Is LISP worth learning in 2017?

just started reading pic related

are there any uses for LISP other than configuring emacs? does it excel at anything in modern times?

Other urls found in this thread:

en.wikipedia.org/wiki/Tail_call
srfi.schemers.org/srfi-34/srfi-34.html
gigamonkeys.com/book/
common-lisp.net/project/mcclim/excite.html
en.wikipedia.org/wiki/LispWorks
symbolics-dks.com/Macsyma-1.htm
sarabander.github.io/sicp/
en.wikipedia.org/wiki/Lambda_calculus
palmstroem.blogspot.de/2012/05/lambda-calculus-for-absolute-dummies.html
mitpress.mit.edu/sicp/
ai.stackexchange.com/questions/2236/why-is-lisp-such-a-good-language-for-ai
wiki.c2.com/?IsSchemeLisp
stackoverflow.com/questions/8778492/why-is-foldl-defined-in-a-strange-way-in-racket
docs.racket-lang.org/net/index.html.
twitter.com/SFWRedditGifs

bump

yes
(define (even n)
(if (= (modulo n 2) 0)
#t
#f))

(define (!= x y)
(not (= x y)))

(define (X-main pos row num low max)
(if (!= row (+ num 1))
(begin
(if (or (= low pos)
(= max pos))
(begin
(display "")
(display "1")
(display ""))
(display "0"))

(if (= num pos)
(begin
(display "\n")
(X-main 0 (+ row 1) num (+ low 1) (- max 1)))
(X-main (+ pos 1) row num low max)))))

(define (X n)
(if (not (even n))
(begin (display "0")
(X-main 1
1
n
1
n))))

So yes if have nothing to do but shitpost on Sup Forums

That's a Scheme book though

On a side-note Lisp will make you a better programmer, even if you never end up using Lisp

Is the only way to do loops recursion? If so, how do you prevent stack overflows?

Yes, the functional paradigm is essential in becoming a well-rounded programmer. Also languages in general are shifting towards a functional approach, so a familiarity will help you pick up new things that come out.

Also you will learn the sense of smug superiority that programming in a functional language brings.

In Scheme, yes. I think Common Lisp has loops built in. At any rate so long as the language is tail recursive, you won't run into overflows.
en.wikipedia.org/wiki/Tail_call

tail call optimization

So you jmp to the start and let the function ret only once since it would only execute a shit-ton of rets aftereards anyways? And if you call another function that needs a larger/smaller stack frame you destroy you frame first? That's pretty neat

SICP gives you an education in computer science. If you just want to learn Lisp, read pic related and do the exercises. It will be much quicker and easier, and Common Lisp is a far more practical language. Scheme doesn't even have exceptions.

Also, don't learn Emacs and Lisp at the same time.

>Scheme doesn't even have exceptions.
srfi.schemers.org/srfi-34/srfi-34.html

professional Lisp programmer AMA

What do you work on?

Learn lisp, use haskell.

publications drafting software, content management systems, live event systems, and hardware stuff

How do i start? What do you think about

Lisp and regular scripting languages are converging. Classic Lisps like Common Lisp and Scheme are stuck on the obsolete implementation concept of the cons cell. A modern Lisp would be something like Clojure which is implemented in immutable data structures and gives the programmer an open interface to the generic sequence container type and so gives a more unified interface between lists, maps, arrays, etc. Scripting languages like Julia and Ruby give a lot of metaprogramming features which is not quite equal to what Lisp can do with homiconic syntax but is moving in that direction.

>Scheme doesn't even have exceptions.
Fake (or old) news. Since R6RS Scheme has exceptions.

learning emacs is a good introduction, even though the learning curve is high, customize it to where you feel more comfortable with it as an IDE

I would probably agree with learning a more practical approach to Lisp before approaching SICP, but SICP is a must read

another good book is "Practical Common Lisp: By Peter Seibel", there's a free version online

gigamonkeys.com/book/

implementing immutable data in Common Lisp or Scheme is trivial, the Clojure dev enviornment and library support is generally terrible

>le scheme isn't lisp meme

>Clojure ... library support is generally terrible
Compared to what? I hardly love Clojure, but the selection and maturity of libraries for it is no worse than for CL, and certainly better than Scheme's.
>dev enviornment
That is the real problem with Clojure. The Java stack traces are just pathetic compared to what CL gives you.

>implementing immutable data in Common Lisp or Scheme is trivial
>I am 5 years old, I can make an immutable data structure in Scheme, therefore I win the argument even though I dont know shit about what an implementation actually is

>the Clojure dev enviornment and library support is generally terrible
No, it uses Java environment, its generally awesome, at least for people who actually have a programming job and not sit in their basement and dish out Lisp hype on the internet

k

>but the selection and maturity of libraries for it is no worse than for CL

Common Lisp has some of the most robust libraries of any language, some of them have been maintained since the 1970s. It is hard to find them all in one place, but clones on github, lisp dedicated forums/subreddits etc are a good place to look for them. MIT CS Alumni who graduated from the 1970s-1990s have treasure hoards of great libraries and technical papers.

>basing your language decisions on being a wagecuck

you're right about getting to sit in my basement all day, but I'm a freelance dev :^)

Can you give some examples of interesting CL libraries that aren't on GitHub or Quicklisp? I am genuinely curious.

common-lisp.net/project/mcclim/excite.html

I want to buy LispWorks sometime, all of the heavy duty Lisp engineers swear by it
en.wikipedia.org/wiki/LispWorks

all of the Symbolics stuff is proprietary but I've found papers on it on lainchan pre-kalyxgate

symbolics-dks.com/Macsyma-1.htm

I have a book called "Parallel Distributed Processing" about neural networks and distributed algorithms with similar references and some Lisp code in the appendix, likewise with the book the Expert Systems book I posted as a pic earlier in the thread which was authored by the lead engineer of a company that made lisp machines for the military and aerospace

add fellow CL users on github and you should find everything contemporary that you need for stuff like web development

Just configure your entire system in Scheme. You'll become a master in no time.

when is this going get kernelland binds and we get a GNU Lisp Machine?

>learning emacs is a good introduction
i was planning to dothat anyway, thanks

Do you have a PDF of the expert systems book? I've been meaning to read something about expert systems.

sorry its an actual copy (found it for $5 in a used book store of all places)

Too bad. Thanks anyway.

underrated post

OMFG this needs to happen

Never have I wanted something so badly and never realized it.

>)))))

Why is lisp so good for AI
As someone who does a lot of networking and systems programming, would lisp even be useful to me

Fuck yes, it is really worth it. It's very well written and gives you a great introduction to many problems.

Just take a few hours and work through the first chapters and you'll see:

>sarabander.github.io/sicp/


Protip:
Before (or along) SICP there are two ressources, that might be helpful.

1) You can work along SICP with "The little Schemer". It's all about the actual Scheme syntax, but it's much softer than SICP and very well written.

2) Understand the Lambda Calculus.
>en.wikipedia.org/wiki/Lambda_calculus
>palmstroem.blogspot.de/2012/05/lambda-calculus-for-absolute-dummies.html

The lambda claculus is one of the two fundamental modells of computing. (The other one being the turing machine).

LISP is modelled pretty close arround the Lambda Calculus (as other languages like Haskell are).

It sounds very scary at the beginning , but it's really simple once you got it. Took me one day to understand it, and I'm not THAT smart...
Also it's cool if you look at Scheme/LISP and think "Whoa, it's just a siple Beta reduction here, no big deal.."

And wait untill you see an Omega-Combinator or the end boss, the Y-Combinator.. :)

SICP has been one of the best experiences of my life and is an absolute must read. You will have plenty of small enlightings about the nature of data structures, objects, state, and waht not.


Have fun and git gud.

wrong page idiot
mitpress.mit.edu/sicp/

I came tbqh

it's Lisp, not LISP.

lisp is and always will be the official programming language of Sup Forums (this subreddit was all about lisp between 2008-2012, until normies took over). it's also the only programming language that has been approved by Richard M. Stallman (PhD). lisp being a programmable programming language, you will never need anything else. you can call yourself a programmer only if you are a lisper too.

Yes it is, specially if you're a Sup Forums user.

>Why is lisp so good for AI
ai.stackexchange.com/questions/2236/why-is-lisp-such-a-good-language-for-ai
>As someone who does a lot of networking and systems programming, would lisp even be useful to me
Maybe. What languages do you program in?

1) The other ressource look better.

2) Go fuck yourself with a cactus.


1) LISP is the historical term. I prefer callign it LISP. Deal with it.

2) The "official" language of Sup Forums is either C or Haskell (just look at a normal /dpt/ thread).

3) I really love Scheme, but RMS is not a very pleasant person. I like some of the thoughts in "free software, free society", but he got so many things wrong and got bitter, intolerant and arrogant over the years. He thinks he knows it all when he really doesn't undersatnd.

4) Vim > Emacs

5) Clojure > Scheme > Racket

>much softer than SICP
But the sequels get pretty serious.

>caring about looks

user... easy on the terpris

>you will never need anything else
Wait until you discover type systems. You'll be torn between Lisp and ML forever.

>Scheme > Racket
Why?

>Clojure > Scheme > Racket

do you even know what clojure is?

...

>5) Clojure > Scheme > Racket

>Clojure
>Lisp

Pick one

>Scheme
>Lisp

scheme still has pair and list has the main data structures.

I'm not him but the fold-left function in Racket is completely wrong.

The one defined in SICP, the one in Haskell or the one built-in in new versions of scheme (R6RS) all work like this:
(fold-left f 0 '(1 2 3 4))

gets expanded to
(f (f (f (f 0 1) 2) 3) 4)


In Racket
(foldl f 0 '(1 2 3 4))

becomes
(f 4 (f 3 (f 2 (f 1 0))))

yes, you can use clojure and do web development

No everyone agrees that this is enough.
wiki.c2.com/?IsSchemeLisp

what's the difference?

Yeah, why is it so bad? Seems about equal to me.

Not him, but I guess he means that in the "Haskell and SICP version" you have a certain start value (say "0") and then apply each operation f on the result of the previous operation f. It works like the first argument was an accumulator, so to say.

Sup Forums has always been diversified on favorite programming langues..../prog/ though prefers lisp but its mainly a meme board with some C larpers (FrozenVoid, Cutter)

and how that's different from the racket version?

>What languages do you program in?
Mostly C and C++. For scripts, either Python or bash, though I've been learning Perl lately.
I know x86 but I rarely use it.

well, you can use it as a (((web))) language and write shitty websites in it.

The "accumulator" is always the second argument here..

Maybe it's mroe clear when you think about this:

(- 4 3 2 1)


The operator always takes the current result as first argument, therefore (- 4 3 2 1) = (- (- (- 4 3) 2) 1).

>The "accumulator" is always the second argument here..

and?

No you dumb motherfuckers. it is a meme language now used by shitty hipsters to seem relevant. At least C is used in embedded systems and as core for many software, lisp is merely a tool to measure your dick just like some user in this thread did with his "beautiful LISP code". LISP is literally ((((LISP)))). Get a clue.

lisp has been embedded into satellites that are still in use. you know nothing.

No

Try foldl'ing a subtraction across that collection and see which one gives you the result you expect. Hint: It isn't the racket version.

So, this is why Racket is shit?

Nobody said that Racket is shit.

Ah nevermind. But to me, this alone is not enough of a reason to claim that Scheme > Racket.

What's a good learning resource for emacs? Any good books or anything?

use built in tutorial

>a meme language now used by shitty hipsters
>taught at MIT as entry level course from 1980 - 2008

Nice b8, m8.


The guy who is annoyed by the fold left isn't even the one who said that Scheme is better..

>2008
So, almost 10 years ago ? Thanks for proving my point hipster pajeet might as well dress up for the antifa rally

stackoverflow.com/questions/8778492/why-is-foldl-defined-in-a-strange-way-in-racket

Open source Lisp implementations like SBCL and Racket have the advantage of being more expressive than Python, bash, or Perl, but also much faster. One potential advantage for you is that you could replace both your Python/bash/Perl scripts and your some of your C and C++ programs (daemons that talk over sockets) with shorter code in a single language. Check out docs.racket-lang.org/net/index.html. Another, which is not contingent on you actually switching to another language for work, is that learning CLOS will leave you a better object oriented programmer.

>SBCL and Racket
What about Scheme?

CHICKEN Scheme can compete with Racket in terms of third-party libraries, but it lacks Racket's huge built-in standard library, contracts, static typing, etc. Since Racket as a language is almost a Scheme and the Racket platform includes Scheme implementations, I'd suggest going with Racket unless you were trying achieve a specific goal for which some Scheme is better. (This goal could be to maximize your raw performance (Stalin, Chez), embedding (Chibi) or interoperablity with C code (CHICKEN).)

Not the same guy but is SICP worth it since it uses Scheme?
Scheme, CL and Racket are all LISPs so I guess it's quite easy to go from one to another?

>Not the same guy but is SICP worth it since it uses Scheme?
Sure. You skills gains with SICP will translate to a bunch of other languages, not just Lisps.

I see. I actually own a physical copy of SICP as well as Land of Lisp, is the latter decent for learning CL?

>(if ... #t #f)

kys

especially when correctly named function even? already exists

ftfy
(define (X-main pos row num low max)
(unless (= row (1+ num))
(begin
(if (or (= low pos)
(= max pos))
(display "1")
(display "0"))
(if (= num pos)
(begin
(display "\n")
(X-main 1 (1+ row) num (1+ low) (1- max)))
(X-main (1+ pos) row num low max)))))

(define (X n)
(unless (even? n)
(X-main 1 1 n 1 n)))

Why do you have to destroy your stack frame when you call another function from a tail call optimized one? The callee doesn't touch the stack frame of the tail call optimized function that calls it right?

Do you use CL?
Is it viable for proprietary software?
How do you organize packages?
Do you use custom macros to hide the horrible default names like "progn" and "terpri"

common lisp is the most superior language in the world

(loop) is awful

It has so many parenthesis it almost looks like a joke. S-expressions exists just because the dude who wrote the parser was lazy as fuck.

How do you even run Scheme. I just want to write it in a file and then run it in console and see results.

>download whatever flavor of scheme you want
>run it
>REPL
it's simple

>The lambda claculus is one of the two fundamental modells of computing. (The other one being the turing machine).

brainlet here

so what would be equivalent of sicp book for turing machine?

So use dotimes or whatever

The parentheses enable the GOAT macro and backtick system so shut your mouth brainlet

TAOCP

kek, several k pages reference books sounds like abuse