libera/commonlisp - IRC Chatlog
Search
6:57:32
White_Flame
no, an in-memory stream where you write into it which will store into a buffer, and read from it which will block if the buffer is empty
6:58:45
White_Flame
hmm, sounds like it's a fair bit of overhead for just connecting a stream-reader loop to a writer in the same process
6:59:08
White_Flame
I'm using the zip library, where to compress a file you give it a stream to read
7:02:56
sm2n
Yeah, but for this to make sense you need some notion of multitasking, which is not part of CL
7:09:44
White_Flame
ah yeah, looking at the gray-streams-pipe, that's a proper in-memory buffering solution
7:09:46
EdLangley[m]
It looks like it's attempting to provide something on implementations that don't supply gray-streams
7:11:32
sm2n
right, but what implementations don't have gray-streams support but can also be assumed to run on unix?
7:17:25
sm2n
but this is unrelated and interesting: http://git.savannah.gnu.org/cgit/gcl.git/tree/gcl/doc/format
7:20:01
mfiano
Why would they use the difference #-(or ...) to load a file that uses an implementation-specific reader extension?
7:23:02
EdLangley[m]
It's also interesting that, like clisp, their git repo seems pretty active without ever having a release
7:25:16
EdLangley[m]
All I mean is they don't seem to care about cutting a new release, despite having a more or less continuous stream of commits
7:28:27
mfiano
My understanding is that they is a person and probably only uses it for personal things.
8:39:50
kathe
_death: i read it in passing while going through various articles/blogs/forums about it.
8:41:27
kathe
looks like mcclim, as it's name suggests is an interface-manager that uses gtk+ for widgets.
8:41:33
_death
kathe: it does not.. although old documentation refers to a gtkairo backend, which isn't part of the main branch
8:43:54
_death
kathe: https://github.com/mmontone/clim-doc contains documents on clim.. you can try the guided tour or other tutorials/guides.. probably not a good idea to _start_ with the spec
8:45:13
lisp123w
I don't have any idea of the topic, but I read online that memory safety is important, but I wonder if this is just an issue for languages like C and if CL already solved this problem before: https://news.ycombinator.com/item?id=30091980
8:46:16
_death
kathe: in climspeak, widgets are called gadgets.. here's code for drawing gadgets like push buttons, radio boxes, scroll bars, etc. https://github.com/McCLIM/McCLIM/blob/master/Core/clim-core/gadgets/concrete.lisp
8:46:24
lisp123w
kathe: A very good introduction to CLIM: https://franz.com/support/documentation/10.1/doc/clim-ug.pdf
8:49:40
_death
kathe: there are some videos on youtube talking about mcclim, and you can look at the demos by loading "clim-examples" and evaluating (clim-demo:demodemo)
9:01:56
kathe
in the lisp world, just like in the 'oss' world, everybody is hell-bent on doing their own thing.
9:03:00
kathe
emacs + slime/sly are so well entrenched that even through symbolics/genera had advanced graphical 'ide' systems, there's nothing for the present day common lisp systems.
9:03:44
kathe
i see rainer joswig's tweets about his experiments with graphical integrated development systems for common lisp and get serious heart-burn.
9:04:59
kathe
even though there are so many free common lisp systems, including the 'gpl' one called "clisp", 'gnu' people are hell-bent on developing their own common lisp, and that too a variant.
9:06:26
kathe
i'm taking time out to figure if i really want to go ahead with common lisp or simply learn enough common lisp to understand the "condition system" and "metaobject protocol" based 'clos' and return to the world of smalltalk via squeak.
9:06:45
phoe
or rather just one or a small group of developers who are hacking at it in their free time
9:08:04
White_Flame
lisp123w: yes, it's memory safe. basically, raw pointers aren't exposed and accessing out-of-bounds array indices or using the wrong accessors won't destroy your memory
9:08:05
phoe
you might want to ask on lisp-hug; Libera Chat is kind of more about FOSS implementations
9:11:42
ns12
White_Flame: "yes, it's memory safe" - What if I use a foreign function interface (such as CFFI)?
9:12:03
White_Flame
then that's not lisp, and you're interfacing with & includign non-safe language stuff
9:13:53
ns12
White_Flame: Is the Lisp part still memory safe in the presence of non-Lisp parts accessed through a foreign function interface?
9:16:03
ns12
"no, because the non-safe stuff can trample lisp" - Doesn't this have significant implications, since many Common Lisp libraries rely on CFFI?
9:16:44
White_Flame
ns12: correct, if you pull in a buggy/exploitable non-lisp library, you might have problems
9:17:00
phoe
ns12: in practice, this has as many implications as using these unsafe libraries without Lisp
9:17:23
phoe
you use a library, you get to use its bugs as well, no matter if these are about memory safety or logic bugs
9:18:19
phoe
...unless you can evaluate Lisp code, at which point not only pwn the machine, but can also abuse DX to destroy memory
9:18:41
semz_
Maybe more notable than CFFI (which obviously can't give you much more than the pittance C provides) is safety 0 code
9:18:43
_death
in general, nothing is safe.. there are risks and you can try avoid their triggers, place control mechanisms, or mitigate bad consequences
9:19:15
semz_
which isn't THAT common, but I've still seen (declaim (safety 0) (speed 3)) way too often
9:21:31
ns12
semz_: "it isn't as easy to spot" - Why not? Isn't it a simple matter of using grep to find "(safety 0)"?
9:22:40
flip214
ns12: no, something using mcclim or similar... allowing to click open subcalls and so on.
9:23:34
ns12
semz_: "CFFI dependency is usually documented" - I don't think so. In any case, CFFI would be listed in the ASD file.
9:27:06
ns12
Does the setting apply to everything that I compile, including all libraries and their dependencies?
9:30:52
mfiano
You shouldn't ever declaim optimization qualities at the toplevel anyway. The semantics are not clearly defined.
9:31:58
mfiano
Years ago I remember taking a couple days to find a bug that was due to some library declaiming at the toplevel.
9:32:10
phoe
therefore, after restricting compiler policy, you can e.g. (ql:quickload :jsown) without feeling guilty
9:34:58
phoe
mfiano: I am giving the programmer a choice at https://github.com/phoe/damn-fast-priority-queue/blob/main/damn-fast-priority-queue/src.lisp#L20, not set the defaults for them
9:36:09
mfiano
I already informed phoe of some large optimizations that can be made. I'm not sure if he applied them yet
9:36:09
jdz
I've been playing around implementing a straight-forward pairing heap: https://github.com/jdz/simple-pairing-heap/blob/master/bench.org
9:37:01
phoe
mfiano: not yet, https://github.com/phoe/damn-fast-priority-queue/issues/12 is still there
9:43:35
flip214
scymtym: some UI that allows to trace a function call, and displays the data graphically (X11, McClim).
10:34:17
beach
Although probably all implementations of Common Lisp are safe with high values of the safety quality, the language itself is not as safe as we would like to believe. Hence WSCL.
13:37:43
Demosthenex
anyone seen a simple utility to output lists to yaml, so i can avoid editing yaml ? =]
13:47:09
flip214
with TRIVIA, how would I match (A B C) and (A C)? Can I specify a nothing-pattern in an OR, like (LIST 'A (OR 'B <nothing>) 'C)?
13:47:51
Demosthenex
flip214: i had the impression you couldn't chain tests in trivia because it was macros, not functions.
13:48:13
flip214
Or would I need something like (OR (CONS 'A (CONS 'B #1= (CONS C NIL))) (CONS 'A #1#))?
13:48:50
flip214
the actual example is a a bit more involved, so I'd like to share the part after the optional thing somehow
13:50:02
flip214
well, SATISFIES might be another idea, though not actually better - I wanted to avoid all that CAR CDR EQ stuff
13:53:17
Demosthenex
yeah, i've been tinkering with trivia to use to enforce grammar testing of records, and field extraction. and it appears there is no skip, optional, or wildcard that i can find
14:32:43
phantomics
For Europeans and American early risers: in an hour and a half (at 14:00 GMT) I will be presenting the April compiler to the British APL Association. You can watch it at https://zoom.us/j/858532665 with the passcode 391680
14:33:10
phantomics
This is a presentation for APL users, so will come from a different perspective than my presentation to the CL users at LispNYC
17:33:43
lisp123
Interesting that I haven't seen it used much (maybe I missing it)? ASDF likes to get people to specify the dependencies between files or to use the :SERIAL T option
17:34:53
Bike
you still need that stuff because being in the same compilation unit isn't always enough. most obvious example is that macros need to be defined before they are used in code that's being compiled.
17:34:53
Colleen
Bike: scymtym said 4 hours, 29 minutes ago: the "Minor fixes" pull request for Cleavir is in preparation for the BIR visualizer improvements
17:37:52
lisp123
Bike: Thanks, yes that is true. Although I would tend to be careful around Macros and more liberal around functions (in terms of placing) for that reason
17:40:19
Josh_2
phantomics: Nice talk thanks. Shame that just as you answered my questions I had to leave :(
17:40:49
lisp123
Yeah. I am just on my anti-ASDF phase for now, which I will come around to in due course once my projects become more complex :)
17:40:58
Josh_2
It would be nice to have heard a bit more about how you implemented it, but thats because I am a lisper but you were talking to APL users
17:41:57
lisp123
The automatic finding of files in ASDF is very convenient, but IMO is the root of quite a few of the problems (e.g. versioning)
17:53:10
Guest6628
why are there two common lisp websites? https://lisp-lang.org/ and https://common-lisp.net/
17:53:34
phantomics
Josh_2, have you seen my previous presentation? https://news.ycombinator.com/item?id=24434717 (video linked here, more discussion in the comments)
17:55:00
beach
Guest6628: Nobody controls the number of Common Lisp web sites there can be, so there are probably many more.
17:56:29
beach
Guest6628: The last one is run by the Common Lisp Foundation, but again, anyone can create a Common Lisp foundation, just not another one in the Netherlands.
18:01:12
phantomics
Josh_2: haven't done much APL code generation with Lisp, could be an interesting way to test
18:04:08
beach
Guest6628: I think you may be overthinking this issue. Both sites contain information about Common Lisp. I see no immediate conflicting information there, but I haven't looked too hard.
18:04:13
Guest6628
guidelines for learning the language: the getting started, the documentation, the resources...
18:06:58
foxfromabyss
do BT threads create real threads in terms of overhead? I just need to poll a socket every 15 seconds, and a whole thread dedicated to that seems like an overkill
18:07:30
lisp123
etimmons: ASDF will find / load the first system definition it finds if I understand correctly. If the user was forced to supply the path of the dependency, they could 'lock-in' a particular version. Of course most would favour the ease of use of ASDF, but that automatic mechanism does have these downsides
18:08:18
Bike
foxfromabyss: if you mean operating system threads rather than green threads, that would be up to the lisp implementation, but i don't think any of them use green threads right now.
18:08:19
lisp123
(I guess for large projects with many dependencies that end up sharing dependencies, the ASDF way is much better)
18:09:52
foxfromabyss
Bike i see, thanks. Could you point me in the direction of any more lightweight alternatives?
18:10:04
lisp123
etimmons: If there is a way to force ASDF to load a dependency at a particular filepath, that could be quite useful
18:10:41
lisp123
A lot of beginners also don't understand the ASDF scanning process and how they have to register folders to be searched
18:10:58
Bike
i don't know of any. i think people use thread pools, or maybe poll for that kind of thing
18:12:18
beach
lisp123: I don't think ASDF requires registration. That's something that Quicklisp introduces if I remember correctly.
18:12:19
lisp123
And then I can deliver a repo with all the dependencies being references by relative pathnames
18:13:30
etimmons
lisp123: ASDF has several ways to configure where to look for dependencies. But none of them are meant to be used from an .asd file. That's good in terms of separation of concerns.
18:13:47
lisp123
beach: I think ASDF searches ~/common-lisp by default (and maybe some other folders), but otherwise you need to edit "~/.config/common-lisp/source-registry.conf.d/"
18:14:13
etimmons
If you want to deliver such a repo, tell your users to set CL_SOURCE_REGISTRY=/path/to/repo// and then all your systems (and only your systems) will be found
18:16:47
lisp123
etimmons: Would that override ASDF default search and interfere with the user's use of ASDF for other purposes?
18:17:12
Bike
ccl complains about x being unused in (loop for (x . y) in list do (print y)). is there some way to pacify it? while keeping the destructuring, if possible
18:18:35
scymtym
LOOP treats NIL (or ()) as ignored instead of an empty-list sub-pattern if i recall correctly
18:27:09
lisp123
etimmons & Alfr: Thanks, I did a quick search and didn't find any quick explanation on it. I'll take your word for it of course. But IMO I think if you can make the :depends-on clause to have an option to specify the exact path of the system, it would be much more natural to read and follow
18:28:34
lisp123
Versioning wouldn't be a problem then, and having filepaths in the ASD would be much more readable for many IMHO
18:33:09
Josh_2
but you can just have a single thread that waits every 15 seconds and then checks and stores the result somewhere, that way you dont have the overhead
18:34:42
etimmons
There's been discussion here over the past few days how we can't load multiple versions of the same system (yet, at least)
18:36:08
lisp123
etimmons: On (1) - I see, my understanding was you could have a portability layer (UIOP?) and translate between filepaths on different computers without too much work
18:38:19
lisp123
(2) - I thought about that earlier, and its an issue which ASDF's current approach solves best. But you could leave it to the writer of the main system (e.g. me in this case), to go through each of the dependencies, and ensure they are compatible and specify the paths to the common dependency
18:38:56
EdLangley[m]
lisp123: I think you're overthinking this, "version compatibility" is not a huge issue in CL at the moment
18:40:33
EdLangley[m]
And my experience is that other languages have a huge problem of getting people used to the idea of not updating
18:41:17
EdLangley[m]
If you're always upgrading all the time, the work is significantly more manageable.
18:41:39
lisp123
EdLangley[m]: Actually it doesn't affect me much. But something does sit off with me on not being able to specify a path to a particular dependency. Like, reading (load "/new-sass-idea/make-money.lisp") is a natural way of thinking about loading files, but with ASDF, I have to learn about how the process works
18:42:31
etimmons
lisp123: But what if your "main" system uses a system that thinks _it_ is the "main" system and defines paths as well?
18:42:53
EdLangley[m]
For example, there's nothing preventing someone from writing an ASDF component that loads code from an SQLite database
18:43:24
etimmons
IMO there should be no distinction between a "main" system and non-main system. And that's why it's important configuration is decoupled from the system definition
18:44:15
lisp123
EdLangley[m]: Yes, but that's getting too abstract :P Lisp is just an implementation detail of my thoughts ;) Like most people *DO* think in terms of files
18:45:45
etimmons
the short story is that you should really only care about the exact versions of your dependencies when you're delivering something like an application. In that case, you deliver an ASDF config that finds the exact systems you want
18:46:59
etimmons
Also makes it easier for a dev to hack on one of your deps without needing to modify your .asd file to point it to a different place on their filesystem, etc.
18:47:05
lisp123
etimmons: I didn't think of "main" systems at all, perhaps I missed it, but is it an issue if a system definition called by another system definition defines its own paths?
18:49:23
etimmons
And you _can_ mix and match between different versions of the QL dist if you know what you're doing
18:49:27
lisp123
etimmons: I don't deny the 'automatic' approach of ASDF makes using systems much more convenient. But I disagree that you should only care about dependencies if you are delivering an application, some of us will want control from the first step in the process
18:50:30
lisp123
I guess the crux is the though of whether files are an implementation detail or not
18:50:59
etimmons
lisp123: I understand, but the reality is that current CL implementations make that basically impossible.
18:51:25
etimmons
because as soon as your and one of your deps disagree on where a shared dep is loaded from you've got problems
18:54:10
Demosthenex
hrm, i'm trying to figure out how to make trivia:match use my object accessor when it encounters a keyword (ie: compare the keyword to the obj)
18:54:10
etimmons
But that doesn't leak to users of my library and is kept up to date on a semi-regular basis by automated CI jobs