This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-09
Channels
- # beginners (22)
- # boot (80)
- # cider (6)
- # cljs-dev (5)
- # clojure (190)
- # clojure-berlin (5)
- # clojure-dev (24)
- # clojure-italy (14)
- # clojure-russia (70)
- # clojure-spec (39)
- # clojure-uk (82)
- # clojurescript (121)
- # clojurewest (1)
- # core-logic (2)
- # cursive (25)
- # datascript (186)
- # datomic (33)
- # dirac (266)
- # emacs (9)
- # gsoc (4)
- # hoplon (37)
- # immutant (34)
- # instaparse (22)
- # jobs (4)
- # juxt (6)
- # lambdaisland (2)
- # leiningen (1)
- # liberator (1)
- # luminus (5)
- # lumo (28)
- # off-topic (9)
- # om (23)
- # onyx (26)
- # other-lisps (1)
- # parinfer (39)
- # pedestal (45)
- # proton (1)
- # protorepl (10)
- # re-frame (18)
- # reagent (4)
- # ring-swagger (8)
- # rum (4)
- # specter (13)
- # test-check (14)
- # testing (1)
- # unrepl (164)
- # untangled (10)
- # yada (14)
@micha have you had any experience getting hoplon prerender working on heroku?
nm, i just had to hardcode the path to phantomjs
@mynomoto got another snippet if you're interested
adding a data attribute to something if it or its descendants are currently in focus, so you can style it
(let [target (j/cell nil)
current-els (j/cell #{})]
(defmethod hoplon.core/do! :current-el
[el k v]
(hoplon.core/do-watch
(j/cell= (when (get current-els el) v))
#(hoplon.core/do! el :attr {:data-current %2}))
(.on
(js/jQuery el)
; click is an obvious candidate for "current" el.
; focusin covers keyboard navigation.
; input covers deletion of an element and reselection of a new one.
"click focusin input"
(fn [e]
(j/dosync
(when-not (identical? (.-target e) @target)
(reset! target (.-target e))
(reset! current-els #{}))
(swap! current-els conj el))))))
This conversation about core.async use-cases on Reddit supports Hoplon's position that Javelin dataflow is more useful for UI's than core.async. https://www.reddit.com/r/Clojure/comments/5y9ln1/what_are_use_cases_for_coreasysnc/
what i've always liked about the hoplon community's school of thought is that it seems to manage to be simple AND easy according to Rich Hickey's definitions. I'm sure core async is simple but it's definitely a lot to learn and practice. And with the cljs react libraries (though I haven't looked at them in a while) there's extra layers of stuff you have to learn. With hoplon you pretty much need to know html and spreadsheets and you can start typing and seeing results
interesting that even the creators have come around
when rich first unveiled core.async he was enthusiastic that it "solved" callback hell
which it does in a way
you get to trade callbacks for infinite loops lol
and there isn't a catchy pejorative for the hand wringing associtaed with infinite loops yet, so it's an improvement 😉
an interesting study is http://go.cognitect.com/core_async_webinar_recording vs https://github.com/rwillig/async-webinar-hoplon
@alandipert I'm trying to deploy the castra template (made a new project with the included boot-new command). Total Heroku noob here. I successfully build and uploaded the war, and got a confirmation message and url on the command line. But when I load the url I get this:
HTTP Status 500 - Servlet.init() for servlet boot-webapp threw exception
type Exception report
message Servlet.init() for servlet boot-webapp threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet boot-webapp threw exception
.......
root cause
java.io.FileNotFoundException: Could not locate my_app/handler__init.class or my_app/handler.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
......
Any suggestions?The castra demo seems to run in (boot-dev)
mode on localhost
hm looks like clj didn't make it into the war
1 sec
i'm gonna see if i can reproduce locally using the jetty runner
In my target there is <project-name>/handler.clj
I am on windows, btw (maybe some backslash thing?)
I dont need to use the heroku.git stuff right?
did you do boot make-war
ok: repro'd locally
this has to be something small, 1 sec
i see the problem
.. or any local git stuff for the war deploy?
it's a bug in the template
my_app/handler.clj
should be <app-name-you-picked>/handler.clj
I ran into a similar error last time I took a stab at Heroku deployment.
if you change line 53 to the from my-app
to the name of your app you picked, it should work if you boot make-war
and redeploy
Ok. Thanks! Trying it now, will report back.
template is fixed now too âš¡
thanks for the report @chromalchemy
@alandipert It worked!!! Thanks for the quick fix. I live clojurescript, but now I don't feel so cut off from the rest of clj libs, having little devops or java experience.
awesome, glad it works