Lisp - First Impression [Programming Languages Episode 30]

  Рет қаралды 2,484

Mike Shah

Mike Shah

Күн бұрын

►Full First Look Series Playlist: • Programming Languages ...
►Find full courses on: courses.mshah.io/
►Join as Member to Support the channel: / @mikeshah
►Lesson Description: In this lesson we take a look at Lisp -- one of the oldest (perhaps second oldest) programming languages -- and it's still around! Lisp is the 'list processing' language, and it gives us a very powerful toolset with a simple syntax. The simple syntax however allows us to do powerful things like treat the code as data, do metaprogramming, and write fast code! Lisp is a fascinating look at a language that has had many commercial successes, but because of perhaps its 'different look' has not otherwise garnered wide scale adoption in the mainstream. That said, we'll look at some fun projects like Jak and Daxter briefly which used the GOAL lisp variant in this video (or rather, we'll look at OpenGOAL for those interested in seeing it). As always, let me know what resources/tools I missed that others should know about in the comments below!
►KZbin Channel: / mikeshah
►Please like and subscribe to help the channel!
►Join our free community: courses.mshah....

Пікірлер: 52
@dalek6779
@dalek6779 7 ай бұрын
Lisp, Emacs and Slime. You’re set for life.
@Optikz-qn8vp
@Optikz-qn8vp 7 ай бұрын
I Appreciate your content, I love your explanations of the STL and now we get tours of other languages!
@MikeShah
@MikeShah 7 ай бұрын
Cheers, thank you! :)
@thegameoflife9179
@thegameoflife9179 7 ай бұрын
Lisp is one of the best languages out there... the problems usually come when integrating it with other packages and large executables that have to include the whole compiler.
@MikeShah
@MikeShah 7 ай бұрын
Very powerful language indeed! At scale I've never used it, so interesting that is one of the challenges
@GaryChike
@GaryChike 7 ай бұрын
Great overview Mike! For those that want to continue learning Lisp, I'd recommend the book "Practical Common Lisp" by Peter Seibel. Now it's time for yet another paradigm, a stack-based language like Forth.
@MikeShah
@MikeShah 7 ай бұрын
Cheers!
@Bobbias
@Bobbias 7 ай бұрын
Scheme is also the main language of Structure and Interpretation of Computer Programs. Also, you missed the point of GOAL which was that it was kind of like a macro assembler, allowing embedding chunks of assembly code in the lisp source as a DSL.
@MikeShah
@MikeShah 7 ай бұрын
Interesting -- indeed I missed that with GOAL, that itself is probably a full video of analysis. Looking at opengoal.dev/docs/faq it looks like there's a lot of powerful reflection capabilities too that would be incredibly valuable.
@50kaoeu256
@50kaoeu256 7 ай бұрын
@@MikeShahSince LISP is the most high-level language it is also the best low-level language at the same time since an expert LISP user can embed low-level languages into itself and build compilers (macros esp when using quasi-quote) more easily in LISP than using existing "mid-level languages"
@minteligencia
@minteligencia 7 ай бұрын
Thank you a lot! That is what I am looking for a long time 😊
@MikeShah
@MikeShah 7 ай бұрын
Cheers -- enjoy! Lisp was a lot of fun :)
@ThislsYusuf
@ThislsYusuf 7 ай бұрын
17:34 Regarding your previous video about doing livestreams, I suggest a deep dive into Andy Gavin's blog on the making of Crash Bandicoot ( part 9 of the series ) as a topic of discussion.
@MikeShah
@MikeShah 7 ай бұрын
Found it -- and noted! all-things-andy-gavin.com/video-games/making-crash/ The war stories from Ars Technica a few years back was really neat :)
@twenty-fifth420
@twenty-fifth420 7 ай бұрын
Happy 30 Mike! I mean, closest I got here is Nim or Racket, but to be fair, those are kind of close to Common Lisp. If you ya know, stretch the idea of meta programming and macros. Anyway, I would classify as well 'linked list macro languages' as the 'swiss army chainsaw of scripting' and/or 'compiling'.
@MikeShah
@MikeShah 7 ай бұрын
Cheers! Indeed, I think Nim and Racket would both (especially Racket) be influenced by Lisp :)
@cebruthius
@cebruthius 7 ай бұрын
@@MikeShah Racket used to be called "PLT Scheme"
@MikeShah
@MikeShah 7 ай бұрын
@@cebruthius That's right -- good note!
@kevinrineer5356
@kevinrineer5356 7 ай бұрын
Your enthusiasm is contagious! I'm somewhat getting swept up in the Rust hype, but I feel that learning Lisp or Haskell would be worth the time at some point. (defun msg (print("uhh how do I do this"))
@MikeShah
@MikeShah 7 ай бұрын
@@kevinrineer5356 cheers! This was a really fun video to do, had been wanting to try Lisp for ages 😁
@liteal
@liteal 7 ай бұрын
Long time ago, I read the SICP book, and Scheme (a kind of LISP-like language) has been one of my favorite languages since then. 😊
@MikeShah
@MikeShah 7 ай бұрын
Yes, the classic SICP book. There's a JavaScript version now, but I've read part of SICP -- should probably finish it up :)
@50kaoeu256
@50kaoeu256 7 ай бұрын
Any tips for getting jobs in Scheme/LISP/Clojure? I guess jobs in OCAML & Haskell & Julia won't be too bad if you know how to use them like LISP... There is also Hy for Python and a LISP on Erlang's BEAM...
@MikeShah
@MikeShah 7 ай бұрын
@@50kaoeu256 Outside of my domain of expertise, but maybe there are ycombinator (i.e. startup) companies where language choice is a bit more flexible. I've also found in some of my industry work, I can write tiny applications (e.g. to process data, configure) in whatever language I like -- just depends on manager. Check out some of these languages various web pages/message boards and you might find something!
@alaindevos4027
@alaindevos4027 7 ай бұрын
Coalton is also intersting. It's a "typed" lisp.
@MikeShah
@MikeShah 7 ай бұрын
Neat! I found the github here -- thanks for sharing! github.com/coalton-lang/coalton
@sethbrown1763
@sethbrown1763 7 ай бұрын
Hey, Mike, thanks for sharing this video! I really appreciate it. I've been trying to learn Lisp for a couple of years now, without much success. I've made some progress but it's been slower than I expected, based on my experience with learning other languages over the years. Like you, I live in vim, so the whole "You need to use Emacs" thing, was a real deal breaker for me for a long time. Once I ran Tower of Hanoi script in Emacs and it instantly crashed my production server. Well, that was a long time ago but it left a sour taste in my mouth as angry users started calling my phone. But my desire to understand Lisp eventually lead me to try again with Emacs. So, this time around, I began to understand that Emacs is NOT your run-of-the-mill editor. The editor part is more like an advertisement, meant to suck you in, before the GLORY of Emacs finally dawns on you. At least, that is how it was for me. Now, don't misunderstand me. I still use vim in preference to Emacs every day. I type a minimum of 2k words a day in my personal wiki and Emacs would just slow me down. But, as I say, the editor part of Emacs is only the teaser. Emacs, like Lisp, is extensbile. You can build almost anything inside Emacs and LOTS of people have done exactly that. Email programs, calendars, to-do list, project managers, spreadsheets, database analysis, etc., all this and more, can be done and have been done inside Emacs. Like Lisp, once you grok the fullness of this, you never want to leave it. But, from the outside, Emacs (and Lisp) is a total mystery. You may know the old joke, UNIX _is_ user-friendly, it's just very particular about choosing its friends ... ? In the same way, the people who are put off by Emacs, would probably never understand the full genius of it. And ditto for Lisp. Remember, Stallman was working in the AI lab at MIT. He understands AI. I think it was his understanding of the danger of AI, even then, back in the 1980s, that led him to start the Free Software movement. No matter what you may think of Stallman as a person, he clearly understood the problem that we are only now beginning to see. So, Emacs was his solution to the problem. Emacs is an open-ended development environment, and that's before you add Slime and the various language servers available for it. Emacs stands for "Editor Macros", if I'm not mistaken, and it encapsulates the idea of macros as both a productivity tool, and in the way they are used in Lisp, to make extensibility possible. Emacs users talk in a different way about their work environment. They practically never shut it down. They don't "exit" Emacs. And even if they do occasionally log out, Emacs preserves everything when they log in again. It's an incredible way to work. This is, to my understanding, based on the Lisp concept of the REPL, which is something easy to misunderstand, and I have struggled for a long time with it. I did C programming for many years, and other languages based on C, after that, so my normal method of programming is to fire up vim, edit code, save it to a file, and then either shell out to link, and compile my code, and run the resulting executable, or invoke a debugger if there are errors. You probably do the same thing. I was so accustomed to doing it that way, so now I can't use an IDE at all because it slows me down. I'm sure you know exactly what I'm talking about. In your video, you do more or less the same thing, you edit a file, save it and run it using the sbcl command line. When you get an error, SBCL automatically invokes the debugger. You need to do it like that because if you type directly into the SBCL REPL, your code and variables disappear off the screen and you can't get them back. So you need to have a file to "hold" the code while you figure out the errors. You edit the code and rinse, repeat until you fix the errors. I, too, have done this a zillion times. You could run the command line from within vim and send the output to a buffer and then switch to that buffer to see the output or debugger's output and switch back to the original buffer. Vim does that. But I suppose for the purpose of the video, you did it slightly differently. Emacs plus Slime plus Swank (a language server) takes all of that and packages it neatly. It takes some time to learn it all and I confess I haven't mastered it yet. But the oh-my-god movement for me, was when i saw Baggers edit a running Lisp process and make the process change WHILE it was still running. When I saw that, it hit me like a ton of bricks! It looked like black magic. Edit a running process? WTF? Now, think about this for a bit. Theoretically, (and not just theoretically) you could have a program running somewhere in the universe and connect to it while it's running, debug it and fix it without ever having to re-start it. And yes, NASA has done exactly this on a remote spacecraft, coz of course, NASA uses Lisp. Now, why is Emacs so clunky? Why is SBCL so user-UNFRIENDLY? Why is there such a steep learning curve? Couldn't somebody by NOW (65 YEARS! FFS!) have written a nice, user friendly interface to Lisp? Well, it's the same reason that newbies find UNIX/Linux command line so difficult. The command line is so extremely powerful that nobody in their right mind would EVAH change it once they understood its real power. Nobody. Once you grok the power of the command line and shell scripting, you are never going back to point-and-click as your main paradigm. "You mean, I can just write a script and stick it into a crontab and it will run forever?" versus I have to bathe and dress and eat breakfast and drive in traffic to get to the office to just click on a button like George Jetson? Yeah, I'll just write a script, thank you. So, Emacs and Lisp and all their baggage, are done that way because nobody in their right mind, would EVAH change a thing once they understood the incredible power of these tools. But first, you have to climb that mountain. This is not a no-code, point-and-click paradigm. This is the Big-Boy-Pants, as a friend likes to say. "Time to put on the Big Boy Pants!" She makes me laugh. Also, with the power that Lisp brings to the table (remember this language was created to develop AI), we really don't want irresponsible people waving the power of Excalibur around like a plastic light saber. We want people who understand what they are doing. It's why root is a separate account in UNIX/Linux and you shouldn't mess with it if you don't know what you're doing. At least, that's what I tell myself after yet another session where either Emacs or Lisp have slapped me silly like the Magician's Apprentice in Fantasia. One day, one day, I will understand this! I swear as I struggle to pull Excalibur out of that damn stone!
@bsdooby
@bsdooby 6 ай бұрын
Tcl, the scripting language, is also called "Lisp for the Masses", ...
@MikeShah
@MikeShah 6 ай бұрын
Indeed!
@antoniocorbibellot6532
@antoniocorbibellot6532 7 ай бұрын
Configuring Emacs with emacs-lisp is gorgeous!
@MikeShah
@MikeShah 7 ай бұрын
Yes, quite famous for that :)
@bsdooby
@bsdooby 7 ай бұрын
My backlog for the summer grows and grows 😅
@MikeShah
@MikeShah 7 ай бұрын
Hehe, I'm trying out different cadences of videos every 2 days or every 3 days -- the videos will always be here when you need them, do enjoy the summer too :)
@bsdooby
@bsdooby 7 ай бұрын
@@MikeShah First some student exam tasks, then your videos, then summer ;)
@okarakoo
@okarakoo 7 ай бұрын
I love Lisp but despite being an old language I found that there aren't that many good tutorials around...
@MikeShah
@MikeShah 7 ай бұрын
I wonder why that's the case, perhaps mostly books then?
@cebruthius
@cebruthius 7 ай бұрын
Practical Common Lisp by Peter Seibel?
@MikeShah
@MikeShah 7 ай бұрын
@@cebruthius I believe that's the common one. Paul Graham wrote one 'On Lisp' -- a bit older, so not sure how much things have otherwise evolved.
@50kaoeu256
@50kaoeu256 7 ай бұрын
SCIP, the other sussman book, the AOP book, Lisp in pieces, On Lisp. Also LISP is similar to ML and Haskell maybe, you can sort of port code from those languages into LISP maybe using AI or a cross-compiler.
@cebruthius
@cebruthius 7 ай бұрын
@@50kaoeu256 "LISP is similar to ML and Haskell maybe" in which ways is it similar?
@Crygd-utre1
@Crygd-utre1 7 ай бұрын
fp, i must learn advanced math 😢
@MikeShah
@MikeShah 7 ай бұрын
Not necessarily to get started. I use math in game and graphics programming, but for functional programming I have not dove deep into category theory (or other algebras) to get some benefits of functional programming :)
@Crygd-utre1
@Crygd-utre1 7 ай бұрын
@@MikeShah ahhh... I'm glad to read that. How about making an Elixir video, Mike? In FP, I was interested in this language, but when I heard that FP required an in-depth understanding of advanced math, I gave up my intention and decided to just study oop language. It's not that I hate advanced math, but learning several OOP programming languages with their environment has already taken up so much of my time. If I have to add advanced math to the mix, it becomes even more overwhelming to me. I'm just not ready to add something else that I need to focus on.
@MikeShah
@MikeShah 6 ай бұрын
@@Crygd-utre1 May consider Elixer -- that's been a popular request. I have a video otherwise on Erlang here: kzbin.info/www/bejne/bmiukpt4qdamfJI
@kjrl818
@kjrl818 7 ай бұрын
I like lisp :)
@MikeShah
@MikeShah 7 ай бұрын
Cheers!
C3 - First Impression [Programming Languages Episode 31]
1:17:23
The Rise & Fall of LISP - Too Good For The Rest Of the World
17:44
Gavin Freeborn
Рет қаралды 45 М.
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН
Ful Video ☝🏻☝🏻☝🏻
1:01
Arkeolog
Рет қаралды 14 МЛН
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
Andrew Kelley   Practical Data Oriented Design (DoD)
46:40
ChimiChanga
Рет қаралды 173 М.
Coding Adventure: Rendering Text
1:10:54
Sebastian Lague
Рет қаралды 847 М.
Why LISP Is The Language of Legends
9:05
Sammy Engineering
Рет қаралды 38 М.
Practical Common Lisp
1:12:05
GoogleTalksArchive
Рет қаралды 35 М.
I Optimised My Game Engine Up To 12000 FPS
11:58
Vercidium
Рет қаралды 843 М.
Haskell - First Impression [Programming Languages Episode 25]
1:07:25
Why You Should Learn Lisp In 2025
21:50
Gavin Freeborn
Рет қаралды 70 М.
CppCon 2014: Mike Acton "Data-Oriented Design and C++"
1:27:46
Why Lisp Is One Of The Most Productive Programming Languages
12:14
Gavin Freeborn
Рет қаралды 46 М.
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН