freenode/#lisp - IRC Chatlog
Search
3:24:28
aeth
I know how to make Common Lisp more popular... https://gitlab.com/mbabich/lisp-hello-world/blob/c45deaab9918285d3de43c52340100fef6591d15/main.lisp
3:28:05
aeth
And yes I'm calling this the worst hello world for Common Lisp even though my previous one was (#4f(+++++++++[>++++++++<-]>.<+++[>++++++++<-]>+++++.+++++++..+++.>++++[>++++++++<-]>.<<<+++[>--------<-]>.<+++[>++++++++<-]>.+++.------.--------.>>+.<++++++++++.))
3:34:31
beach
Bike: In SICL, CONS cells are not represented the same way as other objects. They are a special case.
3:38:45
koenig
I am not deeply knowledgeable in Common Lisp, so it is always interesting to me to see code like that. I learn a lot.
3:40:42
koenig
My Common Lisp learning for today was finding out that defun is not in fact a special form.
3:42:10
beach
Typically expands to something like (setf (fdefinition <name>) (lambda (<parameters>) <body>))
3:43:11
koenig
Indeed, I was also educated about that. Connecting it to the syntactic sugar of how to implement Scheme's function define was helpful.
3:44:03
koenig
The peculiar thing to me is, I know a fairly good amount of computer science. But Lisp is something that I keep unraveling more and more and more.
3:45:15
White_Flame
but the handling of code & data interchangeably also has a lot of overlap with compiler technology and transforms
3:45:59
koenig
I've also written some simple CL macros. But I have to think mindfully about it when I do.
3:48:08
koenig
Well you all are very encouraging! Thanks for that. I'm headed to sleep now and will learn more Lisp magic tomorrow. :)
4:37:15
pjb
Yes, when you write macros, you have to mind two states at once: the state of the macro itself (macroexpansion time), and the state of the expansion (run-time). At least. Some macros have 3 or 4 levels!
7:02:41
no-defun-allowed
in the press conference, Steele said he was very pleased with the new support in CLtL3 for segfaulting, infix notation, manual malloc/free and hygenic macros
7:09:12
aeth
shka_: no... https://gitlab.com/mbabich/lisp-hello-world/blob/c45deaab9918285d3de43c52340100fef6591d15/main.lisp#L6-7
9:35:26
no-defun-allowed
It really is not hard to remember `dQw`. Then you only have a 1 in 32768 false positive rate (if YouTube uses base32 IDs).
9:38:21
pfdietz_
koenig: defun being a macro means you can play games with *macroexpand-hook* to intercept and modify defun forms, without having to modify the source code in question. Quite useful in some situations.
9:39:38
no-defun-allowed
Given defun usually expands to some implementation-dependent stuff, I would expect implementations do not have to use macros for stuff like that...
9:40:02
aeth
Option A: write your own defmacro wrapper that expands into a defun. Option B: Use *macroexpand-hook* to intercept defun forms
9:43:32
aeth
I have temporarily modified the source of functions in Quicklisp a few times for debugging (technically that's not even necessary, just being in the right package is, afaik), so the situations where Option B is required must be really rare.
9:45:11
pfdietz_
aeth: the situation is where one is writing tooling that applies to other people's code.
14:04:14
schweers
I have a question regarding restarts on sbcl. I have a funcion which contains the following code: https://pastebin.com/W7gipV0A
14:05:10
schweers
I get a warning, that something could not be stack allocated. Can anyone tell me how I might find out what this is about?
14:07:14
schweers
Yeah, I gathered that. But I’m not sure what is to be allocated on the stack. I also only get this on restart-case.
14:07:39
schweers
I guess that a closure has to be allocated, but I’m not sure if that is what SBCL is complaining about.
14:09:07
schweers
what wonders me is that I’m not compiling with optimizations which (to my mind) warrent such a note.
14:10:18
Bike
restart-case expands into something that makes several closures, and sbcl will try to stack allocate them because there's no reason not to
14:11:08
schweers
I compiled under these settings: (declaim (optimize (speed 0) (safety 3) (compilation-speed 0) (debug 3)))
14:11:42
schweers
Bike: I wouldn’t have been surprised if this had happened under aggressive settings. I probably would have just ignored it then. But now I am wondering.
14:19:21
Bike
don't think you need to worry about it, regardless. though i'm not sure why it can't stack allocate this
14:25:44
beach
I have the same "problem", and it is not that I worry about anything, but the notes are irritating, because each time I jump and think I might have a warning.
14:30:39
schweers
beach: That is precisely the reason why I’m asking this question. It seems I’ll just have to live with it.