No video

Why Lisp Is One Of The Most Productive Programming Languages

  Рет қаралды 42,335

Gavin Freeborn

Gavin Freeborn

Күн бұрын

This video is focused on explaining the idea of a lisp image and what it brings to the table. I am a strong beleaver that lisp is more than just a programming language. It's an environment with a completely
different idea of what a program really is.
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...
Patreon:
/ gavinfreeborn
---------------► Wanna Checkout My Dots? ◀︎---------------
Vimrc:
github.com/Gav...
Emacs Config:
github.com/Gav...
---------------► Come Join The Community◀︎---------------
LBRY:
odysee.com/@Ga...
Matrix Space:
matrix.to/#/%2...
Discord:
/ discord
This video is focused on explaining the idea of a lisp image and what it brings to the table. I am a strong beleaver that lisp is more than just a programming language. It's an environment with a completely
different idea of what a program really is.
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...
Patreon:
/ gavinfreeborn
---------------► Wanna Checkout My Dots? ◀︎---------------
Vimrc:
github.com/Gav...
Emacs Config:
github.com/Gav...
---------------► Come Join The Community◀︎---------------
LBRY:
odysee.com/@Ga...
Matrix Space:
matrix.to/#/%2...
Discord:
/ discord

Пікірлер: 189
@robertgwatts1858
@robertgwatts1858 Жыл бұрын
I've been using Common Lisp for over 15 years. I'm a musician and write Lisp software to help me with composition and synthesis. The SBCL implementation has gotten so fast, especially with math, that I'm currently toying with the idea of writing a full blown digital audio workstation in Common Lisp. Aside from Lisp the only other language I now use is C. Simply because of the need to interface with audio hardware, and certain real time kernel issues. But the vast majority of my code is in Lisp. It's just so flexible and fast to code in, and is definitely the best language ever for tinkering and trying out crazy ideas. I reckon that there will be a boom of Lispers in the future. It's a shame that Lisp machines stopped being developed. A Common Lisp OS would be awesome!
@user-zx3vp8mw7d
@user-zx3vp8mw7d Жыл бұрын
i am trying to learn Common Lisp. May i know about your environment? I downloaded Portcle. which is SBCL+emacs+qlisp.
@robertgwatts1858
@robertgwatts1858 Жыл бұрын
@@user-zx3vp8mw7d I normally use SBCL within Emacs. Sometimes ECL.
@morgengabe1
@morgengabe1 Жыл бұрын
Brett Buddin, i think, wrote a DAW for the terminal that uses a lisp for live editing.
@yakovdavidovich7943
@yakovdavidovich7943 Жыл бұрын
Similarly, I'm right now toying with the feasibility of writing DSP cores in SBCL. There's a lot of hackery in the type annotations and declarations, but some pretty neat stuff can be obtained. This is all to facilitate IQ modulation and demodulation for RF baseband signals, but ultimately not all that different from normal audio either ;-).
@brucewilliams6292
@brucewilliams6292 Жыл бұрын
Have you seen uLisp for micro-controllers? It sounds like what you are describing. I haven't used it yet as I am just getting started in LISP but the idea of not having to do a restart to change code (such as was done to update the LISP images on spacecraft) is intriguing.
@insertoyouroemail
@insertoyouroemail 2 жыл бұрын
I'm coming from Haskell and I forced myself to learn Chez Scheme. Once I realized I could send code to a running REPL, I discovered this workflow and found myself becoming very productive even though I have almost no libraries and no tooling. I'm actually building tooling and a standard library for myself and I can see myself becoming more productive in Scheme than I could in any other language where I'm limited by what the language developers give me.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
This is part of the reason I am usually talking about common lisp. While scheme is definitely a cleaner language the ecosystem leaves a lot to be desired
@insertoyouroemail
@insertoyouroemail 2 жыл бұрын
@@GavinFreeborn yep it's a good point. I suspect I will actually end up with common lisp in the end but right now I am learning a lot with scheme so I'll stick with for a while
@KillTheFace55
@KillTheFace55 2 жыл бұрын
As you say, "Send code to a running REPL," you mean you're extending the procedures and macros that implement the REPL itself, yes?
@insertoyouroemail
@insertoyouroemail 2 жыл бұрын
@@KillTheFace55 No, I mean you start the empty program and define procedures as it's running and gradually mold your program.
@stevenpe781
@stevenpe781 Жыл бұрын
@@KillTheFace55 I guess this is a reference to the editor/lisp server model (SLIME), where code is sent through a socket for eval. I we take the example one step further with the LispWorks/Editor model (or Emacs/Elisp), you're litterally editing/evaluating code WITHIN the image, and that feels great! (the cycle time is even much shorter than with a REPL!)
@nERVEcenter117
@nERVEcenter117 2 жыл бұрын
The lack of syntax - or probably better said, the uniformity of S-expressions - means that one can express any (ANY) problem or domain as a composition of expressions; effectively, constructing a DSL bottom-up which describes the processing of a given problem. It’s declarative, composable, and often functional. Arbitrary features can be added in no time, usually as simple functions. It’s the most powerful abstraction in programming; it becomes clear after Lisp that *enforcing* syntax is *reducing* flexibility, composability, and thus power. You begin having to wrestle the syntax instead of having it work for you.
@robinpage2730
@robinpage2730 Жыл бұрын
I like to put it this way: it's actually easier to communicate when there's only one way to say a thing.
@mmille10
@mmille10 Жыл бұрын
You can get very similar action in Squeak/Smalltalk, editing a running instance. What enables this is late-bound dispatch. Any language could do this, but very few do. One reason is it's difficult to implement efficiently, because every single step in a program has to do a lookup inside an in-memory database of code at run-time. With the design of processors we have, it's easier/more efficient to bind logic early, but that makes engineering of good software more difficult. Also, the reason you don't "feel" the edit->compile->run cycle is each expression is compiled incrementally. You don't compile your code all at once, like in most compiled languages.
@sjatkins
@sjatkins 2 жыл бұрын
Lisp really has no syntax once you get over simple parens. That is part of its beauty. There is a minimum of stuff defined as syntax and built-ins and keywords and other cruft to have to bang on to say what you really mean. And there is no limit on the problem patterns I can capture and make reusable or ugly hackery needed to do so.
@lispbar
@lispbar 10 ай бұрын
The actual keys to interactive programming are three things: an interactive interface (in Lisp this would be a REPL, a read eval print loop), resident development tools (compiler, interpreter, loader, ... are a part of the interactive language) and a way access them via names (-> symbols and symbol tables in Lisp). For example a function to do output can be registered under the name PRINT-LINE. Then one can reassign this symbol to a new function, which might be an improvement to the earlier one. All global function calls (even in compiled code) go through this symbol table, so changed definition get automatically used on the next call. This allows one build up named functionality piece by piece and update it incrementally. The "image" (-> a snapshot of the system state, like a dump of the heap memory) is a tool to get faster to the state of Lisp system (restoring all the code and data which has been loaded into Lisp). Dumping and restoring images has been introduced in the very first Lisp implementation 60 years ago, because restoring the Lisp system state otherwise was very slow. Note that a bunch of Lisp implementations can't save/restore images - for example ECL (a Common Lisp implementation) and Clojure (a Lisp-derived language for the Java Virtual Machine) - but they still support interactive development.
@rauljosegarcia
@rauljosegarcia Жыл бұрын
I understand now why Emacs is so extensible. I am even beginning to understand why one would want such a tool that is so extensible, although being able to extend it in any kind of way takes a lot of skill.
@ironmanlifts
@ironmanlifts Жыл бұрын
Thanks for the videos, you're the one that got me started on vanilla emacs. I copied your few lines of your config and grew it since into a massive 10,000+ line emacs config lol. I'm counting the lines in my modules (require 'my-module) as well.
@demolazer
@demolazer Жыл бұрын
What really blows my mind about LISP is how it's written in itself. I can write every inbuilt function myself if I want, or look at the code it's written in. Or write new lisp code while im running a pre written script. In python for example, as a relative novice to programming, when I use say the map() function, its written in C and i just trust it does what I want. In LISP i can write my own map function. I've even found a macro on stack overflow that creates a list comprehension function with almost the same syntax as Python. I feel learning lisp has made me better at python too. Except now I have this urge to write lambda functions and pass them around lol which is hardly optimal, but it's a lot of fun :D Also the parentheses aren't that bad! Once you get used to it the syntax feels very elegant and natural, at least for me.
@reisen1553
@reisen1553 2 жыл бұрын
Indeed, Lisp is the most poweful programming language. Great video as always.
@randomdebris
@randomdebris 2 жыл бұрын
Smalltalk and Self are very similar to this
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Had that noted down but must have forgotten to mention it. Smalltalk in particular takes the whole idea of an OS image to another level. At least from my knowledge of pharo which I assume is very similar to how smalltalk was
@derekfrost8991
@derekfrost8991 3 ай бұрын
I wanted to learn Self but it's so hard to find good info about it..
@jacekkow119
@jacekkow119 2 жыл бұрын
Indeed, if you not define or loosely define the word "productive" and do not use objective metrics, for any you can make a video titled "Why Is The Most Productive Programming Language"
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
You most definitely can. This is just a workflow I've found to be productive at least when it comes to develop new and extending existing software.
@yash1152
@yash1152 Жыл бұрын
3:20 doesnt REPL of all these languages (python, julia) etc do the same thing?
@gsofficial
@gsofficial Жыл бұрын
Man, I would love coding in the kind of environment where you were just printing simple values to a screen, as opposed to deploying to a canary, or live-updating a webpage, or any of the things that we have been doing for over a decade.
@prism223
@prism223 Жыл бұрын
It's hard to convey the Lisp REPL in a cycle diagram. Lisp is always running, and compilation is usually instantaneous, so it's as if you're only writing and running code and instantly seeing the results of the changes. Not having to constantly restart your entire programming environment is rare and a game changer.
@stevenpe781
@stevenpe781 Жыл бұрын
Plus, the ""Lots of Irritating Single Parentheses" are actually a great plus for very fast navigation/evaluation (w/o mouse) while editing/evaluating (meaning C-x -C-e, C-M-a, C-M-u ...), but hard to describe/convey ...
@prism223
@prism223 Жыл бұрын
@@stevenpe781 I'm trying to put together ideas to express that in a video, as it seems there's something fundamentally important about having semantics closely mapped to syntax, which is what assembly, Lisp, and many functional languages like Haskell have but something that other languages like C/C++, Java, Fortran, & Python fail to capture. So since their syntax is a convoluted version of semantics, it's very difficult to enable semantic navigation & editing of code, to the point where incomplete statements can't even be interpreted due to the ambiguity. Where Lisp seems to stand out above strictly functional languages that lack S-expressions is that specific point about semantic navigation given incomplete statements. With Lisp, you can easily navigate up, down, and around incomplete statements, but if e.g. a Haskell function definition is missing its `=` sign then it's likely that an editor would not be able to figure out what the rest of the code is supposed to mean. In Lisp that would be equivalent to e.g. forgetting to close a set of parentheses, but that's much easier to detect.
@pappapez
@pappapez Жыл бұрын
Thanks for sharing this! I’ve been looking for a way to explain the workflow, and you just provided! ❤
@kahnfatman
@kahnfatman 2 ай бұрын
I’m in such a hype for Ocaml and Lisp now. I’m learning algorithms in Haskell. I’m leaving my OOP root into the FP world!!!
@yvangodin9313
@yvangodin9313 2 жыл бұрын
on par with Pharo Smalltalk
@MENTOKz
@MENTOKz 2 жыл бұрын
u da best bru. I wanted to look at a language that is like a scripting + fast compiled code so common lisp might be a thing for me at work.
@tswdtx
@tswdtx 2 жыл бұрын
I like CL, but it's far from the most productive language. It suffers from the same issues as all dynamic languages that make them more of a pain as the project grows. Static typing and analysis are far more productive on larger code bases. The last project I tried to do in CL hit a brick wall because the DB libraries don't support blobs with mysql and I kept hitting a bug in hunchentoot caused by them not mutex locking around the socket correctly. So, yeah, I haven't found it very productive for anything significant.
@vitalyl1327
@vitalyl1327 2 жыл бұрын
Build a typed DSL on top then. See Shen for example.
@robinpage2730
@robinpage2730 Жыл бұрын
Write a typed Lisp.
@PePe-kv2se
@PePe-kv2se 11 ай бұрын
Are the bugs you're referring to even related to static typing though?
@argonwheatbelly637
@argonwheatbelly637 2 жыл бұрын
Symbolics. Yeah, I'm that old.
@kalmanlajko6268
@kalmanlajko6268 2 жыл бұрын
Hey thanks, and great video! Have you heard about Urbit and hoon? It is an overlay OS, and Hoon is similar to lisp, it is also homoiconic
@nerd-
@nerd- Жыл бұрын
chad spotted ~
@ebn__
@ebn__ 2 жыл бұрын
Great video as always!
@geoffreysummerhayes4793
@geoffreysummerhayes4793 2 жыл бұрын
Let me add Forth to the list of languages that can carry the entire base around in the final product. Mind you, I much prefer using Lisp.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I really wanted to add some talk about forth and small talk to the video but the runtime got a little out of hand. Happy to see others mentioning them!
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
FORTH really isn’t worth using any more. If you want an RPN language
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
, PostScript had some interesting ideas, and at least you can build a more modern language along the same lines.
@rantalbott6963
@rantalbott6963 2 жыл бұрын
FORTH was useful decades ago, when memory was measured in double-digit K and a system that could cross compile cost as much as a car. Now that we can write C++ for an Arduino that costs less than a pack of cigarettes, or run Linux for less than what we used to pay for a good keyboard, it belongs in a museum next to the flint tools.
@francisst-amour646
@francisst-amour646 Жыл бұрын
@@lawrencedoliveiro9104 Like what (ideas)?
@SimGunther
@SimGunther 2 жыл бұрын
I think of LISP dialects as a good output language from programs written in a higher level language that already has static typing in it. You got a simple problem you need to solve? Create a language with custom syntax that is only built to solve the problem even if it's a very small problem. Doesn't have to be the next Rust or Haskell, but it needs to be simple enough to solve the problem and no more problems than that. If the problem genuinely encompasses multiple paradigms, use an existing general purpose language for that. 4:14 I might be a little confused here, but interactive programming implies some kinds of hot swap from a prompt/running daemon while live programming implies that procedures are sent to data via a queue holding processes/closures to run on the data (Peter Alvaro has a few talks on this concept, including the blue sky OS). Both of these concepts imply that you have a way of looking inside of the program's internal state/data AFAIK.
@user-uf4rx5ih3v
@user-uf4rx5ih3v Жыл бұрын
This makes the language too fragmented and also makes people new to your software having to learn a new language essentially. I'm not sure this is the best way for software engineering.
@A5A5A5A5h
@A5A5A5A5h 2 жыл бұрын
Nice video as always Gavin! What’s your opinion about Clojure? Have you ever tried it?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I like the language but as someone who has worked with java as a full time job I can't stand working with the JVM more than I need to. I realize this is a necessary evil to sell supervisors and investors on clojure.
@replikvltyoutube3727
@replikvltyoutube3727 5 ай бұрын
Agreed on the JVM part. However there now is babashka, a binary built by graalvm. So you don't need a JVM to run it, except when you want to load custom library
@user-he4ef9br7z
@user-he4ef9br7z 2 жыл бұрын
Nice. Makes me wanna learn Lisp.
@erdalmickeyilkturk
@erdalmickeyilkturk 3 ай бұрын
Oh, well, I had a great teacher (!) at the university. He was a Russian-French-American. He was also a poet-computer scientist. I just loved LISP when I first met her ;o) However, I have been using C/C++/C# ever since. Because I was the only one who was into LISP in my hood ;o)
@Antiorganizer
@Antiorganizer Жыл бұрын
First off, the whole K&R style was a mistake since day one. Allman makes hierarchies so much clearer, where braces line up. People that stubbornly cling to K&R feel that it's good to save vertical space, but it makes reading it slower. It's much easier to scroll through code where Allman style is used. I know this is a bit of a religious issue, but to me, it's people refusing to accept facts. This applies to Lisp also. Writing a bunch of open braces at the end of a line and then closing them down below, you can't visually pair up the open and close of lists. It's a great example where K&R fails. Writing all the parenthesis to line up the opening and closing of each segment, will already improve Lisp's readability. True that the amount of vertical space will go up seemingly absurdly so. However, we could fold sub segments. I see it as a hierarchy like a gui tree control, where you can press little + buttons that expands a node where you can then reveal its children. I think we could attract new attention to Lisp by changing how its code is organized / displayed. And then also, perhaps the language could be changed to make it so that a node itself states the instruction, and then *its* children its (optional) list, instead of writing the instruction inside the list. And then lastly, the whole notion of parser combinators can be done so much nicer in lisp. Lips is all about hierarchies. You could define languages inside languages inside languages.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
You definitely make some good points. While I like the current standard lisp formatting I think lots could change to provide a better user experience. The biggest problem I see day to day with the current way is the messy git diff output. Often minor refractors can make for huge diffs and I feel like there are plenty of opportunities to improve it.
@nac5901
@nac5901 4 ай бұрын
You sound literally insane saying this 🤪 Who wants to visually pair up parentheses? (What parentheses? Lisp is made of trees of objects, there are no parentheses)
@DoubleAAmazin3
@DoubleAAmazin3 2 жыл бұрын
What really matters more than anything is....documentation!
@farsthary1984
@farsthary1984 2 жыл бұрын
Awesome content, love you
@jorgegomezabrante8780
@jorgegomezabrante8780 2 жыл бұрын
Hi, great vid! Would you be able to do a video on sly stickers?
@joshpayne4015
@joshpayne4015 2 жыл бұрын
Lordie, I took LISP language in college one semester in the late 80's (thanks to Lisp being installed on the university's AT&T 3B15 minicomputer) under the guise of "this could be an important AI language". At the time I really loved it. Now some-odd years later, I can't imagine trying to learn it again. We affectionately understood LISP to be an acronym for "Lots of Irritating Single Parentheses" lol.
@horridohobbies
@horridohobbies 2 жыл бұрын
Smalltalk is also image-based and offers all the same benefits. However, there are several important differences... First, Smalltalk is much, much easier to learn for newcomers, especially young people. In fact, Smalltalk was *literally* designed for teaching programming to young people by Alan Kay, Dan Ingalls, and Adele Goldberg at Xerox PARC. Second, its syntax is much more readable like conventional programming languages. This is especially true for arithmetic expressions. (Reader macros are a goofy workaround.) Third, Smalltalk is the most productive of all the major languages, according to a 2017 study by Capers Jones. Lisp is one of the least productive! I suspect a large part of the reason is Smalltalk's elegant graphical IDE. It's so easy to use, even a child can use it! (Emacs is a nightmare for beginners.) Fourth, Smalltalk is extremely flexible, adaptable, and extensible without the need for macros (whether hygienic or not). Smalltalk is practically its own DSL (domain-specific language)! Fifth, Smalltalk is purely and consistently object-oriented. OOP is the most widely used paradigm in the industry. There are object-oriented add-ons for Lisp but they're not standard and not widely used. Smalltalk celebrates its 50th anniversary this year: kzbin.info/www/bejne/g3XKk4h5qah-l80. Also, kzbin.info/www/bejne/ioK0YqKOgpyBo9U.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I've taken a look at Pharo but I've never truely dug into it. Maybe if I find a little extra time I can dig a little deeper
@horridohobbies
@horridohobbies 2 жыл бұрын
@@GavinFreeborn You should. It's truly a lovely language. But one needs an open mind. I find too many programming bigots.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
Unfortunately, Smalltalk never quite achieved that goal of teaching young people to program. It just got too complex. Even Goldberg _et al_ admit in some of their writings that it can take several months to become _au fait_ with the extensive library. Otherwise, you will likely end up reinventing parts of it while trying to write your own code. LOGO was an example of a language which was much more successful at teaching children to program. Probably because it was rather less ambitious.
@argonwheatbelly637
@argonwheatbelly637 2 жыл бұрын
I still use Squeak for Smalltalk.
@horridohobbies
@horridohobbies 2 жыл бұрын
@@lawrencedoliveiro9104 True. It does take time to acclimate to the class library. But time doesn't make it difficult; time requires patience. Smalltalk was built for *exploration* as Alan Kay et al. will tell you. And exploration takes time. In general, all *practical* programming languages require you to study the "standard" library without which you can't do much. This applies to C, Java, Python, etc. Smalltalk and Lisp are no exceptions.
@kyuthefox
@kyuthefox 2 жыл бұрын
lisp images remind my of the Java VM in some strange way.. but with more access to the "VM"
@voronow3
@voronow3 2 жыл бұрын
I am strongly recommend you to read the article "Clojure" in the Wikipedia.
@kborak
@kborak 2 жыл бұрын
is "an" operating system.
@veer66
@veer66 2 жыл бұрын
I like your explanation: run -> write -> comile.
@swirlingabyss
@swirlingabyss 6 ай бұрын
Lisp Is AN Operating System, sir.
@LambdaJack
@LambdaJack Жыл бұрын
So how do I use Lisp directly on HW? Linux doesn't seem to be of any use. BareMetal OS seems promising.
@ChasRMartin
@ChasRMartin 2 жыл бұрын
Lisp is compiled and not interpreted? Since when?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
There have been compiled versions of common lisp for decades now.
@tswdtx
@tswdtx 2 жыл бұрын
Lisp has never been interpreted. It does incremental compilation at the expression level, which ends up acting as hot loading. The compiler and runtime are the same thing, there's no separation. When you give it new code, it compiles it into the running image.
@ChasRMartin
@ChasRMartin 2 жыл бұрын
Curiously, the links I left to lisp interpreters have disappeared/
@freesoftwareextremist8119
@freesoftwareextremist8119 Жыл бұрын
@@tswdtx Clisp is an interpreter implementation. If you count bytecode interpreters. Well I guess in that case, Abcl is also an interpreter...
@lispbar
@lispbar 10 ай бұрын
The first Lisp compiler able to compile Lisp code to assembler appeared ca. 1962. It also could compile itself.
@EvanZalys
@EvanZalys 2 жыл бұрын
It's fine to say you like lisp or think it's cool, but if you're going to say "it's the most productive programming language" you should at least back it up with evidence of your own extreme productivity in it.
@jimiscott
@jimiscott 2 жыл бұрын
Agreed. This did not look very productive. We had a convoluted talk about a dynamic runtime/dev environment and then some weird error handling exercise and alteration of the port.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Completely valid criticism. I actually have a video recorded and edited covering the process of developing a production level CL application. I never got the official ok to publish the video. I've been holding off on publishing it for almost 4 months now so I should follow up and see.
@prism223
@prism223 Жыл бұрын
It will always be anecdotal, but here's my anecdote: Started a nuclear physics PhD. Used the standard tools C++ and the CERN ROOT library to write programs to run in batches on a remote computer cluster. Some people started using Python to speed up post processing but they still relied on the usual batch structure, one script/program per pass over the data, possibly using a massive monolithic program with lots of control parameters to simplify their interface. I was learning Common Lisp because I'd heard how great macros were. Ultimately in a few months I built an analysis framework that was essentially a DSL for doing data analysis with Makefile/spreadsheet-like dependency propagation built-in. So instead of writing a monolith or multiple programs for each pass over the data, I defined individual targets, e.g. a histogram, scatter plot, fit function for data, subset of data etc., and the system automatically generated programs to submit to the cluster, monitor progress, resubmit jobs that timed out, and downloaded & merged results to my workstation computer. If I needed a change, I edited the target(s), hit an Emacs combo, and the system submitted new batch jobs just for what minimally needed updates. It didn't even lose efficiency due to me adding a plugin that generated C++ code to compile for certain operators in the DSL. Having worked with Python after the doctorate, I can imagine building a similar system, but not without costing much more time and likely lacking many features.
@gyurilajos5010
@gyurilajos5010 Жыл бұрын
Checkout what the founder of Y combinator says about the subject.
@gyurilajos5010
@gyurilajos5010 Жыл бұрын
While at it learn about the Y combinator hint lambda calculus
@jacksmith1098
@jacksmith1098 2 жыл бұрын
Could you please do a video on sic irc client and bitlbee?
@GeorgWilde
@GeorgWilde Жыл бұрын
Is there a way of easily restarting the entire state of the application back to the init state without killing it completely, so that we still stay within this workflow you demonstrated?
@freesoftwareextremist8119
@freesoftwareextremist8119 Жыл бұрын
No, you have to restart your Lisp. But you can restore from saved images.
@pouet4608
@pouet4608 Жыл бұрын
For mature projects, does lisp has a way to organize code and prevents us having to read everything while on boarding?
@GavinFreeborn
@GavinFreeborn Жыл бұрын
There are multiple. The first one and quickest one is when projects use a packages.lisp file to define all their packages. This gives a file you can look at to get a general idea of the projects layout. Next would be simply running the program and poking at it from the repl. Most large applications use some form of logging so I can usually set that to it's most verbose when looking for what code controls what feature. If I need more details I can use (trace function-name-here :methods t). All in all I find exploring new projects relatively straightforward.
@antinatalope
@antinatalope 6 ай бұрын
Have you used Forth, Gavin? You'd have the same experience, but in stack RPN notation. Lisp and forth; two of the most enjoyable languages imaginable.
@GavinFreeborn
@GavinFreeborn 6 ай бұрын
Only done the basics. Haven't used it long enough to get used to manipulating the stack. One day I'll have the free time to dig into it
@openroomxyz
@openroomxyz Жыл бұрын
Can list be used as a scripting language inside your own game engine code ? How it's better than python?
@GavinFreeborn
@GavinFreeborn Жыл бұрын
It can and has been used as a scripting language for video games and Infact has been used to create entire games. The Jak games are pretty famous for being written in a lisp dialects that allows for the exact workflow shown in this video. The game Kandria is in development write now written 100% in common lisp. As far as why Lisp is better than python it all comes down to usecase really. Python has more libraries and tons of modern tooling that common lisp just doesn't have. Common lisp has the advantage of supporting multiple threads, much much faster code execution, and the language is much much more powerful (my why Lisp video kinda gets into this) meaning that if there is a language feature you need chances are high you can implement it on top of lisp.
@slavicradko9846
@slavicradko9846 2 жыл бұрын
Did you write something substantial in Lisp?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I've written some small personal stuff but my 2 most substantial projects where written during my last job. I can't speak too deeply on their purpose just due to the NDA I'm still held under but it was a service manager with an interactive service manager service. If you have any questions I'd be happy to answer (within reason)
@slavicradko9846
@slavicradko9846 2 жыл бұрын
@@GavinFreeborn What I mean is "the most productive programming language" is the bold statement to make. Probably could be proven if you have built something big in a reasonable amount of time. My first impression when I see such claims is "sure nobody bothered to prove it". It might be the best programming language in the world but how should I believe it, if I don't see you program something really cool in it?
@defnlife1683
@defnlife1683 2 жыл бұрын
Time to add a repl plugin to neovim. :p What’s the best way to learn any flavor of lisp?
@viacheslav1392
@viacheslav1392 2 жыл бұрын
the best way to get started with lisp is using Emacs.
@defnlife1683
@defnlife1683 2 жыл бұрын
@@viacheslav1392 I actually started my coding journey with Doom emacs on Windows. It was eye opening. It gave me the impetus to start really developing and move away from tutorial hell and to live in the editor. I eventually switched to linux (minimal arco linux + dwm), but I started using neovim with a lot of plugins and customizations. felt it was easier to configure for what I wanted and I didn't get weird breaking errors. recently switched to a full lua config and though it's not as intuitive to me as Elisp and Vimscript it's working well. I'm not counting Emacs out, in fact, I'm installing it as I write this, but I don't think I'll be going back to it for now sinve I've fallen into a groove. Already saw he has a video on a repl plugin so I'll check that out.
@astroid-ws4py
@astroid-ws4py 2 жыл бұрын
@@defnlife1683 By the way, There are two Lisp flavors that compile to Lua: Fennel and Urn, So maybe you can check them out for configuring your Neovim environment.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
As far as repl plugins for neovim there are multiple but the most recent one that gained traction is conjure
@defnlife1683
@defnlife1683 2 жыл бұрын
@@astroid-ws4py which do u prefer?
@donjindra
@donjindra 2 жыл бұрын
It's like Forth in that way.
@hansisbrucker813
@hansisbrucker813 Жыл бұрын
How well does image based development like shown here work with Git? 🤔
@GavinFreeborn
@GavinFreeborn Жыл бұрын
It really depends how you use it. I find it works fine so long as I am trying to keep the source code in sync with the image. If I start loading code without actually having any form of backup it can be an issue. I try to reuse some of the code used in the repl to develop tests so I don't have to worry as much on if I forgot to commit some code that is in the image but not in the repository.
@hansisbrucker813
@hansisbrucker813 Жыл бұрын
@@GavinFreeborn aha I think I can work with that 😊
@davidjohansson8476
@davidjohansson8476 2 жыл бұрын
Something that I find a bit confusing in the world of Lisp is what exactly is meant by compilation. I'm doing a bit of Lisp these days thanks to Emacs, but I feel much more at home in the world of C and C++. So when I hear compile, I'm thinking that I'll get an actual binary exectuable. But is this really the case when "compiling" Lisp as described here? From some quick googling, I found something which basically seems to say that compilation in the world of Lisp means to expand all macros, so that the macro expansion is not done at run-time. The resulting "compiled" Lisp code would still be Lisp(not assembly or binary) and would then be run by what I would call a Lisp interpreter which happens to have been integrated into the "compiled" Lisp exectuable, thus making it a stand-alone exectuable file but not a binary executable. Am I understanding it correctly or am I lost? If my understanding is right then I find it hard to believe that the fact that Lisp can be "compiled" makes it a performant laguange, since it wouldn't really be compiled in the sense of actual compiled languages. Would be interesting to see some performance benchmarks. I found somebody who had done some benchmarks, comparing rust, Java and "compiled" Lisp. In those tests rust is far worse than both Java and Lisp, which seems odd. Other benchmarks showing compiled languages to fall far behind interpreted ones often make the mistake of compiling for debug not release, and I suspect that something similar happened here. Anyway, as of now my confusion about compilation in the world of Lisp remains..
@francisst-amour646
@francisst-amour646 Жыл бұрын
> compilation in the world of Lisp means to expand all macros That is false, compiling in lisp usually means the same thing as in the world of C/C++, except the output of the compilation is in-memory as opposed to, say, an object (.o) file. When you want to create an executable, you compile all the code in the same process and then "dump the image" as an executable. But! The reality is more nuanced than that. Implementations like sbcl always compile the code, but some implementation are pure interpreter, others use a VM (like abcl that runs on the JVM). I hope this helps P.S. The macro expansion is part of the compilation process, but it's not the whole thing.
@desmondwilson3416
@desmondwilson3416 6 күн бұрын
I'm in a laptop rn.
@kapilrakh
@kapilrakh 2 жыл бұрын
Does it mean one can never have proprietary code in lisp since everything is readable?
@_FFFFFF_
@_FFFFFF_ 2 жыл бұрын
When most people say proprietary they mean a non free licence. The ability to read the code does not affect the license of the code.
@acebulf
@acebulf 2 жыл бұрын
As Chaz said, dumping the code is not necessary. The amount of information included would be on par with what you'd get doing a disassembly with C++/C#
@jinguu5852
@jinguu5852 2 жыл бұрын
So the answer is no. You can ship compiled binary files in which the source codes are not accessible to the end users.
@youtubehandlesux
@youtubehandlesux 2 жыл бұрын
@@acebulf So which one it is then, C++ or C#? Because for c++ it's basically impossible to regenerate original code especially under release mode, but for C# even without debug information it's trivial to get the original source code, variable and function names included. I've decompiled a whole ass C# video game before, changed an algorithm in it, and it recompiled and ran successfully on the first try
@nerd.bkk.1013
@nerd.bkk.1013 2 жыл бұрын
More videos on hacking on nyxt please. As a student I think I can get a lot out of this.
@arian8791
@arian8791 2 жыл бұрын
What program is that you are writing on?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
excalidraw
@prwchan
@prwchan Жыл бұрын
*an
@kazkylheku1221
@kazkylheku1221 2 жыл бұрын
Nobody in their right mind literally works this way. Lisp people put code into files that are in version control like Git, just like everyone else and can reproduce the application build from scratch. In some situations it's useful to have a running image and reload updated version of that code from those files, without stopping and restarting the image. This is very important if the code maintains a lot of state that you don't want to lose (e.g. because a bug has been reproduced after much effort or whatever, or it simply takes long to get the application into a certain state where you want to be testing your change). But, Lisp programmers aren't stark raving lunatics, just building up a complex program via side effects inside some running image that are not recorded anywhere else. And I should mention that good Lisp coders write test cases like everyone else; they don't just type things into a session, manually test things, and ship the image. That's massively counterproductive.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I did not intended to give the impression that people shouldn't record their changes in version control. I agree with the majority of what you said. The intent was to give an example of how this could assist a programmer during development.
@neunmalelf
@neunmalelf 11 ай бұрын
The average JavaScript/TypeScript/Rust code block has more brackets than lisp 😉 But 🤐 don't tell anyone 😂
@noctisigna
@noctisigna Жыл бұрын
((yes))
@desireco
@desireco 2 жыл бұрын
Forth is even better :)
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I've actually been playing with it recently. Though I haven't gotten all that into it. Only gone through some basics.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
I had a look on GitH
@lawrencedoliveiro9104
@lawrencedoliveiro9104 2 жыл бұрын
ub for FORTH projects. I found a lot of people who had done their own FORTH implementations, but nobody seemed to go on to use them for anything productive.
@argonwheatbelly637
@argonwheatbelly637 2 жыл бұрын
It's a fun language, and if you ever pressed L1-a on a Sun, you dropped into forth.
@rolandinnamorato1953
@rolandinnamorato1953 Жыл бұрын
Average Lisp Enjoyer
@BerenddeBoer
@BerenddeBoer 2 жыл бұрын
I'm a ferm believer in a third option: if it compiles, it works. In a properly designed language (such as Eiffel or Elm/Haskell) that's how works for a lot of the development cycle.
@zackradisic6684
@zackradisic6684 2 жыл бұрын
I like the Lisp languages a lot, but after being exposed to Haskell and Rust I really can't go back to an existence with no types
@PePe-kv2se
@PePe-kv2se 11 ай бұрын
@@zackradisic6684 I have the same issue. I'm currently working on a game in Rust and I would love to use CL but I just feel naked without types and static analysis.
@rashie
@rashie 2 жыл бұрын
👍👍
@muskyoxes
@muskyoxes 2 жыл бұрын
If it's productive, shouldn't it produce stuff?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
Unfortunately CL people are more interested in extending the language than actually producing products.
@thanatosor
@thanatosor 2 жыл бұрын
It’s surprising that people still love CL nowadays to use over other scripting languages. Problem with lisp is often about its ecosystem and the maintainable issues.
@teenspirit1
@teenspirit1 5 күн бұрын
Another underwhelming wide-eyed intro to a lisp repl that does nothing interesting. And the comment section is full of drones praising s-expr and how they can do a lot more with a lot less or something. Or maybe the whole thing is satire. In any case, this just makes me want to stay *far* away from any kind of lisp. Waste of time.
@GavinFreeborn
@GavinFreeborn 5 күн бұрын
@@teenspirit1 another? Didn't know there were that many of these. Idk why you keep watching them if you don't care for them 😅
@ohmyv3gatron
@ohmyv3gatron 2 жыл бұрын
I love lisp but cl angers me. They’re so far behind web wise and don’t seem to care. Clojure gets me by…
@freesoftwareextremist8119
@freesoftwareextremist8119 Жыл бұрын
What specifically do you think it lacks?
@ohmyv3gatron
@ohmyv3gatron Жыл бұрын
@@freesoftwareextremist8119 just in general they’re behind. Haven’t even updated http libraries to 2.0. They just tell you “just use nginx!” It’s just more so the culture, they’re stuck OR PRIVATE. I know people have written their own modern web servers from scratch but they’re for their company. Not open source.
@laughingvampire7555
@laughingvampire7555 Жыл бұрын
No, it isn't. It is a Programming System
@horridohobbies
@horridohobbies 2 жыл бұрын
BTW, how cum there isn't a free, open-source, easy-to-use, graphical IDE for Lisp? If you want a nice graphical IDE, you have to pay through the nose for a commercial one.
@asmewilliams7117
@asmewilliams7117 2 жыл бұрын
What about Emacs?
@horridohobbies
@horridohobbies 2 жыл бұрын
@@asmewilliams7117 Emacs is not graphical. Emacs is not easy to use. Emacs has an enormously large and complicated command set.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
You could take a look at Alive the lisp plugin for vscode. It seems to be getting lots of development lately
@horridohobbies
@horridohobbies 2 жыл бұрын
@@GavinFreeborn I have no doubt there are good efforts out there. But none of them are "universal" like Emacs. Smalltalk's IDE is "standard" in its overall design and philosophy (there are variations among different implementations). This universality is another Smalltalk strength.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
@@horridohobbies it's less so emacs and more so slime. With pretty minimal effort another editor could support slynk (slimes backend). E.g. that's what alive, conjure (for neovim), and Lem
@jinguu5852
@jinguu5852 2 жыл бұрын
I'm not sure how special this is comparing to modern languages. For example, I've heard from my friends who develop in js that they can do pretty similar stuff as well. They have a repl, and even hot reloading.
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I think you may have missed a few key differentiators. First the experience with interpreted languages is pretty similar. However, that's only in the sense that you can interact with the running program. Common Lisp is a compiled language that allows you to modify the compiled program. JavaScript both in the browser and in nodejs. You only get what you called hot reloading in the sense that you can regenerate a page but for that to happen you can't be using those JavaScript resources. That's why there is an event loop and why JavaScript used on sites can become unresponsive. That's not the case with common lisp since most of these features can be handled on a seperate thread the updating of symbols can happen asynchronously. E.g. I could have compiled a larger common lisp file into the project and used the browser without any delay. While nyxt isn't a great example for that I've done a stream where I worked on a video game and modified individual functions without any delay in the actual running game session. Thanks for your comment and input!
@androth1502
@androth1502 2 жыл бұрын
@@GavinFreeborn we can get similar hot loading while developing using low level languages like c and c++. i don't know if lisp can do more, like hook into an application out in the wild and manipulate at will. if it can do that, it will have something over c/c++ etc. ... but then you still have to put up with that awful syntax. not something i could convince myself to ever like (i've tried).
@NathanHedglin
@NathanHedglin 2 жыл бұрын
The difference is the LISP can edit itself as it is running. You can define a new DSL as you're developing. You can't do that with JS.
@seeithappen1
@seeithappen1 2 жыл бұрын
Mmmm ... let's have a look at the job market ... I see lots of wanted java, php, c++ .... don't see lisp ... still good for fanboy talk on patreon
@gerardgauthier4876
@gerardgauthier4876 2 жыл бұрын
Here's the problem with languages endorsed by the intellectual elite... It usually takes an intellectual elite to use that language properly. Haskell OCaml Lisp Rust...even C++ The above is a small example of what I call ego languages. Languages that the average person trots out to brag to the other average types..
@insertoyouroemail
@insertoyouroemail 2 жыл бұрын
Being salty and feeling pity for yourself is not going to help you learn anything.
@gerardgauthier4876
@gerardgauthier4876 2 жыл бұрын
Where did you get feeling sorry for myself from my post? I'm just posting a fact about programmers (myself included ).
@astroid-ws4py
@astroid-ws4py 2 жыл бұрын
Then just stick to your JavaScript as I play with Coq, Agda, Lean and Idris ;-))
@jimiscott
@jimiscott 2 жыл бұрын
@@astroid-ws4py And yet JS is the worlds most used language! Why 'play' when you can actually do something constructive (and relatively easily).
@astroid-ws4py
@astroid-ws4py 2 жыл бұрын
@@jimiscott It is the most used because of the Web standard, Not because it is the best.
@Me-vc4sf
@Me-vc4sf 11 ай бұрын
I need to cut my hair
Why Are Lisp Macros So Great!?
16:28
Gavin Freeborn
Рет қаралды 15 М.
The Rise & Fall of LISP - Too Good For The Rest Of the World
17:44
Gavin Freeborn
Рет қаралды 39 М.
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 18 МЛН
Whoa
01:00
Justin Flom
Рет қаралды 6 МЛН
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 73 МЛН
👨‍🔧📐
00:43
Kan Andrey
Рет қаралды 11 МЛН
What is the Curse of Lisp?
25:09
Eric Normand
Рет қаралды 27 М.
Creating Your First Lisp Project - Quicklisp, asdf, and Packages
24:47
Code Completion In Emacs - Everything You Need To Know
16:57
Gavin Freeborn
Рет қаралды 26 М.
Why LISP Is The Language of Legends
9:05
Sammy Engineering
Рет қаралды 33 М.
Marvin Minsky - The beauty of the Lisp language (44/151)
2:06
Web of Stories - Life Stories of Remarkable People
Рет қаралды 37 М.
What's the FASTEST Computer Language? C++ vs Fortran vs Cobol: E04
15:22
Lets LISP like it's 1959
48:01
linux.conf.au
Рет қаралды 80 М.
Learn Emacs Lisp in 30 Minutes
30:22
Gavin Freeborn
Рет қаралды 9 М.
Leaving dwm for StumpWM
20:25
Gavin Freeborn
Рет қаралды 18 М.
Lisp, The Quantum Programmer's Choice - Computerphile
6:36
Computerphile
Рет қаралды 207 М.
Gli occhiali da sole non mi hanno coperto! 😎
00:13
Senza Limiti
Рет қаралды 18 МЛН