
Joy: Web framework with Clojure syntax, fast startup and low memory usage - galfarragem
https://joyframework.com/
======
jonahbenton
Love passion projects, and love Clojure and its syntax, but wish some folks
would pick up on Spec and on predicate-based data flow definitions. That is
what I miss most in other languages.

~~~
dig1
Spec has it's place, but I think people are trying to shovel spec in all sort
of places; for example, heavy data parsing, making code very hard to track.
Reminds me on core.logic movement couple of years ago, where everyone tried to
have own parser/ui/whatever written in it, resulting very unreadable code.

What I'm really missing from spec is ability to disable it with flag or
property, like "assert" macro. Sometimes I just want piece of code to run as
fast as possible with less bytecode and instructions executed.

~~~
jgalt212
Isn't spec just a way to bolt on types to a dynamic language? And if you look
at this way, can one have its cake and eat it too?

~~~
nickik
Thinking about Spec like a type-system is really not the right way to think.
Its more dynamic validation system that works like regex for data-structures.

~~~
jgalt212
unless you think about types the way Haskell does.

------
threatofrain
Docs are here:

[https://github.com/joy-
framework/joy/blob/master/docs/readme...](https://github.com/joy-
framework/joy/blob/master/docs/readme.md)

------
swlkr
Hey! Joy made it to HN! Pretty cool, if anyone has any questions I’d be happy
to answer!

~~~
Scarbutt
What happened with Clojure and Coast? ;)

~~~
swlkr
Haha well they still work, but yeah not super active on it lately.

------
GradientAssent
I'm working on a project right now where the centerpiece is a Three.js scene.
It's about data visualization, so the surrounding code covers much of the same
ground as a typical single-page web app: fetching data, UI for manipulating
the dataset, etc.

I decided not to use my beloved Clojure and re-frame because it seemed like I
was going to end up wrestling with Three's imperative API.

Others inclined toward projects like the OP and the Clojure ecosystem more
generally: how have you approached similar projects before? Where there's a
very non-Clojure-native library that will be critical?

I ended up with TypeScript, React, and Redux instead of re-frame.

~~~
capableweb
> how have you approached similar projects before? Where there's a very non-
> Clojure-native library that will be critical?

Started playing around with Arcadia which is Clojure-CLR + Unity3D
tooling/library. Basically used for make some interactions with the Unity3D
framework easier.

While most of the code is using interop, having the repl flow is something
that for me, after using Clojure professionally for a while, is really really
hard to give up. I've tried getting into game development before, but the slow
iteration cycles on "make change -> save -> do thing to test" just sucks all
the fun out of it.

If I were to use Three.js in a project, I'd approach it the same way. As I try
to stay far away from any other languages, I'd write a small layer between my
CLJS code and the Three.js API, the smaller the better, and then use that.

Because giving up on being able to eval whatever and having access to a repl
is not worth it in the projects I work with.

Basically, any hurdle (like basing my project around a non-CLJS library) is
easier to overcome than having to deal with something like TypeScript again.

------
christophilus
Interesting. Anyone used Janet before? It sounds like a promising language.
The fact that it supports mutable strings is a little disconcerting, though.

~~~
DennisP
I haven't yet but I think I will, partly because I've always been intrigued by
lisps. Also, I hope they never change their logo, which looks a lot like my
late mother did when she was young. She was also named Janet.

~~~
capableweb
That's a nice coincidence :)

Seems the inspiration for the name comes from The Good Place, and the logo
seems different enough that they won't sue the owner of the project, as the
face in the logo is not that similar to Janet from the TV show.

> Why Janet? Janet is named after the almost omniscient and friendly
> artificial being in The Good Place

------
ngcc_hk
The major question is how Janet compares with clojurescript. A quick look it
seems at least it is easier to setup. Anyone know how Janet cf with
clojurescript.

~~~
hellofunk
There have been a couple of comments here asking a question like this, and it
makes me realize that most people don’t actually know what clojurescript is.

Clojurescript is not some kind of scripting language on top of clojure, it
_is_ the clojure language that compiles to JavaScript, usually for running on
the front end.

~~~
eyelidlessness
> it is the clojure language that compiles to JavaScript, usually for running
> on the front end.

Being super pedantic (probably unnecessarily), it's the Clojure syntax for a
subset of the Clojure language, plus some additional syntax and functionality
specific to JavaScript interop.

------
_bxg1
I'm skeptical of any framework that brings its own new syntax. That means an
enormous additional overhead of documentation, support, and dev tool
integration, which doesn't tend to go well without a critical mass of end-
users.

What's weird to me about this one is that it's "with Clojure syntax" but isn't
just a ClojureScript library? I guess the Lisp syntax makes the parsing step
easy, at least.

~~~
Scarbutt
The framework is not using its own syntax, it is the syntax of Janet. It has
Clojure syntax because it's written in Janet which is a Clojure inspired Lisp.

~~~
_bxg1
Gotcha. Should've read more closely.

------
codesections
To be clear: this is an entirely _backend_ framework, with no support for
writing Janet on the front end, correct?

~~~
swlkr
That is correct

------
ahungry
Awesome framework and choice of language!

~~~
swlkr
Hey thanks! Yeah janet is a great language!

------
sansnomme
You need to fix the syntax highlighting and code rendering on the landing. Use
a monospaced font and a different background colour. Monokai is a good choice.

Any plans for auth? It is a weakness of a lot of web frameworks.

~~~
vga805
do they really need to fix syntax highlighting? for such a small snippet on a
framework landing page, it seems fine.

~~~
sansnomme
And this is why so many Lisps fail. Lisp creators do not give a damn about
"gimmicks" like a pretty landing page.

~~~
vga805
to the contrary, i disagree with your premise that it isn't a pretty landing
page. i honestly dont think the code snippet needs to be fixed, thats all

