Fork me on GitHub
#hoplon
<
2015-09-14
>
alandipert00:09:56

@bsima: correct, and we keep that file encrypted

alandipert00:09:25

well, we have adzerk-wide config that we keep encrypted and a shell function that runs gpg, decrypts, and exports everything in it

bsima00:09:31

Thanks alandipert

onetom06:09:26

mynomoto: thanks for pushing the https://clojars.org/hoplon/castra i held it off because i wanted to adapt the hoplon-demos to work with castra.core but it was not working and haven't got back to it since... i think there were a couple of :bind-ids in it which can not be transformed half sleeping... simple_smile

xifi07:09:50

lot of movement happening these days, :thumbsup:

raymcdermott09:09:03

something simple must be wrong with my set up because otherwise this forum would be filled with fire and brimstone rather than folks actually doing stuff...

raymcdermott09:09:12

latest installment

raymcdermott09:09:26

`i-Mc-Mini% boot
java.lang.RuntimeException: No reader function for tag tailrecursion.boot.core/version
                      ...                
 clojure.core/read-string  core.clj: 3663
boot.util/read-string-all  util.clj:  207
          boot.main/-main  main.clj:  140
                      ...                
         boot.App.runBoot  App.java:  242
            boot.App.main  App.java:  356
`

raymcdermott09:09:05

that’s what happens if I am in the project directory (for example /Users/mcd/Development/Projects/hello-hoplon)

raymcdermott09:09:29

if I am outside of the project directory boot actuallt fires up ok

raymcdermott09:09:16

boot | head -10
Boot App Version: 2.2.0
Boot Lib Version: 2.2.0
Clojure Version:  1.7.0

Usage:   boot OPTS <task> TASK_OPTS <task> TASK_OPTS ...

OPTS:    -a --asset-paths PATH      Add PATH to set of asset directories.
         -b --boot-script           Print generated boot script for debugging.
         -B --no-boot-script        Ignore boot script in current directory.
         -C --no-colors             Remove ANSI escape codes from printed output.

raymcdermott09:09:53

I am running the latest version of boot an created the project using lein new hoplon hello-world

raymcdermott09:09:23

so I will now try again with the off-piste hoplon version

raymcdermott09:09:04

and holy cr4p it’s actually up and running!

raymcdermott09:09:12

boot dev
<< started reload server on ws://localhost:53026 >>
Writing boot_reload.cljs...

Starting file watcher (CTRL-C to quit)...

Compiling Hoplon pages...
• index.cljs.hl
Adding :require adzerk.boot-reload to index.html.cljs.edn...
Compiling ClojureScript...
• index.html.js
2015-09-14 11:38:32.349 java[5290:1139671] 11:38:32.349 WARNING:  140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API's in AudioComponent.h.
Elapsed time: 22.686 sec

raymcdermott09:09:50

thanks for the support @alandipert and @mynomoto I look forward to sharing the joy!

raymcdermott09:09:57

(just to be clear that’s with the hoplon-contacts-demo-master)

xifi09:09:28

@raymcdermott: the lein template for hoplon doesn't seem to be up to date, that's why you were getting the errors

raymcdermott11:09:10

it’s working now but thanks for the other resources!

tbrooke12:09:51

@raymcdermott: I was getting something similar - It looks like Hoplon6 is just about ready to roll and I would like something to experiment with; I’ll look into the repos @xifi posted - I just want to get a feel for it

raymcdermott13:09:00

yes, likewise - unfortunately the delivery side isn’t quite up to the marketing campaign! Seems like it’s on the brink of stability though so there is hope 😉

mynomoto13:09:08

@tbrooke: @raymcdermott since you are the new guys, do you think it's better to update the templates to use hoplon 6, meaning less surprising and better to learn overall? I have those done, only not merged/deployed

raymcdermott14:09:48

I don’t know enough to answer your question. The main thing that I want as a newcomer to anything is for the happy path examples referenced from the main documentation site to work as advertised. How you do that is beyond my pay grade - at least for now!

xifi14:09:56

My 2 cents as a relative newcomer - the http://hoplon.io site should state it is being moved to the github pages. I was too working my way through the getting started section, fighting through the weird error messages simple_smile

xifi14:09:51

and second the move to hoplon 6, the community is relatively small so no need to keep backward compatibility since everyone is moving to 6 anyway no?

alandipert14:09:32

i think it's ok to push ahead with the 6 templates @mynomoto , the new site will be up this week... and after that we can work together on the wiki

alandipert14:09:09

maybe add a note to the template's README that aims at new hoplon wiki?

mynomoto14:09:12

Makes sense, will do it tonight. We may want to add a note on the current http://hoplon.io some sort of deprecation warning on the getting started.

onetom14:09:52

shouldnt we just take down http://hoplon.io to reduce confusion? or put up the current one in any ugly format, which clearly says "We are in transition during 2015 September, so excuse us for the http://motherfuckingwebsite.com/ look and feel."

onetom14:09:54

and hopefully it would be up only for a few days and only a handful of people would see it...

alandipert14:09:04

i won't have time for a few hours yet to do that but i can click a Merge button

alandipert14:09:09

:thumbsup: to the idea

tbrooke15:09:23

Sounds great I’m glad to add to the wiki and struggle with being an early adopter but I need something to get off the ground with and like @raymcdermott says it is currently beyond my pay grade

onetom15:09:12

tbrooke: dont be shy, just keep asking here. we might be able to spend time on help.

onetom15:09:27

(though it's almost midnight here and im gonna sleep soon probably)

onetom15:09:03

i've also struggled at the beginning, but i've struggled a lot more with angularjs... 😉

tbrooke16:09:27

@onetom: will do - Actually I like your stuff with Semantic UI

onetom16:09:59

happy to hear! we are quite pleased with semantic ourselves too

onetom16:09:19

im also quite happy to have the opportunity to build a realistic history of a hoplon+semantic project

onetom16:09:05

i hope it becomes worth studying eventually. it's gonna be like a fossil, enclosing footprints from the different periods of the boot and hoplon evolution 😉

bsima20:09:58

@micha: just watched your clojutre talk on YouTube, really enjoyed it. Kinda abstract but it hit home when you compared javelin to react/virtual DOM

micha20:09:16

tricky to fit everything into 20 minutes, but i think the shorter format was better overall

bsima20:09:21

Yeah I wish it went on for another 20 minutes so I could see demo/examples, or at least a description of your workflow

bsima20:09:44

But I think all that will come with the upcoming Hoplon releases

micha20:09:10

maybe 20 minute modules is the sweet spot

xifi20:09:11

@bsima: thanks! that's from today?

micha20:09:56

i gave the talk at #C08BDAFEE this past friday

xifi20:09:25

cool. I found 3 more on the web - LA clojure talk, Alan at Toronto and the one you have linked on http://hoplon.io

xifi20:09:38

only seen the last one I mentioned

xifi20:09:49

do you have more?

bsima20:09:57

I heard Alandipert is scheduled to give one in November at some conference

bsima20:09:24

But Hoplon is deceptively simple, doesn't really require that much explanation

xifi21:09:55

yeah, as I said before the whole source code of javelin+castra+hoplon kicks in at around 3.3k loc which is almost a lie to call a framework 😛

alandipert21:09:22

it's pre-hoplon

alandipert21:09:34

also shows a nearly unrecognizable javelin api

alandipert21:09:33

wigwam is one of the wonders of the PHP world

micha21:09:08

it had a php repl that said DON'T PANIC in friendly asciiart banner

xifi21:09:20

you guys did php?

micha21:09:01

this was like 250 KLOC probably

micha21:09:05

a huge php application

micha21:09:26

maybe 150K LOC, i forget

xifi21:09:53

did you switch to clojure only later?

micha21:09:21

the application already existed before i ever touched it

micha21:09:58

we were in the process of moving things to clojure but things unraveled before we were able to complete it

micha21:09:26

i mean they're still around and everything, but the clojure project was put on hold and alan and i left

xifi21:09:52

you worked together in a different company before?

xifi21:09:13

at a different company? English isn't my first language, sorry

micha21:09:23

at least 3 if you include the us government

xifi21:09:52

government stuff, woo

xifi21:09:58

is lisp running there too

xifi21:09:20

do you guys know each other from work? Or are you like potty-friends

mynomoto21:09:40

@xifi: if you haven't seem yet I like this talk a lot too: https://vimeo.com/115271300

xifi21:09:03

will be another fine day at work when I start watching these

micha21:09:41

how's it going?

flyboarder21:09:17

@micha: it's going good, much development on the clojurescript side

flyboarder21:09:48

@micha: How about you? I see the new hoplop site, looks good!

micha21:09:10

yeah awesome group effort there!

flyboarder21:09:30

matches the boot-clj feel, love it ❤️

micha21:09:45

josh smith ftw simple_smile

micha21:09:19

he did the design for both

micha21:09:25

what have you been doing in clojurescript lately?

flyboarder21:09:31

well im still new to clojure in general but im working on a web app, wrote a CES engine in clojure using it as a base for the web app

micha21:09:04

great sounds like a good start

flyboarder21:09:11

Any idea why this isnt working? (def route (route-cell "#/home/")) (cell= (println route)) (html (body (div (cell= (div :toggle (cell= (= route "#/home/")) (a :href "#/nothome" "Go nothome")) (div :toggle (cell= (= route "#/nothome/")) (a :href "#/home" "Go home"))))))

flyboarder21:09:37

i get the first link but i click it and go to #/nothome and it's blank

micha21:09:51

you don't have a (head) in there?

flyboarder21:09:02

well in the actualy code I do but im using this as a test

micha21:09:30

your cell is looking for "#/nothome/" though

micha21:09:38

not "#/nothome"

micha21:09:04

you can add a formula to add the slash, that's what i do

micha21:09:26

like (def raw-route (route-cell "#/home/"))

micha21:09:01

(defc= route (if (= (last raw-route) "/") raw-route (str raw-route "/")))

micha21:09:06

or something along those lines

flyboarder21:09:51

ok i fixed the url's as so

flyboarder21:09:54

(html (head) (body (div (cell= (div :toggle (cell= (= route "#/home/")) (a :href "#/nothome/" "Go nothome")) (div :toggle (cell= (= route "#/nothome/")) (a :href "#/home/" "Go home"))))))

flyboarder22:09:07

but I get the same result 6-alpha10

flyboarder22:09:14

is the version

micha22:09:43

so to debug things like this you can open the dev tools in your browser and inspect the DOM

flyboarder22:09:45

the first link works and redirects to a blank page, the other div is not in the dom and does not get added

micha22:09:10

right, you have a cell= in there

flyboarder22:09:38

is that making it only evaluate the next part once? i thought that would allow me to save on memory?

flyboarder22:09:47

ok this slack thing is pretty cool, like modern IRC 😛

micha22:09:05

putting cells as children of elements has a specific effect

micha22:09:21

and it's not really what you want here i think

micha22:09:32

you use cells for things that will need to change over time

micha22:09:56

also nesting of cell= gets you into confusing territory

micha22:09:08

there is normally no need to do this

flyboarder22:09:22

@micha: so what if I dont want it in the dom for a security reason? is there a way to add/remove it instead of show/hide?

flyboarder22:09:41

or to save memory or whatever the case may be

micha22:09:44

the client already has your javascript, what security could be gained?

micha22:09:10

i think it's better to optimize those things later

flyboarder22:09:30

well the javascript is more difficult to interpret url paths and such no? im really thinking about the size of the application more than security

flyboarder22:09:08

as size and speed much affect the performance of a CES engine

micha22:09:42

you can manage things directly if you want to, of course

micha22:09:57

using the appendChild methods etc

micha22:09:18

we generally use static allocation of DOM elements wherever possible

micha22:09:22

which is pretty much everywhere

micha22:09:41

and if there is a specific thing that isn't performing well enough we then work on that thing

micha22:09:12

this way we have the simplest possible thing

micha22:09:29

we're not building games though

flyboarder22:09:56

im actually not either, it's a web dashboard but trying my hand at clj(s) and expanding the lisp

micha22:09:26

i don't think you'll run into any problems doing it the naive way with a web dashboard

micha22:09:34

i've made a bunch of them

micha22:09:55

you're not going to be making hundreds of thousands of things

flyboarder22:09:33

yeah and i plan on using a static set of actual display elements

micha22:09:57

i recommend not optimizing anything until you actually have a performance issue

flyboarder22:09:36

now for the sake of my curiosity if for some reason you really did want to keep things in/out of dom working with it directly is how it would be done more or less

micha22:09:33

well there are things you can do

micha22:09:58

but you then need to think about allocation and things like that in a more hands-on way

micha22:09:08

and time becomes a factor

micha22:09:40

like the order in which things happen and so on

micha22:09:58

you can use (cell= ...) for that

flyboarder22:09:14

anything important really should be coming from an rpc call tho yeah

micha22:09:35

static allocation greatly simplifies everything

micha22:09:52

when you need to manage the heap it gets complicated

alandipert22:09:51

just made a cool lil function for the new homepage:

(defn >-
  "Helper function to create deep nested structures with a certain attribute pattern.

  (>- div :class [\"foo\" \"bar\" \"baz\"] (p \"Hello\"))

  is analagous to:

  (div :class \"foo\"
    (div :class \"bar\"
      (div :class \"baz\"
        (p \"Hello\"))))
  "
  [elem-ctor attr-kw attr-vals & kids]
  (let [[inner & outers] (reverse attr-vals)]
    (reduce #(elem-ctor attr-kw %2 %1) (elem-ctor attr-kw inner kids) outers)))

flyboarder23:09:16

@alandipert: should the new site not be done in hoplon tho? as pretty as it is 😛