
Macchiato – A way to build Node web applications using ClojureScript - tosh
https://macchiato-framework.github.io/
======
weego
I have to admit I thought it was some kind of meta joke about the state of
development right now.

I just can't imagine many situations where you have cl/cljs capable devs yet
want to reject all the benefits of the jvm and use node

~~~
shizcakes
The JVM, for all it's benefits, comes with a significant number of downsides.
Many folks no longer wish to operate a JVM when less bloated and clunky
runtimes exist.

~~~
FieryTransition
Well, there is an OpenJDK version that azul systems make called zulu, which is
open source and free from oracle.

The jvm is still a really good runtime. Java is a way more consistent language
than javascript. Other languages running on top of the jvm are way more
beautiful and sensible than javascript. The jvm can be leveraged many ways
when it comes to performance and use cases, and I consider it way more stable
than different javascript runtime implementations running in different
browsers coded by different organizations.

Out of curiosity, why do you think the JVM is such a thing of the past and so
bloated and clunky? I'm curious about what reasons people have. From my own
experience, I get that javascript is easy to start things in, but damn, it can
get sucky once you have to maintain and refactor a bigger codebase. It just
feels like javascript and node gets a lot of mindshare since it is what the
web industry pushes down everyones throat sometimes :/

~~~
krisdol
JVM is slow as heck to start, but an awesome runtim. In an ideal world I'll
never have to restart my application or my repl, but in the real world I do it
all the time. It's much faster than node.js/V8 when executing heavy tasks.

One reason I might be interested in running clojurescript on node.js is
because most web technologies nowadays are written for node.js/javascript
first and ported as an afterthought. GraphQL servers on Clojure/Java, for
example, are like 3rd class citizens compared to node.js. Google provides nice
wrappers to their APIs as long as you're not using clojure. I end up writing
things in-house a lot more often than I would with node where I just npm
install the package I want and I get something that is maintained by the
official author.

~~~
coltnz

      ~ time java test

Hello world java test 0.11s user 0.03s system 88% cpu 0.161 total

MacBook Pro (Retina, 15-inch, Late 2013)

~~~
grzm
I think what's missing in your parent but assumed is, within the context of
Clojure, startup is slower than ClojureScript. The Clojure runtime is
relatively slow on startup.

~~~
jeremiep
Unless you restart your server 400 times a day, how does startup times matter,
even remotely?

~~~
grzm
I think your question is better directed upthread: I'm attempting to clarify
possible misunderstandings, not arguing for any particular position. But it's
important to keep in mind that people have different needs and desires in
different contexts. One off the top of my head is something like AWS Lambda.
It's not necessarily the context where Macchiato would play a role, but a
server context where one might indeed be starting up processes thousands of
times a day.

------
darkstar999
How many more coffee drink names are available for the taking? Do we reach
peak javascript when that list is exhausted?

~~~
lukealization
There's two JS libraries using the term "ristretto", we've all heard of mocha.
"espresso" seems to be a disused node.js tooling library, similarly, "flat
white" is a disused CMS, "latte" is a failed CoffeeScript competitor.
"Americano" seems to be a slightly more used tooling repository.

I guess the less than inspiring names "short black" and "long black" are
available? :)

~~~
petecox
Then you'd love LuneOS. Every release name is a coffee drink.

------
spraak
I've been loosely following the development for a while. Glad that it's not
dying and seems to be going somewhere, but not quite ready to build anything
big on it yet (which I guess can be self fulfilling... someone has to build
something big on it sometime to increase visibility)

------
didibus
What stops you from using ClojureScript on the server today?

~~~
noobermin
What stops you from using _clojure_ on the server today?

~~~
didibus
Nothing, and I believe there's also nothing stopping you from using
ClojureScript on the server today either with Nashorn or Nodejs.

But Macchiato seems to imply that something was previously stopping us, which
it solves, so I'm curious to know what that is, since I was under the
impression it was already possible.

~~~
yogthos
The goal of Macchiato is to provide an idiomatic way to write Clojure apps on
top of Node that mimics the way Clojure web stack works on the JVM.

------
foxfired
You have a typing error under from closure:

-he goal for Macchiato is...

should be:

The goal for Macchiato is...

------
dharness
I think it should say "ClojureScript arrives on THE server", with the article.

------
v4tab
I keep looking at ClojureScript, and decide to try it. And then I get to the
"requires JDK" and just turn around and walk out the door. It seems like an
interesting language, but it would be nice to have it run without that
requirement.

~~~
grzm
That's no longer true. ClojureScript can now be self-hosted.

[https://clojurescript.org/guides/self-
hosting](https://clojurescript.org/guides/self-hosting)

[Edit to correct: the following is no longer entirely valid: see downthread.]

That said, if you want to benefit from the Google Closure optimizations, you
currently do need to use the JVM toolchain. IIRC, there's been work on the
Google Closure side to run without a JVM, and if that's the case, there may be
opportunities in the future to take advantage of this in the ClojureScript
toolchain.

~~~
wiredearp
Lumo took advantage of that already according to
[https://anmonteiro.com/2017/02/compiling-clojurescript-
proje...](https://anmonteiro.com/2017/02/compiling-clojurescript-projects-
without-the-jvm/)

~~~
grzm
Thanks for the link. I expected it was just a matter of time!

