Fork me on GitHub
#beginners
<
2015-07-10
>
slipset07:07:25

might not apply, but concat might not always be so wise http://stuartsierra.com/2015/04/26/clojure-donts-concat

slipset07:07:44

and as such, (mapcat identity [[['A 'B]['D 'E]] [['X 'Y]]]) would work for this example

slipset07:07:16

but one might want to ask why do you end up with such a nested vector in the first place?

slipset07:07:06

maybe you could have used mapcat instead of map when genrating the vector?

surreal.analysis14:07:13

Hmm, I’m not sure I understand how mapcat fixed the problem, given that mapcat identity would just do (apply concat collection)

surreal.analysis14:07:31

Re-reading I understand more - the issue is that they were using concat repeatedly in a loop

surreal.analysis14:07:20

So I think (apply contact vector) would still be the most correct / idiomatic way to remove a single level of nesting. Still could be wrong though

kamn17:07:38

So javascript has a specification in ECMA-262 is there something similar for Clojure?

teslanick17:07:15

Clojure is shepherded by Cognitect; it's not really a standard so much as a project maintained by a for-profit (awesome) company.

teslanick17:07:50

ECMA-262/TC39 is a standards body for allowing multiple compliant implementations of the same programming language. For complex syntaxes like JS, that's a non-trivial problem

teslanick17:07:55

For Clojure, writing an EDN interpeter is actually pretty simple. Writing the pile of code that makes up the standard library is the hard part (persistent data structures, the hundreds of standard functions, macros, reader literals, special forms, etc)

teslanick17:07:31

All of which are well-documented, but not standardized except that the "Cognitect Clojure" is the reference implementation.

kamn17:07:39

@teslanick: Ok, I was just wondering how projects like clojureCLR and clojurescript match the functionality. I guess they just have to look at the Clojure implementation and mimic it where they can

kamn17:07:47

Thanks for the reply!

teslanick17:07:48

Both ClojureCLR and ClojureScript are maintained in parallel with Clojure to maintain some level of feature parity.

teslanick17:07:00

(dependent on host limitations &c)

curtosis19:07:21

is there a way to add a directory to lein’s classpath that won’t get pulled into an uberjar?

curtosis19:07:05

I need to refer to ~2GB of static data and reeeeaaaally don’t want to include that in a WAR file.

arathunku21:07:53

Hi, anyone have a moment to look at my code and problem with threads (I guess?)? https://github.com/arathunku/game-fun/blob/move-to-clojure.async/tiled-mmo/server/src/gs/components/game_loop.clj#L39 When I uncomment that line and return channel in the component https://github.com/arathunku/game-fun/blob/move-to-clojure.async/tiled-mmo/server/src/gs/components/players_connections.clj#L24 does not execute. I've to pass at least 2 messages to events-chan to "unblock" it. How come that d/let-flow is blocked? It might be better visible in the logs (adding snippet)