#hoplon

/

      • dm3 has quit
      • ul_ has quit
      • lance|afk is now known as lanceball
      • jjmojojjmojo
        +1 on :exclusions michaniskin !! I haven't sat down and tried to write a boot script to manage aws stuff (last time I used amazonica, when I was using leiningen I had to do some exclusions in my project setup)
      • NOTICE: [boot] micha pushed 2 new commits to master: http://git.io/xqeB
      • NOTICE: boot/master c410e67 Micha Niskin: Set boot.app.path system property with full path to executable
      • NOTICE: boot/master 716917e Micha Niskin: Remove requirement for .boot extension on scripts (fixes #105)
      • NOTICE: [boot] micha closed issue #105: Don't require .boot extension for writing boot CLI scripts http://git.io/FuoW
      • candiru has quit
      • irctc joined the channel
      • tcrawley is now known as tcrawley-away
      • danielszmulewicz
        michaniskin: With your latest commit, is boot still looking for a -main function when running a script?
      • piranha has quit
      • danielneal joined the channel
      • michaniskin
        danielszmulewicz: yes, everything is the same except no more need for the .boot extension
      • danielszmulewicz
        michaniskin: Cool.
      • michaniskin
        you can still make a script that doesn't have a -main
      • it still evaluates all the expressions in the script
      • danielszmulewicz
        michaniskin: Nice. Have you had a chance to look at https://github.com/danielsz/boot-binstub
      • michaniskin: ?
      • michaniskin
        danielszmulewicz: it looks awesome, but i haven't had a chance to use it much yet
      • danielszmulewicz
        michaniskin: No problem. It's very premilinary, but if you and alandipert like it, make it yours.
      • michaniskin
        i hope to get started with using it this weekend
      • thanks!
      • danielszmulewicz
        Sure.
      • People, this is the third time this happens to me this week. I see a React extension that could be useful in my Clojurescript project, and then it appears to be a npm module. https://github.com/jed/react-swipe
      • What am I to do?
      • michaniskin
        boot-npm could be a thing... :)
      • danielszmulewicz
        michaniskin: yeah, bring it on...
      • :-)
      • michaniskin
        haha
      • danielszmulewicz
        martinklepsch: Have you tackled this before?
      • jjmojojjmojo
        I ran into some...issues trying to use react components that seemed to only exist as npm modules - IMHO the interchange format for such things should be javascript (or JSX at least) :P
      • danielszmulewicz
        jjmojojjmojo: I don't even understand why they ship React extensions as npm modules. Is this because they use browerify?
      • jjmojojjmojo
        *shrug* I think they just assume that if you're doing react you're doing server-side rendering and you're only doing that with node
      • danielszmulewicz
        jjmojojjmojo: Ah, what did you end up doing?
      • jjmojojjmojo
        nothing yet :) I think I'm going to re-engineer the project to use hoplon from the ground up
      • but I kind of really want to see react work in a simple, straight forward way with clojure
      • (er... react components I mean)
      • because there *is* reagent, but I dunno if wiring that up with server-side js running inside the JVM via clojure is better than just using hoplon
      • which doesn't solve the component issue entirely, but could be path in that direction
      • danielszmulewicz
        jjmojojjmojo: I wouldn't mind switching to hoplon. The problem is that I'm trying to do mobile client-side applications. It's very difficult to get touch events and swiping right.
      • Stuff like thaT.
      • jjmojojjmojo
        *nod* yeah I haven't delved into that world yet - I'm coming back into "serious" web development from a brief hiatus as a "devops" engineer
      • I missed a lot of huge developments in the past 3 or 4 years
      • the state of the art for "mobile" before I changed focus was reactive CSS :)
      • danielszmulewicz
        Yeah, situation has improved somewhat, and things like cordova help a lot, but the last mile is still a steep climb.
      • jjmojojjmojo
        is phonegap still a viable option?
      • danielszmulewicz
        cordova is the open-source equivalent of phonegap, and they build options. You write html, and cordova will package it up in a compliant web container that runs on ios and android. It's completely automated.
      • dm3 joined the channel
      • I meant to say that cordova solves building your app for android and ios in a convenient way.
      • It automates the build process
      • Besides that, it gives you APIs you can use uniformly.
      • But you're still on your own with regards to layout and motion detection.
      • That is what I would call the last mile.
      • Layout can be solved elegantly with flexbox.
      • So flexbox is something you would need to master.
      • For managing touch events there is a wealth of third party libraries, and React extensions have been made wrapping them. But they are packaged as npm modules, and I'm pulling my hair trying to integrate them in my Om application.
      • raywillig
        danielszmulewicz: those 3pl could probably also be packaged up quite nicely as hoplon components.
      • have you seen alandipert: 's awesome blog post about wiring up some cool js guages for an adzerk thingy? not a mobile app but no reason why it couldn't be in a cordova/phonegap/trigger.io environment
      • crazydiamond joined the channel
      • michaniskin: has some good experience at that with the hostelrocket app
      • danielszmulewicz
        raywillig: you have a link?
      • raywillig
      • danielszmulewicz
        raywillig: thanks
      • jjmojojjmojo
        hmm this link from that blog post is broken: https://github.com/tailrecursion/hoplon/tree/ma...
      • danielszmulewicz
        BTW, has anyone attempted to write a mobile application in hoplon?
      • michaniskin
        danielszmulewicz: yes
      • hostelrocket was via trigger.io
      • and some others
      • danielszmulewicz
        michaniskin: Can I download it and try it on my device?
      • michaniskin
        danielszmulewicz: i think so, it's in the app store
      • danielszmulewicz
        michaniskin: Installing now. Who's behind it?
      • michaniskin
        danielszmulewicz: how do you mean?
      • danielszmulewicz
        michaniskin: Who wrote the app?
      • michaniskin
        me and two other guys
      • donmullen_ was the boss of the project
      • danielszmulewicz
        that's in your pre-adzerk days?
      • michaniskin
        yes this was last year
      • danielszmulewicz
        michaniskin: Awesome. Did you use a framework like cordova?
      • michaniskin
        trigger.io
      • same codebase for desktop, mobile web, and mobile native
      • danielszmulewicz
        michaniskin: sounds promising. You recommend it?
      • dm3 has quit
      • dm3 joined the channel
      • dm3 has quit
      • michaniskin
        yeah it worked great for me
      • it's not free though
      • raywillig
        danielszmulewicz: i would imagine you could achieve similar with cordova. perhaps with boot-cordova in your pipeline
      • danielneal has quit
      • jjttjj has quit
      • crazydiamond
        Hi. Are "advanced" URLs like /some/address/to/page/123 possible in Hoplon?
      • tcrawley-away is now known as tcrawley
      • michaniskin
        crazydiamond: i'd recommend using uri fragments
      • crazydiamond
        michaniskin, thanks, I'll check it out
      • michaniskin
      • crazydiamond
        ah
      • and... how about pushState + AJAX etc?
      • michaniskin
        you can do it, but pushState is terrible
      • but of course it's possible
      • crazydiamond
        I remember I was struggling with that back button wiredness once
      • michaniskin
        pushState is just not well concieved
      • it's extremely naive
      • the uri fragment method was engineered sanely
      • crazydiamond
        i.e., naive in terms of browser support?
      • michaniskin
        no, in terms of understanding the HTTP model
      • it's a hack to support something that was already supported
      • jjttjj joined the channel
      • but the people involved never took the time to learn how it worked
      • well i'm speculating there
      • but it's terrible
      • campeterson has quit
      • like imagine a caching proxy somewhere between the client and server
      • with pushState you have 100 urls that all serve the same content
      • so your cache is always thrashing
      • but caching aside
      • when you use pushState you need to now involve the server in everything
      • routes
      • all this nonsense
      • crazydiamond
        ah, that thing
      • michaniskin
        when i make a web app the URL is like a maven coordinate
      • crazydiamond
        i.e. I would always miss the cache?
      • michaniskin
        it's the unique coordinates for the application
      • so http://example.com/foo/ is the coordinates of the program that is downloaded
      • the #/bar/baz/ part is the client state
      • the server doesn't care about it
      • this means you can deploy your html and js to a cdn
      • crazydiamond
        and, data/API endpoints to the server?
      • michaniskin
        those are a completely separate thing
      • they're not related to the UI in any way
      • the UI talks to them as any API consumer would
      • via HTTP requests or whatever
      • crazydiamond
        and, by program you mean that HTML/CSS/JS (very natural combination), i.e. the UI
      • michaniskin
        yes
      • crazydiamond
        that is consuming the API
      • michaniskin
        with hoplon it's a program that runs on the client
      • the HTML is just a shim to get the js loaded
      • basically with hoplon the UI is a js program
      • in order to make it possible to download and run the program in the client we make a HTML page too
      • but the HTML doesn't contain any content or anything
      • once the program is running it can make requests to HTTP endpoints
      • but those endpoints are completely separate from the UI
      • crazydiamond
        I can have only some abstraction that is common for how UI works and backend works (e.g. sth like "rules of validation of text inputs with integers")
      • michaniskin
        hoplon is ideally suited for that, because everything that is in the UI gets there via maven dependencies and :require
      • so you put that kind of thing in libraries
      • just like any other program
      • crazydiamond
        yep, but in Clojure I see my components much more "reusable"
      • michaniskin
        why?
      • crazydiamond
        (w/o quotes)