Wanna learn LISP. Show me the way.
lainchan / sec
----------------------------------------------------------------------
Haruyoshi · 2018-07-02 15:56
I heard a lot about the family of programming languages called "LISP".
I also heard, that it can run just as fast as C or even faster.
I love science, math and video games. And the lisp community seems to
consist of like minded people.
I wanted to learn steel bank common lisp and was thinking if it would
be a good choice for implementing a pet game engine.
It would be nice if you could share some wisdom with me.
:D
----------------------------------------------------------------------
Hong, Guil Dong · 2018-07-02 16:00
>>5067
>I also heard, that it can run just as fast as C or even faster.
Depends how the code is interpreted, compiled or executed. For pretty
much any language. At the end your CPU is passed machine code.
----------------------------------------------------------------------
Bobby Newmark · 2018-07-02 16:14
If you are new to lisp maybe try getting into racket (http://racket-
lang.org) instead of common lisp which is more difficult.
There are many forms of lisp all with some slight differences, but
most share a somewhat common setup.
----------------------------------------------------------------------
Turner · 2018-07-02 22:21
>>5067
TLDR
LISP-family languages are garbage, better learn haskell or erlang
Only reason one should give LISP a try is to get better understanding
why languages like C, c++, java are superior over LISP.
LISPs have no practical usage and they do not solve any problems, they
only create abstract problems(which could be easily avoided by using
better language) and then solve them in most fuarrrked up way. Trough
you CS career you will meet lots of people who will tell you to read
SICP and learn LISP. You should probably just give it a try and play
with it a bit, but nothing more. This languages family attracts people
with obsession on logic, proving trivial things using induction. Don't
fall for this trap.
----------------------------------------------------------------------
Guthrie · 2018-07-02 22:26
>>5074
Learning basic concepts applicable to every language is never wrong.
Just going to Java and C++ because they are popular will only spawn
another generation of coders that have to open stackoverflow to code
anything useful.
----------------------------------------------------------------------
Lain Iwakura · 2018-07-02 23:39
OP don't listen to this guy >>5074
Haskell isn't even homoiconic, there are infinite levels of
metaprogramming you would be abandoning by not learning lisp.
That said, it's not the best idea for a first language (but neither is
haskell). Erlang is a very good language but if you don't get your
head around the message passing model and OTP it will be very
frustrating. It comes easier with some programming experience.
Common lisp is going to be the most portable, but it's also going to
have the most 1950s-era cruft (like prog, which was added to attract
fortran programmers to lisp).
If you have some CS experience you might think about looking into SICP
(Structure and Interpretation of Computer Programs/the wizard book). I
haven't read it personally, but supposedly it has very good exercises.
It was the textbook for CS 6.001 at MIT for some time. It's written in
scheme, which is also a lisp, with a few more modern shortcuts and
slightly less cruft.
It doesn't really matter what lisp you learn, the main concepts are
very transferrable. ecl (embeddable common lisp) and elisp (emacs
lisp) are also popular.
If you do decide to learn lisp, don't stop until you have your head
completely wrapped around macros and how they work. It will make you a
better programmer no matter what language you move onto next.
Last note: avoid Racket. It's not a real lisp (not homoiconic), and
its hygenic macros are heresy.
----------------------------------------------------------------------
Naomi Nascimento · 2018-07-03 00:12
Don't mind me, but I see a few fellow LISP and schemers were around.
----------------------------------------------------------------------
Unidentified · 2018-07-03 15:32
>>5074
You sound like a babby that just started his first Haskell tutorial.
You'll end up with more nuanced opinions when you mature a bit.
----------------------------------------------------------------------
Project 2501 · 2018-07-03 19:57
>>5075
> Learning basic concepts applicable to every language is never wrong.
Just what I've said
> Just going to Java and C++...
I haven't said that, but I agree with you
>>5077
What is so good about language being homoiconic?
I know that my c++ programs are transformen into AST under the hood
and then transformed into the ternary code and then after
optimizations to machine language. So what? Are you trying to tell me
that I should leave all the great tools that makes my work simpler and
faster and write programs in AST-like flavor? Is there any cons of
such behavior?
>It was the textbook for CS 6.001 at MIT for some time.
AFAIR it is no longer a textbook for this class. And If that's the
case I bet that you know why.
> It will make you a better programmer no matter what language you
move onto next.
Why? I would suggest OP to better use his time, you can for example
read Dragon Book (or any other topic which interests you)
>>5083
You sound like frustrated CS looser who can't think for himself, I
have never stated that Haskell is great. All I have said is that it is
better than LISP
----------------------------------------------------------------------
Dox · 2018-07-04 12:26
>>5087
if the language is homoiconic you can write your own code to modify
the ast in that language. If you want to modify the AST in a language
like c++, if you want to do something not supported by the language
you have to start writing a gcc plugin. In lisp there are no
limitations
----------------------------------------------------------------------
Undisclosed · 2018-07-04 12:47
>>5074
>This languages family attracts people with obsession on logic,
proving trivial things using induction. Don't fall for this trap.
Well, I have nothing against proves by induction. It makes me feel
comfortable about my code. I always try to make sure that my program
won't be able to do something stupid.
>>5077
>If you have some CS experience you might think about looking into
SICP (Structure and Interpretation of Computer Programs/the wizard
book). I haven't read it personally, but supposedly it has very good
exercises. It was the textbook for CS 6.001 at MIT for some time.
I'm comfortable with C and Python and proficient in Java. But they all
seem like a hassle. (and java is so fuarrrking verbose jesus christ.)
Also some very basics of emacs-lisp. xD
I will work through that book on the side, now that it was mentioned
yet again.
I WILL CREATE A GLORIOUS 2D ENGINE. (probably not)
P.S. sorry for posting this on /sec. It was an accident.
----------------------------------------------------------------------
Ishikura "Tatsu" Tatsuhiko · 2018-07-04 17:53
>>5067
>I also heard, that it can run just as fast as C or even faster.
Not really. For the past few decades vendors have been optimizing
their chips for running imperative style C code. Alternative languages
and styles of programming are not fighting on an even playing field.
>I love science, math and video games. And the lisp community seems to
consist of like minded people.
This doesn't have anything to do with lisp. Lisp was just a popular
language in the 1980s.
>I wanted to learn steel bank common lisp and was thinking if it would
be a good choice for implementing a pet game engine.
sbcl is just a compiler. Common Lisp is the language. Land of Lisp is
an introductory book which deals with game programming if you are
interested. As others said though, learning common lisp in 2018 is not
a particularly worthwhile endeavor.
Common lisp is a dead language. Nobody uses it. No libraries. No
projects to get involved with. No jobs. There is not a lot of reason
to learn it besides emotional/hipster/attention-seeking reasons.
>>5077
>Haskell isn't even homoiconic,
Most languages aren't. You probably haven't even heard of the non-lisp
homoiconic languages so it's really not a valid argument against
Haskell. All it means is the code you write it the AST itself so
compilers/interpreters are simpler and it's easier to modify your code
with code (metaprogramming) which is neat but it's hardly worth
building a whole programming language with crippled syntax around this
one idea. In the 80s people thought that this might be the key to
artificial intelligence. Boy were they wrong(look up AI Winter).
>>5092
>If you want to modify the AST in a language like c++, if you want to
do something not supported by the language
This is disingenuous because modifying the AST is not an end in
itself, it's just one metaprogramming technique. C++ offers other
features to achieve similar results such as templates and the
preprocessor.
----------------------------------------------------------------------
Lady 3Jane.. · 2018-07-04 18:51
>>5098
>Not really. For the past few decades vendors have been optimizing
their chips for running imperative style C code. Alternative languages
and styles of programming are not fighting on an even playing field.
Don't trust this hack. Compilers are what is being optimized. Machine
code did not much much. There are only a few new instructions like
SSE4.x aka Streaming SIMD Extensions, which is Single Instruction,
Multiple Data to run similar calculations parallel.
This guy can't possibly a CS student, else he would be aware this
literally first semester knowledge.
----------------------------------------------------------------------
Faye Valentine · 2018-07-04 19:13
>>5098
>Common lisp is a dead language. Nobody uses it. No libraries. No
projects to get involved with. No jobs. There is not a lot of reason
to learn it besides emotional/hipster/attention-seeking reasons.
Pretty much everything in this is a lie. I'm guessing you just made a
snap judgment about CL and never bothered to look too deep. There are
plenty of libraries.
Funny how you say no one uses it when someone just wrote an article
about how CL is becoming popular again thanks to the AI/ML boom, just
the other day...
Lisp has been around for 60 years and yet is still around. That has to
mean something. Just because something is popular at the moment
doesn't mean everything else becomes irrelevant. If that were the case
then Haskell shouldn't be suggested either.
But, I am kind of annoyed with all these threads getting turned into,
"X language is better threads". They are languages. It makes as much
sense to debate about why someone should or shouldn't learn Latin. If
they are interested in it, it shouldn't matter what your opinion on it
is.
OP, use whatever language you want. You can create a game engine in a
lot of different languages. Go look at game engines already written in
the language you want to learn, read some tutorials for your language,
and have some fun with it.
Here are some written in CL:
https://github.com/CodyReichert/awesome-cl#game-development
----------------------------------------------------------------------
Donna Hawthorne · 2018-07-04 21:33
>>5102
>lisp is not dead
Name 1 user facing application written in Common Lisp. No Googling.
Just 1. Go.
>If that were the case then Haskell shouldn't be suggested either.
Absolutely not. Haskell is very much alive and kicking. Besides being
actively developed, having a vast online community and presence, being
used everywhere throughout academia. Besides all that, I can go to
almost any bank and get a job writing Haskell. Name 1 company hiring
Common Lisp. I'll let you Google that one.
>Here are some written in CL:
>Game Development
>Xelf
Toy and unmaintained.
>cl-mpg123
Wrapper around a C library.
>Trial
Fair enough. Same author as the one above though.
>trivial-gamekit
Another toy.
That's it.
>Graphics
Most of these are just wrappers around C libraries and the ones that
aren't haven't seen a commit in years.
I apologize if you took my works too literally. I meant it more like
you will have a hard time finding libraries that are actually useful
and actively maintained.
>I'm guessing you just made a snap judgment about CL and never
bothered to look too deep.
I looked into it quite a lot when I had my functional programming/lisp
phase a few years ago. I ended up writing a fair bit of Racket and
Clojure which are much more alive than Common Lisp but still
struggling for relevance.
My intention is not to soykaf on your precious language. I'm just
trying to be realistic.
----------------------------------------------------------------------
Spooky · 2018-07-04 21:40
>>5101
No I'm not a CS student, I graduated years ago. Presumably you are?
Fine.
Tell me what is the fundamental data structure lisp is based on. Tell
me what the algorithmic complexity of traversing that structure is.
Which memory segment will it be stored in? What is a stack frame
again? Now go and look up what a lisp machine was.
Hopefully this will help you understand why modern hardware is biased
towards C.
Don't assume everyone who disagrees with you is an idiot and good luck
with your studies kid.
----------------------------------------------------------------------
Debbie Charteris · 2018-07-04 21:50
>>5104
>do this
>do that
Unlike a complete tool of a person my mental parser doesn't need to do
what your input says. So you don't assume I need to understand
anything from a person lacking basic CS knowledge. Amen.
----------------------------------------------------------------------
Bobby Newmark · 2018-07-04 22:09
>>5101
ever heard about out of order execution, speculation and all the other
stuff which have happened under the processors hood after 2000?
>>5104
lisp machines are very interesting
>>5105
oh yeaaah, classical lisp acolyte buffoon. Have you secured you
scholarship for doing all (and nothing more) that your professors are
telling you to do? Do you have your grades good enough? Have your for
at least one fuarrrking time created any useful software?
----------------------------------------------------------------------
Nobody special · 2018-07-04 22:55
>>5103
Realistic about what? OP wants to do a hobby project. This was never a
discussion about which language is more relevant to mainstream use. I
wouldn't recommend lisp or Haskell for that. I'm trying to help OP
accomplish the goal they set out. What reason is there in trying to
prevent someone from accomplishing something they set out to do? We
should be supporting others instead of feeding them propaganda. If OP
wanted to create a machine learning library in brainfuck I would still
try to point them in the right direction in order to succeed.
----------------------------------------------------------------------
Chani · 2018-07-05 00:13
>>5103
CL is going through something of a renaissance at the moment, there's
quite a lot of community activity and even a few jobs going around.
CLIM is being revived, there are graphics engines now, and that
grammar analyser thing you see advertised around the place is written
in CL, for example. I don't know if it's still the case, but CL was
the language of choice for quantum computing research a few years back
too.
The fact of the matter is that Lisps have been around for over 60
years, yet people are still interested in using them, they still have
some of the best literature available, and so they're still worth
learning.
----------------------------------------------------------------------
Guthrie · 2018-07-05 17:14
>>5105
>Unlike a complete tool of a person my mental parser doesn't need to
do what your input says.
If you cannot answer any of these questions then it's not surprising
you don't understand what >>5098 is talking about. I would strongly
encourage you to educate yourself. The path has literally been laid
out for you.
>>5107
>Realistic about what?
Realistic about the state of Common Lisp in 2018.
>What reason is there in trying to prevent someone from accomplishing
something they set out to do?
The purpose is to warn OP about the reality of Lisp because he seems
to think it is something it's not.
>We should be supporting others instead of feeding them propaganda
Like I said I am trying to be truthful. Pretending Common Lisp is
still alive in 2018 is the propaganda.
>If OP wanted to create a machine learning library in brainfuck I
would still try to point them in the right direction in order to
succeed.
Absolutely, but you wouldn't indulge OP's illusions about bf being
faster than C or having an active community or other such nonesense
going around in this thread.
>>5108
>CL is going through something of a renaissance at the moment, there's
quite a lot of community activity and even a few jobs going around.
I don't doubt there hipsters and gray beards still on comp.lang.lisp
but what evidence do you have that the community is growing?
>The fact of the matter is that Lisps have been around for over 60
years,
And yet you can't name a single company who is running common lisp in
production.
----------------------------------------------------------------------
Dr. X · 2018-07-06 15:55
OP here.
I love this place.
It's the perfect mix of information, jokes, irony and a bit of
toxicity. :^D
I want to learn common lisp, because the concepts are intriguing.
I don't want to write c, because it slows down my thinking process.
>Python is cool and all, but IT"S JUST A WRAPPER AROUND C.
Python is useless, because it's just a wrapper around C. Just
program c.
I'm here to learn. I'm not studying computer science for the money or
because I want get hired by google.
I'm learning lisp, because it has a completely different paradigm of
thinking.
If something sounds interesting to you, you should explore, or you
will never know. It could turn out to be the most awesome thing you
ever discovered.
Only because something isn't popular, there's no reason to not to
start learning it. If you don't like it you can stop at any point.
Regarding: >I also heard, that it can run just as fast as C or even
faster.
I just wanted to know what lisp compiler creates the "best" bytecode.
(directly compiling it to machine code would probably not allow for
runtime changes)
Have a wonderful evening everyone. ^^
----------------------------------------------------------------------
Tomohisa "Tom" Kanezaki · 2018-07-06 17:24
>>5129
If you want to learn lisp then Racket/Scheme or Clojure would be much
better choices because they actually have active communities and a bit
of industry traction.
Realm of Racket is the Racket equivalent of Land of Lisp I mentioned
earlier.
I think Little Schemer is an essential read for any Lisp developer,
even if you don't care about Scheme specifically.
The Joy of Clojure is an excellent read if you want to go down that
route.
Again, I can't in good conscious recommend Common Lisp.
----------------------------------------------------------------------
Roger Pollack · 2018-07-06 20:21
>>5129
>Python is useless, because it's just a wrapper around C. Just
program c.
Python supports some functional programming language features that c
does not, therefor it is closer to lisp than c.
Modern lisp languages like typed racket for example are multi paradigm
so you can use them like other languages too.
The lisp and the c world that once were very different have slightly
merged.
No less i think a true lisp is worth learning.
----------------------------------------------------------------------
BloodCat · 2018-07-06 22:06
>>5129
>>5074 anti LISP flamer here
I just have to react when someone is persuading that LISP is the best
thing ever created (which have happened in this thread). If you want
to learn lisp then start with Racket, it has lots of cool features,
has nice documentation and was intended to be used by beginners.
Sorry if I was too toxic, but I fuarrrking hate lisp-mania.
I hope you will find your "most awesome thing you ever discovered."
Peace
----------------------------------------------------------------------
Masami Eiri · 2018-07-08 11:20
>>5130
This pdf was the main reason I caught interest in common lisp.
----------------------------------------------------------------------
sec · 2018-07-08 22:40
This thread has not at all gone in a security direction.
There is already a Lisp thread in /lambda/: >>>/lambda/4793
This thread is locked.