<Gleefre>
bike: indeed. So yeah, I rewrote the utility so that the macro defined doesn't return its expansion wrapped in anything.
<Gleefre>
But I'm still wondering if it is possible to "fix" MLET to make its macros setfable [ when expansion is setfable ]
<Gleefre>
And the whole point of the macro & setfability is to have some kind of lexical environment at macroexpansion time.
<bike>
what does this macro do, exactly?
loke has joined #commonlisp
<Gleefre>
MLET to MACROLET is kinda like FLET to LABELS
<Gleefre>
If you define macro FOO and have (foo ...) in its macroexpansion, the outer macro will be "applied"
<bike>
oh, i see.
<Gleefre>
With TMLET that I was able to add "true" lexical bindings for user-defined namespaces (for now it is undocumented in a fork of in-nomine: https://github.com/Gleefre/in-nomine )
<ixelp>
GitHub - Gleefre/in-nomine: Utility for creating, accessing, and managing custom namespaces in Common Lisp.
<bike>
wait, no. so tmlet works with setf, right? but that's not mlet?
<Gleefre>
While lisp-namespaces has X-let macro, it is kinda broken - only "last" lexical bindings works, I'd call that subsublexical scope
<Gleefre>
Yes, TMLET works with setf, but is not MLET
<Gleefre>
In TMLET instead of (foo ...) you need to write (,foo ...)
johnjaye has quit [Ping timeout: 255 seconds]
<Gleefre>
FOO will be a local variable holding the name of a macro that is an alias [ that can't be shadowed ] to FOO
<bike>
so in mlet you can use outer macros in the _expansion_ rather than just the expander. oooookay. twisty.
<moon-child>
actually one thing I've always thought would be cute is a setf expander for if. Not saying this would be a good idea, mind. But
<bike>
moon-child: clisp has a setf if, i think. and funcall, progn and locally, looks like
<Gleefre>
bike: yes. I'm not fully convinced that MLET works yet though, as I did not test it a lot; and it (1) uses &environment option (2) is inlining function object into code (but not in the final macroexpansion)
<Gleefre>
I initially came up with another solution that doesn't uses such advanced macrology and still achieves similar effect - although it is less readable
<bike>
i feel like this effect is inherently advanced macrology
<bike>
i can't think of a way to do it that doesn't have macrolet in the expansion...
<bike>
i mean, that is the obvious way
<Gleefre>
I mean, it does have macrolet
<bike>
right but that causes the setf issue
<Gleefre>
But it doesn't use &environment argument, macro-function and inlining function into code
<Gleefre>
bike: no, not MLET. Let me paste it too :)
<bike>
okay i can think of one other way but it's stupid and also wouldn't solve the problem
<bike>
i saw the %macrolet-place business
<bike>
you could also sidestep this crap by lexically binding a setf expander, but there's no way to do that
<Gleefre>
There is not implementation of lexical bindings there, but there is one in #in-nomine's history on my fork (just one commit, then I rewrote it to use MLET and then TMLET)
<Gleefre>
So the trick is to for each version of FOO to define another one with unique name #:FOO-1, and have a "binding" macro NEST-FOO that [1] binds FOO to the current version of FOO - #:FOO42 [2] goes one level down - defines new #:FOO-2, in which FOO references #:FOO-1 [3] macrolets FOO to #:FOO-2 [4] macrolets itself with the FOO in expansion now referencing to #:FOO-2
<bike>
if the point is to have a new namespace of lexical bindings. could you have (xlet ((foo ...) (bar ...)) ...) expand to `(let ((#1=#:foo ...) (#=2#:bar ...)) (symbol-macrolet ((%x-bindings ,(list* (cons 'foo '#1#) (cons 'bar '#2#) (macroexpand-1 '%x-bindings env)))) ...)). and then the accessor is a global (defmacro x (name &environment env) (or (cdr (assoc name (macroexpand-1 '%x-bindings env)))
<bike>
(...global-lookup... name)))
<bike>
i may not be conscious enough for this sort of thing right now
<bike>
then the place (x foo) just expands into a regular variable #:foo which is setfable no problem.
<bike>
my brain kind of bounced off make-let-forms here
<Gleefre>
o.o using &environment like this is tricky
<Gleefre>
I want to try that.
<bike>
using symbol-macrolet to establish your own lexical compile time information is uh, i guess i can't call it "classic", but it's solid in my opinion
<Gleefre>
I see
<Gleefre>
I'll need to remember this
loke has quit [Ping timeout: 255 seconds]
<Gleefre>
But then also - with TMLET accessing local binding also expands into a variable name, so no runtime overhead here
<bike>
yeah i don't actually understand what TMLET would be for, but i can imagine use cases for more namespaces, so i just thought about that part
<bike>
i'm sure there's no runtime overhead for any of this since it's all dizzying macrology
<Gleefre>
Well, with TMLET I'm kinda "constructing" lexical environment - there is switch table consisting of new bindings, and default case goes to the parent environment.
<Gleefre>
So it is very intuitive imho
herjazz has quit [Quit: leaving]
<bike>
it's more the general thing of accessing a parent environment from a child environment past shadowing bindings, which is pretty verboten in the language normally
<Gleefre>
In general [not in this case] - yes, something like this.
<Gleefre>
I wasn't able to find a way to "call"(use) shadowed macro with macrolet before
<Gleefre>
(Although maybe something like that already exists?)
yitzi has quit [Remote host closed the connection]
<bike>
not that i'm aware of
<bike>
even if you are doing it more like a compile time table you can just do the inner macroexpansion at compile time, right? expand my earlier xlet to (let ... (macrolet ((x (name &environment env) (case name (foo '#:foo) (bar '#:bar) (otherwise (macroexpand-1 `(x ,name) env))))) ...))
<bike>
or... maybe that doesn't work
<bike>
yeah, maybe not. bleh.
<bike>
you could still do one of the tricks like expanding into (otherwise (funcall #<OUTER-MACRO-FUNCTION> name env)) like you had. point is the macroexpansion of (x foo) is still just a variable
Lord_of_Life has quit [Ping timeout: 240 seconds]
<Gleefre>
About your "tries" - I don't really understanding what calling macroexpand in macro-expansion code would do...
<bike>
? same thing it always does?
Lord_of_Life has joined #commonlisp
<Gleefre>
Yes, but using it at macroexpansion time kind of feels like trying to write a code-walker
<bike>
that's pretty much what macroexpand is for, outside of debugging
<bike>
if i was writing a code walker there'd be a lot more (case (first form) (progn ...) ...) crap
<bike>
macroexpand takes an environment argument, and the only way to get an environment argument is within a macroexpander (or setf expander, etc.). using it is perfectly natural.
puke has quit [Remote host closed the connection]
<Gleefre>
Well, also the ENV argument is kinda hard to understand I must say
puke has joined #commonlisp
<bike>
it is certainly subtle.
<Gleefre>
As I don't understand it's scope & extent I must say
puke has quit [Max SendQ exceeded]
<bike>
for a simple example you could try (defmacro test (&environment env) `',(macroexpand-1 '%test% env)) (define-symbol-macro %test% nil), and then see what (test), (symbol-macrolet ((%test 4)) (test)), bla bla bla expand to
shka has quit [Ping timeout: 255 seconds]
<bike>
if you mean those in the CL sense, it's just a normal lexical variable, and its extent is the dynamic extent of the macro function (so you can't return or save it). my examples here are pretty simple so they don't cause any problems there
<bike>
but i'm certainly not doing any code walking.
puke has joined #commonlisp
<bike>
i have written code walkers enough that i don't want to do it again
<Gleefre>
I kind of starting to understand how symbol-macro would work as macroexpantion-time local variable...
<Gleefre>
Although it still is weird to see as it is "binded" by emitting code
puke has quit [Max SendQ exceeded]
<Gleefre>
Anyways, do you think it might worth creating a library / adding to an existing one these MLET & TMLET macros? Though they don't have good names and the API is kinda weird.
puke has joined #commonlisp
<bike>
well, again, i don't understand what they would be used for. i'm not saying there isn't a use, i just don't have one
<Gleefre>
Sometimes it feels like it, yeah, but then again, I did wish that it existed a while ago.
<Gleefre>
[ I was trying to emulate TeX's variables iirc ]
seok has quit [Quit: Client closed]
loke has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
dinomug has joined #commonlisp
eddof13 has quit [Ping timeout: 255 seconds]
anticrisis has joined #commonlisp
alip has quit [Quit: The Way is limitless, so nature is limitless, so the world is limitless, and so I am limitless. For I am abstracted from the world, the world from nature, nature from the Way, and the Way from what is beneath abstraction.]
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
<jmercouris>
does anyone know of a slime function like "run function at point"?
<bike>
how would that be different from evaluating a form
<jmercouris>
well let's say I've got a function called (defun fish () (+ 1 1))
<jmercouris>
I just want to have my mouse over fish and hit a key, and get "2" in the REPL
<jmercouris>
I guess it is no different, and it only works for functions without arguments
<jmercouris>
unless you could somehow interactively supply those...
<jmercouris>
you're right, it is a silly idea
loke has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
Oladon has joined #commonlisp
loke has quit [Ping timeout: 255 seconds]
<doulos05>
Will ASDF:SYSTEM-SOURCE-DIRECTORY know the location of an asd file before the system defined there has been loaded?
<doulos05>
I have a 3rd party library (cl-gtk4), I need to load a specific commit of that into my project. So I want to make sure that Quicklisp grabs that folder in project_roots/libs/cl-gtk rather than the default.
loke has joined #commonlisp
robin_ has quit [Ping timeout: 264 seconds]
habamax has quit [Remote host closed the connection]
habamax has joined #commonlisp
edgar-rft has joined #commonlisp
Oladon has quit [Quit: Leaving.]
loke has quit [Ping timeout: 255 seconds]
dcb has quit [Quit: MSN Messenger 4.0.5]
<beach>
bjorkintosh: I would use McCLIM to do GUIs in Common Lisp.
rgherdt has quit [Read error: Connection reset by peer]
mgl has joined #commonlisp
shka has joined #commonlisp
notzmv has joined #commonlisp
dino_tutter has joined #commonlisp
mgl has quit [Ping timeout: 255 seconds]
msavoritias has joined #commonlisp
habamax has joined #commonlisp
Inline has joined #commonlisp
igemnace has quit [Quit: WeeChat 4.0.5]
igemnace has joined #commonlisp
danse-nr3 has joined #commonlisp
anticrisis has quit [Read error: Connection reset by peer]
Pirx has joined #commonlisp
dinomug has quit [Remote host closed the connection]
<Pirx>
good morning
Posterdati has joined #commonlisp
akyv13 has quit [Remote host closed the connection]
akyv13 has joined #commonlisp
attila_lendvai has joined #commonlisp
seok has joined #commonlisp
akyv13 has quit [Read error: Connection reset by peer]
jonatack has quit [Read error: Connection reset by peer]
<danse-nr3>
morning Pirx
jonatack has joined #commonlisp
_Posterdati_ has joined #commonlisp
Posterdati has quit [Ping timeout: 248 seconds]
<Inline>
morning
<beach>
Hello Inline.
simendsjo has joined #commonlisp
seok has quit [Quit: Client closed]
seok has joined #commonlisp
<beach>
danse-nr3: Are you new here? I don't recognize your nick.
karlosz has joined #commonlisp
alphacentauri has joined #commonlisp
<danse-nr3>
yes i am new. Have been lurking in #lisp for a while, then went through libera's channels' list and found this. Nice to meet you all
<beach>
Great! Welcome!
<danse-nr3>
cheers
LW has quit [Quit: WeeChat 3.8]
<beach>
danse-nr3: Are you currently using Common Lisp for something interesting?
LW has joined #commonlisp
<danse-nr3>
not really. Common lisp is the next language i would like to learn, but it might take a long time before i will have resources to invest in a new language. But i do a lot of functional programming, so i am interested in spotting anything related in lisp
<beach>
I see. You might want to know about #clschool if you are a newbie.
<danse-nr3>
i will join that, cheers
<danse-nr3>
(funny, i am at the beach right now)
<danse-nr3>
do you know Christian Pape?
<beach>
I don't think so.
LW has quit [Client Quit]
LW has joined #commonlisp
LW has quit [Quit: WeeChat 3.8]
LW has joined #commonlisp
donleo has joined #commonlisp
Gleefre has joined #commonlisp
<Pirx>
#clschool has a shortcomming: not having "lisp" in the name with all the letters
<Pirx>
if you do //list lisp it won't show
mgl has joined #commonlisp
robin has joined #commonlisp
karlosz has quit [Quit: karlosz]
pve has quit [Read error: Connection reset by peer]
pve has joined #commonlisp
yitzi has joined #commonlisp
danse-nr3 has quit [Ping timeout: 255 seconds]
simendsjo has quit [Remote host closed the connection]
simendsjo has joined #commonlisp
karlosz has joined #commonlisp
rtypo has quit [Ping timeout: 252 seconds]
liminality has joined #commonlisp
liminality has quit [Read error: Connection reset by peer]
liminality has joined #commonlisp
tyson2 has joined #commonlisp
waleee has joined #commonlisp
karlosz has quit [Quit: karlosz]
danse-nr3 has joined #commonlisp
cosmeve has joined #commonlisp
seok has quit [Quit: Client closed]
seok has joined #commonlisp
habamax has quit [Quit: ERC 5.5.0.29.1 (IRC client for GNU Emacs 29.1.50)]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 252 seconds]
zxcvz has joined #commonlisp
rgherdt__ has joined #commonlisp
seok has quit [Quit: Client closed]
seok has joined #commonlisp
wonko-the-sane has joined #commonlisp
karlosz has joined #commonlisp
rgherdt_ has quit [Ping timeout: 240 seconds]
karlosz has quit [Client Quit]
karlosz has joined #commonlisp
Posterdati has joined #commonlisp
karlosz has quit [Client Quit]
_Posterdati_ has quit [Ping timeout: 240 seconds]
karlosz_ has joined #commonlisp
karlosz_ has quit [Remote host closed the connection]
karlosz has joined #commonlisp
karlosz has quit [Read error: Connection reset by peer]
karlosz_ has joined #commonlisp
karlosz_ is now known as karlosz
zaymington has quit [Remote host closed the connection]
karlosz has quit [Client Quit]
zaymington has joined #commonlisp
rgherdt__ has quit [Remote host closed the connection]
rgherdt__ has joined #commonlisp
karlosz has joined #commonlisp
karlosz has quit [Client Quit]
igemnace has quit [Read error: Connection reset by peer]
<bjorkintosh>
thanks beach. I was playing around with it last night.
<beach>
Oh, good!
<beach>
There is a #clim channel with lots of helpful people participating.
<bjorkintosh>
been there for ages already.
<beach>
I think I knew that. Sorry.
jonatack has quit [Read error: Connection reset by peer]
jon_atack has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
<bjorkintosh>
no worries. I just don't say much there.
amb007 has joined #commonlisp
<bjorkintosh>
Its on my list of things within the CL world to learn properly.
<beach>
Sounds like a good plan.
<bjorkintosh>
yes quite. Make Lisp Machines Great Again!
<beach>
Sort of, yes.
igemnace has joined #commonlisp
<bjorkintosh>
I'd like that very much.
karlosz has joined #commonlisp
dinomug has joined #commonlisp
wonko-the-sane has quit [Ping timeout: 252 seconds]
dinomug has quit [Remote host closed the connection]
Gleefre has quit [Remote host closed the connection]
Gleefre has joined #commonlisp
karlosz has quit [Quit: karlosz]
waleee has quit [Ping timeout: 240 seconds]
cage has joined #commonlisp
waleee has joined #commonlisp
wonko-the-sane has joined #commonlisp
pve has quit [Read error: Connection reset by peer]
pve has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
easye has quit [Remote host closed the connection]
easye has joined #commonlisp
<beach>
bjorkintosh: But we need to do better. At the time, there were no Internet threats to speak of.
<bjorkintosh>
well of course. it was a machine of its era.
waleee has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
wonko-the-sane has quit [Ping timeout: 252 seconds]
bendersteed has quit [Quit: bendersteed]
dcb has joined #commonlisp
jello_pudding has quit [Ping timeout: 258 seconds]
jello_pudding has joined #commonlisp
danse-nr3 has quit [Ping timeout: 255 seconds]
dinomug has joined #commonlisp
danse-nr3 has joined #commonlisp
shka has quit [Quit: Konversation terminated!]
dino_tutter has quit [Ping timeout: 252 seconds]
danse-nr3_ has joined #commonlisp
karlosz has joined #commonlisp
danse-nr3 has quit [Read error: Connection reset by peer]
shka has joined #commonlisp
mdaadoun has joined #commonlisp
liminality has quit [Ping timeout: 252 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
ebrasca has joined #commonlisp
jonatack has joined #commonlisp
jon_atack has quit [Read error: Connection reset by peer]
dino_tutter has joined #commonlisp
lispmacs[work] has joined #commonlisp
<lispmacs[work]>
hi, is ANSI common lisp available as an INFO reference manual (or similar?) I was trying to learn common lisp and SBCL at the same time, but the included SBCL doesn't document the ANSI functions, apparently
<lispmacs[work]>
ideally I like to just work through an info manual from inside Emacs
<edgar-rft>
lispmacs[work]: short answer: yes, more than one :-) but must dig for the links, may take some minutes
<lispmacs[work]>
edgar-rft: okay, thanks
<Gleefre>
AFAIK sbcl does provide docstrings for most symbols in CL package. You can use DESCRIBE or DOCUMENTATION from the repl to see them.
<Gleefre>
Like this: (describe '+) or (documentation '+ 'function)
<bjorkintosh>
lispmacs[work], the hyperspec?
<lispmacs[work]>
the one at lispworks.com? is it only available as a Web page?
<lispmacs[work]>
I was hoping for an info manual
<lispmacs[work]>
like, e.g., the elisp reference manual
<bjorkintosh>
in the interim, you can browse the hyperspec via the built-in emacs browser.
<bjorkintosh>
it's just another buffer.
<bjorkintosh>
I understand what you mean, however.
<lispmacs[work]>
bjorkintosh: I don't think EWW handles completion and navigation as nicely
<lispmacs[work]>
helm mode with info manuals is pretty nice
Brucio-61 has quit [Remote host closed the connection]
<lispmacs[work]>
but I could give that a try if that is the only option
<edgar-rft>
lispmacs[work]: the search engine word is "dpans2texi.el", there are severaly github accounts holding the source code but there were ready-made info files for download somewhere, also old versions of GCL (GNU Common Lisp) came with info manuals of dpans3 (last draft version before the final ANSI spec)
<lispmacs[work]>
hmm, wonder what is the fastest route here. Looks like GCL is available as a package on my system
<bjorkintosh>
have you tried the dpans2texi process already?
<lispmacs[work]>
bjorkintosh: no. Is the script fully contained or am I going to need to hunt down dpans sources?
<bjorkintosh>
It should just work. (famous last words)
<lispmacs[work]>
...80 minutes later, still trying to get the script to work...
<lispmacs[work]>
I saw that link to just download the info files but looks like the 10 year old FTP link is dead
<bjorkintosh>
I did it recently and thought the process should be automatic as I was doing it.
<bjorkintosh>
I'd have to retrace my steps.
<edgar-rft>
lispmacs[work]: Xach Beane's Github account has all TeX sources plus the scripts if you really want to build it yourself -> https://github.com/xach/dpans
<ixelp>
GitHub - xach/dpans: The Common Lisp draft proposed American National Standard
<bjorkintosh>
had the exact same thought: the hyperspec should be an info file in emacs.
<lispmacs[work]>
Okay, well, I think I'll just give this dpans2texi thing a try and see what happens
<edgar-rft>
error: the link to Xach Beane's Github accounts has only the TeX sources :-(
cosmeve has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<edgar-rft>
here's a Github link with texinfo sources compiled from the TeX files, but I have no idea about the quality -> https://github.com/krdzo/ansicl
<ixelp>
GitHub - krdzo/ansicl: Texinfo source of the draft ANSI Common Lisp standard (dpANS)