Fork me on GitHub
#hoplon
<
2016-10-16
>
keithsparkjoy00:10:17

I’ve found when developing with Hoplon and other ClojureScript frameworks like re-frame with figwheel, that there are certain things you can do that totally bork up the system. For example, in Hoplon, accidentally dereferencing an input cell within the definition of a formula cell (cell= (inc @input-cell)) can cause this.

keithsparkjoy00:10:35

I’ve started thinking of it as the Blank Screen of Death

keithsparkjoy00:10:40

Curious what you guys call that state

keithsparkjoy00:10:12

and if there are any diagnostics that can be used to track down the problem

keithsparkjoy00:10:35

My current technique is to slowly back out changes until I get back in a state where stuff is rendering again 🙂

jjttjj01:10:31

@keithsparkjoy do you have browser developer tools open? I believe there should be an error message there

jjttjj01:10:18

Also, count me as another instant huge hoplon/UI fanboy. First time I felt comfortable with any sort of UI work, nevermind finding it fun

keithsparkjoy01:10:13

Thanks, @jjttjj. Embarrassed to say I'd not thought of that :) pretty new to cljs.

keithsparkjoy01:10:46

Yep, sure enough. I’ve been looking at the DOM inspector; hadn’t thought to look at the console.

flyboarder02:10:33

@keithsparkjoy you arnt really supposed to do that in a cell=

keithsparkjoy02:10:10

@flyboarder: hah yep it was just an example of a mistake that leads to the bsod :)

mynomoto02:10:42

Maybe spec could help avoiding that, checking for deref and throwing an exception, but I'm not sure.

vigilancetech06:10:34

@keithsparkjoy I've been finding it quite useful to print stuff (intermediate forms) to the console with (enable-console-print!) and (println) for debugging like spelled out in the clojurescript quickstart and hoplon tutorials

jumblerg07:10:54

hoplon/ui master now depends on hoplon/hoplon responsive-layout-attributes-micha branch for bound-fn

mynomoto17:10:39

https://mynomoto.github.io/hoplon-klipse/ live coding a subset of hoplon in the browser. I'm trying and failing to make macros work on that. But the sample works, click on the number and it should increment. I'm pointing to forks of hoplon and javelin because I had to remove jvm related stuff to be able to use bootstrapped cljs.

jumblerg18:10:56

@micha: could we cherry-pick your bound-fn implementation into master?

jumblerg18:10:23

seems to be working pretty well

jumblerg18:10:07

@micha: i just realized, when building against the latest hoplon master + bound-fn, that castra assumes jQuery is already provided (for the promises)

micha18:10:40

i used the zones one for a bit, i found it to be kind of inconvenient, because then all te code needs to know whether to deref it in a special way or not

micha18:10:08

if i were to go that route it seems simpler to just make lexical bindings

jumblerg18:10:11

micha’s implementation works with the existing cljs binding fn

jumblerg18:10:44

not sure what this gives us

micha18:10:44

if you use the latest boot-hoplon you will get jquery by default

dm318:10:45

it looked liked that one was more advanced and could be wrapped to be equivalent to Michas, but I didn't go deep into either

micha18:10:03

@dm3 you need to access the values via zone-get etc

micha18:10:41

there isn't a way to wrap that so it goes away

jumblerg18:10:48

does it give us some benefit (aside from extra machinery) that micha’s bound-fn doesn’t?

jumblerg18:10:57

i only scanned it quickly, but it looks that the benefit of micha’s bound-fn is that it works with the existing clojurescript fns, rather than introducing new ones to accomplish similar things. the one i’m about to merge in seems simpler.

jumblerg18:10:47

whoa! things are happening...

micha18:10:00

@jumblerg my thing does need a different binding macro

micha18:10:13

and the bound-fn macro it introduces on the other end

flyboarder18:10:45

sorry guys should have squashed those

jumblerg18:10:32

ah, right, forgot about that

jumblerg18:10:50

i am using though, works great in ui

micha18:10:54

yeah i think the performance implications are negligible for typical ui event ahndling use case

micha18:10:04

like where events are comin from a user particularly

jumblerg18:10:28

yeah, doesn’t make much of a difference in that context

micha18:10:30

if you have something that will fire many times per second you can always optimize by making explicit lexical bindings

micha18:10:30

ok so i think with alpha17 jquery has been completely factored out into a separate module

micha18:10:46

which is pretty awesome, good work @flyboarder !

micha18:10:18

just to keep in mind

micha18:10:23

it requires the latest boot-hoplon though

flyboarder18:10:45

@micha thanks for fixing boot-hoplon!

micha18:10:51

and backward compatibility is fully maintained

micha18:10:04

which is 💯 imo

alandipert18:10:06

How do we feel about hoplon 7?

alandipert18:10:30

I haven't been able to test with work app yet but we can always do minor releases

flyboarder18:10:37

@alandipert maybe hold off on hoplon 7 until I can get goog attribute provider updated?

flyboarder18:10:50

then we can offer both for the next major

alandipert19:10:18

It would be nice to orient the task and libs around the same number when we're ready, state of things kind of confusing currently

flyboarder19:10:57

agreed, maybe increment boot-hoplon to v1? or v7 hahaha

micha19:10:58

perhaps we should combine boot-hoplon into the hoplon jar

micha19:10:24

full circle 🙂

alandipert19:10:26

Yeah one and the same

micha19:10:56

we could add it as a dependency

micha19:10:00

to hoplon pom

alandipert19:10:08

I don't remember why they were ever separate

alandipert19:10:29

That would be cool, then it can be excluded

micha19:10:48

and we can check and warn if the version is different from the one hoplon requires

micha19:10:28

to support compatibility with older setups where people just update the hoplon dep but have their own separate boot-hoplon dep

flyboarder19:10:08

this is so exciting!

jumblerg19:10:39

there’s bound-fn. hoplon/ui works with master again.

jumblerg19:10:13

need to do some additional experiments with ICustomAttribute.

micha19:10:32

we should mark that as experimental or something

micha19:10:38

in case we want to change it

jumblerg19:10:46

i didn’t merge it in

micha19:10:58

i mean the custom attribute stuff that's already in master

micha19:10:04

in hoplon master

jumblerg19:10:50

gotit, not the protocol ICustomAttribute that’s still in the responsive-layout branch.

flyboarder19:10:21

I will do up a wiki page today about attribute providers

jumblerg19:10:41

cool, i’m not yet up to speed with the changes you’ve made

jumblerg19:10:07

i have a lot of gratuitous attribute machinery in ui right now that needs to be factored out, so they may be quite helpful.

flyboarder19:10:25

basically the on! and do! methods now just fire browser behaviour and all other jquery references in core have been replaced with vanilla js, but you get original functionality back by including hoplon.jquery in your (page) which new boot-hoplon does for you so to the outside world nothing should be different except optionally dropping jquery if you want

flyboarder19:10:07

there are also some new jquery specific things to solve a few problems like :data/* :prop/* where :attr/* isnt technically correct

jumblerg19:10:01

the merge went flawlessly once i updated boot-hoplon

micha19:10:40

the new boot-hoplon should also work with older hoplon without modification

micha19:10:05

provided you aren't using the new --refers option of course

micha19:10:11

well even if you are

micha19:10:16

it should still work fine

micha19:10:30

just jquery will be on the classpath always with the older hoplon

micha19:10:37

which is expected

micha19:10:58

whew that's great

flyboarder19:10:09

yeah i can stop sweating and take a shower now 😛

micha19:10:44

i finally started painting my bathroom, but then i got distracted with computers

micha19:10:08

so for the past week it's just been in primer so i have to take a bath in a bucket every day

micha19:10:36

it's surprisingly convenient

flyboarder19:10:23

@micha omg thats like when I visit family in germany, their house is really old, you actually wash yourself with a wash cloth, because there is no water pressure

micha19:10:54

yeah i have that issue with my house, because we have a well

micha19:10:15

i like the bucket becaus eit's zero maintenance

micha19:10:27

so i can spend my time doing more interesting things than working on the house

jumblerg19:10:09

lol. the efficacy of this method seems questionable. glad i’m back in boston.

micha19:10:51

yeah it's not for the city slickers i guess

micha19:10:07

you can just call your super if you have any kind of housing issue

jumblerg19:10:33

uber for plumbers

jumblerg19:10:15

i have an uber for all my things now. minus laundry, sadly, since washio folded.

micha19:10:30

pouring a bucket of hot water over your head is invigorating though, i have to say

flyboarder19:10:33

yeah scarf was recently shut down here https://www.getscarf.com/

jumblerg19:10:27

ah, that’s sad. we had a service like that here in boston for a while. i was one of their, ah, power users, you might say.

jumblerg19:10:43

press button. get food. magical.

jumblerg19:10:16

city slickers get to spend more time computing and less time fing around with mop buckets.

micha19:10:58

well i don't spend much time with mopping... trollface

micha19:10:25

i need to get a roomba or something

flyboarder19:10:44

I started working out of our local startup incubator, micro services for real world is the way to go, not just for IT

micha19:10:53

one day we will figure out a way to reanimate the dead to clean our houses

jumblerg19:10:05

i have one. but i stopped using it after i found the uber for housekeepers.

jumblerg19:10:12

@micha: i wonder if it would be worthwhile to, instead of using jquery, include a polyfill with castra so javascript promises can be used instead.

micha19:10:23

maybe, but then you'd still need access to the underlying thing sometimes

jumblerg19:10:36

i’m making heavy use of them in one of my apps since, if webrtc is supported, so are they.

jumblerg19:10:03

care to elaborate?

jumblerg19:10:20

there are many things

micha19:10:01

well like aborting a request, things like that

micha19:10:08

yeah there are also promise libraries that provide the same as the newer browser ones of course

micha19:10:19

which can be used as a polyfill in older platforms

jumblerg19:10:14

maybe boot-hoplon could inject a promise polyfill

jumblerg19:10:33

although this couples castra to boot-hoplon.

jumblerg19:10:08

of course, it the current configuration, it already is though since it relies upon it to provide the jQuery dep.

micha19:10:20

what is the advantage?

micha19:10:35

you can do that now by making your own mkremote wrapper, no?

micha19:10:00

i do that myself anyway, because each application has a few types of removtes that i do different things with

jumblerg19:10:12

compatibility/consistency with es6 apis

micha19:10:38

yeah but you can make a wrapper for mkremote that does the promise stuff

jumblerg19:10:12

it would be nice to chain in castra remote calls with other promises i’m getting back from webrtc remotes/peers.

jumblerg19:10:47

sure, i could roll my own (and did)

micha19:10:18

composition seems better than dependency injection for this

jumblerg20:10:10

another path could be to remove the jQuery promise from castra entirely.

jumblerg20:10:01

and make fewer assumptions about how it is used.

jumblerg20:10:21

i agree that injecting deps via a boot task is a bit gross

micha20:10:55

yeah we can factor it like we did hoplon

micha20:10:10

provide multimethods or something with the implementation

jumblerg20:10:15

speaking of disgusting things… instead of simply using json/javascript objects, this is the protocol browser vendors implemented as part of the webrtc apis to exchange connection information. https://tools.ietf.org/id/draft-nandakumar-rtcweb-sdp-01.html

micha20:10:11

i like how many rfcs are involved

micha20:10:21

WebRFC they should call it

jumblerg20:10:14

quite the boondoggle.

micha21:10:30

and we were still using the 113 in combat in 2004

micha21:10:43

we didn't get any fucking portholes tho, wtf

micha21:10:49

i was cheated

alandipert21:10:58

f-35 saga seems even crazier

alandipert21:10:08

with computers and software, demands can take on infinite dimensions

micha21:10:26

hallelujah

micha21:10:33

hail satan

alandipert21:10:09

the portholes thing i don't understand at all

micha21:10:26

what do you mean, so you can shoot at people

micha21:10:45

from inside

alandipert21:10:45

i tried to shoot the saw out of the window of an 1114 at a range once

micha21:10:54

awesome, i'm sure

alandipert21:10:56

whole cabin filled with noxious smoke instantly

micha21:10:01

fuck yeah

alandipert21:10:15

maybe the problem was my mindset lol

alandipert21:10:23

i was pretty amped tho

alandipert21:10:29

definitely rained on my parade

alandipert21:10:58

i guess there is a long tradition of tanks having ports like that tho

alandipert21:10:02

how did they do it and also breathe

micha21:10:05

the bradley did have the periscopes in back, but you can't really see anything

micha21:10:13

like those prism things

micha21:10:41

i dunno, there wasn't any smoke in the bradley, they had a 240 in the turret

micha21:10:07

like inside

micha21:10:16

the portholes would have been covered up with the reactive armor anyway i guess

alandipert22:10:00

maybe if i was actually shooting in bursts it wouldn't have been as badt

micha22:10:49

defeatist attitude

micha22:10:53

that's your problem

micha22:10:02

unamerican

micha22:10:35

probably you just needed more of something

jumblerg22:10:16

@alandipert: my favorite movie!

alandipert22:10:26

the webrtc discussion reminded me of it

alandipert22:10:33

webrtc: troop carrier, recon, tank

jumblerg22:10:46

you’re obviously not drinking enough water

jumblerg22:10:52

drink more water

jumblerg22:10:47

they forgot the portholes though

jumblerg22:10:16

just when we think we’re starting to get one browser interface under control, they botch up another to keep us occupied.

jumblerg22:10:27

they’re some real job creators over there at the w3c.