Live data from Hacker News

Using Clojure for Web Apps

github.com

91–100 of 122 posts

Re: Using Clojure for Web Apps

#91
post #70
post #56

Earlier quoted context omitted.

There's a huge difference. The parens in lisps are significantly detrimental to its first impression, and 3rd, 4th ... I have literally never met a developer I can show a lisp code sample to whose reaction isn't "what the hell is that?" It looks totally alien compared to C-style langs, which is what most people learn. With Python, that is not the case at all, basic Python can be interchanged with pseudo-code for the…

> Pretending this problem doesn't exist Young children tend to look with disgust upon many meals that adults find especially delicious. Is it a problem with the food, or is it a matter of experience and perspective? I'm very tempted to give examples, but it's not worth it here. Suffice to say, this falls squarely in the category of "you don't know what you're missing". In this long essay by Paul Graham - http://www.p…

That wasn’t very nice, but it felt spot on.

Curly braces are the chicken nuggets and fries of computer science, lol.

Within about 18 months at university (80s), I learned BASIC, FORTRAN, Pascal and Lisp. Syntax, yeah, whatever.

(We transitioned to C later, to my horror, with an eye towards a future using “C with classes”)

Re: Using Clojure for Web Apps

#92
post #44

Earlier quoted context omitted.

As someone who tries to use Clojure everywhere I can, its very hard to beat Rails for pushing out a webapp (many long Clojure timers share this opinion). Clojure shines for web services that require lots of data processing in the server and for integrating with parts of the Java ecosystem.

I have not investigated Coast yet. I know it aims to be a Rails for Clojure... maybe it is, and maybe it would meet my needs. But given the incredible power and expressiveness of Clojure, I find no reason to believe that the best rapid web development framework could be developed in Clojure if the right motivated people attempted to do so. I don't know how many people (Plataformatec?) were behind Phoenix, but even in…

Yes, and this trend in the Clojure ecosystem unfortunately works against widespread adoption. Works-for-me, everything-is-a-snowflake reinforces the image of Lisps being creative tools for individual artisans rather than rapid development tools for teams.

Re: Using Clojure for Web Apps

#93

Some of my favorite Clojure libraries in this space: - instaparse: takes EBNF (and other formats) as a string and gives you a parser instantly (!!!) https://github.com/Engelberg/instaparse - re-frame: React-Redux alternative that IMO is much easier to work with https://github.com/day8/re-frame - reagent: React wrapper https://reagent-project.github.io/ - ring https://github.com/ring-clojure/ring - fulcro https://gith…

yes! We use most of these for a pretty large enterprise webapp.

> It's a pernicious accident of history that we are taught to accept references to mutable objects as normal, inevitable, and desirable in most CS curricula. It is much easier to develop, debug, and maintain immutable data structures instead

Except for trees and graphs and the like. immutability makes working with these much more complicated.

Re: Using Clojure for Web Apps

#94
post #88

Earlier quoted context omitted.

> Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions GraalVM could totally change this.

Clojure uses too much runtime reflection. I tried many iterations of compiling different server projects with Graal and none worked. I could get simple programs to compile with an older clojure version, but nothing with recent code.

I'd expect the tooling will improve over time. This obviously isn't an immediate solution for running Clojure in situations where cold starts matter, but in general I think many of the improvements coming to the JVM in the next few years will pay dividends for Clojure.

Re: Using Clojure for Web Apps

#95
post #87

Clojure and Elixir (Erlang) are my favorite languages. When you get to the point where the parens and brackets just melt away and you have this awakening. It makes me wish José (creator of elixir) would have chosen Clojure syntax instead of Ruby.

Have you looked at LFE?

http://lfe.io

Re: Using Clojure for Web Apps

#96
post #72

I love Clojure and take every chance to use it, but unfortunately it’s very much behind the curve. Building web apps is more and more about tying together managed services with short scripts (aka serverless). This means that most app developers never have to deal with the hard technical problems that Clojure was designed to solve and Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions.…

> Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions GraalVM could totally change this.

Not to mention provisioned lambdas if you're on AWS.

Re: Using Clojure for Web Apps

#97
post #72

I love Clojure and take every chance to use it, but unfortunately it’s very much behind the curve. Building web apps is more and more about tying together managed services with short scripts (aka serverless). This means that most app developers never have to deal with the hard technical problems that Clojure was designed to solve and Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions.…

A slight tangent but are there really signals that indicate AWS Lambda style serverless is becoming a dominant way of making web backends? Especially since the AWS flavour is so developer hostile (APIGW, CloudFormation, highly divergent dev vs deployment setups complicating debugging, etc)

It's fairly painful compared to a normal backend, and it seems like the serverless advocates are on the super high and super low end: big product teams that can justify microservices and the associated high friction, and on the other hand users/use-cases who recoil at keeping a monolithic server turned on all the time even on a wimpy cloud service.

But if you've jumped on the bandwagon, look into Datomic - Ions are the Cloure-native Lambdas there.

Re: Using Clojure for Web Apps

#98
post #97
post #72

I love Clojure and take every chance to use it, but unfortunately it’s very much behind the curve. Building web apps is more and more about tying together managed services with short scripts (aka serverless). This means that most app developers never have to deal with the hard technical problems that Clojure was designed to solve and Clojure’s slow startup time on the JVM makes it unfeasible for serverless functions.…

A slight tangent but are there really signals that indicate AWS Lambda style serverless is becoming a dominant way of making web backends? Especially since the AWS flavour is so developer hostile (APIGW, CloudFormation, highly divergent dev vs deployment setups complicating debugging, etc) It's fairly painful compared to a normal backend, and it seems like the serverless advocates are on the super high and super low…

Yes, I believe so. We've just passed the peak of inflated expectations on the technology hype curve, and the comments on HN reflect this.

But in general - Do people manually deploy MySQL, Postgres, or MariaDB on EC2 servers? No, (most) people use RDS. The servers are still there, but the management is less.

Do people manually deploy RabbitMQ? No, (most) people use SQS.

Cloud providers have been working out of the same playbook for years - provide low-level compute, watch what people build, and create managed services which solve common use cases. Developers love these services, because it's less infrastructure to be on call for, and they can build products faster.

Lambda and Serverless represents the inevitable conclusion of the natural evolution of the cloud. Parts of it are still painful, but undoubtably it's getting easier and more capable.

Re: Using Clojure for Web Apps

#99
post #66
post #56

Earlier quoted context omitted.

There's a huge difference. The parens in lisps are significantly detrimental to its first impression, and 3rd, 4th ... I have literally never met a developer I can show a lisp code sample to whose reaction isn't "what the hell is that?" It looks totally alien compared to C-style langs, which is what most people learn. With Python, that is not the case at all, basic Python can be interchanged with pseudo-code for the…

The claimed problem that exists however is... lame. It really boils to "if it doesn't look like C, I'm not learning it", which is a fairly pathetic argument, and not one that can actually be bested with any targeted marketing or discussion. Most developers only learn a new language because they're forced to: at work, or joining an existing project as part of their hobby, or because the library they need requires it,…

> It really boils to "if it doesn't look like C, I'm not learning it"

I think it's funny that most people who complain about this are likely coming from Java, JS, or Python, not C. And they probably would suffer a lot in C...

I've made the jump to Clojure, and to be honest, it's painful going back to other languages, but not just because of the syntax, but rather the lack of expressive power, and the excess of boilerplate. I had to do some Python work last year, and it felt like coding with a straightjacket on.

Re: Using Clojure for Web Apps

#100
post #15

If anyone is interested, there is an up and coming Clojure web framework called Coast, https://coastonclojure.com/ For those that aren’t as familiar with Clojure - there isn’t a rails or Django for web apps, so Coast is trying to fill that void.

Tony Kay is also working on Fulcro RAD, which seems very promising: https://www.youtube.com/watch?v=jkx9F-RIFiY
Post reply on HN