freenode/lisp - IRC Chatlog
Search
12:39:43
beach
I would definitely like to see an implementation-independent protocol. Whether some implementations realize it with some FFI code or directly in their Common Lisp code is unimportant, at least initially.
12:40:38
beach
Many standard Common Lisp functions could then be implemented, using this protocol, in a portable way.
12:46:27
beach
Yes, yes, I know. I am always looking for ways to decrease the total maintenance burden for FLOSS Common Lisp implementations.
13:27:20
heisig
jebes: yYou could try McCLIM. Even in its unfinished state, it seems much more pleasant than GTK or Qt.
13:27:50
TMA
jebes: the best gui framework for lisp is not a settled question as of 2018. Great many people prefer McCLIM that is native lisp gui framework, while some prefer interfacing with C toolkits. It needs to be pointed out that McCLIM has its rough edges. But those are being fixed
13:31:51
jebes
that's no big deal, this is more to flex the ol' lispy muscles than make a practical product
13:46:51
smokeink
why not improve on this one directly? https://github.com/robert-strandh/Second-Climacs
13:49:42
smokeink
it looks pretty neat in the screenshots at least https://common-lisp.net/project/climacs/
13:53:06
jackdaniel
fwiw "well text rendering" is not merged yet (no kerning, transformations etc), but PR will be made in a matter of days
13:54:09
jackdaniel
I like the shift of mood from "McCLIM is abandoned" to "many people prefer McCLIM … despite it having rough edges" (comparing to a state from a not that long ago :)
13:55:09
jackdaniel
nb: same thing happened with ecl a few years bag, from "floating dead" to "maintained" or "third preferred"
13:56:11
beach
jebes: In that case, don't work on (first) Climacs. I fully intend to make Second Climacs a much better editor.
14:01:31
beach
carmack: Do you have any particular reason for using CLISP? There are three other Common Lisp implementations that are better supported, and whose maintainers come here regularly.
14:01:41
shrdlu68
Are you using "clisp" as an abbreviation for "Common Lisp"? That creates some confusion.
14:02:14
beach
carmack: Then you need to tell us which of a dozen or so implementations you are using.
14:03:07
minion
carmack: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
14:03:43
beach
carmack: Do you have any particular reason for using CLISP? There are three other Common Lisp implementations that are better supported, and whose maintainers come here regularly.
14:04:36
beach
carmack: If you are new to Common Lisp, you should probably try a better implementation of it.
14:05:12
beach
carmack: Perhaps you don't realize that the Common Lisp language has more than one implementation, and CLISP is not one of the better maintained ones.
14:06:07
beach
carmack: If you want to learn Common Lisp, then there are better implementations than CLISP, so you should try one of the better ones.
14:07:53
jackdaniel
I'm afraid he got hopped with too many answers (competing with each other) and now it is hard to put things together :)
14:08:06
shrdlu68
This conversation is like one of those surreal comedic ones in Alice's Adventures in Wonderland.
14:09:22
minion
carmack: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
14:11:11
carmack
minion: I read that a while ago. Not one example of a more complicated "hello word" I have not worked.
14:11:12
minion
I read that a while ago. Not one example of a more complicated "hello word" I have not worked: An error was encountered in lookup: Parse error:URI "https://www.cliki.net/I%20read%20that%20a%20while%20ago.%20Not%20one%20example%20of%20a%20more%20complicated%20\"hello%20word\"%20I%20have%20not%20worked?source" contains illegal character #\" at position 111..
14:14:12
beach
carmack: One is an implementation of a language. The other one is a language (i.e. a specification of the syntax and semantics of conforming programs).
14:14:23
carmack
Thank you all for your help, I think I will have to make more effort to start writing something in Common Lisp
14:20:29
shrdlu68
Could you record something like that? You'll get concrete help with a concrete demo.
14:33:48
pfdietz
Various kinds of random testing, these days. There's also a conformance test but I don't run that much (others have copies that they use.)
14:34:34
ggole
I assume it's something like generating random expressions and seeing if they produce different results in different implementations or with (speed 3), that sort of thing.
14:34:49
pfdietz
Right now, I have eight threads running with SBCL random compiler tests, about 16 core-days, close to 40M tests.
14:35:16
jcowan
Clisp seems not to need a maintainer so much as a release manager, which is considerably less of a time suck.
14:38:37
pfdietz
I've wanted to compile SBCL with some sort of coverage enabled, but I'm not clear on how to do that. I do want to couple random test generation/minimization to coverage (Waters' COVER package, in particular) to automatically generate minimal coverage-improving test cases for things.
14:40:01
pfdietz
The change to COVER would be to allow coverage info to be checkpointed and rolled back, so tests that improve coverage could be minimized while still improving coverage.
14:40:14
ggole
I've only some experience with random testing, but my experience so far is that it is very easy to lose track of what has been well tested and what has not (and what work to do to bridge the gap)
14:40:57
shrdlu68
carmack: Did you follow the quicklisp set-up guide? https://www.quicklisp.org/beta/#installation
14:41:02
pfdietz
The main purpose of random testing on SBCL is to catch bugs in new development. Older bugs have mostly been mined out, at least in the space that the random tester can see.
14:48:04
shrdlu68
That's because you're running the wrong thing, there's no "(quicklisp-quickstart:setup)" in that doc.
14:51:10
ogamita
carmack: you would need to add (load #P"~/quicklisp/setup.lisp") in your ~/.sbclrc.lisp file.
14:51:56
carmack
I can't figure out what changes have happened. And what is important now. There are old books from 2005. Advise them to read. However, there is also outdated information. In General, somehow it's all depressing.
14:52:39
jackdaniel
carmack: I've suggested you at least twice portacle as a working pre-configured environment
14:54:07
shrdlu68
It appears the book/tutorial you are reading is based on an old version of quicklisp.
14:55:30
jackdaniel
that's what I've meant when I said that too many people jumped in with help ,) I'll back off now. ftr: there is #clschool channel if you want to ask questions in less strict environment (keeping in mind, that my use of word "strict" is vague, snh snh)
14:56:03
shka_
is it acceptable to use #'identity as default that is supposed to do nothing for a &key argument?
14:56:34
ogamita
shka_: nothing prevents you to write a compiler-macro to optimize this case, if that bothers you.
14:56:49
shrdlu68
carmack: Quicklisp is not part of the language, it's a library. Of course it has changed in 8 years.
14:57:22
ogamita
carmack: see: http://informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/aim-8/index.html
14:57:46
shka_
ogamita: it does not bother me, i simply like to see defaults of key arguments as they tend to show valuable information
15:03:23
shka_
difference exists, but i decided that i would rather avoid adding extra code for maintaining this
15:04:11
shka_
also i discovered that sbcl can inline funcall if it knows what function you are trying to call
15:04:33
shka_
so one strategy to handle this is to use trick beach showed for sequences some time ago
15:06:32
jackdaniel
I mean: what did you measure: two versions of the same code one using funcall one not using it? or you have tried to profile funcall itself?
15:09:08
shka_
jackdaniel: i tested different versions of few of my various functions, trying to figure out how much i can save by eliminate needless calls to identity set as :key
15:10:30
shka_
as i said, difference exists, but for "normal" code it is not significant enough to justify extra code to mitigate that
15:13:03
shrdlu68
Xach: Can you figure out carmack's error? He seems to be on sbcl 1.4.11 and just installed quicklisp.
15:13:58
jackdaniel
use one shipped with quicklisp-slime-helper (or check out github for the latest slime)
15:14:16
jackdaniel
slime is emacs mode, swank is lisp server slime talks with (part of the same software)
15:15:28
shrdlu68
Ahh. Christ, someone make a docker image or something for people trying CL out. Shouldn't be this hard.
15:18:31
shrdlu68
jackdaniel: Well he has to get rid of this mysterious /usr/share/emacs swank, right?
15:19:56
jackdaniel
if he insists on configuring things himself, then yes. and after that quicklisp-slime-helper should be quickloaded and .emacs should be adjusted
15:22:07
shrdlu68
carmack: Grab sbcl from github, compile it, then completely uninstall your distro's SBCL.
15:25:47
pfdietz
I always keep several versions of sbcl around. A release one to build with, and a current one built off master.
15:28:09
shrdlu68
carmack: Yeah, remove it and follow portacle's installation guide. That should work.
15:28:23
ogamita
Common Lisp has several implementations. ccl, sbcl, abcl, clisp, cmu cl, corman lisp, allegro common lisp, lispworks, mocl, etc.
15:30:01
Xach
carmack: I worry about that, too, but I've found that even very popular systems have similar issues of getting and properly using the right things to get started.
15:31:27
carmack
shrdlu68: I really hope so, because so far I get negative emotions from the process. But I'll try to handle it.
15:32:12
ogamita
Actually, in the seventies, software system came to newbies all setup by an IT team, or hardwired in a ROM.
15:33:34
shrdlu68
Anyone know of a tutorial that would've made this process more pleasant for carmack?
15:35:23
ogamita
carmack: I've never used portacle. I wasn't a newbie for a long time when it appeared. Tell us, what do you get from portacle?
15:42:25
carmack
(Portacle:12945): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_rowstride: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
15:42:28
carmack
(Portacle:12945): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_n_channels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
15:42:31
carmack
(Portacle:12945): GdkPixbuf-CRITICAL **: gdk_pixbuf_get_pixels: assertion 'GDK_IS_PIXBUF (pixbuf)' failed
15:44:49
ogamita
yeah, that's the problem with portacle and this kind of IDE: they rely on too many dependencies, including GUIs…
15:45:10
ogamita
You'd need a VM image with everything included, and even with that, either it boots or not.
15:46:15
ogamita
to learn how to do (car '(1 2 3)), you just need sbcl, in a terminal. No need for quicklisp and IDEs. At most, add rlwrap.
15:51:24
carmack
ok, so. you guys pretty cool, but it seems to me that I was left alone with his problem
16:02:37
jkordani
https://stackoverflow.com/questions/11869705/gdkpixbuf-critical-gdk-pixbuf-get-width-assertion-gdk-is-pixbuf-pixbuf
16:03:56
jkordani
I mean, the answer suggests that either portacle needs to be built differently, or the supporting libraries it depends on need to be installed differently on the user system
16:06:15
ogamita
carmack: IMO, the problem comes from the fact that you were told to use systems that try to do things automatically for you. Unfortunately, they break (general bit-rot, dependencies version compatibility, etc).
16:06:39
ogamita
carmack: the only solution is that you install yourself the component, by hand, one by one, and that you understand what and why you install them.
16:22:06
kyby64
hi everybody.i want use caveman2 but after create project when i load it with quicklisp i get this error https://0x0.st/slU8.png
16:26:35
Xach
kyby64: that can happen if you use a new version of sbcl with an old version of ironclad/nibbles, I think
16:29:21
kyby64
sorry i dont know what you mean,i'm using sbcl-1.4.13 and i'm reading caveman2 github page
16:30:28
Xach
kyby64: no worries. but i can help troubleshoot if you type the command i gave and tell me what it shows.
16:32:51
Xach
kyby64: ok! that is too old. you can get a new one by using (ql:update-dist "quicklisp")
16:36:01
kyby64
ok after update quicklisp when i want load caveman2 i get this: "NINGLE.CONTEXT" is a package name, so it cannot be a nickname for "NINGLE/CONTEXT".
17:02:44
dim
maybe there are? some companies want solutions that work and are easy to maintain and don't care so much about the programming language that's used to deliver the solution
17:26:03
anamorphic
Is there a loop clause that works for things that are sequences? I found "for foo being the elements of fooseq" works, but I think it's a loop impl specific
17:28:13
anamorphic
So something like (loop with length = (length myseq) for i below length do ... (elt myseq i)) would be the way to go?
17:52:12
aeth
anamorphic: Never use length more than once, ideally on something known to be small. It's O(n) on lists.
17:57:08
aeth
If your loop is simple enough you could have a macro use for ... in ... when it's a list or for ... across ... when it's a vector. If you need to set, you would have to set the car on for ... across if it's a list (if that's not undefined behavior) and use indices for vectors
17:57:55
aeth
anamorphic: Iterate is problematic imo. It is not just a strict superset of loop with s-expressions for clauses
17:59:10
aeth
You would have to learn it (and it has a 40+ page PDF manual) and expect the reader to know it. You also would, apparently, have to use iterate:foo symbols for its clauses instead of keywords
17:59:57
sjl_
You can use keywords with iterate, except for the first symbol. (iterate (for x :from 0))
17:59:58
aeth
I have added writing something like iterate but readable by people who only know loop to my macro todo list
18:00:57
aeth
sjl_: That means that you need to :use iterate if it isn't a symbol in CL (never :use packages) or prefix always or explicitly import those symbols one-by-one
18:02:18
aeth
I'm perfectly happy to start with a keyword in a DSL and, in fact, it helps hint that it is a DSL and not a Lisp macro/function.
18:02:21
sjl_
Sure. That's the point of the package system -- if I extend iterate with an iteration construct (foo ...) and someone else extends it with a different (foo ...), the names don't clash.
18:03:56
aeth
sjl_: One possible solution is to do the extensible part in a clause that begins with keyword and then is followed by a symbol
18:04:20
pjb
(defmacro while …) (defmacro for …) and with do dolist and dotimes, you don't need anything lese.
18:04:35
Bike
saying extensibility is overrated now, in the midst of "how can i use this LOOP extension", is a little odd
18:05:37
sjl_
aeth: ... I'd rather use the package system than invent some kind of inheritance system for loops.
18:06:49
sjl_
And I very much like iterate's extensibility. I probably have 50+ custom iterate driver macros/clauses that save me boilerplate.
18:08:17
aeth
Bike: Outside of LOOP similar super-iteration macros/functions, the solution is simple when extending: write your own macro or higher order function on top of a more basic one, e.g. my do-destructuring-bind macro on top of dolist.
18:11:48
pfdietz
LOOP is so simple a child of five could understand it. Someone please get me a child of five.
18:12:07
aeth
Bike: Even for something that replaces loop, the solution for extensibility might just be to write your own macro/HOF on top of it
18:13:48
Bike
how exactly would you write another macro on top of loop that gives it a new thing to iterate over
18:14:23
aeth
Bike: The only problem with either of my extension solutions (pseudo-inheritance, probably trivially implemented on actual inheritance; or write a macro) is when you want to combine two separate extensions in one iteration construct
18:15:07
aeth
Bike: I'm talking about a superset of s-expressionized LOOP, let's call this hypothetical DO-LOOP
18:37:39
aeth
Someone should write a bot that posts irc://irc.freenode.net/#lisp when someone says "pwd" (with a limit of once every 12 hours so people don't spam it and it only happens to accidents)
20:28:02
anamorphic
Do any of the various documentation utils let you reference an image file (e.g. diagrams) from within doc strings?
20:51:12
jackdaniel
docstrings are strings. you may create a library which can interpret a special syntax, but for CL it will be a bunch of letters anyway
20:53:23
dim
I think anamorphic is asking specifically about such syntax supporting utilities that would read the docstrings etc
21:01:00
fisxoj
it's not markdown, but I've been working on https://github.com/fisxoj/coo that works with docstrings that are restructured text
21:01:31
fisxoj
it's not super usable, yet, I just found https://github.com/eudoxia0/docparser and need to incorporate that
21:29:27
z3t0
How do I go down a line in the slime repl? Pressing enter causes the code to be evaluated
22:59:59
jiby
I'm fighting with string ~basics. Objective is getting regex "[abc]" from list of #\[ '(#\a #\b #\c) #\]
23:01:32
jiby
so I'd need to give it a sequence-of-char? it doesn't like (concatenate 'string '(#\[) char-list '(#\[)) either
0:20:20
no-defun-allowed
what was that program that typeset mathematical equations using boxes and stuff in the terminal?