[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: images.png (4 KB, 225x225)
4 KB PNG
why does /g/ like LISP so much? what can it do that other languages cant?
>>
It wastes time like no other
>>
File: 1776989057037039.jpg (140 KB, 1920x1080)
140 KB JPG
>>108843735
proper macros, for starters

easy to write good tooling for thanks to simple syntax

better question is, what reason is there to use languages with much more complicated syntax when lisp/clojure already does everything you need, with far reduced conplexity?
>>
>>108786942 is a very straightforward example of using code as data for easy handling of error conditions without boilerplate.
the `verify` macro reads the predicate forms and generates the necessary `cond` structure.
>>
>>108843735
Meme language. It is beautiful in a way. Check minimal implementations of common lisp, you will understand.
But I've never seen anyone actually use it, not to mention use it to make some money. That is likely because other tools exist and are more efficient. Gets job done with less effort.
>>
>>108843782
a lot of the dating app infrastructure (much is shared across apps) is powered by Clojure
anyway, real programmers know that anything can be programmed in anything. real programmers care about access to existing work. Clojure has access to the entire ecosystems of Java, Javascript, and Python (libpython-clj). if you deny the utility of access to such platforms, you are retarded.
>>
oh yeah
>he writes Bash/ZSH/Fish/Shell of the day scripts
I write Babashka nigga
https://babashka.org/
there is a big ass fucking reason a lot of senior devs end up really liking Clojure.
>>
>>108843798
Ah yes, the cloud slop language. Sure.
Anyways, this thread is about LISP.
>>
>>108843735
solved syntax for a starter
>>
>>108843854
no, this thread is about use of Lisp languages. if you cannot accept that Clojure is a Lisp and is very capable of being used right now, then you are like a bitch clinging to a brand of handbag. take a picture and remember it fondly while walking into the future.
>>
>>108843818
>80Mb ram just to run the interpreter
yeaaaaah no thanks
Babashka is maybe a replacement for ruby and python in some areas, but not for shell scripts
>>
>>108843963
yeah it includes a HTTP server retard.
it's called being batteries-included and capable of doing anything trivially on 99% of systems (surely you have at least 1gb on your system).
if you want to do systems shit, then just use Clojure to generate C or whatever.
you could have a "compiler" working in a day with full Clojure macros at compile-time.
>>
>>108843735
It's a weapon for sniping nerds. You show a nerd lisp and they'll never be productive or write useful software again in their entire life because they'll be too busy obsessing over lisp.
>>
i want to write my own lisp then my own emacs then maybe turn it into an OS
>>
>>108843980
>yeah it includes a HTTP server retard
so does python, node, etc
>>
>>108844048
Python, Node are not dedicated to Shell-esque activities like Babashka, and Clojure is a superior base language by far to target
>>
File: K.jpg (695 KB, 2000x2000)
695 KB JPG
Read SICP and achieve SATORI
https://www.youtube.com/watch?v=RhSwBgF-g4I
>>
>>108843735
Give it a try and see for yourself.
>>
>>108843757
That macro could very well be a function. This is a poor example.
>>
>>108843735
>why does /g/ like LISP so much? what can it do that other languages cant?
lisp is HOMOiconic. get it? it language for fa/g/s.
>>
File: 1778952488042537.png (406 KB, 664x512)
406 KB PNG
>>108843910
clojure is not a lisp.
>>
>>108843735
It's for people with an overactive sense for abstract architecture. You notice a recurring syntactic pattern in your code. It ripens into a proper concept in your mind. You can't stop seeing it. You start resenting having to spell it out over and over again, feeling crippled by the language not letting you express the abstraction you have in mind. Your autism torments you relentlessly, leaving you and in a weakened and demoralized state. That's when Lisp gets you.
>>
>>108844352
deboonked already
https://www.expressionsofchange.org/dont-say-homoiconic/
>>
>>108844431
*posts reaction image*
>heh, sure got him
no, I'm so tired of this shit. Clojure is a Lisp, and my personal favorite. I like namespaced keywords. I dislike reader macros. I like the JVM. I like Clojure's ideology regarding data. I've made numerous novel algorithms in Clojure with ease. I've found bugs in Bouncy Castle, one of the most used cryptographic libs in the world, via use of Clojure and `doseq`.
>>
>>108843735
test
>>
>>108844672
>https://www.expressionsofchange.org/dont-say-homoiconic/
Low-IQ take. Let me give you a quick tutorial for homoiconic language creation:

1. Come up with a syntax to instantiate some general-purpose data structure(s)
2. Define a mapping from said data structure(s) to programs
3. Use the syntax from step 1 to write programs
>>
File: 1776230477876081.png (2.12 MB, 1254x1254)
2.12 MB PNG
>>108843735
S-exp like syntax is the best syntax for data and code, it's just not easy for most people, hence there's no real languages in that style, and by real I mean the power, portability, and support of something like C.

In normal syntax you need to add a way to do anything, but in s-exp everything is just a command that takes arguments, everything is a list, and it can easily be manipulated. Something closer to assembly, in which everything is a command, but with an S-exp syntax and all the goodies of higher level langs. But no, we need the millionth C/C++ copy but worse.

It's a shame LISP is mostly a hipster meme toy functional language, mostly python but with a weird syntax. The only good thing about it is S-exp.

>>108843782
This.
>>
>>108844672
>https://www.expressionsofchange.org/dont-say-homoiconic/
I actually agree with this pedant. ‘Uniformity’ always made more sense to me.
>Lisp’s unusual syntax is connected to its expressive power. How? Not because of “homoiconicity”—a word that has no real meaning but sounds impressive and mathematical—but because of uniformity.
https://borretti.me/article/why-lisp-syntax-works
And it’s what Scheme uses:
>An important consequence of this simple, uniform representation is that Scheme programs and data can easily be treated uniformly by other Scheme programs.
https://standards.scheme.org/official/r7rs.pdf
>>
>>108844672
is that ai slop? dude is retarded, especially in the follow up.
>>
>>108843757
The fuck does your code do? It looks like you are just print an array of numbers, am I right? If so why would anyone ever write this abomination of code?
>>
>>108844877
Contrary to what many nu-Lispers believe, Sexp syntax has no inherent advantages (McCarthy himself wanted to eventually implement Mexps, although he later abandoned the idea).

What makes Lisp macros powerful and easy to write is the fact that Lisp code, conceptually, is a list of symbols, making it easy to manipulate and generate in code). Effectively, you get lexing and parsing "for free", unlike most other languages.

Sexps are just one of the many possible plaintext representations of lists, but by no means the only one.
>>
>>108844563
Horribly accurate description of why I can’t stand using non-Lisp languages
>>108844192
Based
>>
>>108844952
>Sexp syntax has no inherent advantages
Low-IQ take. Its advantage is that it's the simplest and most minimal solution that fits the bill for >>108844804.
>>
>>108844952
Yeah, you're right, I meant the representation of code as a data list. S-exp is just a syntax for that, and imo the best.
>>
>>108844877
R is pretty much the S language successor
>>
>>108844967
I met the guy who wrote it, he unironically wanted to make it a Lisp
>>
>>108844960
There is no objective argument as for why (op arg1 arg2) would be simpler than op[arg1 arg2]. Both represent the same list of symbols, the specific ASCII characters used to represent it are almost irrelevant.

Face it, you're just regurgitating memes.
>>
>>108844971
proof, or you're lying
>>
>>108844773
Lisp is defined through five elementary s-functions: atom, = , car, cdr, and cons. McCarthy shown that you can implement a full lisp interpreter with only those five functions; They are the foundation, the very core of lisp. That interpreter can be implemented as is on emacs lisp, scheme, common lisp, racket, ... because they all have those elementary functions. Clojure don't. Clojure is no lisp. it's like saying java is c because they share some syntax and concepts like for loops or type names.
>>
>>108844975
nta. S-exp is easier to parse for the mind and the computer.
>>
>>108844975
>There is no objective argument as for why (op arg1 arg2) would be simpler than op[arg1 arg2].
You've found the simplest and most minimal way to prove you're an imbecile.
>>
>>108844983
Not him, but there is something important to point out.

Even if we assume that Clojure is not a Lisp (by some definition of "Lisp" as a concept), it doesn't mean it can't be a good language in its own right. It's clearly inspired by Lisp, that is without question, but is it really that important whether it *is* "a Lisp" or not?
>>
>>108844995
What an amazing argument.

>>108844987
Write a Sexp and Mexp parser yourself. I guarantee there won't be any significant difference in complexity.
>>
>>108845001
>is it really that important whether it *is* "a Lisp" or not?
Yeah, because it advertises itself as a Lisp and dresses up as a Lisp, while arguably going against the Lisp ethos in most of its design decisions.
>>
>>108844977
What do you mean proof of a conversation, faggot? I met him in Auckland years and years ago, he’s a lisper. If there’s nothing public about that then now you know a random fact about him. If there is then maybe you can find it if you care that much.
>>
>>108845006
What general-purpose data structure is "op[arg1 arg2]" supposed to instantiate?
>>
>>108844975
(op arg1 arg2) is list (everything is data, remember)
>>
>>108845021
I meant a sextape or smth
>>
>>108845011
So it's just CLfags seething because Clojure is more popular gotcha
>>
>>108845051
>Clojure users seething because they can't read
>>
>>108845050
yeah Ross is probably also a pornstar, he seems like he’d be good at that too
>>
>>108844062
>dedicated to Shell-esque activities like Babashka
all the shell-esque stuff takes like 5 times as much code to do in babashka compared to bash:
https://github.com/babashka/babashka/wiki/Bash-and-Babashka-equivalents

Not saying python is better in this regard, but it's also no worse.

>Clojure is a superior base language by far
that's fair, I'd rather have a script grow into a clojure project than a python project becoming too big
>>
>>108845023
A list. What made you wonder about this? M-expressions are just another possible syntax to represent lists.

>>108845042
A list can have many plaintext representations. The inventor of the very original Lisp language came up with an alternative to S-expressions, you don't have to take my word for it.
>>
>>108843854
>slop
Funny because SBCL is AI slopped now
>>
>>108843735
I don't know
>>
>>108845077
>A list.
What are the items inside the list?
>>
>>108844983
Clojure has five functions too: atom, first, rest, and conj
you act as if the names are at all significant when all that actually matters are the operations as they apply to data.
seriously bro you act like I don't know any of this shit. what fucking information can you give me that I have not heard?
>>
>>108843735
The peasants still don't know the power of CLOS-styled multiple dispatch.
>>
>>108845077
>>108845090
I'm just gonna assume you really are a complete idiot and that op[arg1 arg2] is supposed to denote (op arg1 arg2). What does foo[bar []] denote, then? (foo (bar))? (foo bar ())? If it's the former, how do you denote an empty list? How do you know the 'bar' isn't a just singular item without looking ahead? If it's the latter, how do you express a list with a single item?
>>
>>108843735
My main problem with LISP languages is that it's too fragmented and very difficult to start out. Imagine you want to build a web app in CL or Clojure (which should be the most opinionated) you have hundreds of options, zero documentation (you are supposed to be and old timer lisp wizard) and atrocious tooling. It's a pity since I'd really like the language but its ecosystem is really bad.
>>
>>108845264
Imagine being so retarded you can't figure out how to use CL or Clojure in the year of the currents.
>>
>>108845288
It's not trivial, especially for Common Lisp. If you're already an Emacs expert, setting up sly or slime is easy, but if you know neither Emacs nor Common Lisp, getting started with both at the same time can be daunting.

People have acknowledged that this is a problem and have tried to address it in a lot of ways.
- https://almightylisp.com/ :: comes with detailed Emacs setup instructions.
- https://coalton-lang.github.io/mine/ :: This is essentially Borland Turbo Lisp and an alternative to Emacs for the beginner.
>>
>>108845264
>no documentation
>on Lisp
Nigger just fucking pause and read for two seconds. You have so many options it’s unreal. You can call the describe function on a symbol to inspect what it does and read its documentation string. Emacs can jump straight to its source code or take you to its hyperspec page. In Guile Scheme you can literally use the documentation function to jump to the relevant page in a literal book they give you as part of Geiser. What the fuck are you talking about “zero documentation” when you have multiple ways Lisp almost begs you to interact with its code.
>>
>>108845175
they are not the same, lel. atom is completely different. neither conj nor cons return a cell. try (conj 1 2) or (cons 1 2). because of that you can't implement McCarthy interpreter (eval and apply), what alan kay call "the Maxwell equations of software", which is probably the most beautiful code ever written.

https://www.gnu.org/software/mes/manual/html_node/LISP-as-Maxwell_0027s-Equations-of-Software.html
>>
>>108845363
>It's not trivial
It's not difficult. If you can't figure anything out unless it's "trivial", even now that you have LLMs that can spoonfeed you, you're simply not relevant.
>>
>>108844877
theyre not
>>
>>108845377
whatever man, continue to masturbate to useless shit
I've built my own languages before, so none of this shit is really all that exciting to me. Clojure gets shit fucking done in all the ways that I care about, and provides all of the Lisp benefits that I care about.
I'm done conversing with you about this, all it does is anger me to have to wallow through stupid, shitty opinions intended to start flamewars.
>>
>>108845389
its time consuming and tedious, uninteresting and the result always kind of sucks
>>
>>108845416
>i'm niggercattle and the cube farm faux-lisp suits me
No one cares. Just tell your cult leader to stop pretending it's a Lisp.
>>
>>108845198
That notation doesn't feel natural at all. How would you write ((lambda (x y) (+ x y)) (1 2))
>>
>>108845264
>Imagine you want to build a web app in CL or Clojure (which should be the most opinionated) you have hundreds of options, zero documentation
For Clojure, you can for example go with Biff, if it fits what you want to do
https://biffweb.com/

>>108845288
he's not wrong. It's not the language itself that's hard, it's how to use the libraries together to make coherent applications. For example I had difficulty figuring out how to do file uploads to an HTTP server with Clojure, which involves parsing multipart-formdata. All the docs I did find (e.g. the Ring wiki on github) basically assumed that you already know what all that shit is and and how to handle it. Even Claude and Chatgpt couldn't figure it out. I ended up just switching my app to Dart, where everything is well-documented and it was very easy to do despite me being much more experienced with Clojure than Dart.
>>
>>108845363
Whether people like lisp or not, they should experience the sly or slime REPL in Emacs. It's one of the nicest REPLs I've ever used in any language.
>>
>>108845424
>tedious, uninteresting and the result always kind of sucks
Just like every piece of software you've ever written. Dumb webshit.
>>
>>108844983
s-expressions are literally lisps whole identity. they were invented for lisp. they were the whole idea behind the thing.
>>
>>108845416
cool dude but this thread is about lisp.
>>
>>108845440
No, I'm pretty sure you people really are retarded:
https://edicl.github.io/hunchentoot/
That took 10 seconds of googling.
>>
I wish CLfags weren't so insecure about their language.
>>
>>108845264
ive never read documentation in my life
i dont get why lisp people are so obsessed with it
>>
>>108845375
>>108845288
This is what I meant >>108845440, basically: the language has cool ideas, but the ecosystem sucks and feels pretty dated compared to modern standards (such as Go, Rust or similar).
>>
>>108844804
>1. Come up with a syntax to instantiate some general-purpose data structure(s)
>2. Define a mapping from said data structure(s) to programs
>3. Use the syntax from step 1 to write programs
strings are a data structure thoughbeit
>>
>>108845670
>strings are a data structure thoughbeit
That being a flat sequence of elements. Unless you're programming a Turing machine you're gonna have to interpret the string to derive some other structure from its content which isn't what Step 2 tells you to do.
>>
>>108843745
fpbp
>>
>>108845441
This
It’s genuinely an amazing development experience
>>
File: 1680899881440356.png (7 KB, 346x68)
7 KB PNG
Over my decades of experience I have come to realize the value of the function call and the closure. Lisp is a reduction to these things almost alone. It's easy to recognize its power when you have the insight.
>>
>>108845441
>>108845735
Is it possible to convey this to a non-lisper or is first hand experience required?
I like LISP concepts and the language but I'm wary of integrations being a big deal in the same way Java was basically an IDE exclusive language (not practical to use without one) for a while.
>>
File: 1681005614343244.png (156 KB, 410x410)
156 KB PNG
>>108843735
It doesn't make me learn a trillion of ways describe things, everything is a list, I know what format expression will be.
>>
>>108844773
Clojure is definitely not a lisp. It’s lisp-like with a bunch of ill-thought-through random extensions. It’s existence actually harms lisp, so please stop pretending that it is.

The JVM association is inexcusable. The JVM and Java idea was always a stillborn non-starter. Sure, a lot of people “like it” but you can say the same thing about fentanyl, meth, and inbreeding.
>>
>>108845979
>you can say the same thing about fentanyl, meth, and inbreeding.
All of which are acceptable Lisp dialects.
>>
>>108845979
I like CL, but people like you prevented me from getting into it sooner. You talk like an ugly old jealous hag, and it's repulsive.
>>
File: 1778001252423949.jpg (34 KB, 720x739)
34 KB JPG
>>108845979
>>
>>108846017
>people like you prevented me from getting into it sooner
People like him are doing God's work.
>>
>>108843735
big fish, small pond, that's literally it
>>
>>108846037
Doubtful.
Probably a Jewish Demon.
>>
>>108846037
but what have they made?
I made >>108843769
which sure as hell is more Lispy than anything else I've seen in this thread.
>>
>>108846058
>you can't heckin' have any kind of standard for what belongs in the Lisp family
>that's jewish and demonic
>inclusiveness and diversity and aryan and divine
Hmm...
>>
>>108846070
Back in the day, there were people like you who tried to argue that Scheme was not a Lisp although you don't hear that too much anymore.
>>
>>108846153
How do you know they were people like me? I like how your "arguments" precisely map onto leftist thought-terminating cliches.
>>
>>108846070
What I don't like is that you're trying to keep technically competent people out of a conversation.
>>
>>108846188
See >>108846183
>I like how your "arguments" precisely map onto leftist thought-terminating cliches.
It's uncanny.
>>
>>108846196
I am extremely antisemitic in real life. I'm not leftist at all. I just think it's retarded to say Clojure isn't a Lisp dialect. I also think you're a dick for trying to not let the Clojure guys talk.
>>
>>108846257
Clojure is awkwardly grafted onto and intertwined with something unanimously understood to be profoundly unlisplike. And that's literally one of its major selling points. In fact, few of its selling points have anything directly to do with it being a (supposed) Lisp. It was never catering to "people like Lisp so much" and the people who use it clearly don't like Lisp THAT much or they would've sought dialects whose selling points revolve around perfecting Lisplike qualities instead of tangential ones.
>>
>>108845001
>is it really that important whether it *is* "a Lisp" or not?
Depends on whether you want to stretch the definition of Lisp far enough to admit C#.
>>
>>108844995
Ignoring the overall correctness of your post, I found that for a lot of small to mid-size tasks, the Python syntax was indeed pulling it's weight. Slice syntax, for loop syntax, string and formatting syntax in particular.
>>
>>108846435
>i like python syntax
Fine, but I don't see what that has to do with anything.
>>
>>108846478
You don't have to. Consider it meant for lazy evaluation.
>>
>>108846486
I consider your post weakly typed.
>>
>>108843798
>real programmers know that anything can be programmed in anything.
Real programmers know that the difference between being a competitor and having market dominance is that your product is good enough to seem like the best and marketing. Requiring a dev team for a language that is barely spoken about outside of hobbyist programmer circles isn't going to help you build a good product.
>>
>>108846494
Faggot I just used your post (after complimenting it) to make a general point about lisp that's relevant to the thread. Get over yourself.
>>
>>108846531
Your post was entirely about Python, though. Something about how you like its loop syntax.
>>
>>108846560
So you don't know lisp syntax and need me to describe it explicitly for you before making a comparison? Jesus what an idiot.
>>
>>108846499
everything you are describing involves the social dynamics of typical software shops. I do not give a single fuck about typical software. I invent novel shit and do not intend to ever work (again) with devs that are not tip of the spear. tip of the spear devs will have zero trouble becoming productive with a Lisp over the course of a month.
>>
>>108846580
I might as well compare it to C# syntax or COBOL syntax or Haskell syntax. What does it have to do with Lisp?
>>
>>108846601
C# isn't a competitor for small scripting and programming tasks.
Maybe try at least one second-order thought before posting the first retarded thing that pops into your head.
>>
>>108846586
I'm sure you're the greatest 10x that ever lived but many other people need to code for money and money comes from companies offering jobs in exchange for helping them build products (a concept known as 'work').
>>
>>108846635
>C# isn't a competitor for small scripting and programming tasks.
And Python isn't a competitor for Lisp. What are you even trying to argue? Are you, by any chance, literally retarded?
>>
>>108846640
>many other people need to code for money
That's tragic. I hope their financial situation improves so they could enjoy the benefits of Lisp instead.
>>
>>108846654
I too hope they can simply code for fun in the future, whether or not they choose lisp is not important to me
>>
>>108846640
then those other people can continue to wallow in shit. I've written enough Python, Typescript, C++, Rust, Go, even custom JS variants running on custom interpreters for medical applications.
it's all shit. Lisp has it figured out, and makes it as painless as possible to get the computer to do what I want.
>>
File: galaxybrain.png (1.28 MB, 1022x890)
1.28 MB PNG
>custom JS variants running on custom interpreters for medical applications
>>
>>108846675
no, it was some of the most horrid shit I've had to work with. had to write our own HTTP client utilities so that we could send messages to another service, which would update data in the db used by the application in question. very horrible.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.