Fork me on GitHub
#hoplon
<
2015-09-20
>
flyboarder00:09:46

@mynomoto: thanks for the updates to the demos!!

mynomoto01:09:46

@micha: any tips to find how/why castra is getting empty sessions just after setting it have users on castra-chat?

onetom02:09:17

I wish I can help out too but i was dragged down to the beach to play w my daughter... :) maybe later today

onetom02:09:12

@flyboarder: https://github.com/exicon/homepage is our fully hoplon/castra, opensource app which worth looking at as a real world example. It might not be the best example because we don't understand these technologies very deeply but im constantly trying to keep it running on cutting edge versions and incorporate the lastest understandings i gain right here on slack. (The backend part is not open but maybe I will chuck in a mock backend to complete the picture)

onetom02:09:17

@piotrek: dont wait for more documentation. Just keep reading and re-reading the hoplon and castra sources. They r a few hundred lines only. U r still better off than trying to use the better documented react.

onetom02:09:31

I think the trick with React is it's simple to explain it superficially. U might think u got it and it must be easy to use. The u look at some simple examples and it seems straightforward. They are similar to what u saw in ember, angular, etc just a bit cleaner and somewhat simpler conceptually. But the if u look at more complex examples, where different widgets are collaborating over a bigger app state and they also have their own local state, etc, then u will end up learning about those lifecycles micha mentioned and quickly find urself thinking about super abstract shit instead of working directly on your problem.

onetom02:09:02

I cant say I never had to do the same with Hoplon, but with Micha's help our day to day work was not impeded noticeably. Now that we switched all of our repos to Hoplon6 (alpha6 or 10) Im foreseeing a lot smoother sail. It will take a few more weeks until we have great docs and up to date examples but we r more than half way there already. In the meantime this Slack channel is your living documentation ;) We have people here from the Americas, Europe and Asia so most timezones are covered...

piotrek06:09:28

@onetom: thanks - I will take a look at the source code. However, it is usually much easier to read the source code when you know the concepts behind it so you don’t have to wonder why things are implemented as they are

alandipert09:09:46

@piotrek: there are several youtube videos which can illuminate concepts, https://www.youtube.com/watch?v=UoZyyo2Bwr8 is latest and greatest, in case you haven't seen

mynomoto15:09:42

Current status on demo updates: - Done: castra-simple, contacts, counters, demos-homepage, google-maps, hoplife, infinite-scroll, infinite-scroll-paginated, inputs, plotSVG, todoFRP and validated-form - Castra session issues: castra-chat, territory-build (possibly). - htlm2cljs issues: async-webinar, tictactoe, todoFRP-html - libs not updated issues: jquery-date-picker and jquery-selectize

mynomoto15:09:35

Also I missed the deploy uberwar demo.

mynomoto16:09:37

@micha: were you able to find the session issue on castra? Also do you have an example of the html2cljs task?

micha16:09:10

hi mynomoto i'll work on the castra session thing now

micha16:09:01

the html2cljs task?

mynomoto16:09:18

That is supposed to convert html.hl to cljs right? That's what I'm thinking at least

micha16:09:57

like for importing html wireframes and stuff

mynomoto17:09:05

Oh, I'm wrong then. I will try to find what's wrong then. I'm couldn't make html.hl files work yesterday.

micha17:09:40

i think you need to add a <script> tag at the top, before the <html> tag

micha17:09:10

like where the page declaration would go

mynomoto17:09:54

Ok, I will try that now.

mynomoto17:09:04

@micha: you meant adding a <script> on this line and closing in the end of the file? https://github.com/hoplon/demos/blob/hoplon6/async-webinar/src/index.html.hl#L141

mynomoto17:09:25

I tried that and it didn't work

mynomoto17:09:55

java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.String

micha17:09:58

hm that file should parse

micha17:09:03

@mynomoto: this seems to work for me with that file:

micha17:09:13

boot -BP -d hoplon/boot-hoplon -d hoplon -d org.clojure/clojurescript html2cljs -f 

mynomoto17:09:30

@micha: That also works for me. But when I add (html2cljs :file "index.html.hl") before (hoplon) on the dev task I get: `

mynomoto17:09:45

java.io.FileNotFoundException: index.html.hl (No such file or directory)
                                 ...                       
                             io.clj:  229
                           io.clj:   69
                             io.clj:  258
                           io.clj:   69
                             io.clj:  165
                           io.clj:   69
                         io.clj:  102
                                 ...                       
                  clojure.core/apply         core.clj:  632
                  clojure.core/slurp         core.clj: 6653
                                 ...                       
   hoplon.boot-hoplon.impl/html2cljs         impl.clj:   50
                                 ...                       
                  clojure.core/apply         core.clj:  630
               boot.pod/eval-fn-call          pod.clj:  184
                   boot.pod/call-in*          pod.clj:  191
                                 ...                       
                   boot.pod/call-in*          pod.clj:  194
 hoplon.boot-hoplon/eval801/fn/fn/fn  boot_hoplon.clj:  133
      boot.task.built-in/fn/fn/fn/fn     built_in.clj:  171
      boot.task.built-in/fn/fn/fn/fn     built_in.clj:  149
boot.task.built-in/fn/fn/fn/fn/fn/fn     built_in.clj:  230
   boot.task.built-in/fn/fn/fn/fn/fn     built_in.clj:  230
      boot.task.built-in/fn/fn/fn/fn     built_in.clj:  227
                 boot.core/run-tasks         core.clj:  695
                   boot.core/boot/fn         core.clj:  705
 clojure.core/binding-conveyor-fn/fn         core.clj: 1916
                                 ...                       

micha17:09:28

ah right, because it's looking in the filesystem for "index.html.hl", not on the class path

micha17:09:48

that task also just emits to stdout

micha17:09:53

it doesn't write anything

micha17:09:22

you'd use that task by itself and pipe the output to a file

mynomoto17:09:07

I don't use the html syntax at all but that seems like a lot of work for people that need the syntax no? Also the html.hl file cannot be on a input role fileset because it will break the hoplon task if it's there.

micha17:09:33

it should just work automatically

micha17:09:46

like the hoplon task should be able to compile html syntax files just fine

micha17:09:53

as long as they have the .hl extension

micha17:09:59

without the html2cljs task

mynomoto17:09:39

Oh, I misunderstood then. I'm trying to add the html2cljs because it's not working automatically... I get:

java.io.FileNotFoundException: index.html.hl (No such file or directory)
                                 ...                       
                             io.clj:  229
                           io.clj:   69
                             io.clj:  258
                           io.clj:   69
                             io.clj:  165
                           io.clj:   69
                         io.clj:  102
                                 ...                       
                  clojure.core/apply         core.clj:  632
                  clojure.core/slurp         core.clj: 6653
                                 ...                       
   hoplon.boot-hoplon.impl/html2cljs         impl.clj:   50
                                 ...                       
                  clojure.core/apply         core.clj:  630
               boot.pod/eval-fn-call          pod.clj:  184
                   boot.pod/call-in*          pod.clj:  191
                                 ...                       
                   boot.pod/call-in*          pod.clj:  194
 hoplon.boot-hoplon/eval801/fn/fn/fn  boot_hoplon.clj:  133
      boot.task.built-in/fn/fn/fn/fn     built_in.clj:  171
      boot.task.built-in/fn/fn/fn/fn     built_in.clj:  149
boot.task.built-in/fn/fn/fn/fn/fn/fn     built_in.clj:  230
   boot.task.built-in/fn/fn/fn/fn/fn     built_in.clj:  230
      boot.task.built-in/fn/fn/fn/fn     built_in.clj:  227
                 boot.core/run-tasks         core.clj:  695
                   boot.core/boot/fn         core.clj:  705
 clojure.core/binding-conveyor-fn/fn         core.clj: 1916
                                 ...                       

mynomoto17:09:45

without it.

mynomoto17:09:27

Sorry, I meant:

Compiling Hoplon pages...
• index.html.hl
java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.String
 hoplon.boot-hoplon.compiler/read-string-1     compiler.clj:   32
hoplon.boot-hoplon.compiler/compile-string     compiler.clj:  120
                                       ...                       
                        clojure.core/apply         core.clj:  632
  hoplon.boot-hoplon.compiler/compile-file     compiler.clj:  132
                                       ...                       
            hoplon.boot-hoplon.impl/hoplon         impl.clj:   46
                                       ...                       
                        clojure.core/apply         core.clj:  630
                     boot.pod/eval-fn-call          pod.clj:  184
                         boot.pod/call-in*          pod.clj:  191
                                       ...                       
                         boot.pod/call-in*          pod.clj:  194
       hoplon.boot-hoplon/eval762/fn/fn/fn  boot_hoplon.clj:  124
            boot.task.built-in/fn/fn/fn/fn     built_in.clj:  149
      boot.task.built-in/fn/fn/fn/fn/fn/fn     built_in.clj:  230
         boot.task.built-in/fn/fn/fn/fn/fn     built_in.clj:  230
            boot.task.built-in/fn/fn/fn/fn     built_in.clj:  227
                       boot.core/run-tasks         core.clj:  695
                         boot.core/boot/fn         core.clj:  705
       clojure.core/binding-conveyor-fn/fn         core.clj: 1916

micha17:09:40

i can debug this

micha17:09:12

@mynomoto: i just pushed boot-hoplon 0.1.10

micha17:09:16

fixes that issue

mynomoto18:09:04

Thanks! I'm trying it now.

micha18:09:26

that was a boner on my part, sorry about that

mynomoto18:09:56

Np, I like how thing are simpler now.

micha18:09:11

yeah me too

micha18:09:25

hopefully we can continue to simplify

micha18:09:11

we still need a way to deal with 3rd party css

micha18:09:54

hopefully the :manifest can be used there to automate on the consumer end

micha18:09:21

debugging the session issue

mynomoto18:09:07

I'm using bower with sassc when I need css deps, it could be worse. Also I'm trying to inline all styles. I was more sure about including css before, but still see the value.

micha18:09:46

when you say "inline all styles" you mean like css on elements?

micha20:09:46

@mynomoto: i see the issue with castra-chat session

mynomoto20:09:53

Sorry about that

micha20:09:50

ahah iimsse di toto

micha20:09:33

i mean "i missed it too"

micha20:09:44

my computer went crazy there for a minute

mynomoto21:09:53

Looked like latin 😉

xificurC21:09:58

boot.task.built-in/fn/fn/fn/fn/fn/fn waaaat

micha21:09:26

that's anonymous fns, a few deep

xificurC21:09:40

inception taken to the next level

xificurC21:09:50

@micha: yeah thought so

xificurC21:09:58

I have no idea how to debug in clj(s) yet

xificurC21:09:49

the stacktraces are crazy. I'm used to VBA debugging where you can step through code, put in breakpoints, watches, see and inspect the value of all variables, change them etc

micha21:09:35

have you tried Cursive?

micha21:09:53

it has some pretty sophisticated debugging facilities

xificurC21:09:02

no as I heard it's free for now but won't be in the future

micha21:09:18

it's worth the investment i'm sure

xificurC21:09:29

you said you use vim

micha21:09:38

yeah i have a primitive setup

xificurC21:09:52

so how do you debug

micha21:09:56

a lot of momentum behind my backwardness

micha21:09:37

i usually insert a printf strategically

micha21:09:48

shh don't tell anyone

micha21:09:21

the repl helps too

micha21:09:59

it helps that you can edit jars in place with vim

xificurC21:09:00

ah yeah, good old spy

xificurC21:09:49

well when I think about it, looking strictly at debugging, the REPL is like a poor man's IDE

xificurC21:09:05

you don't get the stuff I mentioned previously

micha21:09:11

and vice versa

xificurC21:09:29

true but you can have both

micha21:09:37

languages that have good ides usually don't have any way to do repl stuff

micha21:09:55

yeah i think Cursive is the both you're looking for

xificurC21:09:19

would it be that hard to build an interactive debugger library for clojure?

micha21:09:27

you can definitely set breakpoints and watch expressions and all that

micha21:09:40

yeah it involves a lot of static analysis

xificurC21:09:13

cursive is unlikely, I'm too set in my ways and when it comes to lisp I feel this sorrow anytime I'd have to leave emacs

micha21:09:20

lisp is great at abstraction, but not very friendly to debuggers

xificurC21:09:24

I'd trade it for a modern lisp IDE

xificurC21:09:53

playing around with spacemacs right now, that project is very promising

micha21:09:59

have you tried using java debuggers with it?

micha21:09:25

you can do profiling etc. with tools like visualvm

xificurC21:09:43

to be honest I talk a lot but don't code that much. I mean look at me I'm here for a month and all I did is the markdown editor, which is like 50 loc

xificurC21:09:10

I'm tired after my workday and busy during weekend

micha21:09:19

i hear ya

xificurC21:09:33

I'd love to have a clj(s) job

xificurC21:09:47

I know I would be good simple_smile

xificurC21:09:05

don't think there's many jobs here in Slovakia though

micha21:09:05

there are more and more of them, luckily

xificurC21:09:47

here it's just java java java c# java python java java java

micha21:09:04

clojure is almost java

micha21:09:10

someone will sneak it in there

xificurC21:09:32

java is probably so verbose you need many many devs

xificurC21:09:11

1 line of clojure = 20 lines of java, so you only need 1 clojure dev and 20 java devs simple_smile

micha21:09:18

it's true

micha21:09:27

and architects

xificurC21:09:32

good for the company, not for us

micha21:09:37

to design the hundreds of classes you will need

micha21:09:46

diagrams and things

xificurC21:09:02

which app was it that had 200k obj-c classes

micha21:09:38

lol what?

micha21:09:46

that's incredible

xificurC21:09:41

I read it on reddit

xificurC21:09:50

long time ago. Which means I won't find it now 😞

micha21:09:58

well i believe it

micha21:09:41

i bet mostly generated from templates by some scaffolding tool

xificurC21:09:06

well I lied to you, twice

xificurC21:09:10

1. I found it

xificurC21:09:25

2. it's only 18k

xificurC21:09:44

FBEventUpdateNotificationSubscriptionLevelMutationOptimisticPayloadFactoryProtocol-Protocol.h

xificurC21:09:16

I'll stop spamming now simple_smile Isn't it fun though? From the creators of react 😛

mynomoto22:09:34

Hoplon demos updates on branch hoplon6: Everything except jquery-date-picker and jquery-selectize should work with hoplon "6.0.0-alpha10". There are some bugs on territory-builder and I don't know the current spell to create a uberwar on the deploy-uberwar demo.

micha23:09:53

mynomoto: awesome!

micha23:09:14

big ups and !m