<pjb>
nij-: then instead of (defpackage "MY-PROGRAM" (:use "CL")) you'd write: (defpackage "MY-PROGRAM" (:use "MY-RULES-LISP"))
<pjb>
nij-: have a look at pseudo-scheme to see how you can implement the scheme rules.
<pjb>
nij-: as mentionned, there's no standard way to change the evaluator (ie. EVAL, COMPILE and COMPILE-FILE). BUT you can either feed the evaluator some changed code like cl-stepper does, thru different macro expansions, OR you can use a different evaluator: write your own MY-RULE:EVAL, MY-RULE:COMPILE, MY-RULE:COMPILE-FILE, and the functions that call them such as MY-RULE:LOAD, and use them instead of CL:EVAL, … CL:LOAD.
<pjb>
nij-: note: this is a common occurence, for example, CLIM defines its own objects and methods. A clim application (:use "CLIM") instead of "CL", and you get clim:defmethod instead of cl:defmethod, etc.
<pjb>
Hmm, in McCLIM, there's both a CLIM-LISP and a CLIM package, that re-exports most of CLIM-LISP stuff.
<pjb>
So, yes, it should be CLIM-LISP, not just CLIM.
azimut has joined #commonlisp
orestarod has joined #commonlisp
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 268 seconds]
Oddity has quit [Ping timeout: 252 seconds]
MajorBiscuit has joined #commonlisp
MajorBiscuit has quit [Ping timeout: 252 seconds]
random-nick has joined #commonlisp
rainthree has quit [Ping timeout: 252 seconds]
<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.
<dirtcastle>
how to remove arch linux's sbcl and install it manually from source.
<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.
Dynom_ has joined #commonlisp
Dynom_ is now known as Guest4085
dogfite has joined #commonlisp
<jackdaniel>
the package CLIM exports CLIM symbols, CLIM-LISP is a drop-in replacement for the package COMMON-LISP
<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.
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
<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.
<AadVersteden[m]>
I have extra/sbcl installed and it seems to work fine for me, but I'm not running stumpwm.
<AadVersteden[m]>
(good choice though)
<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.
<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".)
<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.
lisp123 has joined #commonlisp
<pjb>
and the C processor #line are hardly enough.
<jcowan>
It's good enough for the errors that batch compilers typically generate.
rainthree has joined #commonlisp
jmd_ has quit [Ping timeout: 240 seconds]
beach` has joined #commonlisp
beach has quit [Killed (NickServ (GHOST command used by beach`!~user@2a01:cb19:150:3400:5a66:cb04:381d:b708))]
beach` is now known as beach
lisp123 has quit [Remote host closed the connection]
pjb has quit [Read error: Connection reset by peer]
<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
nij- has quit [Ping timeout: 244 seconds]
dBc has quit [Quit: leaving]
antoni has joined #commonlisp
antoni is now known as antoszka-r
Nilby has joined #commonlisp
<Bike>
although it is not standardized and accessible in the same way as it is in racket
<seok>
shinmera:thanks
trocado has quit [Ping timeout: 252 seconds]
nij- has joined #commonlisp
<contrapunctus>
Package SHINMERA does not exist.
antoszka has quit []
antoszka-r is now known as antoszka
causal has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
shka has joined #commonlisp
<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.
<Bike>
oh so by "frontend" you're talkinga bout like a superblub frontend, not necessarily the racket frontend.
nij- has quit [Quit: Using Circe, the loveliest of all IRC clients]
<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.
<jcowan>
So the Racket front end *is* a Superblub front end: there is no real difference.
<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.
<jcowan>
s/Racket/Racket-language
<jcowan>
or more accurately into the result of applying datum->syntax to (%app + 3 4).
<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).
<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.
<Bike>
uhhuh. so the syntax objects are a bit like CSTs, although CSTs don't have any of the hygeine stuff
<jcowan>
What are CSTs?
<random-nick>
concrete syntax trees
<jcowan>
Ah. Yes.
glaucon has joined #commonlisp
tyson2 has joined #commonlisp
<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
jmdaemon has joined #commonlisp
<jcowan>
You'd want to start with Fare's hygienic macros, I think.
<jcowan>
(or maybe they are someone else's, I am not sure)
ttree has joined #commonlisp
cosimone has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
NotThatRPG_ has joined #commonlisp
NotThatRPG has quit [Ping timeout: 240 seconds]
karlosz has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #commonlisp
karlosz has quit [Ping timeout: 245 seconds]
azimut has quit [Ping timeout: 268 seconds]
pjb has joined #commonlisp
azimut has joined #commonlisp
pmwals091 has joined #commonlisp
azimut has quit [Ping timeout: 268 seconds]
glaucon has left #commonlisp [#commonlisp]
notzmv has quit [Ping timeout: 268 seconds]
karlosz has joined #commonlisp
azimut has joined #commonlisp
livoreno has joined #commonlisp
karlosz has quit [Quit: karlosz]
jmes has joined #commonlisp
<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?
rainthree has quit [Ping timeout: 240 seconds]
cosimone has quit [Remote host closed the connection]
<pve>
someone more knowledgeable may correct me, if necessary
<yitzi>
jmes: You can pass any keyword parameter to make-instance. INITIALIZE-INSTANCE and others all have &allow-other-keys.
waleee has joined #commonlisp
<Shinmera>
That's not true.
<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.
<yitzi>
Thanks for the clarification
cosimone has joined #commonlisp
Guest4085 has quit [Quit: WeeChat 3.6]
<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.
pmwals102 has joined #commonlisp
pmwals091 has quit [Ping timeout: 245 seconds]
sjl has joined #commonlisp
orestarod has quit [Quit: Leaving]
<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 !
<pjb>
So you should be able to pass any &key argument to make-instance.
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
tyson2 has joined #commonlisp
pmwals102 has quit [Ping timeout: 245 seconds]
<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.