Fork me on GitHub
#hoplon
<
2016-06-08
>
chromalchemy00:06:12

@jumblerg: I've been trying to get hoplon.ui working as a library. I'm still getting errors like 'WARNING: Bad method signature in protocol implementation, hoplon.core/IHoplonParent does not declare method called -append-child! at line 51 C:\Users\rigalo\.boot\cache\ tmp\Users\rigalo\Desktop\Dev\hoplon\ui-demo\9m4\-x19f70\index.html.out\hoplon\ui\elems.cljs'

chromalchemy00:06:18

Do I clone hoplon into the hoplon/ui project directory (v2) before i 'boot build'?

jumblerg00:06:38

clone hoplon and boot build-jar

jumblerg00:06:04

then boot build-jar in hoplon/ui

chromalchemy00:06:23

Ok, I think I missed that step. I'll try it now.

chromalchemy01:06:18

@jumblerg: It's compiling without errors!!! Thanks. My git-fu is weak..

chromalchemy01:06:10

Can you give me a simple basic function snippet to test in the browser.

chromalchemy01:06:07

I'll start digging for the api though..

mac14:06:39

Is there a hlisp function that will pretty print and arbitrary cljs data structure to html?

dm314:06:00

hlisp doesn't create any data structures

dm314:06:06

you get the DOM elements directly

mac14:06:34

Sorry I was unclear. I have the datastructure, a deeply nested map. Is there a hlisp function that will turn it into some readable html?

dm314:06:00

not that I'm aware of. There's nothing in Hoplon that operates on data structures.

jjttjj14:06:12

@mac: you can do something like this

(pre (cell= (with-out-str (cljs.pprint/pprint data))))

dm314:06:21

in the sense of HTML representation

jjttjj14:06:55

(need to have [cljs.pprint] in you :require statment)

mac14:06:05

jjttjj: That works, thanks.

micha15:06:15

@mac: i bet there is something like a html representation of clojure data in the code for the google chrome clojurescript extension

micha15:06:50

like so you can print in the console with collapsible vectors, maps, etc

mac16:06:31

micha: That was the kind thing I was looking for.

jjttjj17:06:35

are there any examples out there using castra and transit to communicate jodatime dates?

micha17:06:35

@jjttjj: i think perhaps converting them to java.util.Date before serialization might be an easy way to get it working

micha17:06:11

otherwise you could use the transit extension mechanisms to add support for joda

micha18:06:18

how do you like it?

bsima18:06:28

idk, haven't had a chance to look into in depth

micha18:06:40

i have to look deeper into it

micha18:06:45

and build something with it

bsima18:06:52

at first glance the code looks like common lisp moreso than idiomatic clojure, which is understandable considering the author

micha18:06:19

yeah it's more of a complete FRP solution

micha18:06:44

javelin only does a small fraction of that

bsima18:06:58

which is part of javelin's appeal, if you ask me...

micha18:06:18

yeah by limiting it we can make some things work, like formulas with side effects for instance, without needing more primitives

micha18:06:27

i'm interested to see if he's found a way to get around the weak reference problem in his cljs implementation

micha18:06:38

like the lack of weak references in js

bsima18:06:07

I'm not super familiar with the weak reference problem... how does javelin solve it?

micha18:06:32

i think it's impossible to solve in js, but maybe he's found some clever workaround

micha18:06:06

the problem is that cells need to hold references not only to the cells they depend on, but also to the cells that depend on them

micha18:06:59

we'd like to have the references to the cells that depend on them be weak refs, so the cells that depend on them can be GC

micha18:06:16

the "sinks", basically

bsima18:06:56

so in javelin they never get garbage collected, just removed from the sink when it's cell is destroyed https://github.com/hoplon/javelin/blob/master/src/javelin/core.cljs#L55

micha18:06:27

right, you can manually detach them, then they can be collected

micha18:06:35

but that's kind of useless in most cases

bsima18:06:39

hmm, I can't figure out how tilton does it. I think he just removes them like javelin does, but i can't really tell... ¯\(ツ)

micha18:06:16

ideally you wouldn't need to call destroy-cell! explicitly