Why You Should Learn Lisp In 2024?

  Рет қаралды 61,297

Gavin Freeborn

Gavin Freeborn

Күн бұрын

This video is focused on Lisp a collection of languages I have fallen in love with and think many of you will do the same.
My video on learning Racket
• An Introduction to the...
Scheme introduction I like
• Scheme Lisp: Feel the ...
Recompiling a video game without stopping it in Common Lisp
• Lisp - Recompiling a g...
Reference for why I compare Lisps performance to that of C
programming-language-benchmar...
Let me know what you think and if there is anything specific you would like to learn about.
---------------► Wanna Support Me? ◀︎---------------
Github:
www.github.com/sponsors/gavinok
Patreon:
/ gavinfreeborn
---------------► Wanna Checkout My Dots? ◀︎---------------
Vimrc:
github.com/Gavinok/dotvim
Emacs Config:
github.com/Gavinok/emacs.d
---------------► Come Join The Community◀︎---------------
LBRY:
open.lbry.com/@GavinFreeborn:...
Matrix Space:
matrix.to/#/%23gavinfreeborn:...
Discord:
/ discord
00:00 Intro
01:33 Scheme
02:00 Common Lisp
02:55 Clojure
04:44 Easy to start learning
05:34 Simple Syntax
09:48 Code as Data
15:01 Will always exist
15:42 It only gets better with age
16:08 The REPL
18:58 Lisp can do ANYTHING
20:07 Outro

Пікірлер: 254
@silencioseu
@silencioseu 2 жыл бұрын
Just a note at the beginning. CL, Scheme and Clojure are not "implementations" of LISP but rather different languages in the Lisp-family of languages, or more simply different Lisp dialects, and as you've mentioned each of them have multiple implementations. Also Clojure is by far the most popular Lisp nowadays.
@ohmyv3gatron
@ohmyv3gatron 2 жыл бұрын
Love Clojure….
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Ya I definitely should have called them dialects haha, Ya probably should have been clear that when I say popular more people likely have used CL just because many universities used to use it for AI classes.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
Scheme is very different from traditional LISP. Traditional LISP has separate namespaces for function names versus variable names (i.e. you can have one of each with the same name), while Scheme unifies the namespaces. Also, traditional LISPs don’t seem to have continuations, Scheme does.
@horridohobbies
@horridohobbies Жыл бұрын
Still, the popularity of Clojure has been waning in recent years. As of this month, Clojure is outside of the Top 50 at TIOBE. Clojure is no longer on PYPL's list, nor on RedMonk's list. And Clojure is at #39 on IEEE Spectrum's list. At least regular Lisp is #30 at TIOBE. 😄 That's something.
@hipjea
@hipjea Жыл бұрын
​@@horridohobbies imagine caring about Tiobe Index. It's completely flawed and irrelevant.
@user-fd5ih6te9b
@user-fd5ih6te9b 2 жыл бұрын
To cut a really long story short, frustration with some other languages have lead me to make my own language, with the compiler written in Common Lisp. The language is also s-expressions, so we just use the lisp reader and walk the AST right into LLVM. We basically get to skip writing like 80% of the compiler, and honestly I'm wondering why on Earth anyone bothers with other syntaxes at all. Using Common Lisp has been a blast and honestly I am wondering if I should just drop the new language and do everything in CL.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
While I love CL idk if I'd write everything in it. I do find the ecosystem to be a bit overwhelming. I find myself wishing there was a standard project and build system. asdf+ql comes close but often projects mix and match too many things. You end up with autotools/makefiles trying to hide it all from the user resulting in a ton of system incompatibility. I think Roswell while still in its infancy is a reasonable option. Though it's lack of adoption and lack of community interest gives me the feeling it's not going anywhere.
@openroomxyz
@openroomxyz Жыл бұрын
Can you really get to the C, C++ speed?
@aniritri8635
@aniritri8635 Жыл бұрын
Have you made the language public ? If so can you please give the link for the repo, thanks.
@stevenpe781
@stevenpe781 Жыл бұрын
@@openroomxyz you can approach that by giving compiler hints to go for full speed vs debuggability/safety: il will remove many safety nets (errors cheking..). you can program more with arrays, too if you'd like to go in that direction. The recommend way, though, is to write a correct, featureful program first (keeping a conscious eye on perf), and then only, if necessary, go to optimize the critical parts ...
@ruffianeo3418
@ruffianeo3418 Жыл бұрын
@@GavinFreeborn I use Common Lisp mostly for "creative programming", i.e. I have an idea I want to see in action quickly. What you refer to sounds a bit more like "writing a serious application which ends in a binary". Since I did not seriously try to accomplish something like that, I take away from your post, that it seems to be more involved than just (save-lisp-and-die). The one thing I would love to see better supported in the CL ecosystem is the ability to use it as a scripting language in other applications. ECL kind of promises that, but when playing with integrating CL into some C++ application it is not as fun an experience as I would have hoped for. SBCL on the other hand, you can build as shared library. But the amount of tutorials and examples out there on the internet is quite sparse. No free lunch. I think, CL is a perfect fit for the "scripting language in other application" use case and someone should turn it into a free lunch, so it is easy for everyone to do it.
@russellwaterhouse502
@russellwaterhouse502 2 жыл бұрын
I had looked into lisp early last year, and couldn't wrap my head around the bracketing syntax. It all makes sense after you explained it as building an abstract syntax tree! Thanks for the paradigm shift!
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Happy I was able to helped! Was a little concerned that mentioning an AST would overwhelming viewers..
@Noeman2009
@Noeman2009 2 жыл бұрын
I've been using Autolisp and Visual Lisp for almost 20 years, it's one of the most elegant programming language I've known. This come from a person who also know C, C# and Visual Basic.
@MsHofmannsJut
@MsHofmannsJut 2 жыл бұрын
I just imagine a Pac-man-like entity nibbling the expression from its opening. Each s-expression is a list. Each list is a chain of cons cells. Eats it one by one. And each list hides an empty list () at the end. It's like a portal for the said Pac-man to burp his result down.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
Autolisp?? That’s just a LISP with the weird syntax but without all the good LISP stuff.
@laughingvampire7555
@laughingvampire7555 Жыл бұрын
is just function invocation/application, a simpler function application syntax std function invocation syntax: my_fun(arg0, arg1) Lisp function invocation syntax: (my_fun arg0 arg1) so if you have something a bit more nested like std: f1( f2(arg0), f3(arg1) ) lisp: (f1 (f2 arg0) (f3 arg1))
@marc-andrebrun8942
@marc-andrebrun8942 2 жыл бұрын
racket is the way to go for : - a very nice IDE, drracket; - one of the best documentation I ever seen; - a lot of librairies about any topics - and in scheme, a lot of very nice teaching material available.
@openroomxyz
@openroomxyz Жыл бұрын
How is it different than common lisp? Does it restrict you in some way?
@marc-andrebrun8942
@marc-andrebrun8942 Жыл бұрын
@@openroomxyz to say the truth, I don't know because I never used CL. why? because, before everything, you must figure out how to run emacs with CL, and waste a lot of time; and I never found on YT any good lectures about CL; DcRacket works fine out of the box! and you have 5 nice lectures from Stanford and 20 and more lectures from MIT in scheme. Stanford lecture 19 to 23 of programming paradigms kzbin.info/www/bejne/lZS5aYGNhqirpKc MIT they talk about LISP but it's not CL but the people who made scheme : the birth of scheme kzbin.info/www/bejne/Y3vCqX9qfqybgKM
@telesniper2
@telesniper2 4 ай бұрын
@@openroomxyz You're bound to doing things THEIR way which is sometimes the hard way or just not very useful to the way you want to approach a problem. If you already know C and are familiar with Linux, just learn one of the Schemes with a C FFI. That way your Scheme programs can extend to say the glibc, and you can do anything you'd do from c (syscalls, file i/o, etc etc).
@shaunkruger
@shaunkruger Жыл бұрын
I remember working on a project in the mid 2000s where I was trying to build a lab inventory management system using LispWorks. The app was killed before it was ever finished, but the time I spent learning lisp and it’s features was time incredibly well spent for helping me to learn how to think about solving problems and it educated me about how a language can influence the the thoughts you can have and the solutions you can come up with. I always tell people that lisp bent my mind in all the best ways and I always think of it fondly.
@stevenpe781
@stevenpe781 Жыл бұрын
I my experience you can always use that experience to write small and dirty "programs" with clisp, for instance... that's what I do: dev. is as fast as python (when you still have lisp "in your fingers"), and more fun
@eis3nheim
@eis3nheim 2 жыл бұрын
Beautiful presentation, looking forward to learning it this year.
@Aviator168
@Aviator168 2 жыл бұрын
Wow. I haven't touched this one for 30+ yet. Back then, it was one of the best AI languages. The fastest machine that was available to us was x286 (the IBM AT) and we were running common lisp.
@computerguymiguel
@computerguymiguel 2 жыл бұрын
Very interesting, I got a little into lisp for my emacs config, but now you convinced me to try it out for some other things as well
@stephenaustin3026
@stephenaustin3026 2 жыл бұрын
I have no idea why Kent Dybvig called his implementation "Chez Scheme", but "chez" is a French word, meaning "at the house of" or "at the home of", and is pronounced "shay". As in, for example "Chez Panisse", Alice Waters' famous restaurant in Berkeley, CA.
@lesfreresdelaquote1176
@lesfreresdelaquote1176 2 жыл бұрын
This is only a guess, but Proust wrote a very famous novel, whose original title in French: _Du Côté de Chez Swann_ . I have always wondered if it was a pun on this specific title as _Chez Swann_ and _Chez Scheme_ shares a certain resemblance. But it is quite far stretched I definitely agree... :-)
@unbekannter_Nutzer
@unbekannter_Nutzer 2 жыл бұрын
My french is poor, but to my knowledge "chez" only means "at", so get rid of the "house" or "home". In France, every third café or bar is called "Chez Michelle" or "Café Chez Rique" and means the same as the "`s" in "Rick's Cafe". Well - only nearly, too.
@marc-andrebrun8942
@marc-andrebrun8942 Жыл бұрын
@@unbekannter_Nutzer "chez" from french dictionary: come from latin "casa" which mean "hutte"; Indique une localisation dans la maison, le pays, l'oeuvre de quelqu'un, la présence de quelque chose dans le comportement de quelqu'un. Indicates a location in someone's house, country, work, presence of something in someone's behavior.
@pwojtcza
@pwojtcza 2 жыл бұрын
Got here from SystemCrafters stream. Thank you for this content, always wanted to start learning common-lisp but never had a good justification for time investment
@Chemaclass
@Chemaclass 2 жыл бұрын
Awesome video. Thanks! 🙏
@PixelOutlaw
@PixelOutlaw 11 ай бұрын
The best reason for learning Lisp is for how well it covers many paradigms. You've got the CLOS, you've got first class functions with optional arguments, named arguments, defaulted arguments, and variadic arguments. You've got notions of streams of data. Not to mention the ability to truly extend the language at the syntax level via macros which are quite different than text substitution. SBCL is a very good implementation of Common Lisp - it's faster than you might expect and the compiler writers are always adding new tweaks to make it faster. If you want a minimal pure Lisp consider a Scheme like Chicken. If you learn Common Lisp you'll also learn quite a bit of Emacs Lisp since they sort of share a similar branch on the family tree (there are differences though).
@kenneth_mata
@kenneth_mata 2 жыл бұрын
Extremly excited to start learning SBCL, i was initially very impressed by it's handling of spacing compared to Python (Indent) and C (Semicolons)
@higiniofuentes2551
@higiniofuentes2551 2 жыл бұрын
Thank you for this very interesting video!
@messengerofiexist2139
@messengerofiexist2139 2 жыл бұрын
Lisp wasn’t a language until 1960 when MccCarthy published his paper on a list processor. Another gentleman read the paper and built and compiled becoming the first Lisp usage.
@copper4eva
@copper4eva 2 жыл бұрын
I have yet to use lisp yet, but already knew how basic math was written in it, and didn't really understand why however. I never got why it was written like '+ 1 1' instead of the more natural '1 + 1'. But your explanation on how it actually gets evaluated really clears that up. And also makes sense that this more literal robust method makes the order of operations always clear.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Happy to hear!
@marc-andrebrun8942
@marc-andrebrun8942 2 жыл бұрын
if you know C, any program begin like this : int main(int argc, char* argv[]) in "argv" you have an array of null terminated string; in the first slot, the name of the program, and in the other one, the arguments to be passed to that function; you just have to think that all function call in lisp or scheme are just a list (instead of array of string) like the argv in C main function.
@kendawg_mcawesome
@kendawg_mcawesome 2 жыл бұрын
nice explanation, I actually hadn't considered the value of disambiguation of the syntax tree in lisps. So true though.
@boots7859
@boots7859 Жыл бұрын
I was going to bail when the s-exp explanation started, however you made it very, very understandable. Thanks!
@paulo9523
@paulo9523 2 жыл бұрын
I was on the fence about spending time to learn Lisp this year or not, but you convinced me to do so. I think I'll start out by learning Scheme and then I'll probably move on to CL or emacs Lisp.
@krasen4oo
@krasen4oo 2 жыл бұрын
Let’s do it!
@xGOKOPx
@xGOKOPx Жыл бұрын
Note that the only reasonable reason to learn Emacs Lisp (instead of any other Lisp) is if you wanna configure or extend Emacs
@unformedvoid2223
@unformedvoid2223 2 жыл бұрын
You convinced me that I definetelly should give Lisp a try. After learning F# I understood that programming can be much more powerful than stupid OOP and it gave me my interest in programming back. Now I understand that it can be even more powerful than I can comprehend now and I will never truly understand it before I check it myself and learn new higher-level techniques. Functional programming already made me a better developer. I hope that homoiconicity, macros, code as data will make me even better :)
@xGOKOPx
@xGOKOPx Жыл бұрын
Functional programming isn't mutually exclusive with object-oriented programming. Common Lisp has an object system (although it works quite differently from languages based on C++ tradition)
@unformedvoid2223
@unformedvoid2223 Жыл бұрын
​@@xGOKOPx IMO, one of the most important properties of FP is immutability. OOP on the other hand is all about mutable local state. So, I disagree, they are mutually exclusive. IMO, if language is trying to be hybrid of OOP and FP then it means it's not FP, but just have some elements of FP. Because FP is more strict and mixing it with OOP requires relaxation of it's constraints. But relaxed FP is not FP anymore. Because FP is all about constraints. For example one of my favorite languages F# is not fully-functional. It's just functional-first and it's positioned like that by it's creator. I think it's fair to call things as they are.
@raianmr2843
@raianmr2843 Жыл бұрын
OOP is the biggest false prophet in programming. I'm sure if any OO programmer chooses to expand their horizons and learn other paradigms (as I have), they will come to realize how fundamentally defeated OOP is in it's promises. The only good thing about of OOness is polymorphism, and ironically whatever OO languages provide in this area are limited by it's biggest flaw: rigid, unintuitive, ever growing inheritence hierarchies.
@collinsa8909
@collinsa8909 Жыл бұрын
I feel offended that you should call oop stupid. Oop is elegant and beautiful, if you see it. Besides no programming language can exist smoothly without adopting some oop view. Oop is inevitable
@unformedvoid2223
@unformedvoid2223 Жыл бұрын
@@collinsa8909 whatever
@larrasket
@larrasket 2 жыл бұрын
Great video, It was one of my plans for future, I'm more excited now to start learning it. 7:07 May I ask, how did you put the term (1 *2) in brackets after selecting it visually ? Is that an Emacs package?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
electric-pair-mode. Just select text and hit (
@jongeduard
@jongeduard Жыл бұрын
Hi, thanks for your video! I knew quite little about Lisp. What got my interest here and made me also watch your video is 2 things. First I was exploring more information about Emacs and whether it might be something I want to use (I still don't know). I am a software engineer and a Linux hobbyist. Second reson is the Rust programming language, because it has some influence on it from Lisp, which made me curious. Rust has a several functional programming features, but it also has an extremely powerful macro system, unseen in most other languages. I have people seen comparing that aspect with Lisp, and describing how special that is.
@siyaram2855
@siyaram2855 2 жыл бұрын
Thank you for making the video
@topcivilian
@topcivilian 2 жыл бұрын
Awesome video, my friend..!! The google algorithm brought me here and you just got a like and a new subscriber.
@Pariatech
@Pariatech 2 жыл бұрын
I love CL so much that implement everything in it and if I need to use another language, I just write a DSL that output code in the other language.
@AlexandreRademaker
@AlexandreRademaker 2 жыл бұрын
You could explicit comment about Emacs Lisp since you used it in the examples! Nice video
@rainfallen1064
@rainfallen1064 2 жыл бұрын
You should learn lisp because you already know all the languages that will pay off professionally.
@mksybr
@mksybr 2 жыл бұрын
Would've been nice to go into more detail about language features that exist exclusively in each one. Like the difference between CLOS and Clojure Records/Protocols or Schemes call/cc vs Common Lisps unwind-protect
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I have a video planned for this very topic so any ideas for comparison are welcome..
@mksybr
@mksybr 2 жыл бұрын
​@@GavinFreeborn So much you could talk about with that. I a lot of comparisons tend to focus on things like Lisp-1 vs Lisp-2, scoping, and less so language / library features common to major implementations. HOPL has 100~ page documents on the history of emacs lisp, clojure, and pre-common lisp to late 90s common lisp. One thing that I didn't realize about common lisp is that common lisp is a lot more imperative and embracing of mutation than either clojure or scheme-- I'd like to see more content about imperative lisp usage like: setf, progn-go, do, dotimes, dolist, loop-return, some of which have even made it into clojure in modified/functional form like dotimes and loop-recur. Also conditions and restarts seem to only exist in common/emacs lisp land at least at that level of integration. A fun topic about lisp is the relationship about objects and closures as well.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@mksybr wow thanks for all the suggestions!
@Echiduna
@Echiduna 10 ай бұрын
Thank you for such a detailed introduction to lisp! I do decide to have a try. Struggling in shell script's "string world" is really not a good experience for me.😂😂😂
@dhuxdheerdahir2736
@dhuxdheerdahir2736 2 ай бұрын
Well done!
@unbekannter_Nutzer
@unbekannter_Nutzer 2 жыл бұрын
In the right split window at 18:00, it is unreadable - dark grey on light black? You should go for a stronger contrast when doing videos. And a much bigger font wouldn't hurt, too, when showing only few lines of short demo code. I understand that you might use a small font on real work, where you prefer having much of it on the screen.
@11WicToR11
@11WicToR11 2 жыл бұрын
i wrote myself few common lisp utilities (one for example removes duplicate lines in files) just to try and used emacs for almost a year, few years ago...but my issue is that after a month or so I have no idea how it works anymore xD. Then compare it to for example rust, I totally see whats going on on first glance. Maybe thats just my brain being used to something, but i still feel that having "less syntax" leads to longer read time.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I've definitions felt that way before. Though its often resolved by keeping functions small and and extensive use of `let`. I also fine clojure's thread macro comes in handy
@rybakostis
@rybakostis Жыл бұрын
I think it would be great to talk about use cases of lisp, project ideas and job opportunities.
@expeditiontoabyss3597
@expeditiontoabyss3597 2 жыл бұрын
Thanks, very nice.
@numericalcode
@numericalcode Жыл бұрын
Nicely explained
@_q1b_
@_q1b_ 2 жыл бұрын
Awesome video, can you upload more videos related to lisp I am pretty, astonished by seeing it's power
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I have some planned so stay tooned.
@_q1b_
@_q1b_ 2 жыл бұрын
@@GavinFreeborn can I get your Twitter link 🔗
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@_q1b_ sorry I don't use Twitter.
@0nelight19-SaveSoil
@0nelight19-SaveSoil 6 ай бұрын
No matter what language you use for programming - it can be only an inspiriation or a means for your program to be executed on a computer. Your imagination and the flexibility of your thinking is much more important and always will be the most important thing. Going from Turing to Lambda for sure increases you capability to think 🥰
@fgtdjkg
@fgtdjkg Жыл бұрын
Very inspiring
@vicsteiner
@vicsteiner 10 ай бұрын
Hi Gavin tks for the video. I've just started exploring the lisp world. I work with "data" and got curious with the idea of code as data and whatnot actually. I work a lot with python and SQL and I think both miss the point of what is data and how it relates to information. This makes the life's of people working in "data" teams a real struggle. I was exploring the concepts behind datomic in the closure scene but I still think they miss important points like the very definition of data and modeling data although I really appreciate how they give importance to time and immutability therefore auditability. However, concepts like fact and datom are problematic on my opinion.
@simpleprogrammingcodes3834
@simpleprogrammingcodes3834 2 жыл бұрын
It took me 2 months to learn Scheme after learning Common Lisp... It's not that easy. And there are still things I don't know, like the macros...
@AndersJackson
@AndersJackson 2 жыл бұрын
You forgot the elisp implementation. 🙂 The three first languages (except assembler) are FORTRAN, COBOL and LISP.
@tanishshrivastava2442
@tanishshrivastava2442 2 жыл бұрын
When I learn lisp, I probably will start with common lisp. I would end up picking scheme since I do plan to go through SICP in the future, but I'm gonna stay away from Clojure, unless it comes up during the work. Mostly because I rather avoid the JVM. Having said that, it is just a me problem. If you do want to try out Clojure, go ahead.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Ya Clojure's biggest biggest weakness as well as one of its strengths is the JVM. I have only used it for small work projects since we use Java in my day job. The language is really cool but dealing with java is a pain. ClojureScript on the other hand is something I have considered playing with but I'm not much of a front end guy.
@tanishshrivastava2442
@tanishshrivastava2442 2 жыл бұрын
@@GavinFreeborn Yeah, I don't deal with frontend either. This is why I don't mention JS to potential employers, since they would end up offering me frontend positions as a result. As for JVM, I dealt with Java and a fanatic user in the past. I am in no hurry to repeat the experience.
@trannusaran6164
@trannusaran6164 2 жыл бұрын
Check out graalvm and babashka (native & JVM-less clojure). There's also clojure clr that runs on dot net instead of the JVM. Obviously the JVM interop is a big selling point of clojure, but it's not a prerequisite. (Also most modern lisps, like python's Hy, follow clojure's syntax)
@MajinHico
@MajinHico Жыл бұрын
What font are you using in your video?
@siyaram2855
@siyaram2855 2 жыл бұрын
I have bought little schemer, can you recommend any other good resources
@user-cq7db9ij1o
@user-cq7db9ij1o 2 жыл бұрын
But much of Common Lisp(SBCL) is implemented in C, correct? Any CL implementation written diffferently?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Most are written in ANSI common lisp it's self. They compile down to machine code. One example is the popular sbcl.
@higiniofuentes2551
@higiniofuentes2551 2 жыл бұрын
You are talking about libraries, if I want to use CL with gui and with SQLite, what would be the best way to go? Thank you!
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
For GUIs qtools and mcclim come to mind. clsql supports sqlite as well as a ton of other databases.
@openroomxyz
@openroomxyz Жыл бұрын
What do you mean by lisp can be as performed as C++ or C? How? What did make you think so? Is not lisp when it comes to speed more like python? Did you mean you could generate C code from lisp and than the generated program is as fast as C? If it can be so performant why are people not writing big photorealistic 3d games in it like they do in C, C++? I am thinking of learning lisp but not sure if it’s worth it, I am thinking should I write my lisp in C++ or better embed existing lisp into a project?
@GavinFreeborn
@GavinFreeborn Жыл бұрын
I admit this was an overstatement since in most cases lisp won't out perform C and GC will slow things down eventually. However, it has been used to write 3d games in it. The Jak games (1 ans 2 at least) for the PS2 where all considered technical achievements and written in a dialog of lisp called GOAL. Big reason this isn't as popular is because few people actually wanna write the ground work to do such a thing themselves. In general speed though it's substantial faster than something like python by a magnitude of 100 or more. Here are some benchmarks for reference sites.google.com/view/energy-efficiency-languages/results
@xinaesthetic
@xinaesthetic 2 жыл бұрын
I think the non-static typing is something that makes me feel a bit uneasy about Lisp, and I can never quite imagine building anything significant with it. That said, maybe I’ll get around to playing with Overtone in Clojure some time to play with musical patterns.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Ya dynamic typing is something that scares a lot of people away from lisp. There are different approaches in different lisps to overcome some of its pain points. Common Lisp actually supports an imo powerful type system so you can add static types where needed for both performance and safety. Clojure on the other hand uses spec which can be used to enforce types given to a function, generate tests, generate example input and much more.
@xinaesthetic
@xinaesthetic 2 жыл бұрын
@@GavinFreeborn Yeah, I always got the feeling that if I dived into it a bit deeper I'd find there were some interesting aspects to how types can be dealt with... I know a couple of people who are keen on Lisp who I have very high opinions of, making me think that my misgivings may be superficial... just somehow never had any strong motivation to start a project with it. I can feel temptation welling up, but probably need to get some things done first.
@martonkardos8094
@martonkardos8094 Жыл бұрын
@@ghollisjr The point of static typing is compile time type checking. You can catch errors before they even happen, not to talk of the performance benefits of not having to store types at runtime
@raianmr2843
@raianmr2843 Жыл бұрын
I was initially put off for the same reason but soon came to realize that lisps just aren't like your average mainstream dynamic language. They have more potential for polymorphism than any other language families or programming paradigms and operate at such a high level of freedom and openness that you'll only be limiting yourself by introducing type systems. Type systems can be really powerful and secure when done right (e.g., Rust and Haskell). Lisps just happen to have different goals and usecases.
@oj0024
@oj0024 2 жыл бұрын
Are C macros homoiconic? You can defer expansion, which might be a parallel to the quote, edit the data, and later execute(expand) it. Although it's quite messy.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
In the context of your video your reasoning makes senses. However, there is a bit more to it than evaluating later. Maybe something I could have covered in the video. The issue is manipulating and extracting data from code. For example in clojure you use `first` to get the first value from a sequence. If the sequence is just quoted lisp code (aka a list) then it will get the function. This could then be used for anything like using that same function to evaluate against a new set of arguments. There isn't really a parallel in C macros as far as I know.
@oj0024
@oj0024 2 жыл бұрын
@@GavinFreeborn This might not be homoiconicity, but you can e.g. do the following: #define APPLY(f,x) f x #define TUPLE_AT_1(a,...) a #define FOO(x) #x #define TUPLE (FOO,BAR,BAZ) APPLY(APPLY(TUPLE_AT_1,TUPLE), (APPLY(TUPLE_AT_1,TUPLE))) Here TUPLE is both used as data and called on itself. The first element is extracted twice and then called with itself as an argument. So it expands to "FOO"
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@oj0024 I'd say to some extent that definitely is an example of homoiconicity. Honestly if C macros didn't have the whole newline \ pain they would probably be really useful for extending C.
@parnikkapore
@parnikkapore 2 жыл бұрын
Yea C macros are underappreciated
@owendowley1300
@owendowley1300 2 жыл бұрын
To my mind, homoiconicity isn't the core difference between C macros and Lisp macros. The core difference is the existence of a preprocessor. In C, the preprocessor is a program separate to the compiler itself. It reads in a C file, and parses it for what is in effect a second programming language, the language of C preprocessor directives. These are completely different to C itself, and they lack a whole lot of the power that C has. The C preprocessor, not being able to run C itself, can't evaluate parts of the code it's passed - it can only modify the string representation to change what the compiler does with it. This means there are a while bunch of things you just can't do with the C preprocessor. By contrast, Lisp languages don't have a preprocessor: when you write a macro it is a normal lisp function like any other. The only differences are that the macro happens to run at compile time, and is passed its arguments unevaluated - it can evaluate them at compile time, or rearrange them arbitrarily, or do fundamentally whatever it wants using the whole power of the Lisp language. Homoiconicity helps in Lisp macros: given Lisp code is expressed in lists, which are just a standard Lisp data type, you can use all the standard library functions for manipulating Lisp code within your macros. But it isn't the core difference. For instance, modifying python code can be done within python, using the AST module. This has the same advantage as Lisp when compared to C: you can modify a python AST using all of the power of python. The lack of homoiconicity for macros in python makes this a bit more of a pain, I think, but you still have the full power of Python available to do it with. Where as unfortunately in C, you just don't.
@AkashAgrawal03
@AkashAgrawal03 2 жыл бұрын
The example of homoiconicity was a bit lacking IMO. Would have been very valuable if you went ahead and did some manipulation of that list. That would have really driven home the 'code is data' part and would have connected nicely with the macros. Though I imagine it would have blown up the video scope quite a bit. Thanks for the awesome video.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Ya I would have loved to give a better example of it but like you said I didn't want to make the video too long to sit through. Will likely make another video in the future on the topic.
@fmalta
@fmalta 2 жыл бұрын
Which font do you use here? Looks spiffy!
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Terminus
@fmalta
@fmalta 2 жыл бұрын
@@GavinFreeborn thank you
@MakuDraw
@MakuDraw 2 жыл бұрын
tbh jobs are the main thing that is stopping me from learning a LISP. There is near to 0 jobs for CL in webdev, and the most popular implementation related to the JVM (Clojure), well, i'm afraid that it traps me on the java ecosystem, as i'm manly a javascript dev (node, react, etc). I know that clojurescript exists but on every job request around the web, clojure comes with java, spring, and jvm related things :(
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Side note I don't know of any clojure developer that uses spring since it's obsolete thanks to static typing and dynamic dispatch. Totally understand your situation. I only get to use lisp for work every now and then when my team needs something done fast. On the JavaScript side you are definitely right about cljs being the only real option. Though I wouldn't get too worried about fighting the java pains unless you are doing Interop (often unnecessary) since clojure is kinda its own ecosystem where some projects will piggyback off of some of the jvms features. Tbh Interop kinda sucks in every language so imo it's not as different as you would expect.
@raianmr2843
@raianmr2843 Жыл бұрын
If know several languages from completely different paradigms, that actually looks good on your resume. It signals to your potential employers that you are passionate about programming, and are open to learning new things if need be. Considering the fact that the world's highest paid programmers are lispers, you probably have more valid reasons to learn a lisp than not to learn a lisp. I also find learning new ecosystems burdensome, but if you've already managed to find your way around one of the largest ones, you'll probably do just fine.
@gassechen
@gassechen 2 жыл бұрын
How use common lisp in cloud azure?
@collinsa8909
@collinsa8909 Жыл бұрын
Tried lisp before , not having an editor built for lisp , makes it a pain to code in. Many of the function names and syntax are wierd. Simple printing has this wierd function. Why use car cdr when first and last is more intuitive. The cli is painful to work in. How dyu run a program or get thru a screenful of errors? What about documentation to lookup function names etc there's a reason some languages succeed more than others. Some are simply more usable.
@annie3606
@annie3606 2 жыл бұрын
used to use clojure for a bit but went back to C and similar languages because the jvm was jsut too slow for my taste, tho maybe I might give common lisp a try one day.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Nice! Clojure is a great language but sadly stuck on a bad runtime. Jvm has its pros and cons but for personal use it's hard to sell clojure unless you are making some sorta webservice
@annie3606
@annie3606 2 жыл бұрын
@@GavinFreeborn yeah most of my personal use is just contributing to open source projects(which mostly are written in C) or writing tools that need to operate on hundreds to thousands of files and therefor need to be pretty fast to be even remotely viable
@xseman
@xseman 2 жыл бұрын
What font do you use? Thanks
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Terminus
@beauteetmusculation8191
@beauteetmusculation8191 2 жыл бұрын
I actually started to learn Common Lisp a few weeks ago, just for a week-end. I immediately understood why macros are so powerful, and that I really wanted to learn it (I too learnt TCL the same week, great as well). I'm a bit busy right now, currently writing a (kinda) book on Haskell, just to have all the concepts in one place. I don't want to scroll the entire f*cking web every time something slips my mind. So I'm not easily overwhelmed. I guess CL is the way to go for me, even if I admit almost every scheme seems great in its own way. However, something kinda bother me. It really seems that NONE of the implementations of either Lisp or Scheme are complete enough to satisfy about everybody. The ecosystem is a mess. This lead to very incomplete compilers, sadly.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I'd say sbcl is pretty much the gold standard when it comes to satisfying all domains. Not as theoretical or teaching focused as something like racket but it is often the one I reach for.
@beauteetmusculation8191
@beauteetmusculation8191 2 жыл бұрын
​@@GavinFreeborn Yeah, that's what people told me. But I've read a bit the compiler, there are still a lot to do on basic components even if it's the standard compiler. I mean, Zig actually is more advanced that this despite being developed for only a few years. That's a bit weird to me.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@beauteetmusculation8191 mind giving an example?
@beauteetmusculation8191
@beauteetmusculation8191 2 жыл бұрын
​@@GavinFreeborn Sure. First thing that comes to mind is the windows port, which seems to be experimental. I'm not a fan of Windows (for a billion excellent reasons), but having the same experience for all systems is a must. At least for something that exists for decades. Also, I see that some implementations of Lisp exist for micro-controllers, and I think it shouldn't be. The same implementation should cover both extremely small systems and powerful ones. The entire awesome aspect of Lisp actually is to be modular like no other languages, and it still isn't modular enough to select features to include in the final binary, one must use an entire different compiler and language. After that, I do have some concerns about the repository. INSTALL file wasn't updated for ages (it mentions Linux 2.6 and OpenBSD 3.5 :-D). Don't know what's going on, seemed almost just left there to rot. The dozen scripts at the root directory of the repository seemed weird, too. That seems a bit hacky. Also, the policy for the optimizer seems too complicated than it has to be, according to the TODO in the SBCL repos. But I don't know, it may have been fixed ten years ago. I wanted to know a bit about cross-compilation, but I guess the repository isn't the way to go. First line of the README in doc/ "SBCL is -- ahem! -- imperfectly documented." So yeah. I've not a great confidence in the quality of the code, seeing all of this.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@beauteetmusculation8191 most of these complaints are reasonable. Windows support I believe is still considered incomplete due to some sbcl extensions still not being implemented but many people have used it years ago without issue so I'm not completely sure what is missing. For the install documentation it's just meant to be the oldest supported version of those platforms. I assume they don't have exact versions for all platforms. On the side of some architectures not being supported by sbcl it's just die to limited resources. ecl (embedded common lisp) is a better fit since it compiles to C. Not ideal I know but it's a lot easier. On the topic of not including the whole runtime with the executable this is possible even without installing it but as a result you lose the ability to use `eval` at runtime. I believe Zig does something similar.
@mendelovitch
@mendelovitch Жыл бұрын
What about the GC? Any implementation with manual or Rustlang-ish memory management?
@GavinFreeborn
@GavinFreeborn Жыл бұрын
Unfortunately, borrow checking is a pretty new concept so there currently is only Carp which replicates it. There has been a recent push for other languages with Manual memory management but there are few that have first class support for it. gitlab.com/flatwhatson/guile-prescheme is a recent attempt to revive a prescheme a manual memory managed lisp. dustycloud.org/blog/guile-steel-smelting-pot/ Is a recent blog post about the topic and has gained some traction
@mendelovitch
@mendelovitch Жыл бұрын
@@GavinFreeborn Thank you! It is nice to see GNU Guile (which I currently learn) getting attention!
@joshuamathews5507
@joshuamathews5507 2 жыл бұрын
I believe Chez Scheme is pronounced "Shay", like the French "chez moi".
@openroomxyz
@openroomxyz Жыл бұрын
Is lisp better than pyton in your opinion ? How can you combine knowing C++, with lisp?
@GavinFreeborn
@GavinFreeborn Жыл бұрын
In my completely bias opinion I'd say it is for multiple things. As far as mixing c++ and lisp it's hard to say since there are multiple lisps to look at. If you look at common lisp (as mentioned one of the more popular lisps) then clasp is a new common lisp implementation built to work on llvm meaning that you can have relatively easy Interop with clang.
@raianmr2843
@raianmr2843 Жыл бұрын
Lisps won't dethrone Python in what Python is good for. Likewise Python can't dethrone lisps in what they are good for. This is why you should learn multiple languages, preferably from different paradigms. If you're just starting to learn programming I would suggest that you go with Python, simply because very few people learn programming with lisps these days. After you've got to intermediate level in Python and have an arsenal of personal projects, then you may learn a new language to broaden your horizon. My personal recommendation: follow this track Python -> Go -> Clojure/Racket -> Rust -> Haskell.
@AkshayJrKumar-zq1si
@AkshayJrKumar-zq1si 2 жыл бұрын
How to start coding in lisp I am a beginner in programming
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Actually a good lisp starting point would be Racket. I made a video on it which should help you get started. Racket is a Lisp that that is very beginner friendly hand has an active community happy to answer questions.
@LabiaLicker
@LabiaLicker 5 ай бұрын
I'm interested by Lisp. But the few lisp programs I've looked at are quite slow. Are there any lisp programs that are performant?
@GavinFreeborn
@GavinFreeborn 5 ай бұрын
From my experience LEM is pretty good, github.com/turtl/api/ was good before they switched to JS, github.com/dimitri/pgloader is supposedly very performant but I have never had a need for it. There are likely much more. Nyxt is decent but it's pretty heavily held back by webkitgtk.
@LabiaLicker
@LabiaLicker 5 ай бұрын
@@GavinFreeborn Loading lem-ncurses takes a couple secs, like a really bloated nvim config would do. Lisp seems excellent to develop on (repl) . There is just to many dialects and sub dialects. I'm beginning to think the real strength of lisp is translating lisp into other langs, like what fennel and jscl does.
@GavinFreeborn
@GavinFreeborn 5 ай бұрын
Ya the initial load takes a while. I assumed you meant the performance after startup. I can't remember it taking long to startup but haven't tested it in a while. There are tons of strengths to lisp IMO. Unfortunately, the issue with those options is they lose out on the ability to treat compile time and runtime as the same environment. Really having the option to use symbols as a data type and manipulate running code. The 2nd one I show off in kzbin.info/www/bejne/d5e8kK19h8SEeKs @@LabiaLicker
@LabiaLicker
@LabiaLicker 5 ай бұрын
@@GavinFreeborn Thanks I'll give that a watch. I must say you have definitely opened my eyes to the virtues of lisp. Definitely not always the solution, but in the right application it rises head and shoulders above anything else. And I'm quite hopeful for lem, a CL editor free of emacs decades of tech debt and "gnu'ism" is an exciting proposition.
@Speykious
@Speykious 2 жыл бұрын
I'm a low level guy, so if I learn any lisp it's probably gonna be CL.
@fragamus
@fragamus Ай бұрын
Why you should -> Why should you
@zedth2
@zedth2 2 жыл бұрын
Because it's more fun than learning Javascript?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Dang should have added that to the list haha.
@TomerBenDavid
@TomerBenDavid 2 жыл бұрын
Looks like a good language for personal project but I wouldn't want someone to evaluate and manipulate code as data on my car autopilot program, I would rather it be type safety simple understandable unsophisitcated like java
@raianmr2843
@raianmr2843 Жыл бұрын
It's very unlikely that you'll ship your development environment in a production situation such as this. Considering you're comfortable with the Java ecosystem, you should check out Clojure. It runs on the JVM and so enjoys the security features of that runtime.
@halfsourlizard9319
@halfsourlizard9319 8 ай бұрын
'Chez' in Chez Scheme is pronounced ... just like 'chez' is normally pronounced in French.
@alkeryn1700
@alkeryn1700 Жыл бұрын
tbh i find LISP's cool, but i'm not sure i'd be more productive with it than with rust or python. even though it has killer capabilities.
@halfsourlizard9319
@halfsourlizard9319 8 ай бұрын
Hot take: No language can pretend to be modern unless it has a type system, parametric polymorphism, and concrete syntax.
@ujjawalsinha8968
@ujjawalsinha8968 23 сағат бұрын
Who is learning LISP right now?
@horridohobbies
@horridohobbies Жыл бұрын
Lisp has some two dozen "special forms" which significantly complicate the syntax. Special forms have very different behaviours from regular Lisp expressions. As useful as they are, macros also complicate language usage.
@user-fm3wd6uh7c
@user-fm3wd6uh7c Жыл бұрын
well special forms can make development very easy and seamless and macros can shield us from directly interacting with most of special forms. which special form would you throw out?)
@horridohobbies
@horridohobbies Жыл бұрын
My only point is that Lisp's syntax isn't as simple as everybody pretends. My favourite language is Smalltalk and it has the simplest syntax.
@comodsuda
@comodsuda Жыл бұрын
What's stopping me from learning LISP? Other things are way more important to learn to build a project and being productive, whereas LISP is only something interesting that won't be used "on production" in the near future. It's great, but instead of learning yet another programming language, I'd rather learn something new about distributed systems/Web3/Databases, etc. So It's at the end of this long list now.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
You can learn multiple if these are the same time as learning lisp. Best way to learn new tools is using them in a project and lisp is a great language for learning new technology
@raianmr2843
@raianmr2843 Жыл бұрын
In my experience, this is not a helpful way to look at things. If you think hard enough, you'll come to realize that our time, attention, focus, or whatever aren't actually like currencies. They aren't exchangeable, replaceable, or convertible. The mental fatigue you receive from a long session of learning a web framework, for example, doesn't really influence your capacity to learn a new language or style of programming. You can concurrently manage all these goals of yours and achieve far more in a unit of time than if you were to tackle them one by one. That's just how humans work, imo.
@comodsuda
@comodsuda Жыл бұрын
​@@raianmr2843 And that's a correct way of thinking, but who is talking about learning things one by one, I mentioned instead that focusing on learning things that you won't use in practice leads to nowhere. I can create a sticker like "I know LISP" but what next? Instead of lisp, you can pick a language like a scala or an elixir, and it'd be valuable on the market at least. And I'm not hating lisp, it's excellent and powerful, but the core disadvantage is that's not adopted widely, so in practice - useless. Tbh only thing now that motivates me to learn it in detail is emacs. BTW learning a new framework and language at the same time slows you(at least me) down a lot - I did it several times in many ways and learning a new framework for java (which is my core language) and learning new framework with learning python at the same time is not faster at all. From my experience, mixing is the best option, you lose time on switching contexts but new skills are more "durable" let's say.
@leonardoflores6883
@leonardoflores6883 11 ай бұрын
I miss cl and scheme videos
@llothar68
@llothar68 2 жыл бұрын
THe simple syntax is the biggest problem of LISP, it's all just paranthesis, nothing to help the brain to visually understand the code fast. It's so unbelievable why so many people just dont get it. Logo, Rebol and Dylan were the more interesting Lisp variants that tried to get away from it.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I definitely see where you are coming from. An if statement in C is way quicker to reason about than in lisp. Though I find small functions, clear function/variable names and extensive use of let helps resolve this. It is kinda a double edged sword. While more complex syntax can boost readability it can also lead to edge cases, undefined behaviour, and worst of all code complexity.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
I find it helps to put closing parentheses at the same indentation level as their corresponding openers. This does mean putting them on their own lines. Here’s a moderately complex example: (defun convert-to-region-codes (beg end) "converts alphabetic characters in the selection to “region indicator symbols”." (interactive "*r") (unless (use-region-p) (ding) (keyboard-quit) ) ; unless (let ( deactivate-mark (intext (delete-and-extract-region beg end)) c ) (dotimes (i (- end beg)) (setq c (elt intext i)) (cond ((and (>= c ?A) (= c ?a) (
@tourdesource
@tourdesource Жыл бұрын
@@lawrencedoliveiro9104 This makes it super readable. Is there an utility for automatically applying this formatting?
@laughingvampire7555
@laughingvampire7555 Жыл бұрын
I think at this point Racket should be separated from Scheme, Racket is different from Scheme, even Matt the guy maintaining it has said so. And don't forget the most important lisp of them all, Emacs Lisp to confuse and scare unix users all over the world 😈
@GavinFreeborn
@GavinFreeborn Жыл бұрын
I agree every time I go back to racket I feel like it's becoming less and less like scheme to the point it almost doesn't feel lispy to work with. But maybe that last part is just me.
@cannedeals
@cannedeals 2 жыл бұрын
I actually have recently started learning lisp, but likely won’t use it. For me the main thing I program for is statistics and graphing. Lisp does not serve these tasks well. So I will end up sticking to matlab and r.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Julia while not a true lisp in my eyes is heavily inspired by lisp and my be a good middle ground if that interests you.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Came across this and thought I'd share lisp-stat.dev/
@IExSet
@IExSet 2 ай бұрын
LOL Statistics is oldest application of Lisp, since XLispStat !
@hargunbeersingh8918
@hargunbeersingh8918 2 жыл бұрын
Paul Graham inspired me to learn lisp.
@roryb.bellows8617
@roryb.bellows8617 Жыл бұрын
What about 2023
@wernerviehhauser94
@wernerviehhauser94 2 жыл бұрын
Just until you end up trapping yourself with nested brackets......
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Luckily there are plenty of tools for that such as paredit. Though making use of new lines and indentation usually helps.
@devadharshinir8143
@devadharshinir8143 2 жыл бұрын
Post videos for perl sctipting
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I am sadly far from a perl expert. I have really only written one thing in perl github.com/Gavinok/ghighlight
@pm71241
@pm71241 2 жыл бұрын
elisp
@Nehpets94
@Nehpets94 10 ай бұрын
0:16 erlang?!?!
@oleksiilamzin1437
@oleksiilamzin1437 2 жыл бұрын
Where elisp?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Figured it wasn't distinct enough for me to give it a dedicated section. Though watching it back I should have. If you are interested it's basically CL with less features and defaults to dynamic scope. I plan to go further into differences between lisps later on.
@Lucretia9000
@Lucretia9000 Жыл бұрын
Chez is pronounced "shay" it's French.
@domorewithsage
@domorewithsage 6 ай бұрын
Hmm first few sentences could have just easily been describing Python.
@GavinFreeborn
@GavinFreeborn 6 ай бұрын
As someone who gets paid to write python nearly every day I only wish python had all the features I mentioned in this video. IMO python would be a far more enjoyable if it had tried to be a bit more like lisp. Though let's admit, I am bias
@edwardmacnab354
@edwardmacnab354 2 жыл бұрын
You haven't shown anything that is convincing. I don't find C to be that hard , so why would I use Lisp which seems to be a bit of a mindbender with respect to getting a program to make sense . Remember , I'm not a compiler so a syntax tree means nothing to me really
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Probably the biggest one even if you don't understand why the other points are so great would be the ability to test and manipulate an application while it's still running. May not sound like much but having to wait for an entire browser to compile just to go to a site and find out your change didn't fix it can completely hult productivity(in some cases for hours). For an example take a look at kzbin.info/www/bejne/bKGwqpuoeciAsNk if you don't see the advantage there than I can't really help you. You may just need to try any other language to get an idea of the other possibilities that exist in the world.
@janegwaww
@janegwaww 2 жыл бұрын
Iisp is the best language for learning, but not good for product programming.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
There are plenty of companies that have happily moved to using Clojure and ClojureScript in production. I could definitely see an argument against scheme, and CL considering the only major company making us of them I know of is Grammarly.
@0netom
@0netom Жыл бұрын
Forgot to mention, that I worked - and still work - with Clojure for companies in Hong Kong
@IExSet
@IExSet 2 ай бұрын
No proof
@halfsourlizard9319
@halfsourlizard9319 8 ай бұрын
Learn Scheme in an hour, eh? Good luck explaining call/cc after 60 min with Scheme.
@dr.vegapunkph.d7700
@dr.vegapunkph.d7700 2 жыл бұрын
Decent.
@horridohobbies
@horridohobbies Жыл бұрын
Arithmetic expressions in Lisp look bizarre. This is cognitively jarring.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
There are always "reader macros" which can. be used to have infix notation in some code blocks.
@horridohobbies
@horridohobbies Жыл бұрын
@@GavinFreeborn It's not very elegant. It looks like a kludge, which it is.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
@@horridohobbies that's fair. I've kinda just gotten used to it.
@raianmr2843
@raianmr2843 Жыл бұрын
There is code that looks elegant. And then there is code that functions elegantly. Lisps tend to aid with the latter. Once you've overcome the initial 1 foot long barrier of S expressions, you'll find that lisps enable you to cross entire mountains.
@horridohobbies
@horridohobbies Жыл бұрын
I would say Smalltalk, my favourite language, also let's you cross mountains and with a supremely simple syntax.
@hbeezey
@hbeezey Жыл бұрын
Floating subscribe button makes sure I never subscribe. Thanks for making my decision easy.
@h0stI13
@h0stI13 Жыл бұрын
Lisp is good if you want to create your own programming language. Otherwise it's just another programming language(s).
@GavinFreeborn
@GavinFreeborn Жыл бұрын
If only this where true 😔. I still have yet to see a mainstream language as interactive as lisp. Unless you cont Julia or smalltalk
@h0stI13
@h0stI13 Жыл бұрын
@@GavinFreeborn I found Specman-e from Cadence to be one of the most powerful programming language I ever encountered. It supported regex search-replace macros, back in time debugging, aspect oriented programming, constrained random generation, and many other cool things...unfortunately it was only destined for hardware verification and not for software development. I think it's a pity, it would've been a great software language.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
@@h0stI13 sounds interesting. Only experimenting I have done with hardware verification was playing with ACL2 mostly just to see what it's like. I'll have to see what's possible with soecman
@h0stI13
@h0stI13 Жыл бұрын
@@GavinFreeborn Looks like ACL2 is for formal verification. Specman is used for functional verification, meaning it's connected to HDL simulators.
@egglyph
@egglyph 2 жыл бұрын
None of these is a compelling reason for learning Lisp. BASIC has a simple syntax, many languages have REPL, many languages allow treating code as data, that should be a compelling reason to learn these too, no? Also, macros, interactivity, homoiconicity and such are all great until one needs to consume an AWS service or even just to parse some JSON over network - suddenly Lisp loses all its power that unwashed pythonistas are at least 10x more productive than you. And I don't even want to start on dictionary driven programming in Clojure.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Uh idk why you think working with json in lisp would be difficult? There are plenty of options for networking in each of the mentioned Lisps. I don't really see your point. The libs just parse the converting it into a sexp. Many Lisps even come with json parsing included like emacs-lisp and clojure. So you still get to use the same functions you would use else where. The process for such a task would be pretty straight forward is there something I'm missing? Your other points are kinda missing the point that Lisp does all these things not just a few. Also comparing nearly any REPL to that of mosy Lisps makes sense until your realize they have a feature set that competes with most language servers. Most languages REPLs don't provide error recovery, profiling, decompiling, jump to definition, etc.
@anta40
@anta40 2 жыл бұрын
I wonder if doing compiler development is a good motivation to learn Lisp...
@jerickomegatonna9518
@jerickomegatonna9518 2 жыл бұрын
I like how anti-Lispers have universally clung to this laughable argument that since some particular languages have adopted (or more like shittily imitated) some particular lisp features, they are all suddenly as good as lisp. Well, unless you have adopted ALL of those killer features (or appropriate counterparts) in a SINGLE language, bruh, you are OUT OF YOUR depth. It's just that when you do pull that off, you will find that what you got is simply a dialect of lisp.
@user-fd5ih6te9b
@user-fd5ih6te9b 2 жыл бұрын
This is like saying there's no compelling reason to learn to drive a car because wagons have four wheels too.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
Python does offer most of the functionality you get with LISP, including functions and classes as first-class objects. The main thing missing is syntax-based macros.
@mateussarmento7692
@mateussarmento7692 2 жыл бұрын
Dude this is certainly not your natural way of speaking
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Haha ya 😅. I try to cut things down as best I can so I don't waste too much of your time.
@KoltPenny
@KoltPenny 2 жыл бұрын
The real question is, were you really born free?
@raianmr2843
@raianmr2843 Жыл бұрын
Everyone is born free. It's just that people born before you are jealous and have systems in place to take your gift away.
@marusdod3685
@marusdod3685 2 жыл бұрын
why use lisp when you literally have javascript
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
hmm I can't tell if this is a joke or not? While JavaScript took inspiration from Scheme it lost many of it's features due to it's original use case of being intended for client side web applications, having a C like syntax and much more. The biggest loss of them all was how symbols/quoting, macros, s-expressions etc. That's not to mention it lost the ability to access low level usecases. As a result some good stuff made it into javascript such as map, filter, and reduce but many of the biggest selling points of lisp are still missing.
@marusdod3685
@marusdod3685 2 жыл бұрын
@@GavinFreeborn js technically has symbols as data since you can use still use the eval function to interpret code in a string, but they're generally a problem once you introduce scopes into the language. s-expressions exist in the form of arrow functions. the only loss really is macros, but like you can just replace any macro with its functional equivalent, by using callbacks and such, it just won't get expanded at compile time
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@marusdod3685 I personally wouldn't call any of those equivalent. The loss of a proper quote and sexps is the lack of homoiconicity. Excluding the pain of escaping everything, you can't take something like "typeof(\"one\")" and extract elements and structure. With the equivalent in lisp '(typeof "one") this is no different from working with any other list. One example would be to extract the function name. In lisp this is just the first element of a list so it would be closer to [typeof, "one"][0] in js. In lisp you would use (car '(typeof ”one)) or in more modern lisps (first '(typeof "one")) to return the symbol typeof. Let me know if that doesn't make sense.
@marusdod3685
@marusdod3685 2 жыл бұрын
​@@GavinFreeborn I don't see much use in extracting the function name out of a quoted list, but that could be done as well in js if you passed it as a string let bla = function() { let fun = eval(arguments[0]) return fun(2,10000) } bla("Math.pow",2,4) as long as your language can fallback to the interpreter and apply eval, code can be data
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@marusdod3685 that is completely different. You are literally just passing the function and it's arguments as arguments to a completely different function. This isn't the same. With enough work you make nearly any Turing complete solve the a problem. It's about how it can be done. I plan to do a video on this so maybe that will help you understand a bit better.
@AK-vx4dy
@AK-vx4dy Жыл бұрын
C level performance? Click bait? Lol
@cheponis
@cheponis 11 ай бұрын
But completely true. Try it!
@AK-vx4dy
@AK-vx4dy 11 ай бұрын
@@cheponis Maybe near in some cases, but many lisp constructs can't be fully optimised by their nature. But I belive that in the same ballpark. Also todays computers are so quick that if we can use node or python on backend then speed is important in some niches
@IExSet
@IExSet 2 ай бұрын
@@AK-vx4dy C is also awful language for optimization, void * LOL !!!!
@em_the_bee
@em_the_bee 2 жыл бұрын
So lisps are perfect. Got you. Too bad noone will see my dislike.
@grandma3096
@grandma3096 2 жыл бұрын
Sorry, I'm not autistic enough for lisp.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Maybe one day haha
@bendirval3612
@bendirval3612 Жыл бұрын
I don't know, dude. Lisp is kind of a terrible language. Most of the features you and others mention are anti-features that just make it harder to read and use. The main reason to use it in 2022 is to customize Emacs, and it's kind of an unfortunate language for that purpose, if you ask me. We would be better off if it went away.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
Hard to agree in the case of Emacs. Macros have been an asset in expanding the language. If it where not for the choice of lisp chances are Emacs would have died off long ago. I could definitely see some arguments for it not being the greatest for all projects but when it comes to configuration lisp is timeless. In addition having the interactive nature of lisps. Look no further than packer the most popular package manager for neovim these days for an example of Greenspun's tenth rule.
@bendirval3612
@bendirval3612 Жыл бұрын
@@GavinFreeborn I agree that lisp was a good choice at the time, but that was a long time ago. Programming didn't end up going that direction, and for good reason. Vim also made some unfortunate choices back then that users have to live with today, but in that community there is recognition that things could be better and there is innovation toward bringing it about. Every year vim and neovim are better and more capable, but every year emacs is the same. Pretty much the same as it was in the 1980s, when it peaked. Lisp is technically capable as a language, but it's extremely hard to read and pretty hard to write well. All modern languages kind of look and work the same, varying only in the details. As a result, it's very easy to learn an additional language when you know a few others. Lisp, well, it doesn't look or work the same as other languages, so it's a ton of work to learn despite its theoretical strengths.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
@@bendirval3612 gotta disagree with the majority of your points. Emacs is improving more and more every day and new great packages are being created. Is lisp difficult to learn? maybe at first but after a small learning its no different from any other language. Considering most modern languages are still learning from lisps (see Julia, ruby, nim, zig, and others) I don't see emacs slowing down much because of its languages limitations. I do admit that emacs definitely lacks adoption due to its language but most of the fear people have just comes from lack of resources which has slowly been getting better.
@IExSet
@IExSet 2 ай бұрын
Terrible language and perfect meta-language. No silver bullet can be a language, but nobody said meta-language can't and Lisp is best way to achieve your goals without low level JVM, .NET and so on.
LEM - What If Emacs Was Multithreaded
14:32
Gavin Freeborn
Рет қаралды 25 М.
The Rise & Fall of LISP - Too Good For The Rest Of the World
17:44
Gavin Freeborn
Рет қаралды 36 М.
Climbing to 18M Subscribers 🎉
00:32
Matt Larose
Рет қаралды 17 МЛН
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 18 МЛН
They RUINED Everything! 😢
00:31
Carter Sharer
Рет қаралды 23 МЛН
Why Are Lisp Macros So Great!?
16:28
Gavin Freeborn
Рет қаралды 14 М.
Learn Emacs Lisp in 30 Minutes
30:22
Gavin Freeborn
Рет қаралды 7 М.
Every Programming Language Ever Explained in 15 Minutes
15:29
Flash Bytes
Рет қаралды 263 М.
PYTHON vs JAVASCRIPT // What I Would Choose as a Beginner…
12:48
Internet Made Coder
Рет қаралды 321 М.
The History of Lisp and Early Artificial Intelligence
9:59
cryoCode
Рет қаралды 30 М.
[Scheme'22]  Programming is (should be) fun!
52:26
ACM SIGPLAN
Рет қаралды 24 М.
Gleam: Past, Present, Future! • Louis Pilfold @ FOSDEM 2024
40:33
Louis Pilfold
Рет қаралды 19 М.
Дени против умной колонки😁
0:40
Deni & Mani
Рет қаралды 11 МЛН
ВСЕ МОИ ТЕЛЕФОНЫ
14:31
DimaViper Live
Рет қаралды 62 М.
КОПИМ НА АЙФОН В ТГК АРСЕНИЙ СЭДГАПП🛒
0:59
#miniphone
0:16
Miniphone
Рет қаралды 2,7 МЛН