Тёмный

LOOP Common Lisps Superior For 

Gavin Freeborn
Подписаться 12 тыс.
Просмотров 11 тыс.
50% 1

Опубликовано:

 

7 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@fetchmasters
@fetchmasters Год назад
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!
@sjatkins
@sjatkins 2 года назад
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
@AliAzizQualityEducation Год назад
lisp process interview Q & A Latest video : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-1-TlXhorfDM.html
@numericalcode
@numericalcode 8 месяцев назад
Had no idea about the destructuring. Nice!
@GavinFreeborn
@GavinFreeborn 8 месяцев назад
One of my favourite parts of loop. Really ahead of it's time. (and in many ways behind)
@jacksonmowry
@jacksonmowry 2 года назад
Great video Gavin! Learning about Common Lisp macros is very interesting
@tobiasthrien1
@tobiasthrien1 2 года назад
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 :)
@GavinFreeborn
@GavinFreeborn 2 года назад
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.
@EdouardTavinor
@EdouardTavinor 2 месяца назад
Hello :) I've been using more defun recursion with tail call optimisation to do loops recently. It's a one-size-fits-all solution :)
@beauteetmusculation8191
@beauteetmusculation8191 2 года назад
Waiting for the next videos on LISP! ❤
@ericpmoss
@ericpmoss Месяц назад
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.
@jack002tuber
@jack002tuber Год назад
Thanks for this. I was looking for how to do loop in lisp, hit the spot. 🥉🥉🥉
@comproprasad6438
@comproprasad6438 2 года назад
Never thought looping can be so interesting
@GavinFreeborn
@GavinFreeborn 2 года назад
And to think I only scratched the surface
@Oi-mj6dv
@Oi-mj6dv Год назад
The thing about lisp is that these sort of things feel very illegal but yet they obviously arent. Powerful stuff
@AndersJackson
@AndersJackson 2 года назад
Thanks for the explanation of the loop macro. Never really looked into it.
@FUNM0DE
@FUNM0DE 2 года назад
What’s up lisp lovers!!!
@GavinFreeborn
@GavinFreeborn 2 года назад
Lol
@godfather7339
@godfather7339 2 года назад
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.
@GavinFreeborn
@GavinFreeborn 2 года назад
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.
@Oi-mj6dv
@Oi-mj6dv 2 года назад
Holy shit this is amazing
@user-cq7db9ij1o
@user-cq7db9ij1o 2 года назад
Excellent and informative. If you can give what kind of work Common Lisp is ideal ? that would be great.
@GavinFreeborn
@GavinFreeborn 2 года назад
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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-6pMyhrDcMzw.html . 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-cq7db9ij1o
@user-cq7db9ij1o 2 года назад
@@GavinFreeborn Thanks.. looking forward.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
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
@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
@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.
@arisweedler4703
@arisweedler4703 2 года назад
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
@GavinFreeborn
@GavinFreeborn 2 года назад
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.
@aangGAD
@aangGAD 2 года назад
Awesome!
@jarusll
@jarusll 2 года назад
This was nice
@TheJacov
@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
@AliAzizQualityEducation Год назад
lisp process interview Q & A Latest video : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-1-TlXhorfDM.html
@programorprogrammed
@programorprogrammed 2 года назад
3:44 to skip the getting started preamble
@ctoid
@ctoid Год назад
Oh wow, I think I discovered the true power of LOOP too late
@fakecrafter7448
@fakecrafter7448 2 года назад
Tutorial on sly please
@GavinFreeborn
@GavinFreeborn 2 года назад
What would you like to see? I have cool features I want to show but I'm interested in others want to see/learn
@fakecrafter7448
@fakecrafter7448 2 года назад
@@GavinFreeborn how to setup and maybe just the concept of the repl in general and how to use it
@GavinFreeborn
@GavinFreeborn 2 года назад
@@fakecrafter7448 sounds easy enough. I kinda cover the setup of sly in my stumpwm video but something dedicated wouldn't hurt.
@jwmcq
@jwmcq 2 года назад
Loop is an abomination! (This comment is sponsored by the Iterate gang.)
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
Have you got a video comparing the two?
@ericpmoss
@ericpmoss Месяц назад
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
@laughingvampire7555 Год назад
the least favorite macro of John McCarthy, he said "it was too much like English"
@insanecbrotha
@insanecbrotha 2 года назад
fuck polymorphism, let's loop in/across/being the hash-key of ... cl:loop is such a mess. XD
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 года назад
It’s just a macro. Don’t like it, write your own.
@insanecbrotha
@insanecbrotha Год назад
@@lawrencedoliveiro9104 t
@insanecbrotha
@insanecbrotha Год назад
@BoulderBro999 why? Honestly I find the highly polymorphic/abstract loop style of Python better than C loops.
@borschtnazi8195
@borschtnazi8195 Год назад
@@insanecbrotha because the two of the neurons comprising your 'brain' are defective.
@ericpmoss
@ericpmoss Месяц назад
@@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
@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.
@borschtnazi8195
@borschtnazi8195 Год назад
stop saying "you guys"
@davidthompson1797
@davidthompson1797 6 месяцев назад
It's so, so patronising!
Далее
Why You Should Learn Lisp In 2024
21:50
Просмотров 64 тыс.
Мама знает где все документы
00:21
Code vs Data (Metaprogramming) - Computerphile
7:38
Просмотров 106 тыс.
Why LISP Is The Language of Legends
9:05
Просмотров 34 тыс.
LEARN EMACS LISP - Mostly The Strange Parts
29:22
Просмотров 17 тыс.
Rewrite Your Scripts In LISP - with Roswell
21:23
Просмотров 21 тыс.
Why Are Lisp Macros So Great!?
16:28
Просмотров 15 тыс.
What is the Curse of Lisp?
25:09
Просмотров 27 тыс.
Unleash The REPL With Sly
14:45
Просмотров 12 тыс.