This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-20
Channels
- # admin-announcements (1)
- # announcements (9)
- # aws (11)
- # babashka (33)
- # beginners (125)
- # calva (20)
- # cider (18)
- # clj-kondo (7)
- # cljs-dev (73)
- # clojure (72)
- # clojure-europe (18)
- # clojure-italy (13)
- # clojure-nl (13)
- # clojure-uk (9)
- # clojurescript (22)
- # core-async (7)
- # cursive (1)
- # data-science (25)
- # datomic (22)
- # duct (32)
- # emacs (13)
- # graalvm (5)
- # hoplon (16)
- # juxt (6)
- # kaocha (8)
- # leiningen (3)
- # malli (11)
- # meander (12)
- # off-topic (18)
- # pathom (109)
- # pedestal (5)
- # rdf (10)
- # reagent (1)
- # reitit (12)
- # shadow-cljs (27)
- # spacemacs (5)
- # sql (9)
- # tools-deps (7)
is hoplon’s javelin supported in clj on the jvm?
there is a clj version but it’s kinda experimental
that’s perfect. I’m currently experimenting! is there specific branch I should work with?
i noticed that. I was trying to work through the readme with > (ns membrane-javelin.core > (:require [javelin.core-clj :refer [cell cell= defc defc=]]) > (:gen-class)) > > > (defc a 42) ;; cell containing the number 42 > (defc b ’(+ 1 2)) ;; cell containing the list (+ 1 2) > (defc c (+ 1 2)) ;; cell containing the number 3 > (defc d {:x @a}) ;; cell containing the map {:x 42} > > (defc= e {:x a}) ;; cell with formula {:x a}, updated when a changes > (defc= f (+ a 1)) ;; cell with formula (+ a 1), updated when a changes > (defc= g (+ a ~(inc @a))) ;; cell with formula (+ a 43), updated when a changes > (defc= h [e f g]) ;; cell with formula [e f g], updated when e, f, or g change
I’m getting class clojure.lang.Atom cannot be cast to class java.lang.Number
at (defc= f (+ a 1))
presumably, defc=
isn’t noticing that a
is a previously defined cell? not sure if the macro is supposed to take care of that for you
what’s the ideal behavior for cell=
to determine which symbols should be treated as referring to cells? seems like it’s just ignoring locals, clojure core symbols, and special symbols?
there’s a number of ways that could produce unexpected results
I was thinking of doing something that tries to resolve the symbol in the current namespace to check if it’s a cell and if it’s a local variable from a let, then having it do the check at runtime
@U7RJTCH6J https://github.com/hoplon/javelin/pull/40 I've got this PR (not mine) working on the JVM
awesome! i’ll check it out