Fork me on GitHub
#hoplon
<
2016-10-11
>
onetom00:10:14

@micha have you read the https://rfc.zeromq.org/spec:22/C4/ yet? i just came across it again because the author (Pieter Hintjens) just died a few days ago. it's a little abstract but worth internalizing. i was just thinking why am i not asking for permissions for pushing releases to https://clojars.org/groups/hoplon and i realized that i wont trust myself yet to release anything without your review first.

onetom00:10:45

thats when i realized there are no explicit rules setup for governing boot and hoplon

micha00:10:13

i think it would be a good idea to establish rules

micha00:10:52

like what are the expectations for compatibility

micha00:10:59

from one version to the next

vigilancetech00:10:36

@micha, were you talking to me? If so, what did you think you saw?

micha00:10:08

@vigilancetech yes, the 2.5.0 release doesn't have some of the commits from master

vigilancetech00:10:46

@micha so I should go back to 2.4.0?

vigilancetech00:10:44

What is the substantial difference between boot and boot-hoplon? Why maintain two different code bases?

micha00:10:27

boot-hoplon is the task that handles building hoplon stuff

micha00:10:39

boot is a more general type of program

micha00:10:56

boot-hoplon ships a task that runs in boot

micha00:10:04

and composes with other tasks in boot

vigilancetech00:10:37

ah, ok, so boot-hoplon is just a task UNDER boot, ok, thanks for clearing that up.

micha00:10:09

for example you combine it with the cljs task

micha00:10:15

which isn't specific to hoplon

micha00:10:53

@vigilancetech i just pushed boot-hoplon 0.3.0-SNAPSHOT

vigilancetech00:10:50

I just built a new task from the seancorfield/boot-new template and this is what it gave me: `(deftask dev "Build nt2 for local development." [] (comp (watch) (speak) (hoplon) (reload) (cljs) (serve :port 8000)))`

micha00:10:18

looks good, no?

vigilancetech00:10:29

but it has cljs in there

micha00:10:51

sure, you will need to compile cljs -> js

micha00:10:58

which is what the cljs task does

micha00:10:23

the hoplon task actually generates cljs source files and html files

micha00:10:39

the cljs needs to be compiled into javascript by the cljs task

micha00:10:07

the comp there sets up a pipeline of tasks

vigilancetech00:10:13

ok then I'm not understanding what you meant by >for example you combine it with the cljs task >[5:28]  >which isn't specific to hoplon

micha00:10:31

yeah that's exactly what i was referring to

micha00:10:47

(comp (task1) (task2) (task3))

micha00:10:56

that creates a pipeline of 3 steps

vigilancetech00:10:26

oh, ok, sorry, yes I get it now. cljs is another of boot's tasks. I thought you were telling me I was doing something wrong by including it.

micha00:10:37

oh, no sorry

vigilancetech00:10:55

I'll get it eventually 🙂

micha00:10:15

it's a ridiculous amount of machinery to make a webpage 🙂

vigilancetech00:10:52

yes, but it's very cool. Thanks for your and Alan's work on this. It's an exciting project!

vigilancetech00:10:15

hopefully someday soon I'll know enough to actually contribute

vigilancetech00:10:52

the whole js/html thing is like some kind of bad nightmare that's almost over thanks to you guys 🙂

vigilancetech00:10:27

and for that whole reason, I've been kind of staying away from it.

micha00:10:46

thanks 🙂

micha00:10:04

yeah i feel like we're getting close to freedom

vigilancetech00:10:00

very much! I'm ramping up on clojure, cljs, html, etc... to do a project all at the same time and my head is kind of spinning. Sorry if I appear confused at times. Most of my lisp experience is with elisp and probably less than half of that transfers over to clj/cljs

micha01:10:27

welcome! hope the process is more fun than hassle 🙂

vigilancetech01:10:27

Thanks, the only hassle is my personal deadlines 😕

vigilancetech01:10:53

@micha I'm still getting java.lang.IllegalArgumentException: No matching clause: ns+ after pulling 0.3.0-SNAPSHOT. I've cleaned up things a lot (I think). I decided to go from a new (known working) template and only add/change what I think I need: http://pastebin.ca/3727408

micha01:10:10

@vigilancetech can you do a quick git grep ns+?

vigilancetech01:10:40

in my clone boot-hoplon repo? Or in my app?

vigilancetech01:10:58

maybe my build.boot's require should have this instead? '[hoplon.boot-hoplon :refer [hoplon prerender ns+]] (although ui's test doesn't, and it seems to work)

micha01:10:36

no, you don't need to :refer ns+

micha01:10:53

hm i should check something

vigilancetech01:10:44

ok, the prelude is the only place in my code that has the ns+ in it then

micha01:10:35

the prelude?

vigilancetech01:10:40

yeah, the top of my *.hl file

vigilancetech01:10:52

last part of the last past

vigilancetech01:10:21

well, not the grep paste, the one before

micha01:10:23

is the project repo accessible?

micha01:10:29

like am i able to clone it to try?

vigilancetech01:10:05

I can do that, b4b

vigilancetech02:10:57

is there a quick workaround for ns+?

mynomoto02:10:29

@vigilancetech ns+ is unnecessary. It's only sugar. What do you want to do?

vigilancetech02:10:19

I'm trying to build an app based on hoplon/ui. So far, the only one's I've been able to get to compile were the ui/test and computable-law examples. Somewhere it ran off the rails and I started getting this error. Right now I'm going back and putting my code into computable-law and adapting it. Hopefully I can get that to compile again

mynomoto02:10:59

Having code compiling all the time is really useful for warnings, I recommend that you look at that. I would ignore ns+ and use regular ns for the time being.

vigilancetech03:10:02

@mynomoto well, its back compiling again, whew! Going to stick with getting the elems up on the page for a while 🙂

vigilancetech04:10:46

@micha I might have found out something important about that ns+ issue. It only does it if the file is named .hl , it's fine if the file is .cljs. Will that mean that hoplon isn't processing the file?

onetom04:10:31

@micha as part of our upgrade to clojure 1.9, i made this ^ minor change. can we publish a 3.0.0-alpha5 pls? or if you can add me to the hoplon clojars org i can do that. i finally have a gpg setup and i just successfully published a release to clojars: https://clojars.org/onetom/boot-lein-generate

onetom04:10:13

hmm... now that im saying "successfully" i mean clojars didn't complain, but if i look at my jar it seems unsigned:

pair@tomplus ~/g/h/castra> jarsigner -verify -verbose /Users/pair/.m2/repository/onetom/boot-lein-generate/0.1.2/boot-lein-generate-0.1.2.jar

           0 Tue Oct 11 12:17:42 HKT 2016 META-INF/
           0 Tue Oct 11 12:17:42 HKT 2016 META-INF/maven/
           0 Tue Oct 11 12:17:42 HKT 2016 META-INF/maven/onetom/
           0 Tue Oct 11 12:17:42 HKT 2016 META-INF/maven/onetom/boot-lein-generate/
        1111 Tue Oct 11 12:17:42 HKT 2016 META-INF/maven/onetom/boot-lein-generate/pom.xml
         136 Tue Oct 11 12:17:42 HKT 2016 META-INF/maven/onetom/boot-lein-generate/pom.properties
           0 Tue Oct 11 12:17:42 HKT 2016 boot/
        1746 Tue Oct 11 12:15:51 HKT 2016 boot/lein.clj
          25 Tue Oct 11 12:17:42 HKT 2016 META-INF/MANIFEST.MF

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar is unsigned. (signatures missing or not parsable)

onetom04:10:31

maybe it's better if u publish it for now...

micha05:10:19

@onetom i think gpg is a different signature mechanism

micha05:10:39

you can try boot show -v i tink

onetom05:10:58

indeed, thanks!

pair@tomplus ~/g/o/boot-lein-generate> boot show -v
:signed   └── [adzerk/bootlaces "0.1.13" :scope "test"]

micha05:10:54

or like boot -BP -d onetom/boot-lein-generate show -v to check that specific jar

onetom05:10:47

thx. i've also tried:

> cd ~/.m2/repository/onetom/boot-lein-generate/0.1.2/
> curl -O 
> gpg --verify ~/.m2/repository/onetom/boot-lein-generate/0.1.2/boot-lein-generate-0.1.2.jar.asc

gpg: assuming signed data in '/Users/pair/.m2/repository/onetom/boot-lein-generate/0.1.2/boot-lein-generate-0.1.2.jar'
gpg: Signature made Tue Oct 11 12:17:54 2016 HKT using RSA key ID 054F2F74
gpg: Good signature from "Tamas Herman <[email protected]>" [ultimate]

onetom05:10:41

so would a 3.0.0-alpha5 release be possible?

mynomoto09:10:23

@vigilancetech boot-hoplon only does things to .hl files, so ns+ only works there.

micha13:10:05

@onetom 3.0.0-alpha5 version of which library?

micha13:10:37

wow that's a weird one

micha13:10:53

i have no idea why i would have done (import java.io.File) like that

adamfrey14:10:20

is there a way in a cell= to get a reference to a named cell, not it’s deref’d value? Like if I wanted to update some cell as a side-effect in a cell=?

alandipert14:10:12

@adamfrey direct formula is a way, also add-watch

adamfrey14:10:57

ok, thanks Alan

alandipert14:10:56

(page "index.html")

(defc x 123)
(defc y 321)

((formula (fn [v] (swap! y + v))) x)

(js/setInterval #(swap! x inc) 1000)

(html
  (body
    (h1 (cell= (str "x=" x ", y=" y)))))
a little example

adamfrey14:10:28

cool, that seems easy enough.

alandipert14:10:01

i would probly do (add-watch x ::swap-y (fn [_ _ _ v] (swap! y + v))) instead of formula

adamfrey14:10:17

Btw did anyone get a chance to look at my javelin-bug minimal repo? https://github.com/AdamFrey/javelin-bug I’m curious if it can be reproduced by anyone else

alandipert14:10:41

hm i did not, i will look right now

adamfrey14:10:51

thanks so much

alandipert15:10:27

@adamfrey do i understand right that the warning appears, but the code works as expected?

adamfrey15:10:02

let me double check

adamfrey15:10:38

yes it does look like the code works

adamfrey15:10:50

I think the warnings scared me off a bit.

mynomoto15:10:46

@adamfrey for updating a cell inside cell= there is also ~(cell my-cell) to get the my-cell cell.

alandipert15:10:55

@mynomoto that's a good one... i guess that creates a new anonymous cell containing my-cell that is instantly deref'd?

mynomoto15:10:49

@alandipert I'm not sure of how it works, @micha taught me that one. There is code on the demos using it castra-chat and tictactoe.

alandipert15:10:55

hehe yeah, i think so. since cell= boxes all free variables in a call to cell-deref*. so you can sneak cells in by making them the value of a cell

alandipert15:10:49

@adamfrey in any case, confirmed. exploring a fix now

micha15:10:44

@mynomoto you can also do this to update a cell inside a cell=:

micha15:10:15

(cell= (if foo (~(partial swap! bar) inc)))

micha15:10:06

the ~ evaluates the form when the cell= is created, instead of evaluating it every time the cell= updates

mynomoto15:10:49

We need a javelin emoticon 😉

alandipert16:10:26

@adamfrey i'm not sure how the way we expand macros doesn't always spew lots of warnings

adamfrey16:10:06

well, the warning occurs in the normal version without the mx macro

alandipert18:10:01

ok so micha wheeled over and we looked at the warning thing

alandipert18:10:08

it's coming from the call to analyzer/macroexpand-1

micha18:10:48

really weird

alandipert18:10:08

i wonder about macroexpanding as we go instead of in 1 shot

alandipert18:10:27

i don't see how that would fix the problem. maybe we could look at core.async and see what they do

flyboarder18:10:34

@micha so #141 #142 and #143 are good to go and fix all the attribute stuff we previously discussed.

flyboarder18:10:14

defaults are in core and jquery overrides default browser behaviour with hoplon.jquery

flyboarder18:10:44

I think im going to roll them into a separate PR tho to simplify all the changes

flyboarder19:10:34

much better :thumbsup:

micha19:10:15

@flyboarder awesome, i fixed boot-hoplon last night

micha19:10:20

ready for the changes

micha19:10:20

it should still be compatible with older versions of hoplon also (ones that don't have hoplon.jquery namespace)

micha19:10:33

cause it checks to make sure the namespace is on the classpath when you do :refers

micha19:10:41

ignores if it isn't

flyboarder19:10:56

oh thats great!

vigilancetech22:10:20

so I'm trying to do ui and I laid out an image with a 3 subimages (icons) on it and it's wanting to group them all together but I want them to spread out. Does anyone know off the top of their head what attrib I should be using?