Live data from Hacker News

Clojure 1.10 release

clojure.org

81–90 of 97 posts

Re: Clojure 1.10 release

#81

Congrats. I'm trying to learn Common Lisp for great good. And, I love that lisp is still alive. I think we still haven't learned all that lisp has to offer. For me personally, I think Clojure (or any lisp) targeting Go would be awesome. The JVM lacks a killer Go "feature" which is _native binaries/easy deployment. Common lisp and many other lisps lack community which is why I think Go+Lisp would make a great combo. G…

you might want to have a look at Joker (https://joker-lang.org/)

It's a Clojure dialect written in Go. Currently, its mostly used as a linter but you can also do programming/scripting.

Re: Clojure 1.10 release

#82
post #72

Earlier quoted context omitted.

Python 3, Perl 6 it looks like Scala 3 is heading that way too.

Python 3 is quite similar to Python 2. They made some breaking changes, but nowhere near like Perl 6. The real stumbling block was str vs unicode, which they didn't realize would be such a pain when making the decision. There's breaking changes and there's writing a new language. It's a spectrum.

[deleted]

Re: Clojure 1.10 release

#83
post #36

Earlier quoted context omitted.

It takes one to know one. (Or so I would like to think.) Rich's writing, presentations, and example of overall conceptual discipline and maturity have helped me focus on the essentials in ways that I could not overstate. I'm glad (but not surprised) to see so much appreciation for him around here, even among non-Clojurists (like myself). At the risk of fanboyism, I am constantly referencing his ideas* to my team, and…

I made the mistake of showing the 'hammock driven development' talk to an employer of mine. He got annoyed by it and said he thought that it was just providing programmers with an excuse for staying away from the computer when they should be writing code.

>>it was just providing programmers with an excuse for staying away from the computer when they should be writing code.

That would be code as carpentry development model. Often encouraged by career managers.

There are plenty of those in the industry, people who have had rapid promotions before they could do non-trivial engineering work.

Re: Clojure 1.10 release

#84
post #24

Are there any plans for a native version of Clojure? I'd rather avoid the JVM if possible, but I suppose the whole ecosystem is dependent on it so that's unlikely?

Its often referred to as a guest language. The syntax is largely the same across JVM, CLR, and JS V8. The aim was to utilize the richness and reach of the most popular ecosystems, so all of Maven and npm are available to Clojure devs. The language should be able to be consistent across future runtimes with largely the same semantics.

Re: Clojure 1.10 release

#85
post #80

Earlier quoted context omitted.

The "getting things done in the real world" theme is overrated and mostly a myth. In static FP languages, the exotic features being added are almost always demanded by users in the industry. As a fun fact for Haskell, developers in academia are more likely to stick with the Haskell 98 language for stability and compatibility. As an example Simon Peyton Jones in a recent chat with Martin Odersky at Scala eXchange was…

Lisps are so flexible you aren't going to be able to make a solid feature-based argument why one is bad. They can do any logical feature expressively and easily if you want it for your own work. If another language does something better then it isn't hard to lift it either. Lisps fall down on writing performant code easily, on ease-of-learning and on community, but you're setting yourself an interesting challenge cla…

"Lisps fall down on writing performant code easily"

I disagree. I would say it is actually easier to write performant code in lisps than in other languages. In languages with traditional syntax (ie. not homoiconic) it is usually tradeoff between performance and readability. As soon as you try to maximise performance, the program starts becoming unreadable.

In lisps, on the other hand, due to how you can have full control over every aspect of translation between notation and generated code it is much easier to write programs that don't hurt performance just because you want nice notation or DSL.

As an example, take printf. This function makes it easier to format strings and is available in many programming languages.

printf("%d", 7)

If no special compiler optimization is used (ie. compiler having hardcoded optimization just for printf) this results in code that will have to parse "%d" every time just to figure out, every time, it needs to take next argument and output it as integer.

On the other hand typical Common Lisp format macro looks very similarly:

(format t "~d" 7)

but you, as an author of a macro, have option to figure out that the format is an immutable string, so you can, at the compile time, replace call to format with an equivalent call to a simpler function that will take integer as an argument and immediately print it. This way you don't have to parse the format string every time and you don't have to pay for an extra stack frame as the expanded form of the macro takes place of the macro invocation.

For another example take a look at Peter Seibel's Practical Common Lisp chapter on parsing binary files (http://www.gigamonkeys.com/book/practical-parsing-binary-fil...)

This chapter shows a system of macros that take very high level of description of binary data structures and generates efficient code to parse, access parsed data and serialize it to the binary format.

In a typical language the requirement to have flexible description of the messages would likely result in a compromised performance. This is why so many "high performance" solution involve some variant of code generation but at the cost of additional complexity.

Re: Clojure 1.10 release

#86
post #37

Earlier quoted context omitted.

You can use GraalVM, I guess? But keep in mind that the code typically runs faster on the JVM. https://www.graalvm.org/

> the code typically runs faster on the JVM. no, it typically doesn't. in certain edge cases the JVM does out perform Graal though.

“Certain edge cases” being everything that doesn’t include startup time? It makes sense to me that a kit would be able to optimize better than an aot compiler. If you claim otherwise I’d like to see some sources.

Re: Clojure 1.10 release

#87

Nice to know that debug messages have improved. Ease of debugging would improve more, if an exception happens a live repl is spawned at that point allowing one to view locals/values, modify state, continue execution, etc. Most lisps allows such live repls for debugging like Scheme and Emacs lisp, while clojure only provides a stacktace on exception, and not a repl.

You can do that yourself if you care (https://m.youtube.com/watch?v=zp0OEDcAro0) but I get what you mean. On the other hand, on a server application a REPL on exception wouldn’t help me.

Re: Clojure 1.10 release

#88
post #59
post #33

Earlier quoted context omitted.

There’s a CLR port if you really just hate the JVM ;) Can do NodeJS with Clojure a’la Clojurescript as well

Is that actively maintained? Last commit on the GitHub repo has been two months ago, and the wiki page was last edited in 2014.

It's a one-man job more or less, so it comes in bursts, but it's up to date with 1.9.0.

That said, if you're looking to get into the Clojure ecosystem in general, almost certainly not the place to start. You miss out on the multitude of good OSS libraries that have Java deps.

Re: Clojure 1.10 release

#89

Earlier quoted context omitted.

I made the mistake of showing the 'hammock driven development' talk to an employer of mine. He got annoyed by it and said he thought that it was just providing programmers with an excuse for staying away from the computer when they should be writing code.

Has he ever written code that was used in production and he was in charge of the project?

He became a project manager when he found he wasn't good at writing code after becoming a coder when he found he wasn't a good physics researcher.

Re: Clojure 1.10 release

#90

Earlier quoted context omitted.

Rich Hickey is a great thinker. But he's also an application developer (Datomic). So breaking changes don't just break "other people's code" in the abstract. The pain is real and immediate. By wearing multiple hats he's finding the right balance in a way that language designers who don't code day-to-day simply can't.

The deification of Rich Hickey in this thread is amusing. No doubt he's a great developer and language designer, but dogfooding your own language is not exactly novel.

I'm not really sure where you see this "deification" — but as for me, I simply have a lot of respect for him. Mostly because every year or so he comes back with another solution to one of my problems. I don't agree with all his choices (I find some of his naming compromises particularly bad), but I still respect (not "deify") him.

Listen to some of his talks and you will see why people respect Rich.

Post reply on HN