25 ms·
LuaJIT is, by far, the best option for scripting in games/RT, thanks to the incredible JIT performance and its incremental GC with deadlines. But there's somet
by carloscm 11y ago
LuaJIT is, by far, the best option for scripting in games/RT, thanks to the incredible JIT performance and its incremental GC with deadlines.
But there's something when you start playing with Lisp and then you want to keep using it more and more. Suddenly the classic Ruby/JS/Python/Lua language design feels boring and stale (ironically, given the age of Lisp).
After getting my feet wet in v2, I'm doubling down on Scheme for The Spatials v3, this time using S7 Scheme, a true gem of an interpreter (first class environments, hook on symbol-access for reactive programming, super extensive C FFI support, etc.)
- deleted 11y ago[deleted]
- sklogic 11y agoMillions of developers got no clue about the power of meta-languages.
- jarcane 11y agoGoing 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.
- 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.
- SeanLuke 11y ago> LuaJIT is, by far, the best option for scripting in games/RT Much as we want to like it, we've been frustrated by Lua for a single reason: no preemptive threading library. Its lack of true prototype-style OO is more than a bit annoying too.
- david-given 11y agoThreading I'll grant you, but prototype-based OO is practically Lua's defining feature. Could you expand?
- SeanLuke 11y agoWell, I guess that's not really fair. Obviously you can implement prototype-style OO, more or less, using the metatable and metamethod facilities. But as an old NewtonScript developer, I rather find foo = { x = 1, y = 2 } mt = { __index = bar } setmetatable(foo, mt) to be crazy compared to foo := { _proto: bar, x: 1, y: 2 } The uncleanliness of function declarations in Lua compared to NewtonScript also gets to me in this way. At any rate, to me, the metatable facility feels like a hack. That's not to denigrate it: it's a very flexible and clever gizmo which can be used for a variety of cool things. But to me proto-style OO languages are notable for their elegance and simplicity, and metatables expose a fair bit of wiring and boilerplate. [It also wasn't a good sign that the whole OO section in "Programming in Lua" was about "classes" :-( ]
- david-given 11y agoThreading I'll grant you, but prototype-based OO is practically Lua's defining feature. Could you expand?
- larme 11y agoThere're lisp to lua solutions like l2l[1] or moonlisp[2] (Shameless plug: I also have a WIP hy[3] inspired lisp->lua compiler hua[4]) [1]: https://github.com/meric/l2l https://github.com/meric/l2l [2]: https://github.com/leafo/moonlisp https://github.com/leafo/moonlisp [3]: http://hylang.org http://hylang.org [4]: https://github.com/larme/hua https://github.com/larme/hua
- carloscm 11y agoI've looked into both l2l and moonlisp and they were too incomplete to be usable in their current state, and not being worked upon recently (or not much). The most current and interesting effort in this area in my opinion is Conspire[1], which is actually based on Terra[2], another amazing piece of software. The decision to not go with LuaJIT was complicated and depending how it goes with S7 I probably won't take it again for a new game. For starters I doubt I will delegate any per-frame non-evented computation to the S7 side, while I could easily do it in LuaJIT. But I'm already seeing an at least 10:1 ratio of lines of code for things like building GUIs, and it's only going down even further now that I'm implementing event callbacks with lambdas and adding reactive-like system for rendering updates. Good work on hua! I read somewhere that once you learn a Lisp you are destined to write one. I've been tempted too :) [1]: http://blog.duangle.com/2015/01/conspire-programming-environment-for.html http://blog.duangle.com/2015/01/conspire-programming-environ... [2]: http://terralang.org/ http://terralang.org/