Fork me on GitHub
#planck
<
2019-05-25
>
pyrmont12:05:18

@mfikes I like what Ray did with pulling the shared code out of the repl namespace and putting it in a namespace both the REPL and the pREPL can use.

mfikes12:05:15

Yeah, my long-term hope for Replete is that there can be one code path, all based on pREPL (to simplify maintenance). Of course, if that pans out for Replete, it could also be an avenue for pREPL in Planck. 🙂

pyrmont12:05:01

I guess the ideal is that Planck becomes an evaluation library that basically handles the interfacing with JSC (and maybe low level things like sockets?) and then Replete maybe becomes a UI layer that supports UIKit, web, CLI, etc?

mfikes12:05:25

@mike858 I suppose native Repletes could use Planck if Planck ever split off a library. But the idea for Planck splitting off a library is for the purposes of general use by any native application that wants to embed ClojureScript.

mfikes12:05:09

@mike858 The idea was first voiced by Bruce Hauman and David Nolen (evidently 4 years ago) in https://gist.github.com/mfikes/c7da1e7dfded26c7ceb9

mfikes13:05:02

@mike858 I suppose there was no ticket for this idea. Now there is 🙂 https://github.com/planck-repl/planck/issues/936

mfikes13:05:15

That ticket, and https://github.com/planck-repl/planck/wiki/Hybrid-ClojureScript-Native-Libraries would be fundamentally new things in the world, offering value where there probably isn't currently a good solution.

pyrmont13:05:45

Yeah, I confess my interest is probably a bit orthogonal to everyone else's. I'm attracted to the use of Planck on the server in ways that I think are probably duplicative of JVM Clojure. On the low-spec computers I use, JVM Clojure's startup is most certainly not in the sub-second range and I find it's a significant barrier to wanting to hack on code for small projects. Basically, I want an environment I can use in place of scripting languages like Ruby, Python, etc.

mfikes13:05:18

Yeah. One area that is very similar to that is the notion of protoyping "IoT" devices where you want to use Clojure, but you need an extremely tiny footprint. Along the lines of https://www.espruino.com, but probably perforce a little larger.

mfikes13:05:29

(FWIW, ClojureScript won't work on the Espruino JavaScript runtime... it is not fully capable to handle the closures and other JavaScript emitted by the ClojureScript compiler.)

mfikes13:05:38

But yeah, the ability to just write code and run it is key. The notion that ClojureScript is a compiler can be hidden, just like it is in Clojure.

pyrmont13:05:59

I also think—and this is probably projection more than anything else—that something like Planck can be a great way for new users to get into Clojure. Planck is such a simpler and more pleasant setup experience and you're immediately able to start running code. Maybe as someone that studied at university in the early 2000s during the heyday of Java I'm scarred for life in a way other programmers aren't but I still recoil at needing to install Java to do anything. I realise so much of the power of Clojure comes from being able to tap into the Java ecosystem but, again, for small scale projects, I don't feel I need it and actively dislike needing to run it just to be able to execute Clojure.

mfikes13:05:55

Yeah, Replete is also really good in the "it just installs and works" department, while also trying to simplify things even further for new users.

mfikes13:05:14

Replete is in the MAS now, for crying out loud 🙂

mfikes13:05:33

(Replete, Planck, Lumo, etc, are really all largely the same thing, sharing lots of common code, but with different UIs, VMs, etc.)

pyrmont13:05:50

Speaking of duplication, I've actually been wondering the past week if there's a way Planck could be made to translate calls to certain Java libraries (really ) so that you could run code like Ring without needing to have it be rewritten.

mfikes13:05:14

Yeah, I was thinking the same 🙂

mfikes13:05:34

Maybe a --translate and then any use of gets turned into or somesuch.

pyrmont13:05:48

Yeah, that'd be cool.

mfikes13:05:06

Another side-thought I had on that is that it might be doable as a separate library.

mfikes13:05:23

A namespace that delegates to , for example.

mfikes13:05:02

That's essentially the pattern Andare took: It used the same napespaces to make core.async to work in self-hosted.

pyrmont13:05:25

And I've also been wondering (based partly on that hybrid libraries gist from David) the extent to which NPM libraries can be made more accessible from Planck. That is obviously duplicative of Lumo and that's probably what I should just be using but: (a) Lumo doesn't work on ARM; (b) I'm not much of a JavaScript programmer and find the JS in Lumo kind of impenetrable (to be clear, my fault).

pyrmont13:05:12

Yeah, I didn't even think of replicating the approach Andare took but that seems like a simple solution :)

pyrmont13:05:48

Yeah. David's talking about something else but since you linked it from an issue about NPM module use in Planck, I think that's why it got the gears turning in that respect.

mfikes13:05:53

Right, anyone could publish a library that exposes a namespace, but is meant to be used with Planck to implement it, by simply delegating calls.

mfikes13:05:15

Another argument could be had for bundling something like that with Planck, but if it can be a separate lib, that might be worth trying first. Probably much simpler to pull off than https://github.com/abiocljs

pyrmont13:05:15

Ha! I was thinking about the possibility of something like this and there you go—it already exists :) But yes, a separate library seems like a better first step.