The :hoplon: ClojureScript Web Framework - http://hoplon.io/
Rohan Nicholls 2020-01-21T08:48:11.000700Z

I’ve worked with CL before and I liked it, but I’m wondering what are the things that make it stand out for you, so much so, that you want to build your own version? After all you put a fair time investment into clojure, so what do you miss? (disclaimer: I’m just curious, not some slavering, clojure-or-die junky. 😉 )


i like that is has a repl-friendly package system and not much else, runtime-wise. so libraries and frameworks can build up from a lower level than possible in clj

Rohan Nicholls 2020-01-21T16:15:45.001100Z

Thanks, and it has the pretty awesome condition/restart system. That is something I have missed.


yes. although i don't think i will implement that hehe


i'm aiming for a subset that aligns as closely as possible to JS, so that i can use JS minifiers to good effect (aligning with cljs philosophy here)


what kind of stuff did you do with CL previously?

Rohan Nicholls 2020-01-21T17:17:07.003700Z

Just playing around and learning it. Went through On Lisp and Land of Lisp. And implemented a toy http server to test a theory about speed.

Rohan Nicholls 2020-01-21T17:18:06.004900Z

So is closure more walled off as far as the internals go?

Rohan Nicholls 2020-01-21T17:23:59.010700Z

I found there were, what felt like kludges, in CL, and the lack of repl representation for anything except a list made it somewhat opaque. I was using python 🐍 for work at the time and it was very nice to be able to see the contents of your data at the repl. With Hash-map I overrode the printer which was a very cool thing to be able to do, but still seemed an unnecessary hack.

Rohan Nicholls 2020-01-21T17:27:27.014800Z

Clojure had solved some of those problems. I also found the available libraries were not moving with the times as much as with other languages, and found the community was often pretty defensive when asked about a solution for a, b, or c.

Rohan Nicholls 2020-01-21T17:28:27.015900Z

I’m sorry but foreign function interfaces are not the answer to everything.

Rohan Nicholls 2020-01-21T17:28:32.016200Z


Rohan Nicholls 2020-01-21T17:29:49.017800Z

But CL was my first exposure to functional programming which was eye opening and macros. 🤯 wow!

Rohan Nicholls 2020-01-21T17:31:10.019500Z

will your implementation be running natively in js, ie. no external lisp needed to compile?


interesting, thanks for sharing your experiences


yes, no external lisp involved


https://gist.github.com/alandipert/cb5def6eec333926e50b672a407b25ab is the working README, to give you some add'l context


basically this is an experiment to do as much development and tooling in the browser as possible

Rohan Nicholls 2020-01-21T17:46:15.021200Z

That is very nice to hear. And quite a challenge I imagine.

Rohan Nicholls 2020-01-21T17:46:23.021600Z

Thanks for the read me.


sure, no problem. less challenging than you'd think since everything's been thought of already, more like painting by numbers 😄


i work on it in small chunks, to relax

Rohan Nicholls 2020-01-21T17:52:38.027200Z

Something I’ve been noticing in the spa world is that the big players seem to be ignoring the developments that have been happening in the browser and with native web components. Http2 seems to make the whole compile everything into a big blob idea unnecessary. And the native browser api’s have been developing enormously.

Rohan Nicholls 2020-01-21T17:57:10.031600Z

Oh and the other thing that most spa’s miss completely is any idea of resilient apps. One of the things I loved about enlive templates is that they took an HTML page and enhanced it. The js adaptation of it was even more useful because progressively enhancing the application was built in.

Rohan Nicholls 2020-01-21T18:00:24.033500Z

Both react and Angular just leave you with a div tag on a blank page if something goes wrong. Not at all resilient.


yeah, i think it's making more and more sense to move development workflows into the browser


to the extent that lisp shows us there's a gray area between app/development flows


i know there is an experimental File API now, plus there's workers and wasm. i will probably run gclosure in a web worker for my thing


currently source on disk is still a host dev machine concern though. i communicated with lisp over the browser's remote debug connection


https://www.snowpack.dev/, something in the browser dev vein i saw recently

Rohan Nicholls 2020-01-21T20:57:42.037500Z

Interesting :face_with_monocle:. Thanks for the snowpack link. Very interesting. Handles one of the problems with development at the moment. Getting back to the browser has become a theme for me recently as the current state of affairs is out of control.

Rohan Nicholls 2020-01-21T20:59:51.040Z

I’m assuming as this is your way of relaxing; hacking on your CL implementation you do not want any help, turning your hobby into the annoyance of managing people.


i think i'll be open to collaborating on it at some point, i just want to make sure it does what i need first


since it's also a speculative bet on my ability to use CL for SPAs commercially


anyway, if anyone is interested in a demo of what i have so far, i'd enjoy giving one. i have fun talking about it, and CL