Fork me on GitHub
#hoplon
<
2016-12-12
>
flyboarder01:12:26

@mynomoto what is wrong with just changing the hoplon files to .cljc??

flyboarder01:12:55

from what I have been reading only the macro's that use java interop will be a problem, and I dont think there are any.

jondejung02:12:12

@flyboarder Could You aid me through a beanstalk issue I'm having?

flyboarder02:12:30

possibly whats up?

jondejung02:12:20

boot beanstalk -l clojure.lang.ExceptionInfo: No implementation of method: :file of protocol: #'boot.tmpdir/ITmpFile found for class: nil

alandipert02:12:07

@flyboarder enjoyed the article. Tho afaik typed clojure doesn't work with cljs

alandipert02:12:51

@jondejung I think we fixed that bug in a recent version

jondejung02:12:23

Oh, I Must have an outdated version

alandipert02:12:58

I might be misremembering. So here's hoping 😃

mynomoto02:12:27

@flyboarder there are some at least. The text macro being the main one iirc.

flyboarder02:12:57

yeah looks like it's only that one tho, I dont see javelin actually using it's call to http://clojure.java.io

flyboarder02:12:58

but it's required

flyboarder02:12:36

So now I am confused, javelin.core.clj references cljs namespaces????

flyboarder02:12:45

in functions

alandipert02:12:37

There's a cljc branch of javelin, you can see what I did

alandipert02:12:15

I was not pleased with cljc for the macros ns, 2 files is better imo

alandipert02:12:30

Or at least, use cljc only in ns

alandipert02:12:30

Err, to be clearer, don't go overboard with cljc or Micha won't merge it. I think he was ok with it in the ns tho

thedavidmeister05:12:45

for breakpointy things

thedavidmeister05:12:53

tracking the viewport width with a prop cell

thedavidmeister05:12:03

or binding to the resize event

flyboarder05:12:54

@thedavidmeister resize event I would think

flyboarder05:12:16

@alandipert @micha I got pretty far with the self-hosting but much of the problem is the amount of cljs referenced from clojure code in non macro's

flyboarder05:12:34

specifically in javelin, hoplon can easily be fixed

onetom05:12:37

@nux hey, that hoplon-layouts was just a personal weekend exploration really. im still using it though as a sandbox setup to experiment with hoplon or debug hoplon. if you need help with it, just ping me here, im happy to even screen share and do a bit of pair programming

thedavidmeister05:12:02

@flyboarder know of anything off-the-shelf for hoplon for breakpoints?

thedavidmeister05:12:17

no big deal if not, just seems like something many people would want

flyboarder05:12:29

like css breakpoints?

thedavidmeister05:12:10

yeah, like css breakpoints

thedavidmeister05:12:31

great, thanks 🙂

thedavidmeister05:12:02

i’ve got my garden cross compiling, so hopefully i can have the same breakpoints in css and javelin

neupsh15:12:38

@onetom thanks, it will probably be sometime before i get time but i will definitely reach out to you when i start on it.

jjttjj16:12:16

Only slightly hoplon related, but does anyone have any thoughts on when D3 is needed or when [hoplon.]svg is sufficient? I'm attempting to make a kinda fully featured stock chart thingy. I've never worked with SVG at all before but was kinda pleased with my progress messing around with hoplon.svg for a few hours. But now that I'm starting to think about more complicated stuff (like scaling axis, etc), it all seems doable with straight SVG but I'm wondering if I'd be better off just working with D3 from the begining for some reasons I'm missing?

dm316:12:03

I tried using Vega but ran into composability issues

dm316:12:12

Vega is based on d3

dm316:12:44

the idea was to compose clojure code and get out a chart spec which is then rendered by Vega

dm316:12:53

we ended up with Gnuplot

jjttjj16:12:14

cool thanks. I kinda have to stay in the browser. I'll probably just see how far I can get with hoplon.SVG alone

micha16:12:14

some of the useful things about d3 are the statistical functions

micha16:12:19

timeseries stuff etc

jumblerg16:12:51

@thedavidmeister: you should be able to use the breakpoint fn in hoplon ui without the rest of it.

jumblerg16:12:49

it returns a formula cell that contains one of the values you passed in based on the viewport size.

candera16:12:45

@jjttjj Not really direct advice, but my rule of thumb on “roll your own” vs “reuse” is a heuristic having to do with how core the thing you’re building is to your business. If it’s truly at the heart of your business, generally the work invested in building something custom will pay off. E.g. an accounting firm building an accounting system vs. a gaming company building an accounting system.

candera16:12:58

But the flip side of that is that it will be expensive.

jjttjj17:12:12

thanks for the tips everyone

jumblerg17:12:41

a breakpoint function like this is much more powerful than a css media query or grid system because you can use it interchangeably with anything that takes a value in hoplon and specify any number of viewport sizes. https://github.com/hoplon/ui/blob/master/src/hoplon/ui.cljs#L573-L582

jumblerg17:12:29

@micha: maybe we should pull this or some variant of it into hoplon core since there's nothing ui specific about it.

micha17:12:40

sounds legit yeah

jumblerg17:12:59

it should probably also borrow from/incorporate case-tpl when passed elements so it will cache when used with kids.

jumblerg17:12:07

@micha: with your latest javelin update, the ui test page scripting took 881ms.

jumblerg17:12:22

the entire page loaded and rendered in a second.

dm317:12:03

is that faster?

micha17:12:39

i think it was around 1.5s before

alandipert17:12:00

i feel kinda bad that we left the immutable priority map in there for so long

jumblerg17:12:05

without the css selector nonsense, the page loads like a desktop app.

alandipert17:12:24

immutable aka slow

jumblerg17:12:27

boom. everything is there.

jumblerg17:12:28

it will be even faster with the next major ui push, which cuts the number of generated elements in half and eliminates the memory overhead associated with using ui.

jumblerg17:12:37

in fact, i think the ui lib will generate significantly fewer elements than an equivalent bootstrap application.

dm318:12:30

wow, that looks great!

micha21:12:12

how's the life?

donmullen21:12:27

Pretty good, you? I’ve been off-the-grid (literally) most of the summer - learning permaculture and deep-nature stuff - was great. Going to be spinning up a very simple site for Tammi’s new real estate firm — using hoplon of course 🙂.

micha21:12:58

that sounds awesome!

micha21:12:50

we started composting at my house

micha21:12:55

not quite as exciting

donmullen21:12:57

So expect some questions on the channel as I relearn the latest!

donmullen21:12:53

Yea - at Earthaven (330 acres with solor / micro-hydro)- they do humanure 🙂

micha21:12:21

we are only composting uneaten food 🙂

meeli22:12:51

@donmullen thanks for the repost!

meeli22:12:10

@donmullen also permaculture is cool - we dabble in aquaponics #nerdlife

donmullen22:12:00

@meeli excellent - lots of interesting things happening in aquaponics. My interest has taken me to mushroom cultivation - especially medicinals. Should be interesting.

meeli22:12:18

@donmullen ooh awesome. i grew some oyster mushroom once - they are really good if you pickle them - http://www.seriouseats.com/recipes/2012/01/pickled-oyster-mushrooms-recipe.html

thedavidmeister22:12:19

@jumblerg ah cheers, i ended up doing something similar

thedavidmeister22:12:29

i have a base config for my breakpoints

thedavidmeister22:12:44

then a macro that converts them to garden/media queries

thedavidmeister22:12:07

and a function that creates a cell with a set of all the currently valid breakpoints

alandipert22:12:39

@donmullen @meeli wow, that's a really awesome and comprehensive article!