libera/#commonlisp - IRC Chatlog
Search
12:53:52
shka_
hello, I need a sbcl (I think?) tip, i defined type "extendable-vector" that requires type to be array, have a fill pointer and be adjustable
13:35:04
shka_
pfdietz: notice how test1 will give 2 notes about simple-array possibility while test2 will give 0 notes
13:35:52
shka_
i find it weird because SBCL does not have adjustable-arrays that are also simple-arrays
13:36:45
shka_
furthermore, adding (assert (array-has-fill-pointer-p vector)) in the test1 will also remove notes
13:37:28
Bike
shka_: you mean notes like "can't optimize because it's not a simple array"? I think if you expressly declare it's not a simple array those notes are suppressed
13:37:58
Bike
and sbcl might not be smart enough to use satisfies types to figure out array complexity
13:38:22
shka_
Bike: no, notes are about sbcl having to check if vector is a simple-array, however type in the SBCL at least means: not a simple-array
13:40:31
jackdaniel
it is undefined whether simple-arrays are adjustable, it is conforming for them not to be
13:41:23
jmercouris
anyone know of a project like backward-parenscript (https://github.com/bhyde/backward-parenscript) but is complete?
13:42:01
shka_
anyway, thanks all for the assistance, maybe sbcl will be able to figure out constraints based on satisfies
13:42:53
shka_
Xach: nah, it just says list conditions that implies that array is expressly adjustable
13:43:02
jmercouris
pjb: could you expand on that? have you used it to transform JS into parenscript?
13:43:19
jackdaniel
if it is not expressly adjustable, not yada yada and yada, then it is => simple-array
13:43:29
pjb
jmercouris: and without batteries included; yes, I used this a long time ago to turn JS into parenscript.
13:44:02
Xach
I was referencing this: The type of an array that is not displaced to another array, has no fill pointer, and is not expressly adjustable is a subtype of type simple-array.
13:44:27
jmercouris
perhaps it'll be a good starting point, and it will just require a bit of tweaking
13:44:28
jackdaniel
Xach: right, but it is not said, that array which is displaced or has a fill pointer or is expressly adjustable is *not* a subtype of type simple-array
13:48:47
jmercouris
does quicklisp download all of the software from its sources or is a copy made on some sort of quicklisp server?
13:49:44
jmercouris
so basically I imagine you would have just about every important CL project since then
13:50:53
jmercouris
Xach: is there a way to download every single repository available on quicklisp and to have them ready to be quickloaded even when offline?
13:51:24
Xach
jmercouris: sure. (map nil 'ql-dist:ensure-installed (ql-dist:provided-releases t)) iirc.
13:52:23
Xach
jmercouris: it will download and unpack archives but not load them into the running system.
14:27:55
jmercouris
what would have to change to allow multiple versions of the same library to be quickloaded?
14:28:32
jmercouris
something to change all of the symbols and provide some version specific accessor to them?
14:29:01
jmercouris
I'm just interested purely from an academic perspective, Ie have no need to do this practically
14:35:13
Bike
well, there'd have to be some way for them to bind symbols with the same name and package to different things. so either some kind of transparent package renaming or environments, probably.
14:35:18
pjb
jmercouris: the common resource are the package names, keywords, and global (special) CL variables.
14:39:01
beach
jmercouris: I didn't invent the term "environments". It is in the Common Lisp HyperSpec already.
14:39:18
beach
What I did was to turn them first-class, which the Common Lisp HyperSpec does not require.
14:40:03
beach
Lisp has a long history of spreading out the global environment everywhere in the system.
14:40:35
beach
No, but it would require the creators of Common Lisp systems to invent what I only just did.
14:41:19
jackdaniel
clhs was already enormous in scope when it was written (and I think they were running out of money); adding new features would be, well, unwise
14:41:27
beach
And I am guessing the creators of the standard did not want to burden the suppliers of Common Lisp systems with that extra requirement, especially since they didn't know how to make the feature efficient.
14:42:19
Bike
it's kind of hard to answer questions about why something wasn't invented earlier than it was.
14:42:25
jackdaniel
beach: yes, my point is that even for "normal" features that would be unwise, inventing new stuff even more so
14:42:37
beach
So, since the vendors were members of the committee that created Common Lisp, they did not consider making it mandatory.
14:42:48
jmercouris
Bike: sometimes yes, sometimes no. For example, why wasn't the light bulb invented in 1000BC? Because many pre-requisite technologies and knowledge was missing
14:43:32
beach
jmercouris: It isn't expensive if you do what I do. But previous proposals required a hash-table lookup for each function application. Whereas the tradition was to access a slot in the symbol.
14:46:03
beach
jmercouris: With my proposal, calling FDEFINITION or FBOUNDP with a non-constant argument still requires a hash-table lookup.
14:47:06
beach
A function call is just a few instructions, adding a O(1) lookup that may require hundreds of instructions and several memory accesses is out of the question.
14:48:08
beach
jmercouris: You have the pointer to the symbol. You access the function slot, then the entry point of the function. You set the arguments, and then do a CALL instruction.
14:49:57
beach
Notice that they allow for all the different global environments to be one and the same.
14:51:35
beach
jmercouris: What I did was just to have the function slot disembodied. So my call protocol looks the same with a small difference: You have a pointer to a cell. You access the contents of that cell (the function object), then the entry point of the function. You set the arguments, and then do a CALL instruction.
14:52:01
beach
jmercouris: They are not guaranteed to be the same, and SICL will likely be the first implementation in which they are not.
14:54:17
Bike
if you understand the method you'll understand that the number of environments doesn't affect the lookup speed.
14:54:18
jmercouris
won't we have to look for the correct symbol among all the environments using the disemodied function slot?
19:57:51
rdh
hello, i am coming back to clisp and hoping someone can help me out (i do not have to much exp with setting it up) but i have quicklisp installed and everytime i run (ql:quickload "cffi"), i get an error but when clisp offers a restart, taking the option "Retry finding system cffi after reinitializing the source-registry" cffi loads fine.
19:59:34
rdh
I do not understand what is going on. is this some thing I over looked setting up quicklisp or a bug with cffi.
20:04:11
jackdaniel
the problem is that asdf broke its api contract. you need to download upstream asdf and (load (compile-file /it/)) before loading quicklisp