Clojurians
#hoplon
<
2015-12-17
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

jethroksy06:12:40

@micha: you mentioned quite some time ago about a castra screencast... is it made/available?

jethroksy06:12:12

also are there any online examples for castra with a db you also mentioned you were using it with a SQL server

micha06:12:06

i don't know of an example with SQL

micha06:12:19

i can make a simple one tomorrow though, no problem

micha06:12:53

we're using ms sql at work, so it'll be for that cause that's what i'm set up for at the moment

jethroksy06:12:59

that's the reason i asked haha

micha06:12:04

but you can translate to postgres or mysql i'm sure

jethroksy06:12:25

i'm just a little confused as to how castra comes into the picture at the moment

jethroksy06:12:52

i see the abstractions being useful, but i need to see it in action to actually appreciate it

micha06:12:07

sure no problem

micha06:12:54

we used to have a pretty good diagram of it

jethroksy07:12:02

I intend to make a movement chart app for slack with hoplon/castra heh

micha07:12:29

like for stock trading?

jethroksy07:12:42

to track movement of personnel

jethroksy07:12:52

so you check in/out etc

jethroksy07:12:01

where i work we give lots of classes

jethroksy07:12:24

so its good to know who's in or out of the office for good/bad reasons

jethroksy07:12:33

should end up really simple

micha07:12:59

yeah that seems like a good fit

jethroksy07:12:54

looking forward to the castra demo ^^

jethroksy07:12:03

thanks a lot man you've been a great help

micha07:12:40

sure, my pleasure

symbit14:12:59

@micha: You can repro this with lein new hoplon test

symbit14:12:23

@micha: then only change the serve from jetty to pandeiro. The update/refresh function didn't work with Jetty.

laforge4921:12:51

Windows problem. Just started trying the hoplon getting started after playing with boot a bit. After modifying the file, the page is not updated unless I restart boot. Getting an exception... java.io.IOException: Couldn't delete C:\Users\Bill\.boot\cache\tmp\Users\Bill\Documents\GitHub\address-book\5z0\mm3x96\index.html.out\goog\fs\url.js

laforge4921:12:35

Actually it is for a lot of files.

laforge4921:12:43

I'm running windows 10.

micha21:12:50

which version of boot?

laforge4921:12:12

latest--just installed the thing an hour ago

laforge4921:12:23

BOOT_CLOJURE_VERSION=1.7.0 BOOT_VERSION=2.5.0

micha21:12:49

can you try setting in your boot.properties file

micha21:12:00

BOOT_VERSION=2.5.1-SNAPSHOT

micha21:12:41

we fixed a number of things today

laforge4921:12:59

I just need to keep restarting boot dev to get it to work.

micha21:12:04

is there some tool in windows to see what's preventing the os from allowing boot to delete the file?

laforge4921:12:27

well, since the referenced folder does not exist, there really is nothing to look at.

laforge4921:12:46

Couldn't delete C:\Users\Bill\.boot\cache\tmp\Users\Bill\Documents\GitHub\address-book\96k\mm3x96\index.html.out\clojure\browser\event.js

laforge4921:12:57

i.e. there is no 96k folder

laforge4921:12:16

oh. I'm looking in the wrong place. sorry

laforge4921:12:00

I tried manually deleting the file and bingo! I could not delete it because the file was open.

laforge4921:12:18

--one of those snarky differences between windows and unix.

micha21:12:22

is there a tool like lsof for windows?

micha21:12:36

lol i bet windows has the best tool of this kind ever

micha21:12:02

since it's so stubborn about not letting you do anything with files

laforge4921:12:12

I found process explorer. It shows that java.exe has the files open. This is a subproess under boot.exe.

laforge4921:12:30

So I need to find the jetty jar used by hoplon

laforge4921:12:47

jetty is not in the hoplon dependencies

micha21:12:39

boot-jetty does that

laforge4921:12:59

looking in .m2 there is a boot but no boot-jetty under it.

micha21:12:14

can you paste your build.boot file please?

laforge4921:12:00

(set-env! :dependencies '[[adzerk/boot-cljs "1.7.170-3"] [adzerk/boot-reload "0.4.2"] [hoplon/boot-hoplon "0.1.10"] [hoplon/hoplon "6.0.0-alpha11"] [org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.189"] [tailrecursion/boot-jetty "0.1.1"]] :source-paths #{"src"} :asset-paths #{"assets"}) (require '[adzerk.boot-cljs :refer [cljs]] '[adzerk.boot-reload :refer [reload]] '[hoplon.boot-hoplon :refer [hoplon prerender]] '[tailrecursion.boot-jetty :refer [serve]]) (deftask dev "Build address-book for local development." [] (comp (watch) (speak) (hoplon) (reload) (cljs) (serve :port 8000))) (deftask prod "Build address-book for production deployment." [] (comp (hoplon) (cljs :optimizations :advanced) (prerender)))

micha21:12:18

[tailrecursion/boot-jetty  "0.1.1"]

micha21:12:58

it'll be in ~/.m2/repository/tailrecursion/jetty/0.1.1/boot-jetty-0.1.1.jar or something like that

laforge4922:12:26

the boot jetty jar is only 4k. so it must refer to something. The pom file only references clojure and bootlaces.

laforge4922:12:33

a bootlaces dependency?

micha22:12:09

it loads jetty at runtime

micha22:12:32

there are no transitive dependencies, bootlaces etc are only test dependencies

laforge4922:12:37

so how do I find the loaded jar file so I can modify it?

micha22:12:42

you can see that if you do boot show -d

micha22:12:49

you'll see it doesn't depend on anything

micha22:12:54

all boot tasks are like that

micha22:12:03

you don't want to modify the jar

micha22:12:14

anyway you can't, cause jars are considered to be immutable in java

laforge4922:12:15

thats what the link said.

micha22:12:31

no i think you want to just add init parameters

micha22:12:39

to the servlet

laforge4922:12:02

any hint as to what file needs to be modified?

micha22:12:27

hmm the web task is the usual thing to do

micha22:12:36

but it doesn't seem to support init params

laforge4922:12:40

every windows user needs to do this, right?

micha22:12:59

yeah, we'll just roll it into boot-jetty

laforge4922:12:20

need to go now anyway.

laforge4922:12:26

all the best to you

micha22:12:32

good luck!

micha22:12:39

i'll look into the boot-jetty thing

laforge4922:12:15

I'm trying to learn reactive web and clojure script and this looked like a good place to start.

laforge4922:12:39

--I am NOT a js dev, so clojure script is very exciting

micha22:12:52

yeah cljs is way better than js

flyboarder22:12:00

@micha: I was poking around the boot-hoplon task but everything seems fine there

micha22:12:53

i'm working on hoplon stuff this evening

micha22:12:57

so i'll check it out

micha22:12:06

i'm making some updates to castra at the moment

symbit22:12:47

@laforge49 if needed, as a work around, replacing jetty dep with [pandeiro/boot-http "0.7.0"] and require '[pandeiro.boot-http :refer [serve]] will auto recompile hoplon changes if you change the BOOT_VERSION from 2.5.0 to 2.4.2 in boot.properties.