This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-23
Channels
- # aleph (9)
- # beginners (30)
- # boot (42)
- # carry (1)
- # cider (148)
- # clara (2)
- # cljsrn (13)
- # clojars (2)
- # clojure (90)
- # clojure-dev (1)
- # clojure-dusseldorf (2)
- # clojure-italy (7)
- # clojure-madison (1)
- # clojure-quebec (1)
- # clojure-russia (19)
- # clojure-sg (1)
- # clojure-spec (14)
- # clojure-uk (90)
- # clojurebridge (1)
- # clojurescript (70)
- # clr (7)
- # core-async (24)
- # cursive (26)
- # data-science (2)
- # datascript (3)
- # datomic (46)
- # devops (2)
- # emacs (6)
- # events (1)
- # figwheel (2)
- # hoplon (200)
- # klipse (2)
- # ldnclj (1)
- # lein-figwheel (4)
- # leiningen (3)
- # off-topic (44)
- # om (70)
- # other-languages (6)
- # pedestal (5)
- # protorepl (1)
- # re-frame (17)
- # reagent (14)
- # schema (2)
- # spacemacs (1)
- # specter (3)
- # test-check (38)
- # unrepl (38)
- # untangled (19)
- # yada (16)
Btw folks some other folks are trying discord for keeping history, I am already in that one, there was one thread on /r/clojure
I also really really waet to pitch my idea of generalizing repls to other languages, you send clj for registering transpiling functions and sir/de functions for you js favorite transpiler, that is an easy win from upgradable repls
@richiardiandrea I’m not opposed to serving other langs but I would really appreciate if you could develop > you send clj for registering transpiling functions and sir/de functions for you js favorite transpiler
I don’t get why one needs clj. For example in Python, with raw_input
and eval(compile(code_as_string, '<string>', 'exec'))
one can upgrade a python interpreter
True that, you need basically some code that your eval function can understand. Klipse does this already, the whole infrastructure is built in cljs but then everything that compiles to js can be evaluated in the browser.
The additional step to add to the upgrade is the transpiler, call a function to convert to js before eval and call a function for converting back the result I guess
Sorry this is cljs-in-cljs and a transpiler example would be the BuckleScript one converting from ocaml to js
So the idea is to have Lumo or a fork as universal repl for the whole js ecosystem
Just noticed Unrepl in this case stands for universal repl 😀
It is probably better for me at some point to create a poc or something, I hope to get a bit of time soon
so to expand: the repl receives a function, the repl transpiles to js, the repl evals the js. Of course there should be a mechanism to discover the function that does the transpilation to js...it would be awesome if we could send it as blob but it might a fully library
in case of Bucklescript, this whole thing: https://www.npmjs.com/package/bucklescript
I agree this might be a bit out of scope here
(If I understand the question correctly) In lumo
the module resolution is done automatically, node.js takes care of it so whatever is in .node_modules
gets resolved on a require
.
Too much context was missing from my question. It was a reaction to "it might be a fully library".
If we can hook up in the module loading then we can have them loaded on demand by the server from the client. So they wouldn't have to be part of the blob.
Yep I was thinking the same, and/or there could be a section in the package.json
of the transpiler for defining things like which function I need to call for this or that.
I think the first step would be to define the extension points or in another words what needs to be provided in order to be upgradable. In other other words abstract what the blob is. Will think and put my thoughts in the wiki page. At least this is not really clear to me 😀 I was thinking of these two functions, but maybe there is more
Upgrading a X repl to be a X unrepl has more requirements than upgrading a cljs repl to a X unrepl.
Yeah that is what I feel I haven't discovered yet, how much more
I would say three. A parser to split input in evaluable snippets. Eval. Allowing evaluated code to take control of the repl streams.
Nice, so I am thinking it now in terms of pipable repl exposing to the world only two streams, one in and one out. Each one is responsible for evaluating its part of the stream without exposing parser and eval, and the terminal of this exhaust system is stdout 😀
I mean no rocket science here I know 😀 However there are fewer things to add to the unrepl protocol if the only communication medium between repls are pipes
I probably now get in full what you had in mind all along 😅
yep the protocol stays the same, the "engine" can just pipe the streams when an upgrade is requested
Oh I don't know this one, so I will look it up
Ah that part on HN, I remember having read it yet, need a refresher
At the time it sent me down a rabbit hole where i discovered jot and zot https://en.m.wikipedia.org/wiki/Iota_and_Jot
On “regular” CLJS: > current REPL is Read-Compile (in Clojure) followed by eval-print (in JS), to make this more upgradable, one option would be to start by setting up an upgradable JS repl (that would consume framed inputs as a JS reader is not handily available). Hence the process (even for a non-unrepl REPL) would be: upgrade the JS repl to a JS-eval CLJS-print repl and, from there, the REPL could work as usual -- except that now unrepl could upgrade the JS repl to JS-eval EDN-print.
Sure will dig into details, for now it is just an unproven idea I had 😀 thanks for the wiki page