Live data from Hacker News

Why I am excited about Clojure

blog.txus.io

151–160 of 173 posts

Re: Why I am excited about Clojure

#151

Earlier quoted context omitted.

I admit to still not understanding what goes on with function definitions in clojure, but this idea of just making a micro change in clojure and evaling that and seeing the real time effects never seems to pan out for me. I do lots of small functions that build on each other. If I make a change to one of the base functions, the higher functions seem to hold a reference to the old definition and I end up having to re-…

>And documentation in clojure code in general is very poor. People think their code is self documenting. It is not. Clojure functions and macros have docstrings you can query with the "doc" function. Honestly I've started keeping a repl open all time like I used to do in C with a terminal + man, so I can use (doc whatever) or (source whatever) to see the documentation + implementation details of most of the functions…

I do appreciate the doc strings. If only more people would write them. Weavejester's code I think is a fine example of doing this well. https://github.com/weavejester/compojure/blob/master/src/com...

Re: Why I am excited about Clojure

#152
post #35
post #25

Earlier quoted context omitted.

What I find really surprising is that other languages that have pretty decent REPL support have not embraced it so fully as Lisps have. Connecting to the live[0] instance a Rails or Django app, examining its internal state and making updates that don't involve more or less restarting the app is unusual at best. Ruby and Python borrow a lot from Lisp, including the REPL, but some of the most popular applications of th…

The work done at Xerox PARC with Smalltalk and Interlisp was great. Imagine having a REPL to your complete OS, not the just the basic CLI that most systems have. There are a few videos of those days showing up the systems.

+1 I still think fondly of the InterLisp environment on the Xerox 1108 Lisp Machine my company bought me in 1982. You can find emulators for InterLisp, but the experience is not the same.

Re: Why I am excited about Clojure

#153
post #35

Earlier quoted context omitted.

The work done at Xerox PARC with Smalltalk and Interlisp was great. Imagine having a REPL to your complete OS, not the just the basic CLI that most systems have. There are a few videos of those days showing up the systems.

+1 I still think fondly of the InterLisp environment on the Xerox 1108 Lisp Machine my company bought me in 1982. You can find emulators for InterLisp, but the experience is not the same.

Everything I know is from the documents, papers and videos that I manage to scrap from the Internet.

My experience with Oberon, lead me to track down how Wirth learned about such systems.

Additionally, I got to learn Smalltalk in the form of VisualWorks before Java was known to the world.

So I extrapolate my experience to how it might have felt back then and find it sad we are still trying rediscover it.

Re: Why I am excited about Clojure

#154
post #34

Earlier quoted context omitted.

That's the neat thing about Lisp-style macros. You have to sacrifice a little bit of the syntactical sugar that you are used to in most languages, but in return you have the ability to add almost any possible construct to the language natively. It makes it much easier to extend the language as you don't need to hack an interpreter written in C or Java. Half of the core language is already written in macros.

Not having to memorize an operator precedence table makes me more than willing to give up syntactic sugar. This is one of the things that I dislike most about haskell. I wish liskell or one of the other projects trying to bring S-expressions to haskell had taken off.

Of course, when writing Haskell, you could always just wrap the individual operators in parentheses and get the prefix forms (as distinct from fully parenthesizing to disambiguate with infix forms). Getting others to do so (and getting them to merge your code) may be an uphill battle, though...

Re: Why I am excited about Clojure

#155

Earlier quoted context omitted.

One of little secret of Clojure is that you almost never use Java based library. Because it forces you not to use idiomatic Clojure. So, most library you'll use in Clojure are in fact Clojure made. From this point of view of number of libraries, Haskell and Clojure are in fact at the same level. I was sold in part by the JVM argument. But in reality, in practice, I found it to be more a burden than a delight. First,…

> One of little secret of Clojure is that you almost never use Java based library. Because it forces you not to use idiomatic Clojure. So, most library you'll use in Clojure are in fact Clojure made. From this point of view of number of libraries, Haskell and Clojure are in fact at the same level. This isn't really true. Yes, directly using a Java library forces you to use Clojure that is not idiomatic but 1) this is…

Haskell does have a pretty good C FFI, so it's not as if you're necessarily going to have to reinvent the wheel. I know precisely nothing about Clojure's C FFI - I'd guess it has a fine one, which of course means that this isn't an edge for Haskell per se but it does make the Java interop slightly less important.

Re: Why I am excited about Clojure

#156
post #147
post #2

What is it about Clojure that Rubyists love? I am a Rubyist who is new to Clojure (I love it) and I cant explain it myself. Clojure was suggested to me by several other Rubyists. I find myself suggesting it to other Rubyists as well....

Rich Hickey (creator of Clojure) was/is a big Ruby user.

I am not, and have never been, a Ruby user.

Re: Why I am excited about Clojure

#157
post #68
post #50

Earlier quoted context omitted.

The benefits of lisp 'syntax' are legion, to the point that I've come to feel that your position is unprofessional. Why wouldn't you try to get passed something as superficial as syntax, in order to better _make_ stuff? 1) Easier to learn and remember syntax for polyglots. No more Googling, shit like "what was the syntax for try-with-resources or the new multi-catch feature in java"? 2) The language tooling is so muc…

Julia [1] has 3 and 5, and almost 1 (it has very few built-in syntax sugars and a uniform way of invoking macros). It's targeted at scientists, so 4 is not an option, as infix syntax is a hard requirement for mathematics. [1] http://julialang.org/ Edit: Elixir [2] is homoiconic as well, with even more uniform syntax (though it doesn't have special matrix syntax). [2] http://elixir-lang.org/

Elixir is not homoiconic. They used to claim that based on a very unusual definition of homoiconicity, but they have removed those claims from their materials.

Re: Why I am excited about Clojure

#158
post #147

Earlier quoted context omitted.

Rich Hickey (creator of Clojure) was/is a big Ruby user.

I am not, and have never been, a Ruby user.

Sorry, I apparently have a false memory of that. Maybe I was mixing up your history with that of Stuart Halloway.

Re: Why I am excited about Clojure

#159
post #34

I'm more excited about ClojureScript because it runs in the browser as JS, of course. My mind is kind of blown that Go-routines were added to the language as a library (core.async). And so was logic programming (core.logic), optional typing (core.typed), and pattern matching (core.match).

That's the neat thing about Lisp-style macros. You have to sacrifice a little bit of the syntactical sugar that you are used to in most languages, but in return you have the ability to add almost any possible construct to the language natively. It makes it much easier to extend the language as you don't need to hack an interpreter written in C or Java. Half of the core language is already written in macros.

Elixir has Lisp-style macros with a Ruby syntax. It's not quite as close to the AST as a Lisp, but I think the trade off hits a sweet spot. For example:

  quote do
    1 + 1
  end
returns:

  {:+, [context: Elixir, import: Kernel], [1, 1]}
which, if you squint at it, starts to look a little Lispy.

Re: Why I am excited about Clojure

#160

Earlier quoted context omitted.

I'll go out on a limb and say that everyone on HN loves Clojure! It seems to be the least cribbed language here. Its features are hard to beat - that and Rich Hickey's wonderful talks[0] make you all the more confident in Clojure as a language! [0] - http://www.infoq.com/author/Rich-Hickey

Speaking as someone who has lately been studying Common Lisp, I'm not quite sure how I feel about Clojure; I like that it's hosted on the JVM, but I don't like the apparent lack of a debugger, which to my mind is a sine qua non of Lisp development. I haven't seen much in the way of progress on that front, either, but it's been a few months since I last looked into it; is there any sign that that handicap is likely to…

I'm the author of Cursive, a Clojure IDE based on IntelliJ. Cursive currently has a fairly minimal and occasionally frustrating debugger that I'm planning to improve soon. That said, I use it all the time and it works pretty well. It's really nice to be able to debug a REPL session. Currently breakpoints and stepping work well, and expression evaluation somewhat works but is pretty quirky. Types and names are all currently displayed as Java, unfortunately. I'm planning to have a debug REPL per stack frame when I get around to upgrading this part. I'm hoping to get to this sometime within the next month.
Post reply on HN