This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-22
Channels
- # announcements (9)
- # asami (52)
- # aws (1)
- # babashka (7)
- # babashka-sci-dev (12)
- # beginners (72)
- # calva (24)
- # cider (9)
- # clj-kondo (76)
- # cljs-dev (15)
- # clojure (19)
- # clojure-australia (4)
- # clojure-europe (33)
- # clojure-france (9)
- # clojure-gamedev (17)
- # clojure-nl (6)
- # clojure-portugal (5)
- # clojure-uk (5)
- # clojurescript (61)
- # clojureverse-ops (4)
- # code-reviews (23)
- # conjure (1)
- # data-science (2)
- # datalevin (6)
- # datomic (49)
- # gratitude (1)
- # helix (24)
- # holy-lambda (14)
- # jobs (3)
- # lsp (92)
- # malli (7)
- # missionary (8)
- # pathom (12)
- # proletarian (3)
- # re-frame (4)
- # remote-jobs (1)
- # shadow-cljs (4)
- # spacemacs (3)
- # sql (9)
- # tools-build (90)
- # vim (1)
- # xtdb (11)
Programming Clojure today! 💪
Surprisingly also in a defn
conform
unform
context like @raymcdermott and also using @viebel's fix. :thinking_face:
It's about ClojureScript which gets compiled to JavaScript. I'd like to sit at my REPL on my machine and get code executed on a remote machine. It's about automation and I can't just start a REPL there and connect. Being at my REPL in the Clojure-World, calling a function suitable for automation, I'd like to compile this function and it's dependencies to a minimized JavaScript, send it to the remote machine, getting executed and get the result back.
(ns de.doctronic.testomatic.client.macros
#?(:clj (:require [de.doctronic.testomatic.client.defnjs :as defnjs])))
#?(:clj
(defmacro defnjs
[& defn-form]
(if (:ns &env)
`(defn ~@defn-form)
`(defn ~@(defnjs/inject-remote-call defn-form))))
)
(WIP)@U1Z4D5SSV Is that REPL embedded in another application?
@U04V15CAJ the REPL I'm working at? Yes.
Interesting! Someone has recently done something similar with #nbb on an embedded device. Nbb can start up a socket REPL or nREPL server (in pure JS) and you can connect to it, and evaluate more
I also need resources (like pictures). And the remote machine can either be Windows, Linux or macOS. So I need the project folder on the remote machine and shared with my local machine. We would also need two REPLs: One for the desktop, on for the browser, both sharing sources.
But thanks for the hint, @U04V15CAJ! I'll try to have a look. For some inspiration and food for thought.
The difference is that nbb is using SCI so you can interpret forms after compilation has already been done and there is no JVM REPL anymore (even in advanced mode)
In CLJ it all works but fails badly in CLJS as the specs in cljs.core.specs.alpha
are only available to macros (ie on the Clojure side)
I ended up stripping out the def
s and copying them to a project ns. A terrible hack but @U04V15CAJ made me do it 😝
you should know that I found a bug in sequence destructured args that Yehonathon fixed yesterday
@U1Z4D5SSV the update to the code from Yehonathan is at https://github.com/viebel/defntly
g'måning!
morning!
Good morning