libera/commonlisp - IRC Chatlog
Search
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
18:58:59
lisp123
I do think the lack of filepaths adds to quite a bit of that initial complexity. But I guess you may not want to enable practices that could cause some issues when systems have many dependencies (as just discussed)
18:59:45
White_Flame
foxfromabyss: if you don't want to use OS threads (which I personally don't see as problematic for your use case), you could also use timers, if your implementation supports them. They can interrupt your code every 15 seconds and do something
20:38:12
pjb
foxfromabyss: just put it in some directory, and have asdf:*central-registry* or quicklisp:*local-project-directories* point to it.
20:38:39
pjb
Changing the name of the system would be in order if you wanted to be able to load both the old and the new library at the same time.
20:41:25
pjb
asdf:*central-registry* let you shadow a library locally for all asdf commands. quicklisp:*local-project-directories* or storing in ~/quicklisp/local-projects/ let you shadow a library locally for all quicklisp and asdf commands.