libera/#commonlisp - IRC Chatlog
Search
16:58:59
remexre
am I failing at reading, or does clhs 11.1.2.1.2 not actually state (intern "FOO" :CL) should be an error?
17:04:50
Bike
11.1.2.1 could be read to mean that adding or removing _external_ symbols is not allowed, though
17:15:49
jcowan
The title of that section is actually misleading: it's constraints on the external symbols of the cl package.
17:16:21
jcowan
However, "It also follows that conforming programs can use external symbols of the COMMON-LISP package as the names of local lexical variables with confidence that those names have not been proclaimed special by the implementation unless those symbols are names of standardized global variables" could not hold if you were able to intern arbtirary external names into the package.
17:17:59
jcowan
I really don't think that the spec authors expected the cl package to be anything but immutable.
17:18:15
aeth
If you package-lock CL like in SBCL then you have to have (intern "FOO" :CL) fail or else you can add to it something that you can't then remove.
17:19:08
aeth
polygon-op: no, CL package external symbols are undefined behavior if you treat them as if they are not locked
17:19:18
aeth
Which means that portably, you have to treat it like it's locked because it will be in some implementations
17:20:06
aeth
So for you, the Lisp program/library author, you have to treat it as if it's locked. Implementations do not, though.
17:20:31
jcowan
As I said, that is all about what you can do with external cl: symbols. There is nothing about creating symbols there.
17:22:30
jcowan
It's a subtle point, the fact that immutable containers and immutable objects in the containers are independent.
17:23:18
aeth
Yes, but for practical purposes, you especially want to lock the internals because otherwise a lot of programs will be written (in-package #:cl) because it's easier than using CL
17:30:39
jcowan
(at least in the old days; Fortran is a pretty powerful array-processing language today, and even has a non-backward-compatible subset called F.)
17:38:04
aeth
I think it limits itself to the externals of COMMON-LISP because it sees the internals of COMMON-LISP as an implementation detail (e.g. do you implement it inside of COMMON-LISP or do you implement it elsewhere and import it into COMMON-LISP before reexporting or both?)
17:38:37
aeth
And messing with implementation internals is, of course, implementation-specific rather than standard.
17:40:10
aeth
It gives you just enough to know that users aren't expected to be able to redefine #'+ into #'*, though, which lets you make assumptions as a macro author.
17:41:25
aeth
Of course, the user might be able to, but now you can get mad at the user for abusing non-portable UB
20:00:34
pve
Hey, are the internals of asdf documented somewhere? Or perhaps a tutorial on how to extend it?
20:10:53
pranavats
There are packages which extend it, such as literate-lisp which also document the extensions. You can take a look at those too.
20:12:18
pve
pranavats: I'm trying to make this work properly: https://github.com/pve1/alphabetical-asdf/blob/main/alphabetical-asdf.lisp
20:14:34
pve
I *can* load systems with it, but I need to make it behave like ":serial t" when modifying files
20:19:51
etimmons
pve: asdf handles :serial t by remembering the previous component and adding it to the :depends-on list for the component currently being processed
20:20:59
pve
etimmons: hmm right, I would have expected (make-instance 'module ... :serial t) to work but apparently it doesn't
20:26:08
pve
etimmons: I had a look at your extension, it looks like it could improve on package-inferred-systems
20:26:15
etimmons
You may have luck extending `asdf::compute-component-children` to define your implicit components and then call-next-method
20:27:05
etimmons
Just be warned that's not exported yet. We're planning to export it in ASDF 3.4.0, so it may change before then, but I doubt it
0:59:00
etimmons
Xach: No, Robert makes the releases. I've just been helping out with the development a lot recently
1:11:25
Xach
http://report.quicklisp.org/2021-07-07/failure-report/arrival.html#arrival - this is representative of a number of failures that all seem to fail in fare-utils
1:11:31
Xach
http://report.quicklisp.org/2021-07-07/failure-report.html has more, though not exclusive to that issue
1:23:23
etimmons
Huh. It kinda looks like it's using the `uiop:define-package` macro from uiop 3.3.5, but using the function `uiop:ensure-package` (which it expands to) from a previous uiop.
1:25:59
Xach
well, i load asdf 3.3.1 explicitly, because that's what comes with sbcl. but i also download UIOP as a project as well.
1:28:03
etimmons
Ah.. I have a theory. Do you reuse the fasl cache between builds of different systems?
1:28:39
etimmons
I think some system A that depends on fare-utils also declares an explicit dependency on uiop
1:29:12
etimmons
So when A was built, that latest uiop was loaded and the fasls for fare-utils include the 3.3.5 define-package expansion
1:30:13
etimmons
but fare-utils has no explicit dep on uiop and the chain starting from arrival doesn't have an explicit uiop dependncy or asdf schedules it after loading fare-utils
1:32:50
etimmons
yeah, that's tricky... uiop is such a useful library, but it's special relationship with asdf can be a pain point
1:33:34
etimmons
If you could convince everyone that uses uiop to explicitly declare it as a dep that'd solve it.
1:35:01
etimmons
I wonder what a world would look like where ASDF had a private copy UIOP with different package names.
1:35:52
etimmons
you just would have to explicitly declare it instead of assuming asdf would magically load it for you
1:36:57
Xach
I think UIOP does more than it needs to to support ASDF - some of it could be add-ons to ASDF, and some of it could be completely separated.
1:37:28
Xach
I remember thinking Quicklisp would be sooooo popular I could "fix" stuff in CL because it would be loaded all the time. I'm glad I didn't try doing that.
2:59:26
Josh_2
So I just made a list in a defparameter with '((nil nil nil) (nil nil nil) (nil nil nil)) then used (setf (elt (first <my list>) 0) <my val>) and it changed the val of pos 0 in all the lists, whats up with that? Doesn't do it when I use (list ..)
3:00:48
beach
Josh_2: The compiler coerced all the lists. They are literals so you are not allowed to modify them.
3:05:05
beach
To elaborate, QUOTE creates a "literal object", and the consequences are undefined if literal objects are modified.
3:09:45
Josh_2
I am trying to iterate over a list, if the list item is nil then output a space, otherwise output the item
3:13:53
aeth
whatever emacs uses internally for text isn't good with long lines... I haven't gotten crashes, but I have had it hang which is basically like crashing it
3:16:16
Josh_2
I used ~#[ .. ] within a ~{ ~} and I guess it wasn't consuming the argument as it just kept outputting to stdout
3:40:39
Josh_2
A lot harder than I thought it would be to conditionally display an element (format t "~{~:[ ~;~:*~A~]~^| ~}~%" row))
3:41:53
Josh_2
now if an element within ROW is non nil it is displayed, otherwise a space is displayed