5 ms·
The repls you mention are not like lisp repls. You're being downvoted because your comment makes it sound like you've never programmed a lisp but have strong op
by rfrey 3y ago
The repls you mention are not like lisp repls. You're being downvoted because your comment makes it sound like you've never programmed a lisp but have strong opinions nonetheless.
- mathisfun123 3y ago>you've never programmed a lisp but have strong opinions nonetheless i've written racket and clojure (and mathematica, which is a lisp). not multiple 10kloc but enough to understand what the big ideas are. claiming i just haven't written enough lisp is basically the logical fallacy of assuming the premise.
- behnamoh 3y ago> “mathematica is a lisp”
- mathisfun123 3y agohttp://xahlee.info/M/lisp_root_of_wolfram_lang.html http://xahlee.info/M/lisp_root_of_wolfram_lang.html http://xahlee.info/M/lisp_vs_WolframLang.html http://xahlee.info/M/lisp_vs_WolframLang.html > WolframLang has all the characteristics of LISP: seems you either don't know what lisp is or you've never written mathematica
- behnamoh 3y ago> "seems you either don't know what lisp or you've never written mathematica" Meanwhile, you brought up examples from Mathematica docs that talk about head/tails (car/cdr) but by that logic, Python is a Lisp too because you have: list[0] and list[1:] Maybe your Clojure/Racket experience wasn't enough to teach you what the essence of Lisp was. From your first link: "Mathematica expressions are in many respects like LISP lists. In Mathematica, however, expressions are the lowest-level objects accessible to the user. LISP allows you to go below lists, and access the binary trees from which they are built." That right there is telling you that Mathematica is not a Lisp. Edit: Corrected the Python list example.
- mathisfun123 3y agoI'm sorry but are you really going to pretend like car and cdr are not core to lisp? >list[0] and list[-1] That is not car and cdr; closer would be list[0] and list[1:] if lists were cons in python. >Mathematica expressions are in many respects like LISP lists. In Mathematica, however, expressions are the lowest-level objects accessible to the user. LISP allows you to go below lists, and access the binary trees from which they are built This is a quote from 1986. I wonder if the language has changed much since then https://reference.wolfram.com/language/tutorial/Expressions.html#14609 https://reference.wolfram.com/language/tutorial/Expressions....
- behnamoh 3y agoRead PG's "Roots of Lisp" and you'll understand what I mean.
- mathisfun123 3y agoI believe that is an argument from authority (if I remember correctly).
- lispm 3y agoThe content on the pages clearly explain the differences. Mathematica is a symbolic language based on 'rewriting' There are other examples - Prolog would be an example, a logic language. Also most other computer algebra systems are in this category, similar to Mathematica: Macsyma/Maxima, Axiom, ... > WolframLang has all the characteristics of LISP It has many, but there are a lot of differences, too. The big difference is the actual engine. Mathematica is based on a 'rewrite system'. It translates expressions by applying rewrite rules. Lisp evaluates expressions either based on an interpreted evaluator or by evaluating compiled code. Lisp has macros, but those can be transformed before the code is compiled or running. The practical effect is that in many Lisp implementations usually all code is compiled, incl. user code. Mathematica uses C++ then. Most of the UI in Mathematica is implemented in C++, where many Lisp systems would implement that in native compiled Lisp. Thus the computation is very different. Using a rewrite system for programming is quite clunky and inefficient under the hood. A simple example would be to look how lexical closures are implemented. Another difference is that Mathematica does not expose the data representation of programs to the user all the time, where Lisp programs are also on the surface written as s-expressions (aka symbolic expressions) in text. The linked page from the Mathematica book also claims that Mathematica is a higher level language. Which is true. Lisp is lower level and languages like the Wolfram Language can be implemented in it. That's one of its original purposes: it's an implementation language for other ('higher-level') languages. Sometimes it already comes with embedded higher-level languages. CLOS + MOP (the meta-object protocol) would be an example for that.
- mathisfun123 3y ago> Another difference is that Mathematica does not expose the data representation of programs to the user all the time, where Lisp programs are also on the surface written as s-expressions (aka symbolic expressions) in text. I have already addressed this: FullForm https://reference.wolfram.com/language/tutorial/Expressions.html#14609 https://reference.wolfram.com/language/tutorial/Expressions.... >Thus the computation is very different. Using a rewrite system for programming is quite clunky and inefficient under the hood. A simple example would be to look how lexical closures are implemented. You're skimming a couple of paragraphs without actually knowing much about Mathematica. It's absolutely not the case that Mathematica is purely a redex system; it's just that it's very good at beta reduction because it has a strong focus on CAS features.
- patterns 3y agoBut Racket and Clojure are very different from Lisps such as Common Lisp that embrace the idea of a lively, malleable and explorable environment, which is arguably the biggest idea.
- bbbobbb 3y agoNot the OP but would somebody be able to summarize HOW are the lisp REPLs different then to me? I've written limited amount of clojure and common lisp just to play around and I don't recall any difference between Clojure REPL and the REPL I get for say Kotlin inside IntelliJ idea. Maybe the ability to send expression from the IDE into the REPL with one keybind but I cannot say it's not possible with the Kotlin one right now because that's not what I use it for.
- mathisfun123 3y agoThere's a person above saying that it's about being to able to mutate program state from the repl, which is a thing that's also possible in any repl for a language with managed memory.
- ohyes 3y agoCl Condition system + repl = godmode. Your software crashes? Do you go back and set a breakpoint? No, because you’re already in the stacktrace in the repl exactly where the crash occurred. You fix the code, reload it, tell it to ether run where it left off, or restart from an earlier point.
- mathisfun123 3y agoFlask and Django have the exact same functionality - I've already said that this thing you guys keep talking is just a matter catching exceptions. https://flask.palletsprojects.com/en/2.3.x/debugging/ https://flask.palletsprojects.com/en/2.3.x/debugging/ https://docs.djangoproject.com/en/dev/ref/settings/#debug https://docs.djangoproject.com/en/dev/ref/settings/#debug
- MarceColl 3y agoexceptions unwind the stack in all languages I know except in CL
- 3y ago