Fork me on GitHub
#hoplon
<
2015-09-15
>
mynomoto00:09:30

Wow! New site is already live!

alandipert00:09:14

hehe almost! workin on a few bugs, then adding a demo or two

alandipert00:09:02

will make official announcement once our new logo is in place simple_smile

mynomoto00:09:39

Deployed new project templates for Hoplon and Castra using boot2 and Hoplon6 / Castra3

alandipert01:09:16

has anyone made an emacs derived-mode for cljs.hl yet?

alandipert01:09:29

e.g. cljs + page and the HTML5 elements

alandipert01:09:48

@mynomoto: is nubank where you work? just saw the cognitect whitepaper about datomic use, sounds really cool

mynomoto01:09:42

@alandipert: yeap, datomic is amazing. Some colleagues will be presenting more about our use of it with Spark and Kafka at Strangeloop

alandipert01:09:10

neat! i wish i was going to that

mynomoto01:09:25

me too 😉

alandipert12:09:12

@statonjr: hey, welcome 😄

statonjr12:09:02

Watching Micha’s ClojuTRE talk. Pretty good.

alandipert12:09:46

nice! yeah i listened to a bunch last night, i really like the 20 minute length

alandipert12:09:29

btw as a newcomer, your thoughts on the new http://hoplon.io/, particularly the tone, copy, and demos - would be extremely valuable!

alandipert12:09:54

unfortunately many of the links point to empty wiki pages, but we're workin on it

statonjr12:09:12

I’ll take a look. I’ve been trying to get our team to buy-in to Hoplon for some SPAs. Maybe this new site and documentation will help.

alandipert12:09:37

you are in charlotte, right? have we met? i want to say we've met at a triclojure but i can't remember 😦

statonjr12:09:29

Yes, I’m in Charlotte. We met at a Conj. I don’t remember which one. I’ll be at Strange Loop and the Conj in Philly and would love to catch up.

alandipert13:09:13

cool, maybe it was the first one... unfortunately i'm not going to either of those 😞 but i imagine we'll definitely cross paths agani

upgradingdave13:09:42

Hi @alandipert, new site is looking very nice. As a newcomer, when I read the timer example, I stopped to think about whether the cell gets reused or whether each timer element gets a separate cell. Maybe something like this might make it clearer:

upgradingdave13:09:30

(but also, totally just a nit-picky suggestion and I think it’s totally fine as is!)

alandipert13:09:32

i had something like that for the todo app where a (let [n (cell 0)] (defn todo ...)) and then each app showed which # it was and of how many instances

alandipert13:09:00

but i like your example much more

alandipert13:09:27

it's definitely important to show that instances can maintain local state independently

alandipert13:09:44

so yeah pls PR simple_smile

upgradingdave13:09:57

ok, cool, glad to help

upgradingdave13:09:26

I’m working thru getting the jquery fileupload plugin to work as hoplon element. And taking notes as I go. It’s been a good learning experience to understand how hoplon works, how boot works, and how cljsjs fits into the picture. I’m taking notes and so I’ll try to get it into shape for the wiki

upgradingdave13:09:55

but might take me a while, haha

upgradingdave13:09:25

such cool stuff though, thanks again for all of your guys work on all this

onetom15:09:04

upgradingdave: it's nice that you are trying to integrate the fileupload plugin. do u know http://filepicker.io ? we are just using that with our hoplon apps (though i havent personally checked if it broke since we upgraded to the latest hoplon6...)

upgradingdave15:09:43

that looks nice, thanks for the heads up @onetom.

upgradingdave15:09:10

but for now, i’m just playing/tinkering. I maybe want to build a really small app so my parents can upload pics of my kids into my s3 bucket and since I’m familiar with jquery fileupload from life before clojurescript, I decided to run with it

upgradingdave15:09:11

isn't amazing though that file chooser/upload in webapps in general is such a pain?!

upgradingdave15:09:42

it’s really encouraging to think that eventually it’ll be possible to have a fileupload hoplon component that I can just drop in whenever needed 😉

onetom15:09:43

true, but filepicker just offers so much more out of the box and it took a few minutes for my colleagues to hook it in and they didnt even have a lot of web programming experience really... i would really recommend to do the proof of concept w filepicker and replace w the jq plugin (if u still feel it necessary 😉

onetom15:09:59

just saying to promote lean thinking really...

onetom15:09:04

@mynomoto: i saw a talk about kafka + samsa a few months ago. i had the feeling it was a competing model to datomic. im surprised to hear about datomic + kafka... let us know when the talk goes online!

flyboarder16:09:33

@alandipert: nice work on the new site, the demo's already look slick

onetom16:09:35

@alandipert: i saw your FOUC fix. does it mean it's clear to you why is it happening? my suspicion is that there is some flashing when hoplon replaces the content of the head and keep adding the link elements. just basing the visibility of the body elem on the initial loading order of the pre-rendered html page might be not enough to completely get rid of FOUC.

onetom16:09:42

imean your fix might avoid 1 flash, but im afraid i've experienced 2 flashes actually

onetom16:09:46

and the next funny thing we are experiencing is some kind of a memory leak which leads to high cpu usage. i will attack it with a divide and conquer later if there is anything to learn from it. (i just got a bit sick lately thats why i went a bit silent) and of course the new site is awesome indeed!

onetom16:09:58

the other day i tried to create a custom menu element, but the menu element is already defined. how can i redefine it within a .hl file without triggering a compilation warning?

flyboarder16:09:35

@onetom: (:refer-hoplon :exclude [menu])

onetom16:09:05

flyboarder: damnit, i forgot that 😞 thx!

flyboarder16:09:09

in the namespace of course 😛

flyboarder16:09:21

hoplon is really slick in that most of the issues i run into have already been solved, that was one I faced last week

onetom16:09:02

i agree. and i actually read a lot of its source and i understand quite a lot of the hoplon.cljs too, but not the .clj

onetom16:09:49

sure, but i want to do a (defelem menu ...)

flyboarder16:09:23

then I think my first suggestion would be the way to go..... still a n00b at this tho 😛

onetom16:09:15

sure. thx for the reminder again!

flyboarder16:09:01

@alandipert: should the hoplon boot task not compile source files and move to target if there is no additional handler?

flyboarder16:09:30

I had to add an additional task to compile my hl components if I want them in a separate lib

onetom16:09:00

i would be interested in the answer too. i just came up again today amongst us

onetom16:09:50

so u package the compiled version?

flyboarder16:09:54

it seems if cljs is not in the task then the files are left in the source type and not moved to target

flyboarder16:09:23

yeah but it's still just as cljs so it doesnt need the dep's except in the project whil compiles everything to js

flyboarder16:09:09

this is obviously due to my background in php and how things work with composer

flyboarder16:09:43

@alandipert @micha : is there a proper way to package hl in a separate ns?

xificurC20:09:15

I was thinking about this lately - would it make sense to complete the coverage and build css into hoplon? Right now .hl files compile to html and js, the last piece missing is css

xificurC20:09:22

cljs compiler solves the js part, hlisp solves html, but we don't have anything simple to solve css

xificurC20:09:09

and when I played around with basscss which uses some css compilers to support variables, custom media queries etc, that's seems so simple to implement. I mean the whole thing brings in one big css file with lots of cool definitions you might use, which is great. But if we bring lisp and hoplon in the picture one could just define the props/attributes of the DOM element directly and get inline defs or separate css files compiled. Which could be pretty small, depending on what you used, i.e. each page could have a separate, tiny css file associated to it

flyboarder20:09:09

@xifi : I was thinking about how to solve this the other day, there are a few problems I see: 1. Compiler now needs to know about the css asset files

flyboarder20:09:55

2. How should 3rd party libs include css

xificurC20:09:26

hi @flyboarder simple_smile 1 - I don't understand. The compiler works like so: input - index.cljs.hl -> output - index.html and index.js. What I was talking about would be (possibly) adding another output file, index.css

xificurC20:09:26

2 - 3rd party libs can't include the generated hoplon js files either, can they. If I understand correctly this isn't really a goal of hoplon

flyboarder20:09:23

oh i see I miss understood your direction, i believe you are correct there isnt an intended way to package hoplon components it can be done with the task above

alandipert20:09:59

micha has a plan for how to do this

alandipert20:09:20

basically we will wrap all CSS in a cljs namespace, probably a generated one

xificurC20:09:26

@alandipert: out of curiosity what are you using right now at work?

alandipert20:09:38

in the top level of the namespace is some code that dynamically adds a stylesheet. so when you require one of these wrapper NSes, you get the CSS

alandipert20:09:52

@xifi: scss from our designer

alandipert20:09:25

but yeah we want to solve the problem, because without a system for transitive dependencies that interops with cljs we can't package styles alongside programs really

alandipert20:09:45

so micha's idea is a kind of cljsjs style approach w/ the ns wrapper, that would allow for transitive dependencies

alandipert20:09:00

themes could be packaged as separate jars, etc

xificurC20:09:58

what would the underlying data be? hlisp generates DOM elements, but you don't have a CSS object in the DOM (or js) do you

xificurC20:09:57

or maybe I'm misunderstanding simple_smile

alandipert20:09:00

well, tehre are kind of 2 open things around CSS... one is interop and packaging of existing CSS

alandipert20:09:24

this is what would allow things like packing jquery plugin assets

alandipert20:09:39

and themes for 3rd party css systems like foundation, bootstrap

alandipert20:09:51

more or less a cljsjs type thing except for css

alandipert20:09:59

then there is the actual CSS problem

alandipert20:09:08

which is identifying what exactly sucks so much about CSS and how can we do better

alandipert20:09:34

we know CSS in the end is just properties on DOM objects, and we know lisp can do it, but the exact answer isn't yet clear

xificurC20:09:48

the more I play with html and read stuff I fail to see the advantages the separation of html and css has brought

alandipert20:09:59

yeah there is no advantage

alandipert21:09:07

not since HTML was no longer for just documents

xificurC21:09:42

to be honest the html part could be dropped as well 😄

alandipert21:09:45

but it's not obvious whta's best, at least not to me

alandipert21:09:35

hehe i'm at peace with the dom

alandipert21:09:41

now that it's lisp anyway

alandipert21:09:56

and browsers are just views into the heap of my lisp program

flyboarder21:09:58

browser which readls hlisp documents instead of html simple_smile

xificurC21:09:18

yeah the dom isn't that bad. Limited but (h)lisp solves that

xificurC21:09:40

I was pretty frustrated though when I started working on a very simple example project and wanted to put 2 things side-by-side, 50/50 and then spent 3 days learning about css until picking a library like basscss to do the heavy lifting for me

xificurC21:09:46

people on the clojurescript channel had ideas, but all were different 😄 "Use float", "Use flexbox", "Use inline-block", ...

xificurC21:09:02

and I was like what are those words you guys say

xificurC21:09:13

I just want (div :layout (grid 1 2) (div :position "50%" "one") (div :position "50%" "two"))

alandipert21:09:16

yeah we have the beginnings of nice interface design tooling, but that stuff is really hard to build

xificurC21:09:35

or something like that, that is just off the top of my head. Something simple

alandipert21:09:09

and pre-configured integrations with firebase etc

xificurC21:09:10

visual basic as in what

xificurC21:09:22

a UI to build the page?

alandipert21:09:23

the visual basic form designer

alandipert21:09:01

in the past, before cells, there wasn't really a good way to wire pieces of the page together

alandipert21:09:35

the last time i used XCode it had a slick designer but it was never really usable because the underlying relationships were not managed

alandipert21:09:44

so everyone had to code their interfaces by hand anyway

alandipert21:09:17

but elements, through cells, can have a pretty clean interface to other elements

alandipert21:09:27

i imagine using a visual interface designer that doesn't make a mess

alandipert21:09:50

like builds relationships between elements that are totally tractable and can be extended via code, instead of scrapped and re-hand coded

xificurC21:09:36

I understand the problem to be solved (layour and styles) is quite complex

xificurC21:09:57

anything that abstracts it to something smarter would be a step in the right direction

xificurC21:09:38

it's funny how stuff in life works if you think about it. JS rules the browser and it's not very bad, but it's no holy grail either. So people build abstractions on top of it that compiles down to it. Now I'm talking about the same for CSS. Crappy things rule the world so we abstract over them so the next person won't scratch his/her eyes out

xificurC21:09:25

I don't even want to count how many layers are we atop of assembly right now

flyboarder21:09:51

well imho there should be more investigation into lisp machines for that reason

flyboarder21:09:21

have you seen Plan9?

xificurC21:09:44

this is the reason I didn't come and play with html for the last 2 years, I find it a real mess simple_smile

xificurC21:09:09

@flyboarder: unable to connect

flyboarder21:09:21

moves much needed thread namespaces around, more lisp

flyboarder21:09:42

i was reffering to the whole abstraction thing, we dont even run applications correctly, and for that matter we dont run kernels well either, you can trace the whole stack and the abstraction is terrible for much of the way down

flyboarder21:09:59

oh poor the page is down right now 😞

xificurC21:09:50

the mirror is up though

flyboarder21:09:49

@xifi: this was the actual part that relates to the conversation

xificurC21:09:01

@flyboarder: didn't get too much from that ,sorry

xificurC21:09:34

@alandipert: thanks for the discourse link. Reading through it (and some of the links) there's many paths one can take simple_smile

xificurC21:09:23

From my simplistic POV wrapping on top of flexbox might be a simple and nice option

alandipert22:09:30

@xifi: no prob! if you have success with something i'd be curious to hear about it