I've been playing with CL now for about a year, and I've *NEVER* seen the loop macro explained in this declarative fashion. Really helped me understand better what is going on under the hood. Best loop tutorial out there in my opinion. Thank you!
@numericalcode8 ай бұрын
Had no idea about the destructuring. Nice!
@GavinFreeborn8 ай бұрын
One of my favourite parts of loop. Really ahead of it's time. (and in many ways behind)
@sjatkins2 жыл бұрын
Loop is a good example of the raw power and flexibility of Lisp as a person decent at macros could write it if they didn't have it and wanted it.
@AliAzizQualityEducation Жыл бұрын
lisp process interview Q & A Latest video : kzbin.info/www/bejne/Z163nYuepNeZeq8
@jacksonmowry2 жыл бұрын
Great video Gavin! Learning about Common Lisp macros is very interesting
@beauteetmusculation81912 жыл бұрын
Waiting for the next videos on LISP! ❤
@comproprasad64382 жыл бұрын
Never thought looping can be so interesting
@GavinFreeborn2 жыл бұрын
And to think I only scratched the surface
@jack002tuber Жыл бұрын
Thanks for this. I was looking for how to do loop in lisp, hit the spot. 🥉🥉🥉
@tobiasthrien12 жыл бұрын
I was kind of disappointed that you didn't notice at 11:39 that the values are all the same (i.e. 11). Gauss certainly would have noticed it (maybe someone gets the reference). But I shouldn't blame you. I guess this is the equivalent of backseat gaming for programming tutorials :)
@GavinFreeborn2 жыл бұрын
That's what I meant my they end up being similar. Was pretty sure they where the same bit figured I was probably wrong haha.
@EdouardTavinor2 ай бұрын
Hello :) I've been using more defun recursion with tail call optimisation to do loops recently. It's a one-size-fits-all solution :)
@ericpmoss19 күн бұрын
There are several cute things included in the loop extensions that make certain toy problems trivial, but it is so un-Lispy that I avoid them all. It's more than just an aesthetic issue -- a DSL, especially a non-Lispy one, belongs in a loadable library, not the language core. Because of the syntax of this DSL, it is tricky and sometimes impossible to add type declarations without violating that syntax. Similarly, it is tricky and sometimes impossible to instrument the code with things like counters and accumulators and conditional breakpoints. I think it is much better to write one's own specialized iterator macros that look and behave more like the core built-ins of map, reduce, and do, but with whatever specializations and optimizations that apply to the problem at hand. I also think it is better to do that because it lets me be a programmer, not a configuration technician.
@AndersJackson2 жыл бұрын
Thanks for the explanation of the loop macro. Never really looked into it.
@Oi-mj6dv Жыл бұрын
The thing about lisp is that these sort of things feel very illegal but yet they obviously arent. Powerful stuff
@FUNM0DE2 жыл бұрын
What’s up lisp lovers!!!
@GavinFreeborn2 жыл бұрын
Lol
@Oi-mj6dv2 жыл бұрын
Holy shit this is amazing
@godfather73392 жыл бұрын
Really good video, I'm new to lisp and your explanations are really nice. Maybe do a video on CLOS? I've heard that's lisp has a very good object system, but I can't find 1 good video on it.
@GavinFreeborn2 жыл бұрын
The Atlanta Functional Programming youtube channel has on but you have to sit through a lot to get to it. I've been a little hesitant to talk about it since the works "Object Oriented Programming" tends to scare people away from Common Lisp even if it's a much better system than you see in other languages. Java has single handedly destroyed the term haha.
@user-cq7db9ij1o2 жыл бұрын
Excellent and informative. If you can give what kind of work Common Lisp is ideal ? that would be great.
@GavinFreeborn2 жыл бұрын
I'd say nearly everything! CL is a truely general purpose language. It's performant (around the speed of Golang), it's quick to develop with (like Python), it's crazy flexible (more so than nearly any language), it supports both a functional object oriented and procedural style. Though if I had to narrow it down to a few use cases I would say rapid prototyping. I don't get to show it off in this video but CL's repl is unlike any other. Here is an example of what it can do kzbin.info/www/bejne/bKGwqpuoeciAsNk . If you look into companies using Common Lisp you will find most of them are focused on non trivial problems. This is really where lisp can shine. Sometimes you go into a problem with an idea of a solution but don't have information or experience to account for all the possible issues you may face. Hopefully this answers your question. I plan on going into this further in a future video.
@user-cq7db9ij1o2 жыл бұрын
@@GavinFreeborn Thanks.. looking forward.
@lawrencedoliveiro91042 жыл бұрын
Are there any Common LISP implementations that are not purely garbage-collected? I’m thinking of a hybrid reference-counted/garbage-collected implementation like Perl or CPython.
@corinroyal Жыл бұрын
@@lawrencedoliveiro9104 Not as far as I know. There are different garbage collection strategies in different implementations and garbage collection can be tuned, but it's an essential feature of Common Lisp. There are non-garbage collected Lisps though. I don't use them.
@lawrencedoliveiro9104 Жыл бұрын
@@corinroyal I’m not talking about getting rid of garbage collection, I’m talking about adding a prior reference-counting pass to take care of common cases.
@arisweedler47032 жыл бұрын
It is a CL to JS compiler, not a CL to WASM compiler? I guess why not, both can exist. JSCL - the CL implementation for JS, nice
@GavinFreeborn2 жыл бұрын
JSCL is actually CL implemented in JS. There is also parescript a set of macros for CL that compiles to javascript as a string. Useful for adding some client side code to your CL server. Though for something like a single page web app you may be better off with ClojureScript. There is JACL which is intended to fill this gap.
@aangGAD2 жыл бұрын
Awesome!
@jarusll2 жыл бұрын
This was nice
@programorprogrammed2 жыл бұрын
3:44 to skip the getting started preamble
@ctoid Жыл бұрын
Oh wow, I think I discovered the true power of LOOP too late
@TheJacov Жыл бұрын
The only problem I had with sly and emacs was that sly doesn't quote it's repl definition string when you M-x sly. Generally this is not a problem if you are running Linux, but just now I'm stuck on Windoze 10 for my sins. Turns out that if you do a default install of sbcl as I did then your path contains spaces and therefore must be "quoted". So far the only work-around that I've found is to C-u M-x so that I can insert the required quotes. It's not a game-killer, but it was a royal pain in the ass to figure out, and it remains a minor annoyance. Maybe one day I'll be able to figure out how to make sly quote by default so I don't have to deal with this.🤔😁😁😁
@AliAzizQualityEducation Жыл бұрын
lisp process interview Q & A Latest video : kzbin.info/www/bejne/Z163nYuepNeZeq8
@fakecrafter74482 жыл бұрын
Tutorial on sly please
@GavinFreeborn2 жыл бұрын
What would you like to see? I have cool features I want to show but I'm interested in others want to see/learn
@fakecrafter74482 жыл бұрын
@@GavinFreeborn how to setup and maybe just the concept of the repl in general and how to use it
@GavinFreeborn2 жыл бұрын
@@fakecrafter7448 sounds easy enough. I kinda cover the setup of sly in my stumpwm video but something dedicated wouldn't hurt.
@jwmcq2 жыл бұрын
Loop is an abomination! (This comment is sponsored by the Iterate gang.)
@lawrencedoliveiro91042 жыл бұрын
Have you got a video comparing the two?
@ericpmoss19 күн бұрын
Loop itself is fine, but the extensions don't belong in the core language spec, especially since they are so un-lispy. We'd be much better off writing our own macros if map/do/reduce aren't terse enough, and sharing the ones that seem generally useful.
@laughingvampire7555 Жыл бұрын
the least favorite macro of John McCarthy, he said "it was too much like English"
@insanecbrotha2 жыл бұрын
fuck polymorphism, let's loop in/across/being the hash-key of ... cl:loop is such a mess. XD
@lawrencedoliveiro91042 жыл бұрын
It’s just a macro. Don’t like it, write your own.
@insanecbrotha Жыл бұрын
@@lawrencedoliveiro9104 t
@insanecbrotha Жыл бұрын
@BoulderBro999 why? Honestly I find the highly polymorphic/abstract loop style of Python better than C loops.
@borschtnazi8195 Жыл бұрын
@@insanecbrotha because the two of the neurons comprising your 'brain' are defective.
@ericpmoss19 күн бұрын
@@lawrencedoliveiro9104 I agree with the "write your own" part, and I wish the committee had adopted that approach rather than wedge a non-Lispy DSL into the core of the language spec -- especially when it duplicates existing functionality, isn't instrumentable, and turns a programmer into a configuration tech. We would all be better off rolling our own and sharing loadable libs of them.
@zbigniewloboda3393 Жыл бұрын
0:42 Too much self... Clisp. The main difference between clisp and Python is that average world monthly pay of Python programmer is about $250. Why? Because i Python everybody can program this for which algorithms are already created. But try to do the same thing where first you have to first learn proprieties of the domain before you can arrive at the algorithm.