@thedavidmeister uploaded a file: https://clojurians.slack.com/files/U0D4G0Q4U/F9RK10KGS/screen_shot_2018-03-18_at_1.01.09_am.png
what's going on here??
how can email
be undefined if it is part of the fn signature?
is this something to do with javelin?
Try it with formula-of
instead - cell=
is sort of finicky.
If it works with formula-of
then itβs probably a macroexpansion bug in cell=
. Itβs pretty much why I wrote formula-of
mmm that's bad
It works most of the time.
completely WSOD me on prod and can't reproduce locally π
Advanced compilation different between the two contexts?
nah, using advanced
ok, hmm now i can reproduce
weird
hmm, looks like if i only put email
in the cell=
once it works
but that could just be a coincidence...
like, maybe it potentially breaks in advanced compilation if a cell=
references the same cell more than once?
i'm just guessing at this point...
Well, formula-of
is way simpler than cell=
, which is why I suggest trying it. You can also use the underlying formula
form to eliminate code walking from the picture. I donβt really trust code-walking, which is why I suspect it here.
formula-of
also does not code walk, to be clear.
the __$1
looks a little suss to me, like it's incrementing to a new symbol name instead of using the same one twice maybe?
That could be a variable introduced by cell= or it could just be the cljs compiler - no idea.
or a weird combination of the two...
Yep. Hence my suggestion to pare down towards a more minimal situation.
mmk i'll checkout formula-of
when i've got time
for now i just have to get prod back up π
Good luck!
might need to "borrow" some more of your code in the next hoplon branch π
can you flick me a link to formula-of
on github?
Itβs already part of Javelin.
oh ok
well good then π
@candera ah i c
it's like a magic defn
?
the structure of formula-of
looks a lot like defn
to me
Sure, I could see that.
well fn
actually
Itβs really just a thin wrapper around formula
, mostly because I found it confusing to do by hand.
And because I had trouble with cell=
mmm
i like it
i'd also support it being called fn
π
so i could do (j/fn [x] (* x x))
(def fn j/formula-of)
. Boom.
π
tempting
Obviously that would be in your own namespace, so go for it. But I think itβs a mistake.
Itβs not defining a function.
well what does "formula of" mean?
Itβs a Javelin concept. Well-defined.
hah ok
formula and function are pretty interchangeable words in other contexts
If you want something short I suggest fm
.
yeah
save me some typing
cell=
is pretty common
Iβm not big on short names myself.
Right. Defines a formula cell. π
yeah you know what, i can just do it
clojure saves so much typing, i can always put a little back in
i also don't like aliases much
there's a handful that i use a ton, like h
for hoplon and j
for javelin
Like I said, Iβm a fan of more descriptive names, even when it comes at the expense of brevity.
me too
very quickly lose track of what letters mean what
Yes, my brain is too tiny to remember more than one or two things. π
and it's easier to refactor if i can search the whole project for something
h
, j
, d
(datascript), spec
that's it for me...
oh, and is
and deftest
π
this is definitely one of those situations where i really didn't need formula-of
until i really did
@candera formula-of
fixed it!
but it wasn't the duplicate use of the symbol...
that didn't fix it on prod
only local
so i don't know what the problem was, but it's fixed now π