Why is Lisp so reviled, despite so much evidence showing it's value?
Why is Lisp so reviled, despite so much evidence showing it's value?
Other urls found in this thread:
news.ycombinator.com
en.wikipedia.org
textfiles.com
en.wikipedia.org
github.com
sbcl.org
cs.cmu.edu
twitter.com
((((((((((((((((((((((((((())))))))))))))))))))))))))))))))
because literally every implementation is slower than even you
The way variables are declared in most LISP code is pure cancer, stop doing that in the mid of the code dip shit.
I challenge both of those statements.
Try SBCL sometime. It's pretty amazing
> 2017
> Emacs still takes eons to load.
Like Jesus Christ we aren't even talking about some crazy emacs setup basically the bare minimum to make it a okay editor.
-it has obnoxious syntax
-it's slow
-it's cryptic
-no one uses it for anything because it sucks
I actually kind of like lisp when working on a private project, and I think once you've learned the basics of programming in any other language, lisp has some of the best materials for learning more advanced logic structures and/or work with higher mathematics. But if you want to work with someone else's code it's a nightmare in terms of readability, even when the developer uses good style. Good for research, bad for collaboration.
languages that cannot handle memory directly is just hobby language for memers
Cuz it's ugly, mang
Clojure is pretty fast.
I know it's a cool meme to shit on the JVM, but it's actually blazing fast.
>m-muh parantheses 2hard4me
If there was a lisp with inferred typing and no GC (nor manual memory management), it would be the best language ever made.
All mainstream implementations of lisp languages are fast as shit m8, and it's less cryptic than, say, c. Tons of people use it. It's the scripting language for gimp, solidwork, maya and guix among others, as well as being heavily used in all naughty dog games.
>It's the scripting language
that's all you should have to read to know it's shit
(((LISP)))
>gimp, solidwork, maya and guix
>naughty dog games
thx user, I never realized why these were all steaming piles of shit
It's not reviled, just different. I don't know anybody who actually HATES Lisp. It's just that they're mostly busy people and learning new languages (and new paradigms) takes a lot of time, especially if it's something as simple as Lisp and requires you to "unlearn" a decade of Java-tier cruft about how you need factories and generators and complex classes for simple functions. Given that, most people want to put in the effort to learn new things that they feel have been proven to add more monetary value to their skillset.
My guess is that it kind of becomes a self-fulfilling prophecy.
>not enough people doing commercial work with Lisp
>people see not enough people using it for commercial work and decide it won't add value to their portfolio
>not enough people...
etc.
It's very good for scripting actually because its syntax makes it pretty logical and easy to follow. I used a dialect called SKILL which is for EDA tools and it was cool.
Don't see it going anywhere for general purpose programming though, what are its values that you speak of?
homoiconicity is a huge one.
the macro system and native support for multiparadigm (functional, procedural, OO, logic, and so on) as well as its incredible power for defining DSLs makes it extremely easy to adapt to any domain to make it extremely powerful and concise in that domain.
>homoiconicity
This was what I was referring to without knowing what it was called. It was cool following the scripts easily.
why does it have to have ;defun
isn't it obvious from the (defun
that the () block is a function
q about lisp
i suppose its so you keep track of the brackets? closing bracket is for function
Takes literally a minute to start Hello World.
SBCL is roughly comparable to C.
>Emacs still takes eons to load.
The fuck are you running on, a ten year old toaster?
$ time emacs -nw -Q --eval '(kill-emacs)'
emacs -nw -Q --eval '(kill-emacs)' 0.09s user 0.02s system 98% cpu 0.111 total
ITT People regurgitate memes about something they know nothing about.
>why does it have to have ;defun
Author is a Lisp noob. It's like someone writing
x++ // Add 1 to x
why else are you here?
ah. it's a comment
To be smug.
Underrated
since there isn't actually anything in the center i guess that means no jews were involved with LISP
but if that's the case why do they hate-
oh...
Hate the syntax for declaring type.
(let ((x 0))
(declare type (fixnum x))
x)
when it could be just something like
(let ((x :int (get-int-val))) x)
Hate the syntax for accessing objects.
(let ((x (make-array 3)))
(setf (aref x 0) 1))
; instead of something like
(let ((x (make-array 3)))
(setf x[0] 1))
Also you really don't want to fuck with readers macros because then you editor can't handle them well and it's nightmare for anybody using your library.
Python compiles with type information.
But given the object system it's somewhat limited in what automated inferences it can make.
Of course that piece of shit Gimp is LISP, what else could it have been. Well, maybe brainfuck
...
Lisp was part of a much bigger idea. (pre-microsoft)
Lisp machines are general-purpose computers designed to efficiently run Lisp as their main software and programming language, usually via hardware support. They are an example of a high-level language computer architecture, and in a sense, they were the first commercial single-user workstations. Despite being modest in number (perhaps 7,000 units total as of 1988[1]), Lisp machines commercially pioneered many now-commonplace technologies – including effective garbage collection, laser printing, windowing systems, computer mice, high-resolution bit-mapped raster graphics, computer graphic rendering, and networking innovations like Chaosnet.[citation needed] Several firms built and sold Lisp machines in the 1980s: Symbolics (3600, 3640, XL1200, MacIvory, and other models), Lisp Machines Incorporated (LMI Lambda), Texas Instruments (Explorer and MicroExplorer), and Xerox (Interlisp-D workstations). The operating systems were written in Lisp Machine Lisp, Interlisp (Xerox), and later partly in Common Lisp.
a whole OS / "information architecture" of Lisp.
Imagine what the world would have been like if these machines had become the "office micro" (PC). Microsoft regressed everything.
The Bitsavers' PDF Document Archive[32] has PDF versions of the extensive documentation for the Symbolics Lisp Machines,[33] the TI Explorer[34] and MicroExplorer[35] Lisp Machines and the Xerox Interlisp-D Lisp Machines.
(write-line "Hello Sup Forums.")
(write-line "I am learning LISP!")
...
all the keys ... (just 1 file here) textfiles.com
what you are using now was invented by these people
wen u tryina defun fun
(loop for y from -1 to 1.1 by 0.1 do
(loop for x from -2 to 1 by 0.04 do
(let* (
(c 126)
(z (complex x y))
(a z))
(loop while (< (abs(setq z (+ (* z z) a))) 2)
while (> (decf c) 32))
(princ (code-char c))))
(format t "~%"))
You know why Java and C# are so popular?
Because they're similar enough to C++ that C++ programmers can pick them up quickly.
You know why C++ got its popularity?
Because it was similar enough to C that C programmers could pick it up quickly.
You know why... fuck it you get the point.
And the thing is that Lisp is different. It is a new language. A different language that demands, unapologetically at that, that you learn a new way of thinking about things.
SQL does something similar. And you know how many developers have problems doing simple joins? Or who don't understand how the language works? I mean, that's why MongoDB became a thing. Just send in JSON, get out matching JSON. Simple. Oh, what relations lol, you don't really need those.
Python got on because it looked a lot like pseudocode.
Haskell has a niche because it looks a lot like mathematics. Which is sad, because mathematical notation looks like dogshit.
Once you UNDERSTAND why (+ 1 2 3) makes more sense than 1 + 2 + 3, you start to get lisp. But most won't get there until they've implemented a parser or two. Which is kind of funny and kind of sad.
So you have a system that is different from others, and that you have to learn from scratch and doesn't look like the things you've already learned. Now are these languages better? No.
But you already know them.
Lisp is HOMOICONIC
"If a language is homoiconic, it means that the language text has the same structure as its abstract syntax tree (i.e. the AST and the syntax are isomorphic). This allows all code in the language to be accessed and transformed as data, using the same representation.
In a homoiconic language, the primary representation of programs is also a data structure in a primitive type of the language itself. This makes metaprogramming easier than in a language without this property, since code can be treated as data: reflection in the language (examining the program's entities at runtime) depends on a single, homogeneous structure, and it does not have to handle several different structures that would appear in a complex syntax. To put that another way, homoiconicity is where a program's source code is written as a basic data structure that the programming language knows how to access"
en.wikipedia.org
Try loading some elisp.... Like I said other than the minimum it's super fucking slow.
I specifically run server-mode and do emacsclient to deal with this.
Startup times are most certainly a ongoing issue with emacs and why we have stuff like use-package and why it comes up often on emacs-devel.
That's what you would think. But lisps are used all over the place in specialized domains. I believe a lot of aircraft control systems use a lisp. Some financial systems use it, It's quite popular in AI (or was) it's frequently used as a scripting/plugin/config language due to ease of implementation and power.
Seriously go look at where lisps are used and you will be quite surprised at the number of commercial/industry applications it's used for. We aren't even talking about legacy code, new stuff is being developed in lisp dialects.
It's obviously not a ultra popular language like c/Java/Python etc, but it is used in certain problem domains.
It's slow but when compare it to something like eclipse then it doesn't that seems that slow.
There is project old project to try to implement emacs in guile that should support parallel threads. It runs but there's some problems with encoding so it's slow. Things should be better when guile 2.2 comes out but not sure if they are still developing it.
The ecl(embedded common lisp) developer is trying to revive mcclim, gui library for cl. There exists climacs common lisp implementation of emacs but not sure if he's planning to do something for it because the project is also dead.
There actually is some guy doing new common lisp implementation, clim3 standard and reference implementation of that standard and project called second-climacs but it has been in development for few years and I think it's still not usable.
github.com
State of emacs is kind of poor but there really is nothing better.
Yeah don't get me wrong, I use emacs for a editor, and use zile on servers and small systems, but the state of emacs is not okay. It's not perfect there are some huge issues with it (you know freezing emacs while it does something slow like access a remote system with tramp)
Emacs-devel is constantly blocked by rms's objections and and requests, developer infighting, total lack of understanding on what new people expect of a editor. I hope someone does a hardfork and pushes GNU Emacs forward like xemacs did in the 90s.
(
(
(
(
(
(((((((((((kys))))))))))
)
)
)
)
)
>Lisp is HOMO
yeah we know
Use chicken, noob.
>Python compiles
>>>/tumblr/
It has as retard syntax as cl
>literally couldn't be arsed to google being spouting the most retarded comment in the entire thread
really makes you think.
/thread
Python is the name of a Common Lisp compiler used in SBCL. Since this is a LISP discussion I assumed some familiarity with it.
sbcl.org
See page 21.
Gimp uses python, not lisp.
Come to think of it none don't all of those programs use python?
t. inbred too dumb to google.
pajeets forced shitty languages into our throats.
Hey I am professional JavaScript webdeveloper programmer I know this code
{{{{{{{{{{{{{{{{{{{{{{}}}}}}}}}}}}}}}}}}}}}}}
>Why is Lisp so reviled
It's not obvious and intuitive -- for example, it has puzzling contractions like "setq" and "defun", and when you look at a "while" statement it's not obvious what the various parts of it do.
Sure, you can memorize that stuff -- but that's not the point. You could also use Chinese characters for all the keywords too (you can always memorize them, right?) but there's a reason we don't stuff like that: applying that transformation becomes a continual source of extra mental work to extract meaning from it.
Now look at a normal programming language:
"if (x < 0) print 'illegal value';"
Even non-programmers could look at that and immediately get the idea what it's doing. In fact, for that particular statement, I don't think it would even be possible to design it to be any more universally understandable to someone who speaks English.
(if (< x 0)
(print "illegal value"))
That's pretty fucking clear and intuitive in sense that all () are either lists or the first thing is function call.
This is just nonsense, Clojure may have its issue with being hard to access and not being approachable for new users. But there is a reason it['s used a lot by huge companies hanging mega data. In some instance its been faster than java while avoiding get() set() hell.
People who think Lisp is not used need to get out of their bubble. In back-ends it's everywhere. From Amazon to Netflix. Even NASA have used it on many probes and satellites because of the ability to edit in runtime. It's just never made the jump to normie land as firing up a python ide and looking at the millions of tutorials for every single thing is just easier, and people like easy.
is pic related right?
I think kicad and gEDA use a lisp for part of their file format and configs.
It's less common these days, before Python it was tcl, now is Lua .
Lot of gnu tools use a lisp.
This. It's really quite amazing how many things have some connection to lisp.
])))]]}}}}}}}}}}}};}}
no
more brackets than junior high.
>Python got on because it looked a lot like pseudocode.
pseudocode is generally pascal syntax
ok ok .. lisp could be used as pseudocode as it is minimal in that it has no fat, the language subset is small .. java could not be used as "pseudocode" ... why the hell they use java in teaching.
"As the name suggests, pseudocode generally does not actually obey the syntax rules of any particular language; there is no systematic standard form, although any particular writer will generally borrow style and syntax; for example, control structures from some conventional programming language. Popular syntax sources include Fortran, Pascal, BASIC, C, C++, Java, Lisp, and ALGOL. Variable declarations are typically omitted. Function calls and blocks of code, such as code contained within a loop, are often replaced by a one-line natural language sentence."
eclipse is an IDE behemoth ... it is hugely bloated, buggy ... eclipse has nothing to with the language
Baby ducks
C niggers, Java niggers, and ML niggers judge a language solely upon how much it resembles their nigger language
He was talking about elisp and it's generally run only on emacs even though kawa and guile support it to some extend. You don't generally write elisp to develop standalone application but to extend emacs to be more IDE like.
I feel like the paradigms of Lisp are cool when you're actually writing functions, but it's very annoying in others. I generally like it when I'm writing a function, but when I actually have to call a function, it gets really convoluted.
For example, I tend to use Scheme as a calculator when I do my homework, and while I can write a pretty elegant function to calculate equivalent resistance of a list of resistances, anything other than the simpler cases results in a difficult to comprehend expression.
(define (eqres lst)
(define (iter lst sum)
(if (null? lst)
sum
(+ (/ 1 (car lst)) (iter (cdr lst) sum))))
(/ 1 (iter lst 0)))
(+ (/ 3 7) (eqres (cons (/ 16 7) (cons (/ 16 7) '()))))
#| or |#
(+ 12 25 (eqres (cons 20 (cons (+ 15 (eqres (cons 24 (cons (+ 20 (eqres '(12 60))) '())))) '()))))
Maybe part of it is just Scheme making it hard to make lists with expressions inside them, but I think at least part of it is Lisp in general.
instead of consing you could just do
(list (something) (something2) ....)
Shit, I forgot about that. I use scheme pretty infrequently, so I forgot there was a way to make lists other than cons or list literals.
I guess that makes the function calls a bit more readable.
>ctrl f
>2 "macro" results
>lisp thread
Does anybody really use Lisp here?
That's the good part about lisp, you can write your "pseudo-code" first and then implement the language (or function+macros interface) that transforms it to lisp code. This is what really makes lisp so powerful.
>scripting
Depending on the implementation Lisp can be intrepreted as a scripting language.
Talking about SBCL you can build to native code your program and then use its lisp compiler to build your "script" and use it (your JIT built native code) at runtime. I think few languages support it. Maybe C through LLVM JIT compiler, but its interface is not as elegant lisp's.
Of course interpreting elisp is slow, you're literally parsing and compiling code on the fly. That's why you compile elisp and autoload it.
Interpreted any high level language is going to be slow.
>i guess that means no jews were involved with LISP
>Once you UNDERSTAND why (+ 1 2 3) makes more sense than 1 + 2 + 3, you start to get lisp. But most won't get there until they've implemented a parser or two. Which is kind of funny and kind of sad.
why not (+ + 1 2 3)
Calling functions is almost the same in Lisp and other languages.
foo(bar)
(foo bar)
pretty sure you can do (setf (car x) 1) and it will actually work, lisp is black magic I'm pretty sure
>why not (+ + + + + + + 1 2 3 4 5 6 7 8)
fagmachine
((lisp))
rude, i was just asking a question
i don't know how lisp works, educate me
cs.cmu.edu
Basically Lisp let's you define lvalues ad hoc. Like how C-like languages can do:
x[10] = y
(car x) = 1
(third-item-in-nested-list x) = 1
well
(* (+ 1 2) (* 3 4))
= 36
intuitive and KISS/DRY as fuck
read an intro tutorial or something
Basically, '+' is the name of a function, and it takes a variable number of arguments. (+ + 1 2 3) doesn't make sense because there's only ever one function name per pair of parentheses; everything else inside the parentheses is an argument passed to that function.
You can, however, nest functions, so something like (+ (+ 1 2) 3) would be valid, since this is calling a function with the result of another function as one of its arguments.
However, since '+' can take multiple arguments, and addition is commutative, we can just give the outer function 3 numbers.
Basically, the benefit of (+ 1 2 3) over 1+2+3 is that it's clear exactly what arguments are being passed to the plus function, and the order in which things should be evaluated is unambiguous.
And when you understand "apply" you can:
(apply #'+ my-list)
>we can just give the outer function 3 numbers
u wot nigga
Right, yeah, apply is neat.
For example, the function in can be translated to just:
(define (eqres lst) (/ 1 (apply + (map (lambda (x) (/ 1 x)) lst))))
That involves map and lambda as well, but with some pretty simple tools, you can write some complex functions with not a lot of code.
By "outer function" I mean the outer '+'
(+ 1 2 3)
instead of
(+ (+ 1 2) 3)
That's kind of like how forth works
but it's postfix instead
Tell me is string manipulation in clisp as big a pain as it looks?
stacks are mathematical cancer
If they're painful for you, take them as atoms and write your owns.
BTW clisp is an CommonLisp implementation, for abreviation use CL.
no but why are you writing your own string tools in the first place