This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-08-25
Channels
- # admin-announcements (18)
- # beginners (16)
- # boot (13)
- # bristol-clojurians (1)
- # cider (41)
- # clojure (116)
- # clojure-berlin (1)
- # clojure-italy (2)
- # clojure-japan (6)
- # clojure-russia (94)
- # clojurescript (46)
- # clojutre (5)
- # core-matrix (2)
- # cursive (1)
- # datascript (14)
- # datomic (10)
- # devops (73)
- # editors (3)
- # emacs (19)
- # hoplon (382)
- # jobs (1)
- # ldnclj (8)
- # ldnproclodo (4)
- # off-topic (50)
- # onyx (3)
- # reagent (2)
- # yada (19)
it's possible the changes we made to support hot-reloading tests might have affected compilation times
-server to select the "server" VM
The default VM is server,
because you are running on a server-class machine.
i was reading the tempfile handling code of boot a lot btw caused a lot of head scratching... like we couldn't really figure out how to create a TmpFile. the boot code only had 1 example of it. we tried (cp ...) too but it was complaining about the tmpdir not being recognized
but at the end my hack worked: https://github.com/exicon/homepage/blob/SPA/build.boot#L31-L49 have u seen it? do u have any immediate comment on it?
i've noticed it was creating symlinks for the index.html.out/ but not for the index.html.js
i've seen later there are helper functions to lookup the various components of the TmpFile/TmpDir but not sure what's the purpose of those
remember that the FileSet has a fixed set of underlying directories in which it stores the blob files and hard links
the blob files are the actual files, those are named by their md5 hash and are stored in the blob dir
the rest of the directories associated with the fileset are where the working tree is built
there are a number of these directories because we need to have some files in the classpath and some not in the classpath
ah, yeah, that's an other thing. i keep getting "can't delete target/something/something" errors since i use my copy task
im not sure i understand what do u mean by cant add/rm new dirs. doesn't the (tmp-dir! ...) fn make new ones?
the overall purpose of the fileset is to have a standard abstraction for the filessystem as it relates to the JVM
instead, when you do (add-resource ...)
what happens is the files in the tmpdir are copied into blob storage
because now it's possible to refer to the file without referring to a specific path on the filesystem
when you call commit!
on a fileset it takes those mappings and makes hard links on disk pointing to the blob files
as i saw there was a new-fileset
fn to create one but then no other one is created, but only that is evolving?
using the normal java temp directory machinery isn't as good because cleaning them up is a pain
like iwth boot if you make a tmp-dir! you can see things in the directory after boot exits
(it's all golden what u are saying. i will save it and try to rework it into some kind of documentation / article)
and no other shenanigans other than that directory is in $BOOT_HOME
, so boot can know when to delete it
that code is a little complicated maybe but there was a lot of reprtition and clerical errors so i did some refactoring that made it more confusing but less prone to clerical errors and typos
the thing that's a singleton is the place where files are written when you call commit!
on an immutable fileset
any operation that creates a new fileset will not affect the actual underlying filesystem
and that's not really 100% true, because some things like add-resource
etc. actually do add things to blob storage
any idea at 1st glance what can cause this:
java.io.IOException: Couldn't delete target/index.html.out/homepage/layout.cljs
io.clj: 426
...
boot.file/delete-file file.clj: 52
boot.file/sync! file.clj: 190
...
clojure.core/apply core.clj: 634
boot.core/sync-target/fn core.clj: 687
boot.core/sync-target core.clj: 686
boot.core/run-tasks/fn core.clj: 695
tailrecursion.boot-hoplon/eval343/fn/fn/fn boot_hoplon.clj: 45
i have the feeling that my copy-index-html
is doing something nasty which spits into the soup
but i was not using cp
... so im not sure if it was valid to just grab a TmpFile, change its path and shove it back to the (:tree fileset)
yeah, it's a heisenbug, but happened quite often today when i was switching between prod and dev runs
imean i saw a lot of code extracting the path from TmpFiles then putting them back to objects or the :tree
that's interesting because the pipeline is what protects the consistency of the fileset
if the fileset was made of cells and more self-managed, the pipeline would be less important
i wouldnt know though how to do the cp
if i wouldn't have had access to the underlying (Tmp)FileSet 😕
anyway, i don't have a lot of clarity yet on this fileset vs javelin, but i thought i would put it there so u can ponder about it
as i was reading the code i found it hard to decipher the reason why all that code is there
and it's followed by a <script>xxx.something</script>
then xxx would be accessible for sure if the xxx.js
had a xxx = {something: ...}
but in development we are not using prerendering so (static (script ... )) would break, no?
(which is another thing which we looked into the source code of but couldnt understand...)
i saw u were adding :static-id attributes too but their usage was unclear and also seemed unrelated to the (static ...)
macro
well, it would be great to access that semantics of the script tags for integrating 3rd party code
also it was not clear if i should reference the namespace it provides in the (ns (:require ))
since the vars are accessible as js/...
anyway
u made a task like that the other time but it scrolled out of the chat buffer... 😞 either way, im just surprised u can specify a remote URL in the foreign lib and havent found any docs on it how it works
it just gets added to the list of modules as something which no one depends on explicitely?
if you don't require it you're just relying on someone else :require it in code that runs before your code
because the cljs compiler doesn't have any way to know if js/jQuery is in the environment or not
wouldnt those symbols in the externs file become available under the namespace of the foreign-lib?
i will ask later tonight probably because we are trying to roll this new hoplon6-alpha6 homepage out tomorrow or the latest the day after
but now i have to help to put my daughter into bed... she is 10months old now and started to be naughty
@martinklepsch: hi! we are trying to use your https://clojars.org/cljsjs/auth0-lock but with hoplon.
it tries to insert some CSS into the <head>
automatically already at the beginning of loading the library:
https://github.com/auth0/lock/blob/master/lib/insert-css/index.js#L13-L17
but then the head gets blown away by hoplon.
have you experienced this?
do u have any solution for it?
or you are not really using hoplon?
if we include a <script>
tag at the end of the (body)
then it works, but that's ugly obviously.
@micha: what if
(reset! (.-hoplonKids elem) (vec kids))
in https://github.com/tailrecursion/hoplon/blob/master/src/tailrecursion/hoplon.cljs#L291
would be
(swap! (.-hoplonKids elem) conj (vec kids))
or
(swap! (.-hoplonKids elem) (partial conj (vec kids)))
instead?on the surface of it, it seems to solve my problem with auth0 tinkering with the <head>
even before (head)
could kick in
all of them have the infamous document.getElementByTagName("head")[0].appendChild(document.createElement("script" or "style"))
works fine with simple optimizations too (all im doing in my example is to initialize the auth0 popup)
maybe i will ping these auth0 guys... is there any library which you would point them to if you were to explain them how should a lib constructor look like?
do u have a google analytics init snippet in cljs?
we were just using (script "....")
until now
you can call that function whenever you want, and it doesn't do anything until you tell it to