Live data from Hacker News

Why I like Clojure

sulami.github.io

81–90 of 155 posts

Re: Why I like Clojure

#81
post #68

Earlier quoted context omitted.

Composing libraries instead of buying into a framework is a wonderful thing. It allows a developer to use just the parts they want, integrate them with just what the developer needs, and get on with whatever they're doing. It's a beautiful idea, and it can enable amazing levels of productivity. With that said, might it also be possible that there could be some drawbacks? Having worked in and with Clojure, I found the…

Really though, Clojure web apps are at the php-no-framework level security days, not joking. The most used HTML templater(hiccup) doesn't do any secure output escaping, bad password/session management, auth*, sql injection, bad encryption methods, its all there.

HTML templater has nothing to do with password/session management, auth, sql and encription, if your does, it does the wrong things.

Re: Why I like Clojure

#82
post #81

Earlier quoted context omitted.

Really though, Clojure web apps are at the php-no-framework level security days, not joking. The most used HTML templater(hiccup) doesn't do any secure output escaping, bad password/session management, auth*, sql injection, bad encryption methods, its all there.

HTML templater has nothing to do with password/session management, auth, sql and encription, if your does, it does the wrong things.

I think you spliced that sentence wrong. It's bad templating, /along with/ bad session management, auth, sql, and encryption tools.

Re: Why I like Clojure

#83
post #68
post #63

My favorite thing about Clojure: You compose libraries, instead of totally buy into framework A or B. Some people prefer the opposite. However, Composition works in Clojure because everyone is using the staples: functions, maps and seqs. Pretty much everything in the language can work as one (or all!) of them. While I also like static types, this is my argument for a well designed dynanic language like Clojure or its…

Composing libraries instead of buying into a framework is a wonderful thing. It allows a developer to use just the parts they want, integrate them with just what the developer needs, and get on with whatever they're doing. It's a beautiful idea, and it can enable amazing levels of productivity. With that said, might it also be possible that there could be some drawbacks? Having worked in and with Clojure, I found the…

This is a great conceptual point that I think can be missed by folks who prefer a constellation of quality library-style code over a single framework. It's true that the *nix ecosystem is a case of the former over the latter, and I think that can work nicely for library level code that is used to build applications. But, it's hard to build protocols; or maybe, more accurately, it looks like successful ones emerge rather than are constructed.

The closer you get to the application layer, the more it looks like high quality, opinionated frameworks and ecosystems are great. You get more mileage out of a sophisticated foundation once you're at that point, so your integration risk surface is higher if you choose to roll your own framework. To some extent, this is unavoidable, but I've always gotten value out of minimizing it.

To some extent, I think Clojure has some great things going for it because it can hook into the JVM and the Java package ecosystem. But if that's ignored, then it's essentially starting from scratch.

For folks who have production experience in Clojure: how valuable is Java interop in your experience? How often are you able to get away with using the most idiomatic parts of the Clojure-land ecosystem, and how often do you have to reach for Java-land? How easy is interop in terms of traceability?

Re: Why I like Clojure

#84

I love the language. I’ve never found a language where I found the learning curve so shallow for being able to do so much. That said, I do find myself pining for the ability to easily compile a static executable (maybe with a small embedded runtime). Some time ago there was an attempt to port Clojure to Gambit Scheme, but that appears to have fizzled. More recently, I’ve seen Ferret, which compiles a subset of Clojur…

Compiling an static executable is also interesting to me. This is why I'm learning Common Lisp. Its syntax and semantics are not as beautiful as Clojure's (IMHO) but CL also has other powerful features.

I recently read about RUtils [1] which uses reader macros to modernize a bit the syntax.

1: https://gist.github.com/vseloved/9c6e36f2fa89f4accf3f3cbc371...

Re: Why I like Clojure

#85

> While the primary platform is the JVM, superbly uncool but stable and relatively performant My impression was that java has the reputation of being "uncool" but JVM is highly regarded as modern marvel. I am wrong about this ?

IT Java is uncool, but then IT is uncool even if written in Clojure (though the psychological aspect of using a "cool" language will likely dampen the existential pain of writing yet another book keeping CRUD app since now you are using s-expressions!) In my experience, people who say silly things about Java -- the technology, which certainly includes the Java Language Semantics, and JVM -- actually do not know what…

> though the psychological aspect of using a "cool" language will likely dampen the existential pain of writing yet another book keeping CRUD app since now you are using s-expressions!)

Damn! I felt that.

Re: Why I like Clojure

#86
post #68
post #63

My favorite thing about Clojure: You compose libraries, instead of totally buy into framework A or B. Some people prefer the opposite. However, Composition works in Clojure because everyone is using the staples: functions, maps and seqs. Pretty much everything in the language can work as one (or all!) of them. While I also like static types, this is my argument for a well designed dynanic language like Clojure or its…

Composing libraries instead of buying into a framework is a wonderful thing. It allows a developer to use just the parts they want, integrate them with just what the developer needs, and get on with whatever they're doing. It's a beautiful idea, and it can enable amazing levels of productivity. With that said, might it also be possible that there could be some drawbacks? Having worked in and with Clojure, I found the…

Pedestal is a web library that ships with security enabled by default.

Re: Why I like Clojure

#87
post #72
post #70

I love the idea of Clojure. I find the ecosystem immature and full of ideas about "libraries, not frameworks" that leave developers incredibly vulnerable to their own ignorance and second-order ignorance. The number of developers I know - or even know of - that can be trusted to develop a useful and secure web application from the ground up with this kind of tooling approaches zero. Clojure is a cool language. I can…

Which libraries are people expected to plug together the security parts? I'm not pushing for clojure but a lot of other languages and frameworks are taking this approach too including Node and Go. Wouldn't the security stuff be a part of the individual packages? Ie authentication package handles sessions and tokens, an http server/middleware with built in csp and ssl, orm, the data stuff handling serialization and da…

The situation in Node and Go is better by the fact that these ecosystems have extensive documentation related to web security.

Re: Why I like Clojure

#88
post #70

I love the idea of Clojure. I find the ecosystem immature and full of ideas about "libraries, not frameworks" that leave developers incredibly vulnerable to their own ignorance and second-order ignorance. The number of developers I know - or even know of - that can be trusted to develop a useful and secure web application from the ground up with this kind of tooling approaches zero. Clojure is a cool language. I can…

there is luminus that assembles all the parts for you.

Re: Why I like Clojure

#89

Clojure Help: This is super apropos since I am JUST learning Clojure via the Clojure Koans. Any tips from clojurists on getting the repl (and readline) working fluently? I'm using Leiningen but it's not responding as I'd expect. I would think this would all set up more effortlessly. Tips on getting a new Clojure setup working would be appreciated.

try to get integration with repl working with your IDE.

Not sure what you are using but i use CIDR on emacs.

Re: Why I like Clojure

#90
I tried to learn (get to know) Clojure by writing a library for cacheing (memoizing) function calls. I thought it would be a simple exercise, but it turned out to be not so easy at all, with lots of special cases.
Post reply on HN