Fork me on GitHub
#beginners
<
2016-02-19
>
josh.freckleton01:02:21

@shaun-mahood: The backend is just 2 simple REST endpoints in python, on Heroku (that access a MongoDB). It'll get more complex, and I'll probably port the python code to clojure before it does. If I'm just serving a simple SPA, any thoughts on what would be the fastest language/framework (node, composure, php, ...) to serve simple assets?

chadhs03:02:18

why on earth does http://codewars.com bring up protocols and records in the “answer this to sign up” questions… sheesh

shaun-mahood04:02:33

@josh.freckleton: no reason you need to change the current back end or even have a framework, just point at your current back end and serve your spa as static assets and it should work great. Once you decide to port your back end, then you could start thinking about combining the two together. Make sense?

adamkowalski06:02:29

Has anybody used Cycle.js with ClojureScript? If so how has the experience compared to using a react based library such as Om Next?

jaredly06:02:20

@adamkowalski: cycle.js is pretty squarely research territory imo, whereas react (+ om etc) is battle tested. should be pretty fun, although observables can take some getting used to, and you’ll want a cljs wrapper for rxjs. the “lets hide all our state in mutable objects that are hard to reason about” is less appealing to me than clojure’s state management 😄 (reactivex can be super cool & liberating in a lang like java or objc, but I don’t think it has a ton to offer clojure(script))

adamkowalski06:02:31

fair enough, I just thought it was an interesting idea and wanted to see if anybody had tried it out haha

adamkowalski06:02:56

you could probably do most of the things rxjs does purely with core.async though right?

yogidevbear07:02:09

Thanks @mikeb, @enyert, @nkraft. I'll try accessing the regular repl via ctrl+enter later today :thumbsup:

mikeb07:02:06

@yogidevbear: No problem, feel free to direct message me if you need help.

adamkowalski08:02:43

Hey what is the difference between the transducer version of map using partial

adamkowalski08:02:59

is there a good place to learn about them?

samlinncon08:02:26

how do i include a java gateway into a laravel project?

adamkowalski08:02:39

arnt these two equivilant? (into [] (comp (map #(+ 2 %)) (filter odd?)) [1 2 3 4]) ((comp (partial map #(+ 2 %)) (partial filter odd?)) [1 2 3 4])

samlinncon12:02:52

@val_waeselynck: how i could include a different external java class to my clojure project

val_waeselynck12:02:22

@samlinncon: ok, was wondering what Laravel was doing here ^^

val_waeselynck12:02:37

@samlinncon: are you using Leiningen ?

samlinncon12:02:37

it was a typing mistake

josh.freckleton19:02:17

@shaun-mahood: ahh, so, right now my set up is just clojurescript, do I need to set it up with ring or compojure? And then I'd compile down the cljs files, and push up, to a heroku clojure-only dyno, an uberjar that uses ring or something like that to serve the static .js files that were compiled on my computer. So heroku never deals with cljs files, but mostly just an uberjar, and some static js/html/css? Is that right?

shaun-mahood19:02:57

@josh.freckleton: I don't think you need to deal with either ring or compojure or anything else. I found instructions for getting Heroku to host a static site on https://gist.github.com/wh1tney/2ad13aa5fbdd83f6a489 but I've never used Heroku so I have no idea if they'll work or not. Otherwise, it's pretty easy to set up a really simple compojure site if you would rather host using that.

shaun-mahood19:02:41

Did you manage to get your SPA compiled down to one .js file?

josh.freckleton19:02:42

Yes, but not with advanced optimizations yet, granted I haven't spent a lot of time on it yet so I won't spam with questions... yet 😉 ... I checked out your link, and it looks like it uses PHP to host things, so I could do that, or Node, or, compojure, maybe I should keep it simple and go the PHP route for starters...

shaun-mahood19:02:32

I don't know that I would consider that really using PHP, it seems like it's more faking it than anything. If it's easier you could also host a static site on something like github pages and link it to your heroku backend (I assume you can do that with heroku, anyway).