This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-16
Channels
- # aleph (1)
- # aws (1)
- # beginners (23)
- # boot (33)
- # cider (15)
- # cljs-dev (4)
- # clojure (73)
- # clojure-dev (18)
- # clojure-italy (8)
- # clojure-russia (7)
- # clojure-serbia (1)
- # clojure-spec (8)
- # clojure-uk (118)
- # clojure-ukraine (3)
- # clojurescript (34)
- # code-art (1)
- # community-development (24)
- # cursive (21)
- # data-science (3)
- # datomic (72)
- # defnpodcast (1)
- # fulcro (77)
- # graphql (4)
- # hoplon (8)
- # jobs (3)
- # luminus (3)
- # lumo (7)
- # off-topic (3)
- # onyx (17)
- # other-languages (7)
- # pedestal (1)
- # perun (1)
- # protorepl (21)
- # re-frame (91)
- # ring (4)
- # ring-swagger (18)
- # shadow-cljs (22)
- # spacemacs (37)
- # specter (1)
- # sql (23)
- # test-check (4)
- # unrepl (29)
- # utah-clojurians (3)
- # vim (36)
- # yada (10)
Start a plain old repl:
Clojure 1.8.0
user=> (require ’[net.cgrand.xforms :as x])
FileNotFoundException Could not locate net/cgrand/xforms__init.class or net/cgrand/xforms.clj on classpath. clojure.lang.RT.load (RT.java:456)
Now connect unravel to it with additional entries on the classpath:
$ scripts/run -cp .:$HOME/.m2/repository/net/cgrand/xforms/0.9.5/xforms-0.9.5.jar:$HOME/.m2/repository/net/cgrand/macrovich/0.2.0/macrovich-0.2.0.jar 5555
Unravel 0.2.2 connected to localhost:5555
Type ^O for full docs of symbol under cursor, ^D to quit
Enter #__help for help
user=> (require '[net.cgrand.xforms :as x])
nil
user=> (x/into {} (x/by-key odd? x/count) (range 10))
{false 5, true 5}
EDIT:
It’s worth noting that xforms requires macrovich. So recursive requires are supported “for free” (without any support at the sideloader level)oh, wow, it works with jars too. That's basically what would be needed by CIDER. That's amazing. I'm sure @benedek and @bozhidar would be excited by this.
I mean, in theory you could say "I will handle any require of replant.XXXXXX" and load it with x, y and z functions.
The 34 lines of the sideloader are there https://github.com/Unrepl/unravel/blob/sideloader/src/unravel/loop.cljs#L290-L324
yes on missed require you could ask the user if they want to perform a repo lookup and add the dep etc.
I’ve been rambling with the sideloader idea for so long (and having struggled to communicate it), that I’m happy to see it works
> I (@dominicm) just didn’t understand the gap between jar and base64 encoded class. you are asked for a resource, you open the zip (jar), check if the resource is in it, if found you extract it, base64 it and send it
I might attempt something like this for juxt/edge's training mode. It's quite nice to not have to worry people with require's whilst we're getting them to grips with the foundations of the language.
@pesterhazy @volrath @dominicm Does anyone remember what I proposed for autocomple: prefix, suffix returns a list of maps? I think there was a third argument
Slack, yes. Not to repeat discussions elsewhere, with much heat, but Slack's business model doesn't align with community's much. I'm not advocating for a move, I think the sheer # of people far surpasses many of the costs.
@cgrand, yes, namespace I think