13 ms·
Going from Python to Lisp to Racket was an absolutely mind-blowing experience. It literally changed my life, my perspective on programming, even what jobs I so
by jarcane 11y ago
Going from Python to Lisp to Racket was an absolutely mind-blowing experience.
It literally changed my life, my perspective on programming, even what jobs I sought out.
- k__ 11y ago> It literally changed ... what jobs I sought out. Why?
- jarcane 11y agoSame reason I still hate doing dishes at home after using a professional-grade dish machine at work for a decade.
- istvan__ 11y agoSir, this comment just made my day. I am going to screen shot it and place it in our office when anybody asks why I use mostly Clojure for my work.
- kgabis 11y agoI never understood why people consider lisps superior, mind explaining exactly what changed your mind?
- squeaky-clean 11y agoNot a lisp user myself, so I can't speak firsthand, but Paul Graham has several essays about it. http://www.paulgraham.com/lisp.html http://www.paulgraham.com/lisp.html
- k__ 11y agoCan languages with other syntax have the same properties?
- sklogic 11y agoAny language with a compile-time metaprogramming would do.
- TeMPOraL 11y agoTcl I heard has string-based homoiconicity. Otherwise, I'm yet to see a proof you can get an actual, usable and not incredibly annoying macro system working without turning your language into a Lisp. People keep trying, but it's always some inelegant subset bolted onto the core syntax.
- sklogic 11y agoTake a look at Converge, Nemerle, TH and many other similar languages - they're doing just fine without any homoiconicity. All you need is a decent quasiquotation.
- TeMPOraL 11y agoThanks for the pointers, I never heard of those languages before. I am actually looking at the Converge documentation on macros now, and I found the perfect quote to highlight the problem I see with those approaches: Quasi-quotes allow ITree's to be built using Converge's normal concrete syntax. Essentially a quasi-quoted expression evaluates to the ITree which represents the expression inside it. For example, whilst the raw Converge expression 4 + 2 prints 6 when evaluated, [| 4 + 2 |] evaluates to an ITree which prints out as 4 + 2. Thus the quasi-quote mechanism constructs an ITree directly from the users' input - the exact nature of the ITree is of immaterial to the casual ITree user, who need not know that the resulting ITree is structured along the lines of add(int(4), int(2)). That is, quasi-quotes take some code and turn it into a tree object. This tree object can then somehow get compiled into actual code later. Compare that with Lisp approach, in which code is data. You don't think about the code as something separate from the tree that represents it. The code is the tree. There is no ITree object. It may seem like just "semantics", but I find this to be a significant cognitive difference.
- 11y ago
- moron4hire 11y agoIt's not that there is anything particularly special about what you can do in Lisp than what you can do in, say, C#. It's that Lisp provides facilities for metaprogramming that most other languages lack. Most other languages make metaprogramming hard enough, or require it all be done at runtime, that it is very discouraging against the concept in general. Lisp creates a culture around metaprogramming that fundamentally changes how you approach programming forever after. You stop writing programs. You start writing programs that write programs. It's a lever that multiplies the power of the programmer. That can be both good and bad. For a hacker coding in earnest on her own, it can be extremely good. Yes, if you are the type of beginner or intermediate programmer that still struggles to just write programs, advanced metaprogramming in any language is not for you. If you're an intermediate programmer looking to become an expert programmer, learn Lisp, where metaprogramming is easy, and take the lessons on to whatever other languages you eventually end up using. That's what people mean.
- stray 11y agoI've never had to change my mind about Lisp -- but to me, Common Lisp's condition system kicks the crap out of every other language because it allows you to handle conditions without unwinding the stack. And whenever you get dropped into the debugger, you can edit and reevaluate the broken code or values or whatever -- and then continue on with the task. In other words, you can begin a task with imperfect code -- and refine it as you go along -- figuring out how to handle corner cases as you go. All without starting the task over from the beginning. I know of only one other language that allows you to explore a problem space like that. Besides, the parentheses make the code less jagged looking and jagged looking code imo, is more tiring to look at. Lisp is simply prettier.
- muraiki 11y agoSmalltalk also drops you into a debugger on an error, letting you inspect the state of the system, correct your code, and resume. Check out Pharo Smalltalk.
- stray 11y agoTIL. I have edited my comment to account for smalltalk.
- TeMPOraL 11y agoSmalltalk probably supports this as well, but what's cool about Common Lisp's condition system is that it doesn't depend on user interaction or debugger to work. Conditions let you separate the code making the decision about how to handle an error from actual error handling. The decision doesn't have to involve interactive debugger, you can have your code making the choice about which restart (unit of error handling code) to invoke. The common use case is that you install various restarts as you go down the call stack; then, when an exception happens, control goes up the stack until appropriate decision code, which selects restart, and control goes back down the call stack to the selected restart block. It's an incredibly flexible system that makes exception handling much more useful.
- lectrick 11y agoAfter learning about Elixir (http://elixir-lang.org/ http://elixir-lang.org/) and playing with it some, I now want an Elixir job. (I'm skilled in Ruby, and Ruby already back in the day wanted me to get a Ruby job... which I finally did) One nice thing about Elixir for Lisp lovers is that you get "real" macros (full AST access within a quoting context) AND actual syntax. I am not sure there are any other languages which feature that combination currently.
- vezzy-fnord 11y agoAND actual syntax What does "actual syntax" mean here?
- cursork 11y agoPresumably a riff on "Lisp has no syntax"
- vezzy-fnord 11y agoI actually thought it was a riff on Erlang's syntax, which is just as annoying a complaint in 2015.
- lucozade 11y agoIt does have a syntax. It's just hard to find in amongst all the parenthetical shrubbery.
- lectrick 11y agoYes, I was riffing on Lisp not really having a "syntax." The fact that Erlang's syntax is (disclaimer: subjective) awful just adds further grist to the Elixir mill, assuming you think Elixir's syntax is (disclaimer: subjective) sweet. Which a lot of people seem to be coming to the same conclusion on.
- vezzy-fnord 11y agoThat's their loss, then.
- antjanus 11y agoCan you explain why? I have no experience with Lips/Racket and I'd love to hear about your experience.
- TeMPOraL 11y agoNot OP, but I find this text a good introduction to one of the most significant things you can get enlightened by when learning Lisp: http://www.defmacro.org/ramblings/lisp.html http://www.defmacro.org/ramblings/lisp.html.
- pjmlp 11y agoStarted coding in the mid-80's and went through a plethora of languages, OSes, frameworks, you name it. Learned ML when Caml Light was new and got a third price in logic programming contest between universities. Nowadays I care mostly about JVM, .NET and first class languages from OS vendors. Why? Not all of us have the luxury to move around just for working with the languages, or the skilled team, we would like to.
- fallat 11y agoThis is primarily why I'm focusing on strengthening my JavaScript skills...There are tons of start-ups looking for back and front-end devs. Your comment also makes me want to get back into Java and C#...I've taken the time to learn Haskell but I know realsitically I'll never get a Haskell job (at least here in Quebec...).
- jeswin 11y agoLearning lisp is enlightening, but to claim that it's that much more productive than some of the other well designed languages is a stretch. - Lisp macros are powerful, so the core of the language can be kept simple. However, many languages take an alternate approach and codify the most common programming patterns into their specification. The result is a compromise that works for the majority of cases, and better understood than custom macros. - Homoiconicity is elegant, but somewhat over rated in practice. Declaratively expressing intent does not require homoiconicity, you can do that in JSON or XML if you agree on a format. Now with lisp, code being data, you can be infinitely more expressive; but at the same time inferring intent out of complex code-as-data is essentially writing a very intelligent macro/parser. There's a cost to it. - if you're not really gathering the intent from code-as-data, there are ways to do eval() in other languages as well. - Lisp has not succeeded on a relative scale. Let's not discount that. - Compilers can optimize well known constructs better than equivalent macros in lisp. So again, learning lisp is a great idea. But there isn't a one programming paradigm that's universally better than others.
- japhyr 11y ago- Lisp has not succeeded on a relative scale. Let's not discount that. Is there a clear reason for this? I've only ever heard good things about lisp. My impression, as a hobbyist programmer, is that lisp appeals to people who have a deep intellectual curiosity about the way programs work. It doesn't seem to appeal to the larger pool of programmers who are looking for a language thy can pick up in a straightforward way so thy can either get a job, or build a project they've been thinking of.
- nkassis 11y agoMy naive reasoning of why is that a lot of people start by learning c-like languages and don't see the need to learn something as different as lisp. As lisp and it's descendants were never really the dominant language, it was never the first type of language most people learned. Now that many mainstream languages have progress to incorporate more and more lisp features, it's becoming less foreign to many devs and the popularity is increasing and is now higher than I think it ever was.
- wyldfire 11y agoPaul Graham writes about this phenomenon -- http://www.paulgraham.com/avg.html http://www.paulgraham.com/avg.html https://en.wikipedia.org/wiki/Paul_Graham_(computer_programmer)#Blub https://en.wikipedia.org/wiki/Paul_Graham_(computer_programm...
- apu 11y agoFunny to see that latter link on this message board, of all places.
- zem 11y agothe thing i remember most from comp.lang.lisp was someone defining a truly great language as one that could get you to take a job simply to work with it, irrespective of the actual problem being worked on.
- stray 11y agoCan confirm. I once took a job working on a product I had a moral objection to -- on a platform I despise (windoze embedded) -- simply because I'd be working in Common Lisp.
- harperlee 11y agoCould anyone comment on the Lisp --> Racket mind-blowing experience? I have worked with Lisp and Clojure, and most of the big concepts are shared. What has racket on top of (common, I assume?) lisp?
- dragonwriter 11y ago> What has racket on top of (common, I assume?) lisp? Racket is from the Scheme family rather than the Common Lisp family, (Racket used to be PLT-Scheme before the name was changed because Racket isn't strictly an implementation of the Scheme standard, though it includes such an implementation among its bundled languages.)
- soegaard 11y ago* macro/module system with phases ( https://www.cs.utah.edu/plt/publications/macromod.pdf https://www.cs.utah.edu/plt/publications/macromod.pdf ) * submodules ( http://www.cs.utah.edu/plt/publications/gpce13-f-color.pdf http://www.cs.utah.edu/plt/publications/gpce13-f-color.pdf ) * Languages as modules (i.e. the #lang mechanism ) ( http://www.ccs.neu.edu/racket/pubs/pldi11-thacff.pdf http://www.ccs.neu.edu/racket/pubs/pldi11-thacff.pdf ) * Documentation system that links identifiers to documentation (respecting the scope) ( http://docs.racket-lang.org/ )
- jarcane 11y agoIt is simply that I found Racket to be the most pleasant and inviting to use. An all-in-one toolset, with a large and vigorously well documented standard library, and some of the best books on programming there are. As a sometimes-aspiring language designer who'd already done one esolang before coming to Lisp, the language dev tools that Racket provides were also far too enticing to stay away from.