This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-29
Channels
- # aatree (1)
- # admin-announcements (7)
- # announcements (3)
- # beginners (125)
- # boot (164)
- # braid-chat (8)
- # cider (26)
- # cljsrn (37)
- # clojars (3)
- # clojure (162)
- # clojure-argentina (1)
- # clojure-art (2)
- # clojure-berlin (5)
- # clojure-czech (3)
- # clojure-ireland (1)
- # clojure-miami (1)
- # clojure-norway (9)
- # clojure-russia (47)
- # clojurebridge (1)
- # clojurescript (151)
- # community-development (1)
- # conf-proposals (80)
- # core-async (15)
- # core-matrix (1)
- # cursive (66)
- # datomic (26)
- # emacs (17)
- # events (10)
- # funcool (59)
- # hoplon (43)
- # incanter (2)
- # jobs (10)
- # ldnclj (8)
- # lein-figwheel (18)
- # luminus (1)
- # off-topic (19)
- # om (144)
- # onyx (167)
- # overtone (9)
- # parinfer (12)
- # pedestal (1)
- # proton (158)
- # re-frame (139)
- # reagent (48)
- # test-check (19)
- # testing (43)
yeah 'f course
Now the html comes up but I get a log error of Uncaught ReferenceError: document is not defined
I agree, but you need to access it through js/document
though
@richiardiandrea: this is just plain javascript
Do we need to do an on-load or somethin? Remember, all this stuff is about 2 years old that I'm converting.
if(typeof goog == "undefined") document.write('<script src="main.out/goog/base.js"></script>');
the code is invoked twice, the second time from the webworker which DOES NOT HAVE A DOCUMENT!
the example project there is a good start https://github.com/adzerk-oss/boot-cljs-example
I'll need to dig some, as the build.boot file is not clear to me. But at least I have a starting point. Thanks!
@micha basically my yesterday's problem was that I am testing inside (boot ...
some sift
function but in the same build.boot so I need a way to reset the fileset at will
but take your time, the PR is there, you can also answer there 😄
I was just going to say, http://www.w3schools.com/html/html5_webworkers.asp Since web workers are in external files, they do not have access to the following JavaScript objects: The window object The document object The parent object
What I want to do next is to create a hoplon demo built on the webworker example in the above link.
And this: Here, we create a script that counts. The script is stored in the "demo_workers.js" file: var i = 0; function timedCount() { i = i + 1; postMessage(i); setTimeout("timedCount()",500); } timedCount();
in the mozilla docs they show making a web worker where the javascript it runs is in a string
yeah, you can use a blob to create a .js "file" that will work with a webworker. But then you need to add the libraries. So I think it is just easier to create a separate .js file in the build for the webworker.
I'm slow because I'm focused on using this stuff. It does not get any more than the minimum necessary attention from me. Proficiency, yes. Extra features, no.
Ilearned that indexedDb is the way to go for file i/o, and that it runs best in a webworker. Webworkers work best with their own js file. So now I want to learn about creating multiple output files. It is a bit indirect, but quite different from trying to swallow boot whole, hmm?
There is so much tech that I'd really like to know more about, including awt, boot, etc. But I tend to be quite defensive about maintaining my productivity and selective about what I learn and when.
I'm sure if you look in aatree/aautil you will see no pattern to my choices of snippets there. But they are all things that are in my critical path to cljc db development. I think aautil is really all about making cljc easier to write.
OK, after a nice break I looked at this again and it seemed clear, unlike before https://github.com/adzerk-oss/boot-cljs-example/blob/master/build.boot
multple builds covered here https://github.com/adzerk-oss/boot-cljs/wiki/Usage#multiple-builds
@laforge49: travis is for CI
Hi! I'm wondering does boot-reload accept new CSS styles on the page after it reloads css file?
@jethroksy: Thanks!
Looking at the boot-reload task to use in conjunction with react-native. I've got a patch ready to make it work, but am wondering how to expose the "dom-less" mode best. @martinklepsch ?
basically we need one more change in addition to not adding the HUD
@pesterhazy: I'm in favor of a runtime check that ensures a DOM is available
@pesterhazy: CSS reloading that is right?
(doto changed*
reload-html
reload-css
reload-img)
`this needs to go (none of these apply I think)
any idea on how to check for DOM reliably?
So I think if we can do a dom-available?
thing that'd be best. We could also check for RN but then there are cases like webworkers, node etc.
@martinklepsch: add an option to a boot task, or add a fn to check automatically?
I'd prefer guards added to the functions. Better out of the box experience and can't do much wrong I think.
technically @juhoteperi's call
let me see
(defn has-dom?
"Perform heuristics to check if a non-shimmed DOM is available"
[]
(boolean (aget js/window "document" "documentURI")))
how about this?
@pesterhazy: if that does it for you with react-native lets go with that
please don't use aget
for property access though
yup. I'd guess that should return true for every browser env
(and (exists? js/window) (exists? js/window.document) ...)
is that safe (i.e. won't throw errors) in all circumstances?
if you check them step wise yes
(also, what's wrong with aget?)
aget is array accessor and that it works for objects is an implementation detail you should not rely on
really? I never knew!
there have been a bunch of conversations in #C03S1L9DN around this unfortunately can't point you to any "source of truth" now
I believe you
better don't 😄
oh, and referring to js/window.document.documentURI won't generate warnings if that doesn't exist?
compiler warnings, that is
nope, compiler can't know what will be in js/
oh, I also thought that disabled-hud is a bit unfortunate
how about disable-hud ?
oh, thought it was disable-hud, PR welcome
since this is not yet released also good timing
I'll open a PR once we've verified the fix
if I do boot build in that directory, will it install a snapshot release to my local maven repo?
i.e. how do I refer to it correctly?
boot-build-jar
or no wait
boot build is correct, I think it prints the used version when installing
and yes build
installs to local maven
ok, so no SNAPSHOT needed?
not unless you changed the version in build.boot
ok, thanks
https://github.com/cljsinfo/cljs-api-docs/blob/catalog/refs/cljs.core/existsQMARK.md is kinda neat
@richiardiandrea: sorry i've been remiss lately, trying to get some projects finished deadlines looming, you know
Hello guys, I found the time to create a representation of a TmpFileSet
for testing
it is very useful in understanding the innards of boot and in other projects they put it as sample data and stored in an .edn
(I saw this in https://github.com/cljsinfo/cljs-api-docs)
I just need @micha help for the description of :bdir
:blob
and :scratch
😄
@richiardiandrea: we can do a hangout tomorrow if you like