Thank you very much for this video. I learned more about lisp and lisp macros from this 1.5 hour video than I could learn within days by browsing and googling.
The final part, with macros writing compiler macros and all that jazz was way over my head. But man, it was fun! And very instructive. Good job Mr Baggers!
That's lovely to hear! I'll have to have another go at it some time, is really like to go through it at a nice pace. Would be cool to organize a time when more beginners can tune in and fire off lots of questions :)
These videos are excellent! just about every other lisp video I've found is either beginners only or very high level. This practical approach is refreshing :)
Thank you, mister Baggers, and hope you are doing well. Let me reveal here my egocentric nature and wish you to come back soon ( or late ) with new videos about everything. For those who watched this video recently and have the time and the desire to explain to me about the dispose macro and why we have (var ... ) as parameter? And just simply pass x? I tried to talk with my new friend GPT but he isnt very talkative about this subject. Sorry if I am missing something obvious and thanks for those who hopefully will answer! Cheers for the great channel and community!
Fantastic explanation! Are you still doing these? I would love to see a video explaining conditions and restarts, especially how they would be used in a larger/production system. Thanks for the amazing Lisp content!
Thanks for pointing out alexandria:symbolicate function, now i can stop doing intern manually. :-)
6 ปีที่แล้ว +4
Thanks for this video. I generally understand macros, or their idea. I am currently reading On Lisp and after that probably Let Over Lambda, so i will know more afterwards. My current issue (i guess it is a general beginner problem) (maybe reading this books will solve it) is that i don't recognize from my task at hand that i should use macros. Like a human language, i passively understand them (i see what they do), but i cannot actively express my self with them. Coming from Python (well any other language) i just don't think that way. I try to solve things only with functions, because i know how to solve things with functions. Also maybe my toy projects are too simple, so no one sane would use macros at all. So a video about recognizing when i want a macro would be awesome. And since i think that such a video would take 10 hours, it would be maybe more helpful to just point at some libraries/projects, where and why they use macros.
The way I've looked at it is whether I want to control evaluation or not, since with a function, the arguments to it get the standard evaluation treatment, whereas with a macro, you decide when arguments get evaluated. Though, from looking at a video from Gavin Freeborn, it seems there's a performance consideration, as well, since as he seemed to express it, macros are pre-compiled evaluation templates. He said rather than explicitly using eval, for situations where you need that, it's better to use a macro, for performance reasons. That's a shift in thinking for me, because I've been using macros for defining new constructs, but that's it. I've had some situations that are just "for this problem" where I've used eval. He seemed to say, "As a rule of thumb, find a way to use a macro instead" for those situations.
Re. compiler macros - I see now you implied this by showing different scenarios, where the macro could be used, and where it couldn't, and then having a function alongside the macro, so that all scenarios were satisfied, but when I first saw your video (I'm watching it for a second time), I was confused about just how the compiler decides to use the macro. I see now that it uses context. I think the only improvement I would've made to your presentation is if you'd just added a note saying that, because I kept feeling like I'd missed some directive you put in that told the compiler when to use the macro.
1:52:00 I don't understand why we still keep the topmost ecase with the destructuring-bind around in the macro, has that not become obsolete with the generated defuns (assuming there will be dispatch code)? edit: oh, because the dispatch code is a compiler macro, which is optional.
Hi Baggers, first of all I want to thank you and congratulate you on this amazing series of "A little bit of lisp". It has taught me so much and it's being so incredibly helpful. You are a great teacher and these shorter videos format that you have been using is great because it is concise and to the point so we don't get bored and feel very productive. I'm somewhat new to coding and I really like this macros video, as it has been my really first contact to with them. I've previously avoid/ignore/feared them but now I have a better idea for what they are and how to use them, so thank you again. I have however a question. It's probably something very obvious and basics do I appologize for that. My question is, why do you put and @ in front of body in the minute 37:16? You write ,@body but you don't put the @ in the other variables. Thank you so much!
That's explained in the bit about quasiquoting. Basically, `(1 2 ,(list 3 4 5) 6 7) evaluates to (1 2 (3 4 5) 6 7) and `(1 2 ,@(list 3 4 5) 6 7) evaluates to (1 2 3 4 5 6 7), i.e. the values in the resulting inner list are inserted into the outer list.
At 25:18 you mention a previous video on quasiquoting -- I've looked all over and can't find it. Would you mind posting a link? Nested quasiquotes are killing me!
> performance improvements I've heard SBCL itself is pretty performant compared to a lot of other "modern" languages. Maybe CLASP might interest you: github.com/clasp-developers/clasp
It's certainly is for a dynamic language and, when you give it enough information (like type declarations etc) it can go toe to toe with a good few more. In the end it's about what the spec and user allows a compiler to know, some optimizations that would be easy for c++ compilers are just hard to impossible for lisp compilers. Clasp is cool and leverages llvm so it has the potential to benefit from all that work, however is still subject to these same limitations. Fun to see where this all goes though!
These are great. Nice service to the Lisp community.
Thanks man!
Thank you very much for this video. I learned more about lisp and lisp macros from this 1.5 hour video than I could learn within days by browsing and googling.
Seriously awesome content, thanks so much for putting this stuff out!
Congratulations.Amazing explanations.The best lisp series-tutorials you can find.
Hey man, you're so good at explaining things and you have such a nice persona. Thanks for being awesome, and for sharing that awesomeness with others!
Wow, thank you for the kind words. Thanks for watching and I hope you're having fun lisping!
The final part, with macros writing compiler macros and all that jazz was way over my head. But man, it was fun! And very instructive. Good job Mr Baggers!
That's lovely to hear! I'll have to have another go at it some time, is really like to go through it at a nice pace. Would be cool to organize a time when more beginners can tune in and fire off lots of questions :)
These videos are excellent! just about every other lisp video I've found is either beginners only or very high level. This practical approach is refreshing :)
Presentation is awesome, thanks a ton!
Really like these videos, could you make a video on the specifics of lisp garbage collection?
Thank you, mister Baggers, and hope you are doing well. Let me reveal here my egocentric nature and wish you to come back soon ( or late ) with new videos about everything.
For those who watched this video recently and have the time and the desire to explain to me about the dispose macro and why we have (var ... ) as parameter? And just simply pass x? I tried to talk with my new friend GPT but he isnt very talkative about this subject. Sorry if I am missing something obvious and thanks for those who hopefully will answer!
Cheers for the great channel and community!
Fantastic explanation!
Are you still doing these? I would love to see a video explaining conditions and restarts, especially how they would be used in a larger/production system.
Thanks for the amazing Lisp content!
Thanks for pointing out alexandria:symbolicate function, now i can stop doing intern manually. :-)
Thanks for this video. I generally understand macros, or their idea. I am currently reading On Lisp and after that probably Let Over Lambda, so i will know more afterwards.
My current issue (i guess it is a general beginner problem) (maybe reading this books will solve it) is that i don't recognize from my task at hand that i should use macros. Like a human language, i passively understand them (i see what they do), but i cannot actively express my self with them. Coming from Python (well any other language) i just don't think that way. I try to solve things only with functions, because i know how to solve things with functions. Also maybe my toy projects are too simple, so no one sane would use macros at all.
So a video about recognizing when i want a macro would be awesome.
And since i think that such a video would take 10 hours, it would be maybe more helpful to just point at some libraries/projects, where and why they use macros.
That's a fantastic point, brilliantly explained. I should definitely make video/s looking at this. Cheers!
The way I've looked at it is whether I want to control evaluation or not, since with a function, the arguments to it get the standard evaluation treatment, whereas with a macro, you decide when arguments get evaluated. Though, from looking at a video from Gavin Freeborn, it seems there's a performance consideration, as well, since as he seemed to express it, macros are pre-compiled evaluation templates. He said rather than explicitly using eval, for situations where you need that, it's better to use a macro, for performance reasons. That's a shift in thinking for me, because I've been using macros for defining new constructs, but that's it. I've had some situations that are just "for this problem" where I've used eval. He seemed to say, "As a rule of thumb, find a way to use a macro instead" for those situations.
Re. compiler macros - I see now you implied this by showing different scenarios, where the macro could be used, and where it couldn't, and then having a function alongside the macro, so that all scenarios were satisfied, but when I first saw your video (I'm watching it for a second time), I was confused about just how the compiler decides to use the macro. I see now that it uses context.
I think the only improvement I would've made to your presentation is if you'd just added a note saying that, because I kept feeling like I'd missed some directive you put in that told the compiler when to use the macro.
1:52:00 I don't understand why we still keep the topmost ecase with the destructuring-bind around in the macro, has that not become obsolete with the generated defuns (assuming there will be dispatch code)? edit: oh, because the dispatch code is a compiler macro, which is optional.
we are a waiting a CLOS tutorial.
Hi Baggers, first of all I want to thank you and congratulate you on this amazing series of "A little bit of lisp". It has taught me so much and it's being so incredibly helpful. You are a great teacher and these shorter videos format that you have been using is great because it is concise and to the point so we don't get bored and feel very productive.
I'm somewhat new to coding and I really like this macros video, as it has been my really first contact to with them. I've previously avoid/ignore/feared them but now I have a better idea for what they are and how to use them, so thank you again.
I have however a question. It's probably something very obvious and basics do I appologize for that. My question is, why do you put and @ in front of body in the minute 37:16? You write ,@body but you don't put the @ in the other variables.
Thank you so much!
That's explained in the bit about quasiquoting. Basically, `(1 2 ,(list 3 4 5) 6 7) evaluates to (1 2 (3 4 5) 6 7) and `(1 2 ,@(list 3 4 5) 6 7) evaluates to (1 2 3 4 5 6 7), i.e. the values in the resulting inner list are inserted into the outer list.
A stumpwm user!! Love to see it :-)
currently using exwm but stump sounds really awesome too!
yours in the only channel where someone actually knows lisp.
For those watching in the first few hours after upload the stream starts at 8:51
Thanks :-)
Sorry I missed your CEPLcast this morning :'(
Should probably be acronymized as LOBOL :-)
So - Thanks for sending your LOBOL ... to me :-)
Hello Baggers, cant find the quasiquote video you mention at 25:18
Great video! Learned a lot. :D
At 25:18 you mention a previous video on quasiquoting -- I've looked all over and can't find it. Would you mind posting a link? Nested quasiquotes are killing me!
same, trying to find the vid.
maybe if I tag @Baggers, he can help.
you've predicted russians!
what are you using to take notes at 6:26?
Gromit-mpx github.com/bk138/gromit-mpx
Thank you very much
best explanation on macros i have witnessed... i wish i would have stumbled over this halve a year ago :D
what is the twitch channel name?
Has someone had Lazik by any chance? :-)
How to find a job on lisp?...
I haven't had a logo job so I'm not the best person to ask. At ELS a couple of companies have mentioned they were looking for people.
please run screenkey next time :D
Good idea. A little nerve wracking though as I mistype pretty much constantly
> performance improvements
I've heard SBCL itself is pretty performant compared to a lot of other "modern" languages. Maybe CLASP might interest you: github.com/clasp-developers/clasp
It's certainly is for a dynamic language and, when you give it enough information (like type declarations etc) it can go toe to toe with a good few more. In the end it's about what the spec and user allows a compiler to know, some optimizations that would be easy for c++ compilers are just hard to impossible for lisp compilers.
Clasp is cool and leverages llvm so it has the potential to benefit from all that work, however is still subject to these same limitations. Fun to see where this all goes though!