libera/#commonlisp - IRC Chatlog
Search
11:01:59
jcowan
One issue with rewriting code (and this applies both to macros and to run-time rewrites) is that all's well when the input is fine, but a compile-time or run-time error will be given in terms of the transformed code rather than the original code. C and Scheme both have facilities to help with this.
11:10:53
dirtcastle
I want to get stumpwm running. it works but the modules don't work. stumpwm-ql in community package loads properly but I think it's not working as intended.
11:32:12
jackdaniel
the package CLIM exports CLIM symbols, CLIM-LISP is a drop-in replacement for the package COMMON-LISP
11:54:15
contrapunctus
dirtcastle: removing Arch's SBCL is an Arch package management question (which I'm not knowledgeable about). SBCL has binary releases on its website IIRC.
12:17:10
AadVersteden[m]
dirtcastle: if you installed from the AUR you can remove it that way. If you are installing manually because the AUR installation doesn't do what you want, you should be able to build a different release that does do what you want.
12:17:45
AadVersteden[m]
I have extra/sbcl installed and it seems to work fine for me, but I'm not running stumpwm.
12:23:49
pjb
jcowan: granted. The same is true when you compile natively to assembly. Then the debugger could give you assembly and hex dumps. In both cases, meta data is addded to the code, to be processed by a source-level debugger. So it's a consideration to take, and add a debugger for your new language.
12:27:25
jcowan
Racket has the advantage that it doesn't require any such thing: source information is generated by the front end and the compiler believes it. Similarly, a C preprocessor, either cpp or something else, generates lines of the form "# foo.x 32", meaning that errors in the following line are to be reported as coming from line 32 of the file foo.x. (Note that this is not a preprocessor directive: that is spelled "#line".)
12:28:15
jcowan
Granted, debuggers like gdb can't handle just any language: you'd hardly expect them to work correctly with a Prolog compiler, e.g.
14:20:27
Bike
i don't understand how "source information is generated by the front end and the compiler believes it" is different from what most lisps do
16:13:46
jcowan
Bike: Consider the case in which I am translating some language (Superblub) into Lisp in order to execute it efficiently. When a run-time error takes place, it is reported in Lisp terms rather than in Superblub terms. That is very confusing for the user, who needs to be able to understand program faults according to their mental model, which is based on Superblub, not Lisp.
16:14:50
Bike
oh so by "frontend" you're talkinga bout like a superblub frontend, not necessarily the racket frontend.
16:16:16
jcowan
If you write a front end in Racket, you talk to Racket in syntax objects, which carry along with them Superblub-level source information.
16:17:21
jcowan
e.g. (+ 3 4) is translated by the Racket front end into (%app + 3 4), where %app is a special form representing function application.
16:19:16
jcowan
So if your Superblub language is Basic, then sin(x) would be translated into (%app sin (%var x)), whereas rnd is not (%var rnd) but (%app rnd).
16:25:10
edgar-rft
jcowan: of course it's possible to signal Common Lisp conditions containing line numbers from Superblub code, but it's task of the fornt-end to set that up when transforming the code from Superblub to Lisp.
16:25:23
Bike
uhhuh. so the syntax objects are a bit like CSTs, although CSTs don't have any of the hygeine stuff
16:50:51
Bike
i looked a bit at racket while doin csts stuff. something like syntax->datum and datum->syntax could be useful in writing some macros, but that would require some major and nonconforming reorganization of how CL macros work
19:41:41
jmes
Hey folks, when you define an initialize-instance :after method and you give it a keyword parameter, does that mean you would be able to pass that keyword parameter to make-instance?
19:53:29
pve
jmes: that should be the case, see http://www.lispworks.com/documentation/HyperSpec/Body/07_ag.htm
19:56:19
yitzi
jmes: You can pass any keyword parameter to make-instance. INITIALIZE-INSTANCE and others all have &allow-other-keys.
19:58:21
Shinmera
make-instance must error on unrecognised keyword arguments. A keyword argument is recognised if it is a slot initarg, or if it is defined as a keyword argument on an applicable initialize-instance or shared-initialize method.
20:02:56
Bike
yeah it's a bit confusing. they have allow other keys but that's only because make-instance does this special checking instead of the normal checking.
20:27:56
pjb
Shinmera: that's not true; make-instance takes &rest. It passes them to initialize-instance which takes &rest. It passes them to shared-initialize, which has &key &allow-other-keys !
21:00:47
Bike
there is an entire subsection on the CLHS specifically describing how make-instance and co reject keyword arguments. this is not ambiguous. you cannot pass any keyword to make-instance.
21:01:00
specbot
Declaring the Validity of Initialization Arguments: http://www.lispworks.com/reference/HyperSpec/Body/07_ab.htm
21:01:27
Bike
and of course the page on make-instance says "The initialization arguments are checked within make-instance."
21:05:00
Bike
if you're going to try to out-pedant someone please take the effort to ensure you are saying true things
21:17:05
Bike
don't try to play this off with "yes". i am disagreeing with you. someone said something and you tried to correct them with something false.