Fork me on GitHub
#beginners
<
2016-03-10
>
doddenino09:03:52

What would be the best/easiest web framework to write a single page app with? Luminus? I would just need to handle authentication, serve the main index.html and prove some endpoints

jmayaalv09:03:49

@doddenino: luminus is a good choice. If you want to write the client side on cljs add the +cljs flag when creating a new lumins project you will have a good base to start. http://www.luminusweb.net/docs/clojurescript.md

doddenino10:03:27

@jmayaalv: is there a list of all available luminus flags when creating a new project? I can't seem to find it

jmayaalv10:03:44

you will probably want to add +swagger as well. it would help a bunch for documentation and testing.

doddenino10:03:59

@jmayaalv: oh, of course I had to look in the template... eheh thanks a lot!

krchia13:03:53

where should i place my go loop in my clojure code if i’m using figwheel?

krchia13:03:31

all that i can figure out from the template code is that figwheel just starts the server

krchia13:03:27

i can get it to work, by going into lein repl and starting my go loop manually once figwheel is loaded

krchia13:03:39

but i’ll like to know a bit more

krchia13:03:57

the docs on figwheel’s github aren’t helping me much

krchia13:03:09

i suppose if i get desperate enough, i might just take a look at the source code

val_waeselynck14:03:36

@krchia what purpose does this go loop fulfill ?

krchia14:03:53

listening for messages sent from the client through websockets

lmergen15:03:06

how idiomatic is it to use functions such as doseq and dorun ?

lmergen15:03:34

I know in Haskell, it's considered pretty much an anti-pattern when you need to force evaluation of something lazy

Chris O’Donnell15:03:24

@lmergen: If you find yourself using those functions, it's definitely worth considering whether your lazy seq should have been a vector in the first place.

jonahbenton15:03:40

@krchia: if you follow the pattern in the "scripting with component" section: https://github.com/bhauman/lein-figwheel#scripting-with-component you can create a component that starts a go-loop

jonahbenton15:03:20

@lmergen yeah, those are used more for side effects than for eager evaluation/consumption

lmergen15:03:40

yeah, in my case it's used in a test case, though... so i guess that's okay?

jonahbenton15:03:27

yeah. if there was a reduction/aggregation around the items then reduce or into could make sense, but if the sequence just needs to be consumed to confirm something on the production side...