freenode/#lisp - IRC Chatlog
Search
16:26:06
pjb
theseb: AFAICS, it would be possible to write a CL compiler for DrRacket, so you could !lang cl and be happy for ever?
16:30:47
theseb
pjb: someone implemented python in CL..you may have heard of CLPython... https://common-lisp.net/project/clpython/
16:39:38
Fare
rpg, I ran upgrade tests on what I have and found plenty of failures. I'll analyze the failures and do better.
16:42:08
phoe
MichaelRaskin: your parser seems to work, however it's pretty verbose - the string " does not appear in this chapter;" is represented in code by https://plaster.tymoon.eu/view/1836#1836
16:48:38
MichaelRaskin
Ah right, sorry, I didn't paste that part of the file. Yes, these can be just defined.
16:49:26
phoe
I've defined these two dynavars, but I have no idea how to use that second part of the file just yet
16:54:46
phoe
I get a big string that seems very much glued together without any newlines or anything else - is that the intended result?
17:05:11
MichaelRaskin
AST-eval is _fully_ agnostic, so the fact that the output is a string is just an accident
17:37:45
beach
bitmapper: You were the one who tried the SICL REPL the other day, right? Well, it works again, but it can't do many useful things. You can do things like (car '(a b)) but you can't create generic functions yet.
17:38:15
beach
bitmapper: But I think progress is going to be fast from now on, so check back in a few weeks.
17:41:45
beach
Fare: Thanks. It is till executing in the host Common Lisp system, but it is executing (mostly) SICL code.
18:20:58
theseb
The following returns "(+ 1 2)"......(print ( (lambda (a) a) '(+ 1 2) ) )....Must an eval be added inside the lambda expression "(eval a)" to evaluate a and return 3?
18:27:07
Fare
many of the upgrade failures are actually regular brokenness, as in CMUCL's subtypep being broken my some class redefinitions.
19:12:21
pjb
bitmapper: last time I looked at it, it need ffi4gen, which needs an old apple-gcc-4.2 compiler to be compiled.
20:08:09
pve
I'm experimenting further with some MOP stuff, and SBCL tells me (I think) that it cannot change the class of an instance of standard-generic-function into my subclass. Is it really forbidden or am I missing something?
20:13:46
pve
I think I could manually *move* them one by one, from the old to the new, but that seems fishy
20:14:25
Bike
"Portable programs must not call change-class to change the class of any generic function metaobject or to turn a non-generic-function object into a generic function metaobject. "
20:17:23
Bike
i think you'll have to get the list of methods, call remove-method on each to make them unaffiliated, fmakunbound the name, define the new generic function, and add-method them all
20:40:54
pve
Bike: this does indeed seem to work (first annotation): https://plaster.tymoon.eu/view/1842#1843
20:42:36
Bike
change...class is kind of a problematic name for this, since it doesn't change-class (i.e. preserve the identity of the object)
21:10:52
PuercoPope
Is there a way to splice (,@) outside of quasiquote? I'm trying splice code that is already being spliced (and evaluated at macro-expansion time)
21:11:31
PuercoPope
I'm trying to get rid of the surrounding parentes around write-byte at the end https://gist.github.com/PuercoPop/4e6a1bdb348d032a99261a0f81a84ba8
21:11:50
phoe
PuercoPope: you are most likely doing something wrong if you are working with , or ,@ outside quasiquoted forms
21:18:49
PuercoPope
phoe: yeah, because I haven't commited the code I couldn't link the repo directly. You can find expand-request-reader here https://git.sr.ht/~puercopop/cl-xcb/tree/schemas/src/xcb/schema.lisp#L39
21:19:38
PuercoPope
I still have to fix the non-sense of using expanding into a lambda + funcall. But I'm still early in the PoC phase
22:03:49
ralt
error1 handler is doing a bunch more things too, so yeah, that's why I came to the conclusion "I want handler-bind*" :P
22:08:10
phoe
just :compile-toplevel? AFAIK it is going to make it impossible to use handler-bind* outside of that file
22:11:15
phoe
once you get that, the whole magic drops away, but the macros become easier to write in general
22:15:34
phoe
"The body of an eval-when form is processed as an implicit progn, but only in the situations listed. "
22:19:08
ralt
so AIUI, phoe's point is that given the empty list, it is never processed, and hence shouldn't fail
22:21:10
Bike
but more broadly, i don't think the compiler is restricted to not fail just because the uncompilable code is never executed
22:21:30
Bike
in these cases it's obvious that it's never run, but in general it's the halting problem
22:21:49
phoe
I understand "The body of an eval-when form is processed (...) only in the situations listed" as "no situations, no processing"
22:22:43
Bike
it would be very weird if this is the only place the standard says something cannot be looked at by the compiler at all.
22:24:30
specbot
Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
22:25:25
Bike
in the first case, in the example you gave with COMPILE none of that is relevant since it's not top level.
22:25:59
Bike
fundamentally i don't see what value there would be in restricting the compiler like this
0:04:47
lispmacs
does anybody know if there is a way in GCL to increase the bind stack size. I have a case of bind stack overflow that does not seem to be a problem with the same code in SBCL
0:06:13
Xach
i understand there are some appropriate uses but those users aren't here that i know of
0:07:41
pjb
Well, maximal has been ported to ecl and other CL implementations, so I'm not sure there remains a use fo gcl. At least not until a big effort is made on it.
0:20:11
lispmacs
bitmapper: Xach: pjb: The wxmaxima 20.03.1 package in Guix uses maxima wih gcl 2.6.12. I didn't personally have anything against gcl, but I was just running into this case
0:21:36
MichaelRaskin
Nixpkgs defaults to Maxima on SBCL, and I assume this is not a completely unique decision
0:22:35
lispmacs
but I was still wondering if gcl had a way to adjust bind stack size. I don't really like to stop using a piece of software just because I run into one error
0:23:14
lispmacs
i couldn't find anything on that in the manuals that were installed with it, but maybe I missed something
0:26:04
lispmacs
LdBeth: they are all using sbcl it seems. Maybe that is the answer to my question :)
0:31:08
LdBeth
But usually it means you’re writing wrong code/there’s a bug in maxima than the binding stack limit has been set too low
0:37:39
lispmacs
LdBeth: hmm, yes, I'm thinking that there must be a maxima bug in the code triggering the overflow. Maybe I'll try some code adjustments and see if I can work around it
2:58:51
beach
pjb: A hard question to answer. During bootstrapping, I compile (using the SICL compiler) files containing definitions of macros, normal functions, generic functions, classes, etc. Then I load the compiled files into first-class global environments and the resulting code is executable in the host Common Lisp system (using an interpreter for intermediate code). And I generate native code, but there is no system for that code to
3:01:17
beach
You can say that, yes. I tried turning the intermediate code into Common Lisp code for execution in the host, but the SBCL compiler was unable to handle the size of the resulting code.
3:01:53
beach
So it means I can test a lot of the SICL infrastructure, including the generation of discriminating functions and such, but I can't test the native-code generator yet.
3:04:45
beach
Plus, Bike and karlosz are working on Cleavir compiler optimizations that I have not integrated into SICL yet, but they are part of Clasp now.
3:05:19
beach
And heisig is working on a very nice implementation of the sequence functions, using sealed classes and generic functions.
3:05:59
beach
His functions are portable and they often perform better than the native ones in SBCL.
3:07:23
beach
And scymtym continues to improve Eclector. It is an extremely useful library module now.
3:08:21
beach
Trucler (compile-time lexical environments) is not moving, but appears to be working as advertised. That was also heisig's work.
3:09:37
beach
Coming soon: Extraction of first-class global environments into a separate repository, and a version of PRINT-OBJECT that can be customized by the client.
3:11:56
beach
Coming a bit later: Separate repository of the Cleavir compiler framework, including the representation of abstract syntax trees and intermediate representation.
3:14:57
beach
All those modules are possible to use in order to create a complete Common Lisp implementation. But, most existing implementations can't use them because of the way these implementations are built.
3:14:58
beach
The modules often require the full Common Lisp language, and that is incompatible with the way most Common Lisp implementations are gradually bootstrapped from a subset of the language.
3:15:48
beach
So at some point, I need to turn the SICL bootstrapping technique into something that can be used by other Common Lisp implementations as well.
3:26:37
LdBeth
I’d imagine that if SICL can access host lisp’s functions and data it is already ideal to be used for all sorts of code analysis
3:34:31
beach
But yeah, the Cleavir-based compiler can be customized, so it can be used to turn source code into an abstract syntax tree, using the macro definitions of your choice, including the host ones, if that is what you prefer.
3:35:27
beach
Those macro definitions are just part of a first-class global environment that the compiler works against, so it is even possible to stick (say) ECL macros in such an environment and compile ECL code in SBCL.
3:45:56
LdBeth
I don’t have exact idea, but it seems possible to be used to develop a distributed computing/compiling environment that multiple instances of lisp can sharing compiling environment via network
3:47:32
beach
That sounds possible. But I am not sure what it would be used for. It is also tricky because of compile-time execution, so a lot of sandboxing must be put in place.
3:52:07
beach
Aside from creating a new Common Lisp implementation (i.e., SICL) using these new techniques, another (possibly futile) objective is to convince maintainers of other Common Lisp implementations to use some of these modules, so as to cut down on the collective maintenance burden.
3:53:04
beach
I mean, imagine the possibility of writing compiler optimization passes that will automatically benefit several different Common Lisp implementations.
4:01:43
LdBeth
Yes, the probability to have more aggressive opts with configurability to disable or enable by need