Fork me on GitHub
#hoplon
<
2016-10-22
>
vigilancetech03:10:25

ok, I've got a problem and I'm too much of a noob to figure it out. 😒 I'm trying to play around with the plotSVG demo. I created a new project, copied the chart.cljs.hl into it, giving it a multi-segmented ns (because the build complained about that in its original form). I made my otherwise stock index.cljs.hl file require it, and I went to boot it and it gives me: '''WARNING: Can't take value of macro cljs.core/use at line 88 /home/kevin/.boot/cache/tmp/home/kevin/0work/hoplon/aaa/n4o/nyg3lv/index.html.out/hoplon/svg.cljs WARNING: use already refers to: cljs.core/use being replaced by: hoplon.svg/use at line 88 /home/kevin/.boot/cache/tmp/home/kevin/0work/hoplon/aaa/n4o/nyg3lv/index.html.out/hoplon/svg.clj''' Now since that's a collision between two different libraries (I think) and not between any code in my project, what is the canonical way to deal with it? Fix it and issue a pull request? https://github.com/vigilancetech-com/aaa

vigilancetech03:10:10

Or just treat it like the warning that it is and ignore it hoping it will go away (and that I don't end up using that particular feature)?

flyboarder03:10:31

What version of clojurescript are you running?

flyboarder03:10:44

Ah so you are using the latest version I see, those are new core functions, they will need to be excluded

vigilancetech03:10:24

isn't this a problem with one library including another library and not excluding "use?"

flyboarder03:10:41

Right use is now in core

vigilancetech03:10:43

I'm probably using a newer version of both

flyboarder03:10:00

We need to exclude it in hoplon

vigilancetech03:10:32

so as just an intellectual curiousity, what is the best way to deal with such a thing? Is it a bug report?

flyboarder03:10:59

Yep an issue on github or a PR

vigilancetech03:10:36

ok, and in the meantime, I guess should just hack the code on my local copy

flyboarder03:10:43

If you wanted to hack it yourself you could also send us the PR with the change it's fairly minimal, also we need alpha17 in master tested :)

vigilancetech03:10:57

ok, thanks @flyboarder ! This ALSO will be mostly a new experience for me.

flyboarder03:10:53

Hoplon is easy to hack on, boot develop and make changes :+1:

flyboarder03:10:35

Just add use to line 2 of hoplon.svg

vigilancetech03:10:21

yeah, I'm learning that (in theory). It's all pretty abstract and the code is dense with meaning/function, but its slowly starting to sink into my thick head! I've tried to climb this hill several times before but then life happened and I never was able to use it enough for it to be second nature (unlike some other languages). This time is looking good though (thanks to a little help from my friends).

alandipert04:10:09

koseki reminds me very much of cells (vs. events)

alandipert04:10:21

> Compared to “event-based” Official Documents (birth certificates, divorce decrees and so forth) that prevail in places like America, the koseki is more accurate. An American can use a marriage certificate to show he got married on a particular date in the past but would struggle to prove he is still married today. A koseki extract, on the other hand, can do just that.

alandipert04:10:34

one simply derefs the married? cell

flyboarder04:10:26

@vigilancetech I proposed your question in #clojurescript

vigilancetech04:10:10

@flyboarder about what is the best way to deal with the name collision?

flyboarder04:10:37

im not sure since this is a core name probably rename hoplon use to svg-use like is done with html-meta

vigilancetech04:10:07

yes, for one's app, but if that library doesn't need "use" specifically, probably fine to just exclude it (although it might bite the unwary dev in that library in the future)

flyboarder04:10:32

im not sure that use can be excluded now with the latest version

flyboarder04:10:45

since it’s a namespace macro

vigilancetech04:10:56

well, it compiled without warning if that's any help

vigilancetech04:10:00

hey, when I get a message like these: >WARNING: header already refers to: hoplon.core/header being replaced by: hoplon.app-pages.indexDOT_html/ header at line 33 hoplon/app_pages/indexDOT_html.cljs WARNING: html already refers to: hoplon.core/html being replaced by: hoplon.app-pages.indexDOT_html/html at line 90 hoplon/app_pages/indexDOT_html.cljs does that mean the problem is in my file? I don't see anything under hoplon that looks like "app-pages"

alandipert05:10:34

my read is, it's compalining about defs in your index.cljs.hl

alandipert05:10:52

claiming you created your own header and html definitions

vigilancetech05:10:14

yeah, renamed those 🙂 Probably not the best choice for names.

vigilancetech07:10:33

well, for one thing alpha17 is using javelin 3.8.4 but the newest version in clojars is 3.8.1 so it breaks for me (not saying that that's a bug, but its making it difficult; trying to change hoplon's build.boot to make it use 3.8.1)

vigilancetech07:10:31

that didn't work either: clojure.lang.ExceptionInfo: Could not find artifact hoplon: javelin:jar:3.8.1 in clojars (https://clojars.org/repo/)

mynomoto13:10:39

@flyboarder should we do a alpha17 release? It's confusing having the readme saying that is released and not being on clojars.

mynomoto13:10:49

@vigilancetech latest javelin is 3.8.4 on clojars -> https://clojars.org/hoplon/javelin

thedavidmeister14:10:45

just realised i can compile garden css from a javelin cell straight into the dom

thedavidmeister14:10:50

that’s pretty cool

thedavidmeister14:10:47

(def styles (j/cell {}))

(defn set!
  [& params]
  (let [pairs (partition 2 params)]
    (j/dosync
      (doseq [[k v] pairs]
        (swap! styles assoc k v)))))

thedavidmeister14:10:57

(h/defelem css
  [_ _]
  (h/style
    (j/cell= (->> styles.state/styles
                  (map second)
                  (filter identity)
                  (apply garden.core/css)))))

thedavidmeister14:10:23

(garden.def/defrule logo :.logo)

(styles.state/set!
  :logo (logo { :font-size (u/px* 2 styles.typography/base-font-size)
                :line-height styles.typography/base-line-height}))

flyboarder15:10:29

@vigilancetech: can you update the PR?

tbrooke15:10:22

@alandipert koseki sounds like blockchain

mynomoto15:10:10

@flyboarder I think the pr from @vigilancetech is fine, what should be changed?

flyboarder15:10:44

@mynomoto thanks to @anmonteiro I think you are correct that the PR is fine.

flyboarder18:10:40

@micha I hate to always be bugging you, but do you mind a quick review of pending PR’s as @mynomoto stated there are a few people trying to test alpha17

micha18:10:02

sure thing, sorry about that

flyboarder18:10:16

no prob, I just dont want to be merging things without approval

alandipert18:10:56

I wonder about numbers as custom attributes. I imagine using to make a positioning system

flyboarder18:10:59

@alandipert like (myelem 4 someval) ?

alandipert18:10:39

Or (myelem 16 9) to express aspect or something

alandipert18:10:24

Not like custom attributes blocked on it, but I wanna fiddle with it

flyboarder18:10:01

that would be interesting for sure

micha20:10:04

i see attributes as method calls, like:

micha20:10:25

(myelem :foo 100 :bar 200)

micha20:10:43

(doto (myelem)
  (foo 100)
  (bar 200))

micha20:10:52

interesting to think about attributes with no values in that way

micha20:10:04

(doto (myelem)
  (foo)
  (bar))

jondejung23:10:59

I'm in need help; regarding Boot / Clojars

jondejung23:10:37

I'm not able to upload My Clojure Project, it always declares that missing jar-file / repo

mynomoto23:10:24

@jondejung do you have a public repo of the project you want to upload?

jondejung23:10:49

I' must make one correct?

mynomoto23:10:56

It would be easier to see what is the problem. Or you could put the contents of your build.boot somewhere public and tell what command you are using.

jondejung23:10:14

1(set-env! 2 :resource-paths #{"src"}) 3 4(task-options! 5 pom {:project 'earthware/earthware-css 6 :version "0.1.0" 7 :description "test "} 8 speak {:theme "woodblock"}) 9 10(deftask build-jar 11 [] 12 (comp 13 (pom) 14 (jar))) 15 16(deftask install-jar [] 17 (comp 18 (build-jar) 19 (install)))