Clojure all the way down
bucharestfp.ro
bucharestfp.ro
I'll stick with Guile Scheme, which has tail call semantics, first-class continuations (both regular and delimited varieties), and other things that are absent from Clojure.
In my experience, though, the lack of full TCO in Clojure actually makes people write more readable code in many cases (because you can only recur from a tail position in Clojure, you always know where to look).
On the other hand, does Scheme have STM? Agents? Refs? I'd miss those.
So, it is not surprising that Clojure lacks continuations.
I guess you could argue that most Schemes / Lisps have a similar boundary, but from using both it feels different in Clojure.
In short, I think you run out of turtles to jump down onto at a certain point in Clojure.
[1] https://github.com/takeoutweight/clojure-scheme [2] https://github.com/raph-amiard/clojurescript-lua
I think it'd be a fun project to get cljs-lua working and build a system for developing OpenResty apps but it's so low on my priority list I don't anticipate ever making it happen.
"When an exception is thrown in Java, the stack unwinds meaning all state in stack frames from the point of the throw to the handler gets thrown out."
"In Common Lisp, the stack does not unwind and high level logic can simply restart the computation (after fixing the error or trying different strategies) without losing any intermediate state. This killer feature is what makes interactive debugging possible."
Not enforcing a functional paradigm also makes prototyping easier.
McCarthy, Steele, Gabriel, Fahlman, Weinreb, Moon, Stallman, Bobrow, Greenblatt, Moses, Norvig, Sussman, Brooks, Masinter, Pitman, White, ...
The all have been working on useful Lisps...
A: No, and don't waste your time on this talk if you already have watched any of Rich Hickey's talks, this is an ego-stroke at best that introduces no new solutions to any problems. It's an hour and a half of 'Hey look what clojure can do', and 'Gee, our documentation isn't great'.
Maybe someday Clojure will have something like the Shen project has with KLambda. A tight, core language implementable in any language, and a language library built on top of that core language, agnostic of the implementation it's derived on.
If Clojure had gone this route, we could basically have Clojure on any platform capable of parsing and modifying S-Expressions.
Maybe someday!
The idea that you can have a language which is portable/reimplementable on any platform is fundamentally flawed. You can't.
It is because of the fact that Clojure and ClojureScript are not really exactly the same language, and are implemented in very different ways from each other, that we can take advantage of many platform-specific features that would otherwise be abstracted.
If you can't implement C on a platform, I think you're in some pretty strange territory and you're probably having to invent your own language to match the platform.
In other words what you call C is actually very different from platform to platform, people solving that with a crap load of ifdef statements.
It is possible to implement C faithfully on these platforms, including all of C's weirdness like pointer-arithmetic and unsafe casting. But you'd end up with something that departs far from the platform's runtime model and calling conventions.
Of course it can. The two platforms you listed can both faithfully emulate an entire computer, upon which you can build your C runtime.
http://bellard.org/jslinux/tech.html
Now, if what you really meant was more along the lines of "can I faithfully cross-compile C to Java bytecode", the answer would be "not without a layer of abstraction".
Can you elaborate? Shouldn't VM just standardize EVERYTHING on the language level? Can you give specific examples when language NEED to be aware of the hardware?
You always need to be aware of the hardware/target-platform. Some examples:
1. Bioinformatics 2. Data storage 3. Any soft real-time application 4. Any kind of constraint search with simulated annealing through large spaces 5. Operating systems 6. Compilers 7. Image recognition/analysis 8. Rendering 9. Basically any application where the user expects a responsive result
You ignore performance at your peril. The reason why we have super-fast computers and software with loading screens is because of this thinking.
If you do have a legitimate reason to run on a VM you should be aware of the burden its abstractions places on your ability to reason about the performance and costs your program will incur.
Someone mentioned C, and it's a good example. C is different on every platform. If your C code interacts with the world in any way, you won't write the same code. Libraries will be totally different, not to mention that pointer sizes are different, byte ordering is different, and even your lowly int might betray you. The reason why C is so practical and widely used is exactly because it doesn't try to force a platform abstraction on you.
In the case of a host language, any integration beyond the most simple with the host is going to require implementation specific code.
True, but some people push the limit of what you can do much farther than others. Take a look at what the ceylon team is doing, to see what you can do if you plan for it from the beginning.
On the other hand, Clojure runs on a platform that is supposedly implementable anywhere.
The kool-aid drinkers.
I don't like Clojure or ClojureScript. They are both awful by virtue of the platform they exist on. I would like very much if Clojure had a core lisp KLambda, because I could abstract Clojure onto a platform that wasn't terrible.
Rich is a guy who (whether consciously or otherwise) hated writing Java and decided that functional programming worked, and that Lisp did too. Clojure is a strange abomination from the points of view of those in the pure-functional family, and those from the paren-dimension, but I find that Clojure code reads easily, and comes off far more expressive than that of Python or Ruby or other so-called expressive languages.
When someone who uses the JVM tells me that something I know to be true is 'fundamentally flawed' I become fearful for myself, that I might drown in irony.
Personal attacks are not allowed on Hacker News. I'm sure you can express your thoughts about programming languages without them.
Would you like to see my papers?
https://news.ycombinator.com/newsguidelines.html
To anticipate the objection, no, this hasn't a fig to do with political correctness. It's about trying to preserve HN as a place where people want to come for substantive discussion. I'm sure many of us agree with your views on Lisp; that doesn't mean you get to be an arsonist.
We detached this subthread from https://news.ycombinator.com/item?id=10432280 and marked it off-topic.
This entire thread of backstabbing selfishness is why Lisp and Lisp people never accomplished anything.
Go lock yourselves in your own personal Orthancs weaving unreadable code and leave the rest of the world alone.
If they had just said "A new awesome Lisp" or something, they wouldn't be getting so much hate.
Personally, I think Clojure is great. I like Common Lisp better. I also use Emacs Lisp and play around in Racket Scheme.
It's when people try to say that their Lisp is the only useful one that us lispers get pissed off.