Fork me on GitHub
#clojurescript
<
2015-07-03
>
mikethompson04:07:31

Regarding the tangled relationship between HTML, CSS and js: https://speakerdeck.com/chantastic/inline-styles-react-europe?slide=9 Via Clojurescript/Reagent it appears I'm living in the future. And that it will be insanely popular.

Petrus Theron11:07:47

How do I change the port that boot runs on when I run boot dev? I see serve is defined as (deftask ...) with a port option, but I can't figure out where in boot.build to put the port.

Petrus Theron11:07:16

Figured it out: need to run it as (serve :port <port-number>) in build.boot. However, now I am getting an out of memory error when I run boot dev: java.lang.OutOfMemoryError: PermGen space ... Exception in thread "main"

Petrus Theron11:07:57

Fixed: updated my JVM options and learned that export is specific to the current terminal...

escherize12:07:36

hey @mikethompson what can :md-icon-name be? and where did the md- prefix come from

escherize12:07:47

i.e. md-add etc

mikethompson12:07:18

Ahh. Looks as if the author of that icon font has updated it to use names that start with zmdi- .. it used to be md-

mikethompson12:07:49

md- prefix is an abbreviation of material design

mikethompson13:07:00

Right, so after a bit of poking around. That website is now all about v2.x of the icon font. re-com is still using version v1.x. Some docs about the old v1.x names here: http://zavoloklom.github.io/material-design-iconic-font/v1/

stephen13:07:23

What's the best leiningen template to use to get an Om project started?

stephen13:07:47

I normally use Chestnut - but this time I don't want any server components included..

stephen13:07:16

Great thanks, with an option to include Om as well.. Looks like it is being maintained as well.

stephen13:07:39

There's too many lein templates about.. it gets confusing..

dnolen14:07:53

@stephen: heh it’s true, I’ve just deprecated all my templates except for the standard mies one

stephen14:07:00

What I would really like would be some kind of componentised template mechanism, so I could choose multiple templates to merge into my project.

stephen14:07:58

Something like : lein new om:figwheel:bidi:ring:rethink

stephen14:07:37

That ring actually being : ring :...

andrea.crotti14:07:40

@stephen: well all the templates are handmade now so that would not really be possible

andrea.crotti14:07:58

but I've heard that boot plugins compose better

stephen14:07:24

Interesting. I've not really looked into boot yet..

andrewmcveigh14:07:55

I think boot is looking promising for cljs

andrewmcveigh14:07:14

Much easier than messing around with lein-cljsbuild

dnolen14:07:15

@stephen: it’s not clear to me how you could ever arbitrarily compose different templates bits as they often imply different api calls, different initial side effects.

tcrayford14:07:15

I kinda think templates are a pretty bad idea for reasons like that, and the fact that when the template changes, what do you do to your 10k line production app that's mutated bits of it simple_smile

dnolen14:07:17

@stephen: as far as templates, what have you seen that’s popular beyond mies, chestnut, and figwheel?

stephen14:07:40

I guess composable templates would need to be set up differently to reduce conflicts..

andrea.crotti14:07:12

like every auto generated code templates are in general evil

andrea.crotti14:07:21

useful in the beginning to get started

stephen14:07:36

I came across one the other day... darn it forgot which one it was.. but I would have liked to have merged it in to my chestnut project..

stephen14:07:57

Instead I created a new project and just copied the bits over by hand..

stephen14:07:50

Ah yes it was one for Component.

stephen14:07:42

I could use its template to create the server, but then I missed out on all the cljs setup..

escherize15:07:45

can't talk about web app templates without mentioning http://luminusweb.net

escherize15:07:46

lein new luminus kitchen-sink +postgres +aleph +auth +cljs +cucumber +swagger +sassc

sooheon15:07:49

@escherize: I missed your cljs/d3 stream. Have you looked into saving videos somehow?

samueldev15:07:05

I broadcast there a bit. It archives all of your broadcasts

samueldev15:07:09

its twitch for live coding

bhauman15:07:05

templates are really much better at demonstrating how things are setup and wired together, they have a lot of value as such, in this sense the shallower and simpler the better

dnolen15:07:02

Figwheel REPL inside of Cursive rocks, I’ve added some new simple instructions get it working https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL

bhauman15:07:01

hmmm maybe I should adjust the template .....

bhauman15:07:50

@dnolen: does it work with the figwheel deps in :profiles {:dev {:dependencies ?

dnolen15:07:51

how to accomplish the same thing with Emacs + inf-clojure

dnolen15:07:18

@bhauman: yes I suspect that will work! feel free to tweak that part.

bhauman15:07:59

dnolen: one thing to note with this setup is that leinigen :profile merging won't happen. But a simple solution is for folks to explicitly inline their build config.

dnolen15:07:39

@bhauman: I don’t know what you mean, but I don’t really use Leiningen for app development

dnolen15:07:56

so I defer to whatever the best practice actually is

bhauman15:07:07

No worries I'm creating a note in the Wiki

dnolen15:07:49

figwheel really has the best 0-60 ClojureScript story, great work @bhauman!

bhauman15:07:24

wow thanks!

bhauman15:07:09

A working devcards is coming. That's hopefully going to be like 0-100.

dnolen15:07:18

haha looking forward to hearing more about that

bhauman15:07:34

@dnolen: actually have you played with embedding an om/root into a larger React app?

bhauman15:07:58

@dnolen: I'm doing it now with a raw dom node

dnolen16:07:19

@bhauman: haven’t tried that myself no

bhauman16:07:43

@dnolen: well you may be happy to know that you can om inside a ReactElement the same way that you can canvas or do anything else. Pretty cool actually says alot for React.

malcolmsparks16:07:52

@stephen: that's really what I've been trying to do with http://modularity.org - templates are evil, but if what they generate is itself infinitely recomposeable they are less evil (perhaps?)

malcolmsparks16:07:59

templates are composed of modules which are composed of components, so the whole thing lends itself to the a la carte approach you're asking for, but I haven't actually written the menu system yet

malcolmsparks16:07:07

it's all data driven too

dnolen16:07:00

@malcolmsparks: interesting would like to see how that translates to ClojureScript applications, esp. Om/Reagent and tooling integration (browser REPL/figwheel)

dnolen16:07:32

it’s definitely either a manual affair or a template thing that doesn’t really compose as you say

malcolmsparks16:07:51

@danielsz is doing a similar thing, and is doing interesting things with boot

malcolmsparks16:07:19

everything in cljs is moving so fast, will be good when the dust settles a bit and we can think about composeable tooling

danielsz16:07:22

malcolmsparks: hi, and thanks for the mention. I appreciate it.

danielsz16:07:29

malcolmsparks: BTW, I’ve included a compatibility note on system’s README. I think it’s important to let users know they can mix and combine.

cfleming16:07:02

@dnolen: Awesome, thanks for that doc, I've been meaning to write it up based on jackjames' gist

dnolen16:07:21

@cfleming: yeah I found his gist and just put this together. figwheel + Cursive just seems like an obvious combo.

danielsz16:07:06

To get a feel for the dev experience you get when working with boot, there’s a tutorial + video @ https://github.com/danielsz/holygrail

danielsz16:07:35

Let me know if there’s anything I can do to help explain or clarify.

cfleming16:07:15

@dnolen: No doubt! I'm planning to add a built-in CLJS REPL based on these configs Real Soon Now. That'll mean I can do the cljs.test integration too.

malcolmsparks16:07:37

@danielsz: good stuff, I just learned about leaven and bakery from that

malcolmsparks16:07:29

you're doing great stuff there, because really what everyone wants is the whole stack - om-next - graph-query - back-end - with tooling, and recomposeable at will

malcolmsparks16:07:57

the cljs part of that is key

malcolmsparks16:07:11

who wants a stack that doesn't include cljs these days?

jackjames16:07:32

the old refheap link is still pinned here and should prob be swapped out for the new figwheel wiki link. not sure if you pinned that @cfleming or if there is a Person In Charge of Pinning?

cfleming16:07:08

@jackjames it must have been the PICoP, it wasn't me

danielsz16:07:05

@malcolmsparks: Absolutely. In my opinion, Boot embodies Leiningen’s lessons learnt.

danielsz16:07:24

Everything needs to run under 1 JVM.

danielsz16:07:55

The proliferation of JVM instances when developing is not acceptable anymore. Building on what Leiningen taught us, Boot was designed to tackle the quirks of the JVM toolchain and the practicalities of the Clojure ecosystem.

dnolen16:07:37

@danielsz: I don’t actually have a real problem with running multiple JVMs especially on modern hardware. Still it’s nice to have a 1 JVM option I admit.

danielsz16:07:35

@dnolen: I’d probably do a disservice to Boot if I emphasize the 1 JVM instance too much. That’s just something that comes with the design, as a benefit. At its heart, it’s a rethinking of what a toolchain is and how to interface with one.

dnolen16:07:32

right, I think agree that boots benefits are not really about 1 JVM

dnolen16:07:45

I regularly work on several projects at the same time with 7-8 JVMs running

dnolen16:07:50

it's just not something I care about

danielsz16:07:59

Nice for you!

dnolen17:07:39

@danielsz: haha, yes that’s what I meant by it’s a hardware thing. But that’s where things have been and continue to head.

cfleming17:07:20

@dnolen: I’m in the same boat as you - I just busted my work machine, and any emergency building over the next week or so will be on a 2009-ish MBA 😞

dnolen17:07:26

got my new 12” MacBook yesterday actually 😄

escherize17:07:35

so clicky, feels good. what color, @dnolen

cfleming17:07:01

Oh nice, I’m keen to know what that’s like to develop on.

cfleming17:07:10

Sooner or later I’ll convince myself I need one.

dnolen17:07:25

@cfleming: it’s not a very fast machine, but I’ve come to appreciate that.

danielsz17:07:32

@dnolen: You won’t be running 8 JVM instances on that one. simple_smile

escherize17:07:33

have the non-backlit keys bothered you at all?

dnolen17:07:33

beyond that it rocks.

dnolen17:07:44

@danielsz: lol no I won't

cfleming17:07:03

Oh, non-backlit keys is a bummer - I thought they’d have learned that lesson

dnolen17:07:56

@escherize: honestly the only thing that really annoys me is the lack of sleeping indicator and the lack of indicator light on the power plug

escherize17:07:36

oh yeah, usbc. that's so cool :O

escherize17:07:11

docking stations are going to be everywhere, I can't wait

dnolen17:07:22

@cfleming: it runs IntelliJ/Cursive great, much better than my last machine.

cfleming17:07:01

@dnolen: Yeah, but your last machine was more or less an Apple ][, right? simple_smile

dnolen17:07:14

haha basically

cfleming17:07:45

Still, that’s good to know. I’ll probably always need an MBP to run two instances of IntelliJ + Cursive and debug them.

dnolen17:07:40

@bhauman: gonna be at TXJS this month. Will probably demo Figwheel + Cursive, show these JS React Hot Loader whippersnappers a thing or two 😄