libera/#commonlisp - IRC Chatlog
Search
11:14:38
jackdaniel
fare wrote at some point of time that three backquote programmers are the equivalent
11:16:19
jackdaniel
did you have a need for three stars without abstracting it away with a new type?
11:18:35
Cymew
Double pointer? Like an array of pointers pointing to subtables? Kind of basic in so much systems programming.
11:20:11
jmercouris
maybe it isn't /that/ basic, I think you could probably do Lisp for years without needing it either
11:22:36
jackdaniel
and the answer is: no, it is a reader macro, not a special form (it may be implemented as a special form)
11:24:28
jmercouris
I seem to recall phoe teaching me something about not needing to use backticks at all in a defmacro
11:24:31
jackdaniel
backquote is a syntactic sugar for the reader, it is not specified as a lisp form (unlike quote which is specified as a lisp form - also it is not a mere syntactic sugar)
11:24:57
jmercouris
there was some article or something showing how macro functions are just regular functions
11:30:01
jackdaniel
i.e cltl2 appendix suggests an implementation based on a special form but that's not always the case
11:30:24
jackdaniel
reader may simply imlpement semantics described in /the second entry of http://l1sp.org/search?q=%60/ and get over with it
11:33:09
jackdaniel
as of fare-quasiquote it takes one interpretation of the backquote specification (following cltl2 appendix that is /not/ part of the standard) and claims that it is the only correct interpretation
12:20:19
Guest6382
Saw some mention of LEM in the log - is it an acceptable solution for day to day coding?
12:23:48
Guest6382
I can see the benefit - I'm starting to explore building apps in Emacs directly, but having a CL base is better than Emacs to some degree (although you can run CL code directly from Emacs)
13:46:03
coat
phoe: read that you don't use Paredit. how do you manipulate the s-expressions? Say you type (concatenate 'string a b) and then you realize that you want to create a (let ...) expression and put the (concatenate ...) inside (let ...). how do you do that easily?
13:51:50
coat
beach: yes, that works. thanks. I guess I am so used to paredit that human beings have been writing code without paredit too.
13:56:07
coat
err... my last message is screwed up. I meant, I am so used to paredit that I forgot human beings have been writing code without paredit too.
13:56:24
beach
coat: I use only the existing Emacs S-expression functions. There are quite a few of those as you can see.
13:57:50
coat
beach: so long time Lisp programmers like you, how did you avoid using Paredit? almost any Emacs + SLIME tutorial I pick recommends paredit. Even Portacle comes with Paredit enabled. how did you never feel tempted to use Paredit?
13:58:27
coat
beach: was it that you began doing Lisp when Paredit was not popular yet? or you began doing Lisp your own way and never bothered with Paredit because vanilla Emacs itself was sufficient?
13:59:01
coat
beach: okay. makes sense. I found it confusing too. to be honest, I don't use much of paredit anyway. slurp and barf are the only two things I use
14:00:35
coat
phoe: okay. I misunderstood that you never used paredit. have you used paredit? do you like smartparens more?
14:03:19
susam
coat: I have a little mnemonic to remember slurp and barf. C-) is slurp because ) is nice and round like a belly. Thus C-) makes the parentheses grow outwards and consume the next s-exp and put it inside the belly. Nom! Nom! C-} is curly and ugly and barfs out s-exps from its belly.
14:03:50
susam
coat: of course, that is how I started when I used to get confused. Now it is all muscle memory, so I don't really need the mnemonic anymore.
14:06:23
coat
phoe: do you customize rainbow-delimiters colors? the default ones all look very faded and very similar to each other? do you change its colors so that they become more visibile and easy to pair up?
14:12:16
phoe
https://cdn.discordapp.com/attachments/214454452067893250/857261729779679232/Zrzut_ekranu_z_2021-06-23_16-11-54.png
14:13:37
coat
phoe: looks nice. I should also customzie to put bright colors like this. why do you have two consecutive parens inside (cond ...) colored the same? There are two consecutive parens both colored green. Did you decide that? or is rainbow doing that?
14:20:19
coat
Is this the code to customize rainbow-delimiters: (set-face-foreground 'rainbow-delimiters-depth-1-face "#f99") ? Seems to work but want to be sure.
14:24:53
patience_
A strange thing that I expected to work, but then didn't was using a symbol generated by gensym in a macrolet that was nested in a macro: https://pastebin.com/5j961anx
14:29:58
beach
patience_: That happens when you try to use a variable at compile time, but its lexical binding is available only later, at run time.
14:35:33
pjb
patience_: in your case you want to use ,',sym This is a comon pattern in double backquote expressions.
14:41:57
pjb
you may rewrite the defmacro without backquote to better see it. https://termbin.com/imjg
14:42:28
pjb
as you can see, you need to wrap sym in a (list 'quote sym) this is waht ,',sym does when you use backquotes.
14:45:45
patience_
I can see that I was trying to use an unquoted symbol in my macrolet, which means that it was trying to use the value bound to the symbol. Is definitely a tricky thing to hold in the head haha
21:41:38
Colleen
Clhs: special operator load-time-value http://www.lispworks.com/documentation/HyperSpec/Body/s_ld_tim.htm