Fork me on GitHub
#hoplon
<
2020-03-13
>
dave00:03:28

a coworker of mine and i are just a little doubtful that it's smart enough to figure out where the cells are 100% of the time it works totally fine in simple cases like (cell= [one-cell another-cell]) or (cell= (:something some-cell)), but as the expressions get more and more complex, we think trusting it is a bit of a leap of faith

dave00:03:46

the big thing for me, though, is that it isn't immediately obvious to the human reading the code where the cells are

dave00:03:02

it feels a bit too magic to me sometimes

micha00:03:01

i've never seen a case where a formula couldn't figure out which things are cells, because it just calls cell? on them

micha00:03:24

but when you want to do some certain types of things it can be difficult for a human

micha00:03:52

especially if you need to do something like (formulet [x (cell 100)] (when @some-other-cell x))

micha00:03:41

like if you want to manipulate cells as cells inside a formula, and not just the values contained in the cells

micha00:03:18

like in the above example the formula wouldn't update when some-other-cell updates

dave00:03:30

ah! yeah, i guess that would be an example of something you can do with formula-of and formulet, but not cell=, because cell= eagerly treats cells as their values

dave00:03:52

it is pretty uncommon to need to do that, though

micha00:03:55

yeah, there are ways, but it's more quirky

micha00:03:16

like (cell= (when @~some-other-cell x))

micha00:03:43

the ~ guy hides some-other-cell from the cell= code walker

micha00:03:20

but it's probably overkill, just use formulet or whatever in that case for sure

jjttjj00:03:09

Yeah personally I've found cell= to be really reliable for what it does. (and yeah formula-of and fomulet handle the cases it's not perfect for)

dave00:03:48

i can't personally think of an example of cell= failing to recognize cells, especially if you know how to use ~

micha00:03:47

the ~ form has some quirks that can be surprising

micha00:03:04

in other words annoying lol

jjttjj00:03:29

I way more often get tripped up by the templating nuances in hoplon

alandipert01:03:19

conditional children, another landmine

alandipert01:03:33

ie if vs if-tpl

micha01:03:05

ah, yes, that templating

alandipert01:03:19

i feel that part was clearer back when hlisp was a thing, since the only elements you used were markup or special ones

alandipert01:03:10

like the templating model made sense if you knew mustache or whatever. now with everything intermingled, more conceptual overhead

alandipert01:03:46

ahem, "power" 😬