Fork me on GitHub
#clojure-uk
<
2017-03-27
>
glenjamin06:03:38

i do generally prefer to order a source file top-down, it does annoy me slightly that clojure doesn’t let me choose to do that

glenjamin06:03:59

without a declare anyway

korny07:03:01

I tend to have a big (comment block at the bottom of my source file (or in the middle) where I put stuff for evaluating in the REPL - I rarely type into the REPL, because I want all my bits and pieces of stuff to stay with the code. And then when it comes to cleanup time I try to move the stuff in the (comment block into tests 🙂

korny07:03:29

(parentheses deliberately left unclosed to mess with OCD types. It's ok, they won't read any of this because it's in a comment block)

agile_geek07:03:53

@glenjamin I agree I would prefer to see high level fn's earlier and detailed ones later in the source file but I guess I've adapted to the reading a file from the bottom upwards in the same way I've adapted to reading s-expressions from the inside-out.

Rachel Westmacott08:03:31

@korny, now the rest of their lives are in a comment block! They’ll never read anything again!!!

agile_geek09:03:17

@peterwestmacott thank goodness you closed them... nothing worse than dangling parens!

thomas09:03:08

I suspect the Cortisol levels of the people on this channel went up a bit while the parens weren't closed properly.

thomas09:03:48

so @peterwestmacott provided a public health service there 🙂

dominicm11:03:56

I've found a fun game

thomas11:03:12

what? cause stress levels to go up?

thomas11:03:24

or how long it takes before someone closes it?

glenjamin11:03:01

()()()))((()())(((())(()()((

thomas11:03:57

now that is cruel!!!

thomas11:03:19

I think that is against the Geneva Convention!!!

thomas11:03:03

()()()((()())(((())(()()(())))))

thomas11:03:22

thanks to parinfer

thomas11:03:06

and it looks like it just deleted any open )'s

korny11:03:00

Be careful, too many )))))) and the universe ends.

thomas11:03:40

surely you need a lot in that case (some like 5 billion I'd suspect)?

mccraigmccraig11:03:19

you mean like this @thomas (take 5e9 (repeat \))) ?

thomas11:03:17

some thing like that... 😂

korny12:03:09

I'm glad you included that take, otherwise you might have a stack overflow

thomas12:03:36

running it now actually....

thomas12:03:49

seeing how long it takes to kill the universe...

mccraigmccraig12:03:14

don't think i'll get an SO from a lazy-seq @korny ?

mccraigmccraig12:03:13

i'd be better off mining ethercoin tho

thomas13:03:42

well... running that will kill the planet at least... fans are spinning at full speed

mccraigmccraig13:03:57

@thomas it took about 6s for my iterm it print 1e6 \)s... so i guess you'll be looking at a couple of hours to run given rough equivalences

thomas13:03:08

I killed the process.... couldn't be arsed to kill the universe... even with a one liner it sounded too much like (hard) work 😉

mccraigmccraig20:03:49

"couldn't be arsed to kill the universe" - i fear you will make a hopeless evil genius @thomas

yogidevbear21:03:27

Evening friendly peeps. I know some of you work on some Clojure web Frameworks. Was hoping someone could remind me of which ones they are and what part of the stack they fulfill (e.g. yada, etc)?

seancorfield22:03:11

We just use plain ol’ Ring, with Compojure for routing.

seancorfield22:03:32

Frameworks mostly aren’t “The Clojure Way”.

mccraigmccraig22:03:06

@yogidevbear we're on yada, which is (roughly) about easily building HTTP compliant async services. it sits on top of netty and aleph, and behind a routing thingie like bidi, and gives you a schema with which to declare your HTTP resources. it looks after a bunch of hard to implement details like async multipart POST handling

mccraigmccraig22:03:46

other nifty features include resource schema coercion and swagger generation