This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-15
Channels
- # adventofcode (121)
- # bangalore-clj (5)
- # beginners (46)
- # boot-dev (9)
- # cider (20)
- # cljs-dev (7)
- # cljsrn (1)
- # clojure (341)
- # clojure-austin (7)
- # clojure-greece (144)
- # clojure-india (3)
- # clojure-italy (5)
- # clojure-spain (1)
- # clojure-spec (34)
- # clojure-sweden (3)
- # clojure-uk (90)
- # clojurescript (24)
- # core-async (1)
- # core-logic (7)
- # cursive (108)
- # datascript (2)
- # datomic (39)
- # events (1)
- # fulcro (225)
- # graphql (8)
- # hoplon (86)
- # instaparse (12)
- # jobs-discuss (2)
- # jvm (4)
- # keechma (1)
- # lein-figwheel (2)
- # leiningen (12)
- # off-topic (26)
- # onyx (35)
- # other-languages (1)
- # pedestal (3)
- # planck (11)
- # re-frame (12)
- # reagent (12)
- # reitit (5)
- # spacemacs (48)
- # specter (29)
- # sql (2)
- # test-check (1)
- # unrepl (71)
@cgrand trying out plain-repl:
WARNING: Use of undeclared Var lumo.repl/load-data-readers! at line 110 plain_repl/lumo.cljs
events.js:182
throw er; // Unhandled 'error' event
^
Error: This socket has been ended by the other party
at Socket.writeAfterFIN [as write] (net.js:352:12)
at plain_repl$lumo$accept_$_epl (evalmachine.<anonymous>:653:8)
at evalmachine.<anonymous>:294:11
at Socket.<anonymous> (evalmachine.<anonymous>:101:10)
at emitNone (events.js:110:20)
at Socket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
and in nc
: #object[TypeError TypeError: Cannot read property 'call' of undefined]
this is on lumo 1.7.0 - are you on 1.8 beta?
I'll try 1.8.0 beta
that works
pretty cool. I noticed it ends the lumo process when I type ^D
but other than that it works
trying to wrap my head around what this does though haha
Saw plain repl nice!
@richiardiandrea I’ve found a better way.
@cgrand would love to try that ;)
darn! I was hoping to use the image rendering feature of unrepl.el
to generate graphs of datomic query results but my datomic SOCKET repl is bare bones.
lol may have to use unravel to send deps and then unrepl.el
to render graphs once deps are available
@cgrand yes to my hacky workaround or yes to sending deps to socket repl using unrepl.el
@gcast no to your hacky workaround, because of classpath isolation deps added in one repl may not be visible on another (once loaded generally they are but in subtle cases it may fail)
@pesterhazy @volrath, @gcast is the happy unravel user/evangelist I talked about earlier
@richiardiandrea I pushed a WIP which you may help with (a problem with ns not being set after eval)
is the branch on lumo
?
cannot find branches in plain-repl
(also why plain 😄 ?)
oh got it, no unrepl..
This file https://github.com/Unrepl/plain-repl/blob/master/src/plain_repl/repl/lumo.cljs
so yes basically by using that eval
you are changing the global *ns*
...which is kept in https://github.com/anmonteiro/lumo/blob/master/src/cljs/snapshot/lumo/repl.cljs#L41
(btw sorry if I say something you know already)
it seems to me that your "sessions" should have their own current-ns
getter
in eval
, before calling cljs/eval
, current-ns
contains 'cljs.user
and both *ns*
and ana/*cljs-ns*
have been set. When cljs/eval
returns the value for key :ns
is nil
. No matter what I eval (even if it changes the current namespace).
Uhm ok will look into that
yes I was following the dots as well 😉
oh you were using eval from cljs.js
gotcha
uhm..stiill not working here...
ok let me see if I am doing it right
$ nc localhost 5557
cljs.user=> (+ 3 4)
7
cljs.user=> (ns foo.bar)
nil
foo.bar=> *ns*
#object[cljs.core.Namespace]
foo.bar=> (ns-name *1)
foo.bar
foo.bar=>
ok that works, the client side in the README throws:
return caught_SINGLEQUOTE_.call(null,e,rrepl);
^
TypeError: Cannot read property 'call' of null
at plain_repl$repl$caught (evalmachine.<anonymous>:471:28)
at plain_repl$repl$pl (evalmachine.<anonymous>:436:15)
at plain_repl$repl$then_pl (evalmachine.<anonymous>:429:11)
at plain_repl$repl$lumo$eval (evalmachine.<anonymous>:229:4)
at plain_repl$repl$epl (evalmachine.<anonymous>:410:26)
at evalmachine.<anonymous>:241:11
at evalmachine.<anonymous>:156:11
at plain_repl.repl.lumo.bytes_stream_reader.cljs$core$IFn$_invoke$arity$2.plain_repl.repl.lumo.t_plain_repl$repl$lumo60.plain_repl$min$AsyncReader$read_chars$arity$2 (evalmachine.<anonymous>:102:10)
at plain_repl$min$read_chars (evalmachine.<anonymous>:14:10)
at plain_repl$repl$skip_if_eol (evalmachine.<anonymous>:149:34)
I also tried (in-ns 'foo.bar)
and it hangs...should be because it is a special function
Ok cool let my try that
Quick explanation: https://github.com/Unrepl/plain-repl/blob/master/src/plain_repl/min.cljs is impl agnostic stuff that should be better added to cljs but in the meantime, why not spawn this file in a standalone dep
No more *in*
as I’ve been struggling to fine an ok way to manage (or arather encourage) exclusive ownership of a global resource
So when eval retuns a suspension it means the host repl must pause and yield control to the suspension, passing in
as an argument.
https://github.com/Unrepl/plain-repl/blob/master/src/plain_repl/repl/lumo.cljs is the platform specific code
Ok cool, so what about ns problem you have?
Ok, almost in front of my pc
I'm trying out unravel
for the first time but it doesn't seem to work with my basic socket repl:
unravel localhost 50505
evalmachine.<anonymous>:22
var reader = cljs.reader.push_back_reader.call(null,s);
^
TypeError: Cannot read property 'call' of undefined
at unravel$lisp$safe_read_string (evalmachine.<anonymous>:22:42)
at Transform._transform (evalmachine.<anonymous>:56:60)
at Transform._read (_stream_transform.js:186:10)
at Transform._write (_stream_transform.js:174:12)
at doWrite (_stream_writable.js:385:12)
at writeOrBuffer (_stream_writable.js:371:5)
at Transform.Writable.write (_stream_writable.js:288:11)
at Transform.ondata (_stream_readable.js:642:20)
at emitOne (events.js:115:13)
at Transform.emit (events.js:210:7)
I installed this with brew install
, is there potentially a lumo problem at play?
$ unravel --version
Unravel 0.2.2 (Lumo 1.7.0)
@aengelberg better build from source