This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-07
Channels
- # adventofcode (38)
- # aleph (1)
- # bangalore-clj (3)
- # beginners (126)
- # boot (165)
- # boulder-clojurians (5)
- # cider (42)
- # cljsrn (11)
- # clojure (203)
- # clojure-greece (6)
- # clojure-hk (1)
- # clojure-italy (11)
- # clojure-new-zealand (1)
- # clojure-nl (1)
- # clojure-russia (112)
- # clojure-spec (86)
- # clojure-uk (176)
- # clojurescript (38)
- # code-reviews (2)
- # core-async (2)
- # cryogen (2)
- # cursive (16)
- # datascript (2)
- # datomic (80)
- # events (2)
- # garden (28)
- # hoplon (115)
- # jobs (1)
- # jobs-discuss (7)
- # klipse (50)
- # lein-figwheel (15)
- # liberator (17)
- # luminus (6)
- # off-topic (8)
- # om (31)
- # onyx (26)
- # parinfer (4)
- # planck (35)
- # protorepl (26)
- # quil (2)
- # re-frame (50)
- # reagent (21)
- # ring (5)
- # rum (2)
- # schema (1)
- # untangled (29)
- # vim (10)
- # yada (40)
The way I'm going I may build a Hoplon Framework ™️ which will make it a framework framework lol. Adding routes, a datascript db, a http lib. Lots of convenience things.
@mynomoto: I'm working on something similar, integrating feathers.js and hoplon as a full stack cross platform framework
omg did we make a framework framework
pretty awesome, i say :thumbsup:
does anyone do cl/js audio stuff by any chance?
would love to pick your brain about webaudio/scriptnodes/audioworkers
little demo of a side project i've been workin on, hoplon-based of course
are you using Javelin cells in the interpeter somehow, or are you just using Hoplon for the user interface for the interpreter?
not in the interpreter per-se... but they help withe what i'm calling the "vm"
the stateful object that you get that you call load! and run! etc. on
fields of this object are cells, like the state of the interpreter, interrupts, etc
the interface to the stateful vm object thing is very similar to what i'd make for dealing with a server, really
cells for reading, functions for mutating
underneath the stateful 'vm' is the stateless 'machine'
the defrecord that gets iteratively run through a step function via setTimeout
https://youtu.be/S-CWGbe3Tak?t=1h17m35s is this still happening? cells and elements being interchangeable?
micha made a defelem+ that somewhat delivers
i think ui delivers also, not sure in same way
one of the underlying problems is that there's no way in html to represent a collection of nodes without a parent element
this shows up all the time in hoplon by needing to put loop-tpls etc inside wrapper divs
the cell=node ideal is that loop-tpl returns something that doesn't contribute to the dom heirarchy, but can contain cells or nodes
so yeah... a defelem wouldn't need to return a container element, it could return a "transparent" collection object that could be spliced into containing markup
in retrospect i think that line of thinking may have been backwards tho
for a long time our mindest was interop, so we were thinking about lower level abstractions
but i think ui shows that we can also go up
and maybe that's the way to do it, just pave
and the one two three list items will correctly be inserted in between the "start" and "end" ones
@mynomoto maybe could just start with a good list of symbiotic tech and example integrations
Hello hoplonians. I am trying to integrate this http://labs.abeautifulsite.net/jquery-minicolors/ into a Hoplon project, and am having little luck. I know very little about jQuery, which is probably the source of my problems. The immediate problem I’m having is that my call to $(”input.minicolors”).minicolors() doesn’t seem to do anything, even though it starts things up when I run it from the developer console. I figure it’s related to things loading asynchronously, so I’ve hacked my way towards the below solution, but it’s still not working.
Would love some advice here. I’m sure this is broken in 12 ways, so anything from specific advice on how to fix it to general advice to how one integrates jQuery plugins would be helpful.
looks like you're on the right track, i'll try it here and see
I’m including a script element in the head, like this: (script :src "js/jquery.minicolors.min.js")
how are you bringing in the lib?
have yuo tried putting the script in the body?
soft-yes
well, yes
soft-yes that load order is the problem
i try
oh i see
yeah "one does not simply" pull functinos off object like that and call them
for function calls that can't be inlined
cljs emits code like mc.call(null)
where call is Function.prototype.call(this, args...)
jquery works by chained plugins setting and using this
properly
this is all just a theory
but i'm up to speed on it because i had to do this recently to pass around the console.log function (let [printfn (.. js/window -console -log (bind (js* "this")))] ... )
Anyway, clearly I’m suffering from not knowing jack about the browser world. Hoplon has made it possible for me to get this far.
id =~ bad
oh, yeah. i've run across js things that demand a selector, and gensym is def. the way to provide
also you don't need when-dom
either, a (with-timeout 0 ...
is usually sufficient to ensure that i
is in the dom when the body is evaluated
I’ve been using core async go blocks for similar stuff, especially since I’m doing web workers in this app and I use it there.
if you don't want to make cljsjs package you can still avoid the script tag by making a deps.cljs file
with that file in place the cljs compiler will figure out how to load the jquery module
that's how you can declare dependencies between the scripts, like minicolors.js depends on jquery.js etc
Thanks, guys. Going to have to digest that a bit. Probably come back to you with questions about deps.cljs etc.
Building this, BTW: http://weathergen.s3-website-us-east-1.amazonaws.com/