Fork me on GitHub
#hoplon
<
2015-11-14
>
onetom02:11:24

it was not a critique of the change, just an example of the cost of a change, to argue against "light heartedly" introducing capabilities, like this simpler get "syntax"

thedavidmeister06:11:13

@onetom: sure, all of that makes sense. I’ve written enough documentation/helper functions that have been equally abused and ignored enough to understand the reluctance

thedavidmeister06:11:40

deliberately restricting common programming techniques in a particular domain, like “building a DOM for presenting our data” comes with it’s own set of frustrations

thedavidmeister06:11:09

@micha: i’d be interested to hear about how this code path affected performance - I wouldn’t have expected that

micha13:11:33

@juhoteperi: do you have a boot.properties file that pins BOOT_VERSION?

micha13:11:11

haha sorry, wrong channel

mynomoto16:11:54

@onetom: I had a different experience upgrading 8 app and 2 libs to hoplon 6, only some global find/replaces and I was good to go. But part of the code was already using the :class and :click notation that was valid on hoplon 5 also.

onetom16:11:31

@mynomoto: and how many people were working on those 8 apps?

micha16:11:49

in the future things like that will be behind a feature flag whenever possible

mynomoto16:11:01

5 other people.

micha16:11:19

so we can maintain backwards compatibility at the expense of not performing some optimization

onetom16:11:37

mynomoto: experienced ones?

mynomoto16:11:11

@micha: I really like the ember way of only removing deprecated stuff on majors and adding new things on minors. Sounds pretty sane.

onetom16:11:14

because in our case that was not the case and i let them to do the transition

mynomoto16:11:30

@onetom: experienced as programmers for sure, not specifically on hoplon.

mynomoto16:11:44

But I did most of the upgrading, once you know what you are doing is simple, but should be a nightmare for people that don't and things break and you have no idea of what is happening.

micha16:11:10

@mynomoto: yes, we did at least do that simple_smile but even on major versions if we can have a flag to enable deprecated features i think it would be good to do it

onetom16:11:29

well i did one of the projects myself to in about an hour just to confirm there is no major issue behind the transition

mynomoto16:11:42

I was on vacation this last week trying to keep my hands of the computer until monday but I didn't succeed and did https://github.com/mynomoto/flux-challenge/tree/hoplon-solution/submissions/mynomoto

mynomoto16:11:04

If you guys want to take a look before I submit the PR.

micha16:11:30

awesome! i 👀

onetom16:11:39

but u know when im coding and helping out to fix mysterious situations some of my colleagues refer to my activity as black magic as they are watching me solving the problems

onetom16:11:23

and i would say not because im a super fckin uber hacker, though quite experienced indeed...

mynomoto16:11:34

@micha: but there is functionality being added on hoplon 6, this makes the transition harder. It's not only a matter of not using deprecated stuff, there was mandatory changes. But it is hard to do like them, it is just a thought.

micha16:11:36

oh, you mean you don't add new things with the first major release?

micha16:11:43

you just remove things?

micha16:11:01

i get it now, this is a good idea

micha16:11:14

we should definitely adopt this method

micha16:11:41

its like the 4-step process we use for changes to our production apps

micha16:11:10

of course, i can't believe i never realized this before

mynomoto16:11:37

@micha: it is, so if you are not using anything deprecated, you can bump the major and it's gold.

micha16:11:53

yeah this is definitely the way to do it

micha16:11:00

the ember guys are true professionals

micha16:11:10

everything they do is legit

micha16:11:10

man, i learned something good today, thank you simple_smile

mynomoto16:11:02

@micha: haha, glad to help once in a while. I own a lot to the people in this channel but mainly you.

micha16:11:52

thanks simple_smile it's a pleasure

micha16:11:04

the discussion about the element attribute lookup is interesting

micha16:11:50

i hope to write a little about what the optimal hoplon abstraction might be today

mynomoto16:11:45

I saw that, I just use cells for that problem. I'm not convinced that those are necessary. Cells are amazing 😉

micha16:11:49

yeah it will be good to see the use cases

micha16:11:14

one thing i found myself using something like that for was like when you have "false" elements

micha16:11:47

like with the google maps component we have now, you configure it by setting attributes to cells that contain data

micha16:11:23

and the component knows how to transform that data into domain specific things, like pins on the map or polygons etc

micha16:11:31

so you have like this:

micha16:11:55

(google-map
  :pins some-cell
  :polygons other-cell
  ...

micha16:11:16

this is good for something like maps, but what if you have a more complex data table

micha16:11:25

it seems like sometimes you want to have more like

micha16:11:33

(google-map
  (loop-tpl :bindings [{:keys [lat lon]} pins]
    (pin :lat lat :lon lon)
    ...

micha16:11:09

you'd want that if you were styling the pins or something and you want to use the already familiar element abstraction even for data

micha16:11:31

i've used this in my current project for data tables, for instance

micha16:11:45

where we have data-column elements and whatnot

micha16:11:01

i made a box element that just contains configuration state

micha16:11:08

that the parent looks at

mynomoto16:11:56

Oh, are you using an element as data then?

micha16:11:49

well i am but the implementation i ended up with isn't great

micha16:11:57

it was kind of rushed

micha16:11:17

we were trying to integrate the structure our designer provided with as little alteration as possible

micha16:11:26

but we didn't have time to really think it through

micha16:11:03

but i think it might be good if we could think it through and fully understand it

mynomoto16:11:24

I understand the argument of familiar abstractions but I like data as maps and vectors. But to integrate on an existing project or flow may be useful, but it looks complex.

micha16:11:57

the "data elements", the box defelem for example, are really just maps and vectors

micha16:11:23

i made the boxed type so that you can add it as a child, which is really an implementation detail

micha16:11:44

because hoplon ignores children that aren't of the Element type

mynomoto16:11:43

Hum, that I like. Just ignoring non renderable things. I remember having problems adding cells where they shouldn't be.

micha16:11:43

flux-challenge isn't starting the websocket

mynomoto16:11:23

Oh, you need to go to the server folder on the toplevel and do npm install then npm start

micha16:11:37

oh ok cool

mynomoto16:11:40

I didn't bootfy those.

micha16:11:10

i should have read the docs

mynomoto16:11:07

The index.html and index.html.js on my submission toplevel are required by the challenge too.

micha16:11:08

man, the specification for this application is confusing

mynomoto16:11:47

hahah, part of the challenge 😉

mynomoto16:11:27

But sure looks legit, it's like the real world lol

micha16:11:00

"Do not make any request for a sith that would be outside the list. Cancel any such obsolete request when the user scrolls."

micha16:11:09

how would a sith be outside the list?

mynomoto16:11:41

You are scrolling up, some request is happening, you scroll down and now it wouldn't be rendered.

mynomoto16:11:03

Because it's outside the current list.

colin.yates16:11:07

(brilliant - one browser window was talking about the new star wars trailer, the other window had @micha talking about ‘do not make any request for a sith’ :-))

colin.yates16:11:45

simple_smile Sorry to distract simple_smile

micha16:11:17

oh i see, like you scroll up and it's going to fetch two things, and you scroll down before it finishes fetching the bottom two things it should cancel the outstanding requests because they would be out of view

mynomoto16:11:43

@micha: yeah, that's it.

micha16:11:51

or "scroll down" if you're on linux simple_smile

mynomoto16:11:47

I just suppose that up and down are opposite directions. When I use a mac the first thing I do is invert the scroll 😛

micha16:11:49

@mynomoto: looks awesome

micha16:11:44

the code is elegant and easy to understand i think

mynomoto17:11:38

Thanks! I was browsing the repo, there are some complex things over there.

micha17:11:02

i like the separation of concerns in there

micha17:11:05

very nice

micha17:11:19

the actions and state namespaces vs the view namespace etc

micha17:11:42

and the index.cljs.hl is pretty sweet, just assembling those things

micha17:11:59

many awesome things in there

micha17:11:49

with my new monitor i can see all the code at the same time, even

mynomoto17:11:33

That's the way I try to use Hoplon on serious projects simple_smile

mynomoto17:11:51

Do you have one of those 4k amazing things?

micha17:11:20

it's not 4k, it's one of the dell 34" wqhd curved ones though

micha17:11:41

3440x1440

mynomoto17:11:08

Cool. I used one 3840 x 2160 27'' that was amazing at work. Need to find me one of those for home.

micha17:11:51

i was skeptical of the curved display, but it's actually pretty good

micha17:11:27

the edges are nice and bright, compared to like a cinema display

micha17:11:43

because you're not looking at them at an angle as much

mynomoto17:11:26

Nice! I will keep that in mind, I didn't think that was useful too.

mynomoto17:11:44

Oh, I remembered a problem that I had updating an app. Did something change on :toggle? It hides things ok but when it shows it is using display: block all the time breaking span and td. I'm setting the display manually but I'm sure this used to work using :toggle.

micha17:11:21

hm, i don't think so, maybe we upgraded jquery and that changed?

mynomoto17:11:20

I think that's the most likely cause, will check their changelogs.

micha17:11:39

it's just calling $(...).toggle()

mynomoto17:11:01

Hum, looks like nothing changed, I will investigate foundation next.

alandipert19:11:44

@mynomoto: cool, re: flux challenge! be curious to know how you feel hoplon compares

mynomoto20:11:35

@alandipert I think your orodev talk killed it. Hoplon is simpler and unless you get to the point of having performance troubles (which I never did) I recommend people to stick to it. From what I saw of the other solutions people are really smart so they don't mind the complexity 😉

mynomoto21:11:34

@alandipert: reagent is not bad also, the solution over there is nice too using re-frame. It's the most hoplon like react wrapper on clojurescript.

mynomoto21:11:26

At least things are converging to frp, but some are simpler than others.

alandipert23:11:57

@mynomoto: thanks! yeah i've heard good things about re-frame