#clojure log - Sep 29 2013

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

0:02 m00nligh_: chord: You're going to clone the whole game? If so, it's a big project

0:02 chord: m00nligh_ we are going to not clone the entire game but make what starcraft 2 should have been

0:02 nightfly: so you gonna help?

0:03 arrdem: nightfly, m00nligh_: it's a trap

0:03 nightfly: chord: no, but rather than just tell you to fuck off I'd like to least give you somewhat okay advice first.

0:04 m00nligh_: Does anyone ever use hadoop and hbase together, store the result in reduce phase to hbase directly?

0:04 dcolish: yup

0:04 chord: arrdem: why do you hate starcraft

0:04 dcolish: well not to Hbase directly, to hfiles

0:05 m00nligh_: dcolish: yeah

0:05 But then I should use another function to process the result file?

0:05 * nightfly waves at dcolish

0:05 dcolish: you can just bulk load it into hbase

0:05 hey nightfly

0:05 didnt know you liked clojure too

0:06 m00nligh_: dcolish: bulk?

0:06 dcolish: http://hbase.apache.org/book/arch.bulk.load.html

0:06 m00nligh_: dcolish: To read a file on hdfs is different? Is it right?

0:06 dcolish: its how we do backfills

0:07 if you've ever used copyTable, that does batched row inserts directly to hbase using mapreduce

0:07 its performance is a great example reason why you dont really want to do that

0:08 m00nligh_: clojure-hadoop's does not support TableOutputFormat ?

0:08 tshauck: hi, this is a simple question, but if I have core.clj as my main file, then I have func.clj and a function in that file, how can I use that fucntion in core.clj?

0:08 dcolish: that would be a huge oversight

0:10 mgaare: can't tell if chord is serious

0:11 chord: mgaare: www.github.com/chord-rts/rts PROOF THAT I PUT IN SOME MINIMAL EFFORT

0:11 m00nligh_: dcolish: Do you use the clojure-hadoop package or use the Java's hadoop package?

0:11 mgaare: saw that, still can't tell if serious

0:11 chord: mgaare: what makes you still doubt?

0:12 dcolish: m00nligh_: java's, the clojure-hadoop package doesnt provide any abstraction that would make that worth it

0:12 m00nligh_: So then, we can use any way the java's hadoop and hbase package provided to us, is it right?

0:13 http://twitch.nervestaple.com/2012/01/12/clojure-hbase/

0:13 like this post ?

0:13 mgaare: well the whole thing is ridiculous on every level :

0:14 chord: I don't know if I want to hear your reasons, its better if I live in fairy tale land where I believe i can do ANYTHING

0:14 callen: chord: can you live in that fairy tale land outside of IRC?

0:15 Apage43: hm

0:15 m00nligh_: dcolish: So then we can actually use TableOutputFormat to store the result to hbase directly?

0:15 Apage43: buying groceries before 1AM

0:15 is apparently a suspicious transaction

0:15 and cancels my card

0:16 chord: mgaare so tell me your entire reasoning you were going to explain, I can handle the bad news

0:16 callen: Apage43: lol

0:17 dcolish: m00nligh_: it really depends on what your goals are for loading data in hbase

0:17 m00nligh_: dcolish: Thank's for you kindly help. I give a detail description of my job

0:17 What I want to do is to process some log information

0:17 and store the result into hbase

0:18 So I want to combine the two phase,

0:18 clojurebot: Titim gan éirí ort.

0:18 m00nligh_: when the reduce finish, the job will store the result into hbase directly

0:19 chord: mgaare are you stil alive?

0:20 mgaare: chord: Ok, I'll bite. I get the impression that you have neither shipped any game before, nor even have a basic familiarity with the tools you propose to use. Starcraft was built by hundreds of people working full time who met both of those qualifications

0:21 chord: mgaare: so you have experience making games, then you're perfect to help me right?

0:21 mgaare: I do not, I am not, I will not

0:22 chord: mgaare but you're an expert at clojure at least right?

0:22 mgaare: I'm gonna see about finding some expertise in gracefully exiting this conversation now

0:23 dcolish: m00nligh_: it has been my experience the bulk load approach is faster than TableOutputFormat, your results may vary. You should really explore both with tests and determine what suits your needs best

0:24 chord: why does everyone hate starcraft!!!

0:24 m00nligh_: dcolish: OK. Thank's for your kindly help.

0:25 dcolish: no problem, sorry i cant say more. either approach should be straightforward to implement

0:25 m00nligh_: Yes, thanks very much

0:31 chord: mgaare If i show you A* path finding working will you join the project

0:43 mgaare you play dota 2 instead of starcraft?

0:59 ivan: http://youtrack.jetbrains.com/issue/CLJ-242 vote for the La Clojure highlighting bug

1:03 chord: `cbp help with starcraft project: www.github.com/chord-rts/rts

1:03 [Neurotic]: chord - how come you went with the old style OpenGL?

1:04 chord: [Neurotic] the what old what?

1:05 [Neurotic]: Looking at your OpenGL code

1:05 arrdem: [Neurotic]: you expected a help vampire to have reasonable code?

1:06 chord: [Neurotic] I just learned how to put up an opengl window

1:06 [Neurotic]: arrdem: well, it's not modern OpenGL, but it woul still work

1:06 chord: [Neurotic] if selfish guys like arrdem had taught me how to do modern opengl then it wouldn't have looked like that

1:06 [Neurotic]: chord: check out: http://arcsynthesis.org/gltut/

1:07 It'll make your head hurt, but it's a decent primer on modern OpenGL

1:07 chord: [Neurotic] I need to get core of rts game working before bothering to clean up opengl code

1:07 `cbp: dont pull me into this :P

1:07 [Neurotic]: But really, you should probably look into game dev frameworks.

1:07 actually, I kinda disagree

1:08 arrdem: yay 200x slowdown using a local datastore!

1:08 * arrdem groans and goes for more coffee

1:08 [Neurotic]: Integrate with something like http://libgdx.badlogicgames.com/ is probably a better fit anyway

1:08 chord: [Neurotic] so you going to help with my rts project :)

1:08 [Neurotic]: I just did

1:08 :D

1:08 chord: [Neurotic] fork the project

1:08 you know you want to

1:09 [Neurotic]: no thanks, got enough on my plate

1:09 chord: SUCH AS

1:09 [Neurotic]: But good luck :D

1:09 chord: tell me what you are working on

1:10 [Neurotic] ANSWER ME

1:10 [Neurotic]: Actually, anyone got some conventions regarding what namespace they put things in when working on clojurescript for a clojure backed app?

1:10 Do they tend to keep them them similar? I'm trying to decide what to use.

1:11 chord: `cbp: why don't you want to help me?

1:12 arrdem: [Neurotic]: the pattern seems to be to seperate cljs source from clj, so I don't see an issue with a shared naming scheme. That said having a .client.* and a .server.* to preserve the seperation is probably a good thing.

1:14 [Neurotic]: arrdem: yeah, I have them in seperate source files... the server code is foo.x.y.z and since it's an angular front end, I'm going with foo.ng.x.y.z .. (I can't be bothered refactoring the server side namespace)

1:16 ivan: chord was banned from #gamedev, #bitcoin, #litecoin, #RubyOnRails, and #haskell-game this month

1:16 arrdem: well there's a shocker...

1:16 ivan: truly we are buddhas

1:16 ambrosebs: haha

1:16 chord: ivan how cold you possibly know that

1:16 thats all a lie

1:16 you just made that shit up

1:17 arrdem: ivan: the tranquility of this channel is bounded only by myself and callen

1:36 [Neurotic]: okay, this is weird (?) doing `lein cljsbuild once` is trying to compile my clojure code in src, not in src-cljs ... at least it seems to be, as it keeps falling over from not being able to find the v8 native for dieter. I'm officially confused.

1:36 dieter is only used in the server code

1:37 That's a good question - should cljs have a seperate project.clj/

1:37 ?

1:51 chord: I am addicted to the idea of starcraft clone made with clojure

1:51 you guys need to help me make it

1:52 Apage43: https://www.google.com/search?q=rehabilitation+centers

1:52 chord: very funny apage43

1:56 Apage43 what projects are you currently working on?

1:57 Apage43: psh i'm playing video games

2:03 chord: which game Apage43

2:04 [Neurotic]: Does anyone else create a profile specific for lein-cljsbuild, to remove unwanted/needed dependencies?

2:07 jonasen: dnolen: core.async should work now (on cljsfiddle)

2:09 Pupnik__: chord: dont you think it would be better if you use haskell

2:10 arrdem: Pupnik__: #haskell banned him

2:10 Pupnik__: no help comming from there

2:10 Pupnik__: i cant imagine why

2:17 arrdem: hehehe

2:18 [Neurotic]: So I'm starting to wonder if I should have seperate lein profiles, one for 'server', for the clojure code, and one for 'client' for the clojurescript (since they both sit under the same project.clj) - anyone see any issues with that? or am I looking at this the wrong way somehow?

2:18 Basically as a way to manage the dependencies of each seperately

2:30 piranha: what's the good way to do (into {} [:a "b" :c "d"])? partition returns lists rather than vectors and that seems to fail...

2:32 ambrosebs: piranha: (apply hash-map coll)

2:32 piranha: oh!

2:32 ambrosebs: thanks! :)

2:32 ambrosebs: np

2:33 callen: ambrosebs: congrats on the so-far successful fund raising.

2:33 ambrosebs: cheers callen!

2:34 callen: ambrosebs: I look forward to seeing what you can do to make the Haskell users in my life shut up :)

2:34 ambrosebs: haha

2:36 OtherRaven: quick question for you guys: is it better to put multiple ref-set statements in the same dosync, or use a different dosync for each one?

2:36 Pupnik__: ambrosebs: what are you fund raising for?

2:36 ambrosebs: Pupnik__: http://www.indiegogo.com/projects/typed-clojure/x/4545030

3:28 christopher: does anyone know of a good posix layer for clojure?

3:29 specifically something that gives convenient access to unix domain sockets

4:48 chord: www.github.com/chord-rts/rts

4:48 please help the project

4:52 serycjon: Hello!

4:53 I try to learn clojure and I am using vim with fireplace plugin for clj programming, but today it started to throw strange errors at me

4:53 Error detected while processing function <SNR>30_print_last..fireplace#echo_session_eval..fireplace#session_eval..<SNR>30_eval..189:

4:53 line 38:

4:53 E605: Exception not caught: Error running Clojure: Error: Could not find or load main class clojure.main^@

4:54 When i try to eval simple (ns .....)

4:54 Any idea what could be wrong?

4:54 How to fix it? Thanks!

4:58 piranha: if I have (:require [ns1.ns2.x :as x] [ns1.ns2.y :as y]), can I make it somehow shorter and less repetetive?

4:58 arrdem: piranha: yes.

4:58 piranha: you can rewrite it as (ns1.ns2 [x :as x] [y :as y])

4:58 piranha: arrdem: thanks, let me try...

4:59 can I do maybe (n1.ns2 x y z) ?

4:59 arrdem: piranha: not that I know of.

5:00 piranha: ok, something to try out :-)

5:00 christopher: piranha : iirc that is equiv to [ns1.ns2.x :as ns1.ns2.x] and same for y

5:00 piranha: oh :(

5:00 ok

5:00 arrdem: christopher: yeah that's right.

5:01 piranha: the :as is really a special case for renaming, by default nothing is ever aliased or renamed.

5:01 piranha: I see

5:10 chord: so question can I actually implement efficiently the data structures used by games using a functional language like clojuer

5:12 arrdem: chord: no there's a reason that the games industry is C and C++ to this day.

5:13 chord: arrdem: so you're an expert at making games, show me the list of games you've made

5:14 arrdem: chord: I'd carry this conversation but it wastes my time and ups your ranking in my clojurecup submission. don't worry, I have a ticket with your name on it.

5:14 hfaafb: chord: depends what the requirements of your game are. you can write tic tac toe in clojure with no concern to performance

5:14 indigo: arrdem: Good luck in clojure cup :)

5:15 mtp: the games industry is a software charnel house

5:15 arrdem: hfaafb: you could write tic tac toe naively for a stack machine with no registers and still get reasonable performance

5:15 mtp: i could write tic-tac-toe for a human

5:15 and still get reasonable performance

5:15 arrdem: (inc mtp)

5:15 lazybot: ⇒ 1

5:15 hfaafb: you can probably get away with writing some basic 2d games in clojure if you figure out where your bottlenecks are

5:15 mtp: performance is fucking boring

5:15 nobody cares until you measure it

5:15 arrdem: (dec mtp)

5:15 lazybot: ⇒ 0

5:15 mtp: NET GAIN: 0

5:16 arrdem: mtp: downvotes 'cause I just spent two hours profiling my CC submission's database crap.

5:16 mtp: sorry, i'm overreacting to a $WORK condition

5:16 arrdem: lol

5:16 mtp: $WORK only cares about one thing, and you'll never guess

5:16 arrdem: $CPU_CYCLES?

5:17 mtp: no, they care that the CPU_CYCLES are enough to make the PR happy

5:17 and i think that pr's bad

5:18 (we'll delay a release because the "performance numbers" don't match what they've already sold; we won't actually fix problems that (if fixed) would allow us to sell better performance)

5:18 ((and i'm overreacting to that; carry on))

5:19 chord: for an rts game like starcraft what will be the most performance intensive part?

5:19 pathfinding?

5:19 arrdem: chord: no, far and away the rendering engine.

5:20 chord: arrdem: what do you mean, isn't that the gpu

5:20 * arrdem doesn't even have words

5:20 chord: what do you mean rendering engine

5:21 you mean the rendering the gpu does?

5:21 arrdem: chord: I wish I was dead drunk, because I'd have so much fun mocking your apparent ignorance in public.

5:22 chord: arrdem: no one else on the channel is mocking so obviously they're all just as confused

5:22 indigo: Or maybe just tired

5:22 arrdem: chord: no everyone else is either asleep, hacking for clojurecup or smart enough to not feed the trolls.

5:22 chord: indigo: explain NOW

5:22 indigo: chord: So demanding.

5:23 arrdem: indigo: were it not for the existance of a github repo in clojure and some other stuff I'd swear he's just a bot.

5:23 mtp: arrdem‘ yeah i'm kinda out of words too

5:24 indigo: Lol

5:24 chord: arrdem: AH HAH SO YOU ADMIT LOOKING AT www.github.com/chord-rts/rts

5:24 arrdem: chord: if it would save my mother's life I wouldn't read your copypasta code

5:25 chord: so you concede

5:25 SO EXPLAIN RENDERING ENGINE

5:25 gws: chord: http://en.wikipedia.org/wiki/Rendering_engine

5:25 arrdem: chord: concede what? that you're a blithering idot at a desk somwhere with a script for wasting otherwise productive peoples time?

5:26 chord: so where does the performance go into the rendering engine

5:26 gws: rendering

5:26 chord: thats the gpu taking the hit right?

5:26 gws: The core functionality typically provided by a game engine includes a rendering engine (“renderer”) for 2D or 3D graphics, a physics engine or collision detection (and collision response), sound, scripting, animation, artificial intelligence, networking, streaming, memory management, threading, localization support, and a scene graph.

5:27 chord: we are talking about starcraft clone only

5:27 we don't need fancy AAA game shit

5:28 so I am asking for a starcraft clone where is all the cpu and memory problems going to come from?

5:29 path finding is apparently not one of them

5:29 so gws can you explain where the problems will be specifically for starcraft clone

5:30 serycjon: chord: just sit down and try to write it :) Maybe one day you will understand what we are trying to tell you...

5:30 chord: I asked a question, the only way I can understand an answer is if someone answers it...

5:30 mtp: chord‘ no

5:30 you are asking the wrong question

5:31 and you're not listening to the answer

5:31 chord: not listening to which answer

5:31 mtp: if you listen to the answer (which is sometimes "you are asking the wrong question"), you can learn to ask the right one, but YOU have to change

5:32 and i think i've made my point to enough people, so, good night :)

5:32 indigo: Yeah, going to go sleep too

5:33 arrdem: 99.2%...

5:34 chord: so you guys don't know the answer to my question in other words

5:35 gws: chord: i would guess, but can't prove, that it is possible to make a performant SC1 clone in clojure that's performant enough on modern hardware to be playable

5:35 arrdem: chord: I'd like to point out that in 718 messages to this unfortunate channel you have yet to pose a reasonable question or accept criticism. The average person gets an answer in three messages.

5:35 chord: belive me I'm counting.

5:35 chord: gws: because of which part?

5:35 gws: i don't understand the question

5:36 chord: teacher told me that there is no dumb question blame my teachers

5:36 why is a performant sc1 clone in clojure not possible

5:36 gws: did you read what i wrote?

5:36 arrdem: gws: no, no he didn't

5:37 damnit I forgot the end case on my loop/recur

5:37 99.98% and never gonna end.

5:37 chord: so which part of starcraft 2 is the problem in a reimplementation using clojure

5:38 serycjon: chord: the programmer...

5:38 arrdem: (inc serycjon)

5:38 lazybot: ⇒ 1

5:38 chord: you guys haven't actually answered whats the big deal with clojure

5:39 show me a benchmark

5:39 arrdem: chord: here's the playform you should lear.

5:39 chord: https://www.usenix.org/conference/woot13/page-fault-weird-machine-lessons-instruction-less-computation

5:41 chord: gws you gotta help me, your'e the only one answering

5:44 gws: chord: it's possible to create a performant game on the JVM (see minecraft if i'm not mistaken) so it should be *theoretically* possible to create a playable SC clone in clojure

5:45 piranha: arrdem: eh, it seems this "optimization" of namespaces is only possible in clojure, but on in clojurescript

5:45 chord: didn't you just say the opposite

5:45 gws: no

5:46 callen: gws: calling Minecraft performant on the client or server-side is a bit of a stretch.

5:46 arrdem: callen: it performs well... at wasting ram!

5:46 * gws shrugs

5:46 gws: apparently plenty of people think it's playable

5:47 chord: gws: ok so can all of those imperative data structures be done in a performant way functionally?

5:47 gws: that are used for games

5:47 callen: Nobody really knows for sure.

5:47 Papers on FRP attack the problem from one direction, industry practice from another.

5:48 chord: callen: WTF HOW CAN NOBODY KNOW

5:48 callen: they'll meet in the middle eventually.

5:48 arrdem: we hope

5:48 callen: arrdem: I trust in the pain of gamedev to be a good incentive.

5:48 serycjon: chord: those who care are too lazy to quit irc and start programming :)

5:48 arrdem: callen: gamedev has bigger issues than functional vs. imperative :|

5:48 chord: ok but worst case scenario is that 99% of my code will be clojure and 1% will be in Java so I can do the imperative stuff?

5:51 gws: chord: maybe pick up a book on clojure or something

5:51 chord: gws: I am going to do the generic thing of winging it along the way

5:52 serycjon and arrdem: I am going to prove you both wrong by implementing a* in clojure PROVING TO YOU THAT I CAN MAKE PROGRESS

5:52 borkdude: since no-one in #emacs answers my question, I'll just try it here. This function should, after its execution show the same buffer as where I started it, right? https://www.refheap.com/19131

5:52 callen: arrdem: certainly.

5:52 borkdude: it doesn't, points me to the archive file. what to do about it?

5:52 callen: arrdem: good luck telling Haskell users that.

5:52 gws: chord: then do it, and link the results when you're done

5:53 chord: gws: if I show you guys a working a* then you gys are gonna stop making fun of me right?

5:53 TEttinger: borkdude, I have no idea how emacs works

5:54 we're having troll problems now, unfortunately

5:54 christopher: borkdude: are you trying to switch to a buffer and execute some stuff and switch back? use with-current-buffer to do that

5:55 scottj: borkdude: maybe save-excursion or save-window-excursion

5:55 gws: chord: can't speak for anyone else. good luck. i'm gonna stop chatting - just interacting with you has probably got me on a few people's /ignore

5:56 borkdude: christopher scottj I didn't even needed the wrapped save-current-buffer in my previous version of emacs, but I think org-mode might have changed org-archive-subtree

5:56 TEttinger: gws, I still care about you

5:56 gws: TEttinger: means a lot *taps chest twice in quick succession*

5:56 TEttinger: *shies away*

5:58 arrdem: 'night gents

5:58 borkdude: scottj ah, save-window-excursion is the only thing that worked thanks

6:00 chord: I am going to prove you all wrong by reading this http://theory.stanford.edu/~amitp/GameProgramming/

6:05 callen: arrdem: you're sleeping?

6:48 christopher: i've hacked support for nrepl to use unix domain sockets. this allows you to use unix permissions to protect embedded nrepls running on production servers. right now with tcp local ports, if any process running as any user is compromised, your nrepl can be compromised too.

6:48 i'd love for people to help me test it: https://github.com/monsanto/nreplds

6:52 john2x: I'm getting a compiler exception with this form. It seems there's something wrong with my if form? I'm blind as to what it is though. https://www.refheap.com/19132

6:54 is it because I'm recursively calling the function?

6:59 nope, tried removing the function call.

7:57 oskarth: (System/getENV "MYENV") returns nil in my repl / server log, but in my terminal it gives me the right value. What's wrong?

7:59 christopher: often daemonizers will clear the environment, sudo does this too on some systems

8:01 oskarth: christopher: I assumed that restarting with 'lein ring server' would catch up with ENV that's set. What else do I need to do to get it up to date?

8:01 christopher: oskarth i actually don't know much about lein ring server, when i speak of daemonizers i mean stuff like start-stop-daemon and upstart

8:01 sorry

8:02 oskarth: I see, thanks for the pointers though

8:08 got it to work. The problem was that I didn't source it globally. I solved it by simply exporting it in my dev-terminal-session before running 'lein ring server'.

8:10 naeg: what exact advantages does typed clojure have? except the obvious type checking before runtime

8:10 Oddman: anyone know if there's a nicer templating approach to HTML than hiccup?

8:12 christopher: oddman: have you tried enlive?

8:13 Oddman: I haven't, no - but had a look

8:13 was wondering if there was one that was HTML focused?

8:13 rather than having code generate html

8:13 jonasen: Oddman: https://github.com/davidsantiago/stencil is pretty good

8:13 Oddman: which I've never been a huge fan of except for rather complex requirements

8:13 oskarth: Oddman: enlive is afaik html focused

8:13 squidz: Oddman: maybe mustache? I think there was a library out there called clostache

8:14 Oddman: oh nice, that could work

8:14 christopher: enlive is html focused; you fill in the template using xpath style selectors

8:15 Oddman: yup stencil could be what I want :)

8:15 thanks all

8:53 jonasen: dnolen: Another core.async example: http://cljsfiddle.net/fiddle/jonase.snake (or http://cljsfiddle.net/view/jonase.snake)

8:57 dnolen: jonasen: nice

9:48 lunk: https://github.com/lunkdjedi/clj-ta-lib

9:48 fun little weekend project

9:59 dobry-den: hiccup takes discipline.

10:01 much easier to forget that you're ostensibly trying to keep your view layer dumb when it's just another clojure datastructure :(

10:02 Oddman: clostache seems more recent+popular.

10:12 Oddman: dobry-den cheers :)

10:28 john2x: I'm getting a compiler exception with this form. It seems there's something wrong with my if form? I'm blind as to what it is though. https://www.refheap.com/19132

10:32 dobry-den: john2x: i think you have to bind the caught exception to something like 'e'

10:34 think your if statement needs to be 3rd arg to catch

10:37 john2x: dobry-den: thanks! that was it

10:39 is it possible to dynamically create functions, with their names coming from a list of strings?

10:39 darrickw: john2x: yes, with a macro

10:41 (defmacro defthing [s] `(defn ~(symbol s) [] 42))

10:41 Hey, I've got a core.logic question, or maybe a problem. I've written a simple relational parser which works ok in clojure core.logic, but has a problem in ClojureScript.

10:42 john2x: darrickw: thanks!

10:42 AimHere: john2x, darrickw, for suitably static values of 'dynamically'. If the strings are generated at runtime, then that won't work, of course

10:43 darrickw: sure it will, as long as you aren't generating them in clojurescript...

10:43 john2x: Ah the strings are defined by me, I think this'll do. I guess I'll be writing my first ever macro. yey

10:44 darrickw: Re my core.logic problem. Here is the expected result:

10:44 {:type :model, :model [tweet], :child {:type :rel, :rel responses}}

10:44 and here is the actual result:

10:44 {:type :model, :model <lvar:value_238>, :child <lvar:child_241>}

10:45 The lvars appear only in clojurescript. If I inspect them, I can see that they were unified.

10:45 Here is a gist: https://gist.github.com/pangloss/6752822

10:49 ambrosebs: Racket-con! http://t.co/7Up5epRa2g

10:50 darrickw: Live stream from an SLR?

10:50 ambrosebs: SLR? It's in Northeastern :)

10:50 darrickw: just noticed that every now and then it does a crazy little defocus/refocus

10:51 ambrosebs: yea we're trying to get their attention on #racket :P

10:51 I think the camera operator is watching the talk

10:53 darrickw: ambrosebs: you do core.logic stuff, don't you?

10:53 ambrosebs: darrickw: a bit yes

10:53 never in cljs tho

10:54 darrickw: oh yeah… still the behaviour seems strange to me. Do you think I should just file a bug on that?

10:54 Is there a tracker?

10:55 oh nevermind, I found it...

10:55 I guess I willl just file a bug.

10:57 ambrosebs: darrickw: probably yes.

10:57 dobry-den: I've made decent progress replicating the patterns i'm used to from Rails into my Clojure app.

10:57 i want to eventually extract it. i'll name it Clojy on Clails.

11:12 juliangindi: For some reason, the function I am trying memozie (to reduce API calls) keeps hitting the API server. Could someone give this a look and see what they think: https://gist.github.com/Julian25/6748965

11:38 `cbp: juliangindi: how are you telling that the server is getting hit?

11:38 juliangindi: also don't use def inside a function

11:38 juliangindi: I'm looking at the API's server console

11:45 sveri: hi, i am trying to parse xml and i was able to get something running, this: http://pastebin.com/JDN6DUDj is the code that gets me one subtag of <item> however, i need all the subtags and its content of item, how would i do that?

11:49 juliangindi: cbp: any idea what could be going wrong?

11:51 `cbp: juliangindi: sec

11:51 borkdude: Where would the grep function from old string contrib be nowadays?

11:52 `cbp: juliangindi: sorry give me an hour and ill get back to you

11:52 juliangindi: cbp: no worries. Thanks! Much appreciated

11:53 borkdude: I guess I can just copy it

12:05 mischov: sveri: you might check out enlive or laser for some examples of how they go about selecting html.

12:19 vijaykiran: ehd: Mine is built with Pedestal

12:26 `cbp: juliangindi: does (println (core-memo/memoized? attempt-request-memo)) print true?

12:28 juliangindi: it does

12:33 sveri: mischov: thank you, i will try that

12:37 `cbp: juliangindi: then i don't know haha. It should be getting memoized. I did an example with clojure.core.memoized/ttl and it memoized correctly. Also looked at the source and didnt find anything weird there, you must not be calling it with the same arguments

12:38 juliangindi: cbp: yeah that might be it. I'll run a few tests. Thanks a ton for looking it over though, much appreciated

12:39 `cbp: np

13:05 napper: what is a good document that'll give me a solid understanding of how clojurescript implements and compartmentalizes IJavascript. I would like to know how clojurescript makes decisions for the namespace. (ns)

13:06 Or if you could point me to where this is beging done in the source, is equally welcome. I cannot seem to find it.

13:10 seangrov`: napper: You mean src/clj/cljs/closure.clj?

13:10 Javascript namespaces are basically implemented (from what I understand) via google closure's module system of `provides` and `requires`

13:14 napper: seangrov, something more along the lines of: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/compiler.clj#L865 - I suppose all I needed to do was pose the question. I should invest in a rubber ducky.

13:14 mtp: (you're the one)

13:18 seangrov`: napper: Yeah, that's quite a bit earlier in the process

13:33 napper: seangrov, I see...hum

13:35 seangrov`: Alright, time to do this pedestal thing

13:36 Hopefully it's less than a day to grok some of the ideas

13:45 rurumate: dnolen: in clojurescript 0.0-1909 my code doesn't run anymore, chromium says Uncaught TypeError: Cannot call method 'call' of undefined

13:46 dnolen: dnolen don't know which version it was before the change, because version info was missing in project.clj

13:50 bbloom: rurumate: have you done a `lien cljsbuild clean` ?

13:55 juliangindi: Why would stringing 'rests' together work and using 'nth' would not. (rest (rest (rest data))) works but not (nth data 3)

13:55 (nth data x) always returns nil

13:58 Kelet: Anyone know how to compile a file with Clojure? I set my CLASSPATH to ".". I (set! *compile-path* "."). The file is word.clj in current directory, and it is (ns word). When doing (require 'word) or (compile 'word) it always tells me it can't find word.clj or word__init.clj in classpath.

13:59 rurumate: dnolen: bbloom yup; report coming

14:00 whoops, should learn to quote

14:19 muhoo: Kelet: use lein

14:23 Oddman: also, clabango

14:24 Kelet: muhoo: I do, but I also think it's silly to not know how to compile a file in a programming language.

14:24 muhoo: Kelet: clojure isn't really a language as much as it is a library for the jvm

14:25 it's not like it's got its own compiler.

14:25 Kelet: I thought it compiled its code into JVM bytecode which was then interpreted by whatever JVM you have

14:25 muhoo: that said, there may be a way to get lein to spit out what it's doing when you do lein compile

14:26 it's essentially invoking javac with a massive -cp and other args

14:26 yes, it compiles code to jvm bytecode. but clojure "the language" is just a jar file... it's a library

14:26 Raynes: muhoo: I think Selmer is probably a better bet than Clabango at this point.

14:26 muhoo: selmer, right

14:27 people keep changing this stuff :-)

14:27 Raynes: Goddamn it people, stop making better things than existing things. God.

14:28 muhoo: Raynes: did you get lured into the clojure cup insanity?

14:28 Raynes: muhoo: No, despite callen's insistence. I just helped him find team members who weren't dead weight lazy people instead.

14:28 :p

14:29 seangrov`: Ah, too bad, I could've been dead weight lazy people

14:34 `cbp: mm has anyone used protocol buffers recently with flatland-protobuf?

14:35 muhoo: i'm curious to see what kind of stuff falls out of that clojure cup thingus.

14:35 `cbp: I seem to remember it throwing exceptions when making a protobuf with an invalid field, also stuff like (protobuf-load (protobuf-dump (protobuf type {:a 1}))) returns {}

14:36 muhoo: i did some protobuf stuff earlier in the year, but i just used raw java interop

14:37 worked fine for what i needed, IIRC

14:37 * muhoo goes back to procrastinating

14:38 callen: seangrov`: I would've roped you in, but you were in foreign lands in search of fortune it seemed.

14:38 `cbp: (protobuf-schema type) always seems to have {} for :fields :(

14:38 seangrov`: Yes, I would have just been dead weight

14:38 callen: muhoo: Selmer is about ~1000x faster than Clabango. I'm not exaggerating.

14:39 `cbp: callen: :-D

14:48 nevermind i think I'm dumb and forgetting how to use protobufs correctly like usual

14:56 dobry-den: A naive layman's alternative to Redis would be to have a Clojure datastructure that's syncd to a file for durability. is there an efficient way to do something like this?

14:56 rurumate: ,(format "%s" "is there no there no (format a b) in clojurescript?")

14:56 clojurebot: "is there no there no (format a b) in clojurescript?"

14:57 `cbp: rurumate: I think you can use goog's format?

14:57 rurumate: oh, ok didn't find that one

14:58 ambrosebs: First stretch goal for Typed Clojure campaign: complete Bronsa's self-hosting Clojure compiler CinC http://www.indiegogo.com/projects/typed-clojure/x/4545030

14:59 bbloom: nice! congrats

15:00 ambrosebs: bbloom: cheers!

15:00 I think we all want to see CinC!

15:01 aaand passed 20k!

15:03 seangrov`: Yes, congrats ambrosebs, really very cool to see

15:03 callen: seangrov`: you and Raynes both could've contributed. Found some awesome people for the team :)

15:03 ambrosebs: thanks!

15:03 callen: ambrosebs: congrats :)

15:03 seangrov`: How long do you expect to hack for $20k though?

15:03 ambrosebs: about 6 months I think. Maybe a little longer

15:04 bbloom: really depends on what city you're in :-)

15:04 seangrov`: Well, sure, if it works for you, it's definitely awesome. All of us will benefit

15:05 ambrosebs: How is CinC related to typed clojure?

15:05 bbloom: seangrov`: he made a video to talk about that on the indiegogo page

15:05 seangrov`: Ah, didn't realize that was a different video

15:06 ambrosebs: I can't wait to rewrite the checking parts of typed clojure with CinC!

15:07 it's a compiler that can actually be changed, hallelujah!

15:08 palango: Is there some sort of function to create hierarchic lists from some lists like here: https://www.refheap.com/19145

15:10 bbloom: palango: certainly not in core, but it's probably pretty easy to do with reduce

15:10 palango: why not use maps though?

15:11 ,(reduce #(assoc-in %1 %2 {}) {} [[:a :b :c] [:a :b :d] [:a :c :b] [:a :d] [:b :a]])

15:11 clojurebot: {:b {:a {}}, :a {:d {}, :c {:b {}}, :b {:d {}, :c {}}}}

15:12 seangrov`: I didn't realize feature-expressions had been decided on for 1.6. Glad to see something happening around code sharing

15:13 bbloom: seangrov`: last i saw was this: http://dev.clojure.org/display/design/Release.Next+Planning says "post 1.6"

15:13 palango: bbloom: that's indeed easier than I thought, thanks

15:14 seangrov`: bbloom: Ah, I just saw it on the pedestal tutorial https://github.com/pedestal/app-tutorial/wiki/Testing#sharing-code

15:14 bbloom: seangrov`: i wouldn't read too deeply in to that

15:16 seangrov`: bbloom: Yeah, I was surprised by it from having read the dev.clojure.org discussion recently

15:16 Bronsa: I want to thank ambrosebs for entrusting me with his campaign's first stretch goal, I'm obviously hoping we can make through the funding and get even more motivation to further develop CinC

15:17 seangrov`: Bronsa: is the $5k to "finish" CinC?

15:17 ambrosebs: seangrov`: it's $5k to keep developing.

15:18 seangrov`: Ok, makes sense

15:18 ambrosebs: seangrov`: Bronsa is the best person to do it, I want him doing CinC as much as he can :)

15:18 Bronsa: seangrov`: to keep developing it, meaning also I'll spend a good amount of time on making CinC as easy to understand as possible, meaning blog posts describing the internals, good documentation etc

15:20 rurumate: dnolen, bbloom: oh nvm, it seems like something else was the problem

15:20 CLJS-587 resolved indeed

15:20 seangrov`: Bronsa: What's the chance/general-timeframe of this replacing the current Java compiler?

15:22 Bronsa: seangrov` honestly I don't see CinC replacing the current Java compiler any time soon -- as tools.reader is not going to replace LispReader.java

15:23 the value of the project lies in its analyzer, that can be used/extended by various tools (like core.typed)

15:23 seangrov`: Bronsa: Curious why - tools.reader was wonderful to work with when transitioning the cljs compiler

15:23 Bronsa: and in making it easier to experiment with various optimizations/transformations

15:23 jjido: What is CinC?

15:24 seangrov`: jjido: https://github.com/Bronsa/CinC

15:24 Bronsa: jjido: a still experimental (but mostly working!) clojure analyzer/compiler written in clojure

15:24 seangrov`: CinC?

15:24 clojurebot: CinC is https://github.com/Bronsa/CinC

15:24 clojurebot: 'Sea, mhuise.

15:26 tacoman: is there any way to prevent the Emacs *nrepl* buffer from autokilling if my process dies?

15:26 jjido: self-hosting?

15:26 seangrov`: Bronsa: The other question I had was how you see it affecting the cljs compiler - the emit phas is obviously analogous to the jvm-bytecode emit phase in CinC. Are there any other benefits to cljs beyond the analyzer?

15:26 tacoman: jjido: as in, lein trampoline?

15:27 Bronsa: seangrov` actually emitting jvm bytecode requires quite some more machinery than emitting js

15:27 seangrov` the CinC analyzer uses children-keys to implement a number of passes over the "base" AST

15:27 jjido: tacoman: doesn't tell me anything

15:29 Bronsa: seangrov` virtually cljs could use CinC's analyzer with some custom passes and plug the already existing emit

15:30 seangrov`: Bronsa: That's more of what I was wondering

15:30 tacoman: jjido: sorry, I'd thought you were talking about my issue when you said "self-hosting", I'm guessing you meant the discussion here

15:31 Bronsa: seangrov` using CinC to emit cljs is something I want to try -- not a main objective though and not really going to happen soon

15:37 cpetzold: with core.async, is there a way to know of a channel has been closed other than trying to take?

15:37 know if a*

15:38 dobry-den: does @username notify someone in a Gist comment?

15:39 callen: dobry-den: just how github works in general

15:39 arrdem: home stretch.

15:39 cpetzold: i basically have a nesting of looping channels, and i want them all to close and stop when the top level one is closed.

15:43 bbloom: cpetzold: no. any observation of the state of a mutable object in a concurrent world is prone to race conditions

15:43 cpetzold: imagine you ask "are you closed?" get "nope", somebody else closes it, then you take a value

15:44 cpetzold: a better solution to your problem is to create a control channel and multiplex on it with your other channels

15:44 arrdem: callen: congrats, best of luck. I've punched out due to real life Q_Q

15:45 cpetzold: bbloom: ah yeah makes sense

15:46 bbloom: cpetzold: are you the Charles Petzold of microsoft/windows programming book fame?

15:46 cpetzold: bbloom: no :P

15:47 Conner Petzold, no affiliation with Microsoft

15:48 no relation either, afaik

15:49 bbloom: OK then. I just had to ask because I wouldn't imagine anybody who has spent as much time putzing with the windows message pumps as that guy has ever asking a question about how to accidentally create a race conditions ;-)

15:49 cpetzold: lol, no probably not

15:50 bbloom: I'm certain that guy had written WaitForMultipleObjectsEx more than a few times in his life!

15:50 cpetzold: I'm also not cool enough to sport the tattoo: http://charlespetzold.com/PetzoldTattoo.jpg

15:50 * bbloom cringes

15:50 * arrdem shudders

15:50 * bbloom winces

15:51 cpetzold: if i were more of a hipster maybe i could do it ironically

15:53 wow, he published a book last year! that's over 20 years of writing books about windows programming

15:54 bbloom: most people lose money publishing tech books, but i think he's so entrenched in this msft culture that his books just sell by the truck load to bigcos

15:58 dnolen: finally http://github.com/clojure/clojurescript/commit/782e10ed2be766323d2bc7560dda636e30eaa647, http://github.com/clojure/clojurescript/commit/b567bc55b54583d31256499c30c1f1a4ee30d900

16:00 ambrosebs: dnolen: yay!

16:03 amalloy: fwiw dnolen, you can make that into one url, which is easier to read: https://github.com/clojure/clojurescript/compare/7153b297...b567bc55b

16:03 dnolen: amalloy: too civilized

16:04 heh, thanks, yeah I just always forget about that

16:04 bbloom: git help revisions # super freaking useful man page

16:05 sadly, github's URL scheme doesn't support arbitrary refspecs

16:11 georgek: hi, is there a way I can reload clojure files with jetty using emacs nrepl *while* also connected to a browser nrepl in the same app? Right now I can run the app with jetty and modify clojure files and see the results on page refresh, but once I connect the browser repl, trying to compile and load clojure files (C-c C-k) causes an error in the cljs repl, and a page refresh shows the old page of course

16:12 as a result I have to quit back to the clojure repl to modify clojure files, then reconnect the browser repl...I'm using Austin as the browser repl

16:12 I tried running two nrepls in emacs, but I think Austin needs to launch in the same context in which I run-jetty

16:15 callen: bbloom: aren't tech books supposed to be boosters for consulting gigs?

16:15 bbloom: callen: for most people, yeah

16:16 callen: but that guy is basically the dude who writes all the mass produced msft instruction manuals given out at conferences and such

16:16 basically anything he writes is a best seller in the msft community simply b/c he is the default

16:18 callen: bbloom: I know who Petzold is, I used to work in the .NET salt mines.

16:19 bbloom: I once helped move a guy who was apparently a big Cisco router nerd. Wrote a bunch of books

16:19 dude had so much stuff in his house it took a team of 14 people three 12 hour days to move him.

16:19 bbloom: sheesh

16:20 callen: bbloom: yuppies man. You give 'em an inch, and they'll own every widget on the planet.

16:25 does the :uberjar profile in a project.clj work for anybody else?

16:25 I still get the annoying AOT warning and it doesn't seem to use the options.

16:25 do I need to explicitly say with-profile uberjar?

16:32 ToBeReplaced: callen: it works for me, no extra work necessary

16:33 bbloom: huh. I didn't realize that reference objects had metadata & it's mutable

16:38 Bronsa: bbloom: yeah, also, suppose you have a tagged literal that returns an IRef -- ^meta syntax should overwrite the ref-meta at read-time

16:40 bbloom: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LispReader.java#L733-L737 I'm not exactly sure why it resets the meta instead of updating it though

16:40 bbloom: Bronsa: heh, i literally just looked that up & was about to paste the precisely the same lines to you :-P

16:41 crazy

16:42 the Whitesmiths style braces still weird me out :-P

16:42 Bronsa: bbloom: that line left me wondering for quite some time while writing tools.reader.

16:42 in the end I chose to keep the behaviour, but I think it's wrong.

16:43 bbloom: Bronsa: so it seems that some var metadata is mutated during bootstrapping of core, but other than that, i haven't seen reset-meta! or alter-meta! ever used

16:46 Bronsa: bbloom: yeah, actually I've never seen metadata used on references other than vars -- and that is usually set automatically by def/intern

16:47 bbloom: Bronsa: i'm trying to make some more sense of the philosophy of metadata

16:47 i keep going back and forth between "metadata is awesome" and "metadata is a nightmare"

16:47 i can't come up with any sort of rule on when metadata is preserved

16:47 & it's so easy to write code that would violate any rule you come up with

16:47 lazybot: java.lang.RuntimeException: Unable to resolve symbol: it's in this context

16:48 bbloom: & lazy bot is still bugged with respect to how i like to join multiple messages together :-P

16:48 lazybot: java.lang.RuntimeException: Unable to resolve symbol: lazy in this context

16:48 Bronsa: bbloom: my main complaint with metadata in clojure is its weird (and mostly undocumented) evaluation semantics

16:48 bbloom: Bronsa: you mean with respect to the reader? or like actual runtime evaluation semantics?

16:49 Bronsa: bbloom: regarding read-time metadata, depending on the context it may or may not get evaluated

16:49 or even get evaluated twice!

16:50 bbloom: Bronsa: evaluated twice?

16:50 Bronsa: try (def ^{:foo (println "foo")} foo)

16:50 bbloom: lol well that seems like a bug

16:50 is that only with def ?

16:51 isn't def like the only remaining interpreted op?

16:51 Bronsa: as far as I can remember

16:51 fu86: hi

16:51 I use a lib (image-resizer) to do some image manipulation

16:52 unfortunately the lib sets the filename itself and I cant change this

16:53 Bronsa: bbloom: ^{:foo (println "foo")} (do :foo) here it won't get evaluated for example

16:53 fu86: https://github.com/josephwilk/image-resizer/blob/master/src/image_resizer/fs.clj#L14

16:53 I want to replace this function

16:54 is there a clean way to do it in clojure?

16:55 bbloom: fu86: you can monkey-patch using ##(doc with-redefs)

16:55 lazybot: ⇒ "Macro ([bindings & body]); binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body. The temp-value-exprs will be evaluated and each resulting value will replace in parallel the root value of its Var. After the body is executed, the ... https://www.refheap.com/19147

16:55 bbloom: all the usual monkey-patching caveats apply

16:56 fu86: nice, thanks!

16:57 piranha: is there a good way to check if one vector contains all elements of other vectors?

16:58 bbloom: ,(require clojure.set)

16:58 clojurebot: #<CompilerException java.lang.ClassNotFoundException: clojure.set, compiling:(NO_SOURCE_PATH:0:0)>

16:58 bbloom: ,(require 'clojure.set)

16:58 clojurebot: nil

16:58 bbloom: ,(doc clojure.set/subset?)

16:58 clojurebot: "([set1 set2]); Is set1 a subset of set2?"

16:58 bbloom: piranha: use (into #{} ...)

16:59 or rather just (set ...)

16:59 piranha: bbloom: oh, clojure.set is not available in clojurescript...

16:59 ah damn sorry

16:59 I don't need it there %)

16:59 It's all messed up in my head already, damned clojure cup

17:00 bbloom: piranha: https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/set.cljs

17:00 it's there

17:00 piranha: hmmmmm strange but ok

17:01 bbloom: Bronsa: so the thing w/ metadata i was thinking about was stuff like metadata on lists

17:02 Bronsa: conj preserves metadata on lists, but not on seqs

17:03 Bronsa: well, conj on a seq is cons

17:03 I think.

17:03 bbloom: Bronsa: yeah, that's right

17:03 and cons doesn't preserve meta

17:04 assoc : conj on maps :: cons : conj on seqs

17:04 those ops on maps preserve, but not on seqs

17:05 but then again :: cons (member function) : conj on lists

17:05 Bronsa: bbloom: I feel like cons shouldn't preserve metadata

17:05 bbloom: ok, why? and what about conj on to lists?

17:07 Bronsa: bbloom: cons has no relationship with the original seq, when you use cons you know you're constructing a new cons with the seq as its tail

17:08 gfredericks: cons[truct]

17:08 Bronsa: bbloom: I agree however that conj should preserve metadata even on seqs

17:09 gfredericks: that gets you into this weird feeling situation where a whole "tree" of objects have the same metadata

17:10 Bronsa: bbloom: an easy fix for this should probably be changing this line https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ASeq.java#L126

17:10 gfredericks: when you conj onto other things you don't inherently maintain a reference to the source object

17:10 Bronsa: to "return new Cons(meta, o, this)"

17:12 bbloom: gfredericks: yeah, that's an interesting problem: when you push on to a singly linked list, you preserve the interior meta pointer

17:12 if you dissoc from a map, you preserve the metadata

17:12 but if you pop from a list, you get the metadata of list

17:12 er of the NEXT list i mean

17:13 ,(-> (list 1) (with-meta {:x 1}) (conj 2) (with-meta {:y 2}) next meta)

17:13 clojurebot: {:x 1}

17:13 gfredericks: yeah you certainly don't want this behavior e.g. when using [node child child ...] tree structures

17:14 which seem more comparable in a way

17:14 bbloom: compare:

17:14 gfredericks: (to lists)

17:14 bbloom: ,(-> {:a 1} (with-meta {:x 1}) (conj [:b 2]) (with-meta {:y 2}) (dissoc :b) meta)

17:14 clojurebot: {:y 2}

17:14 Bronsa: ,(meta (rest (with-meta (list 1 2) {:foo true})))

17:14 clojurebot: nil

17:14 gfredericks: ,(-> [1 2] (with-meta {:x 1}) (seq) (meta))

17:14 clojurebot: nil

17:15 gfredericks: ^ unrelated but interesting

17:15 bbloom: it almost seems like a lot of these issues would go away if you used encapsulator objects & only allowed metadata on those

17:16 but then you'd have an object of overhead for every "root" in to a data structure

17:16 would greatly simplify equality, printing, dispatch, etc too

17:16 it's basically the "newtype" idea from haskell

17:17 which does plenty of compiler cleverness to eliminate those capsule objects at compile time

17:18 the seqs vs cons vs lists also makes me wonder about (= some-seq some-vec)

17:19 still don't know how i feel about that :-P

17:20 Bronsa: bbloom: I would be ok with that if we also had a type-dependent comparator

17:20 but then we get into the CL hell of having n different equality comparators

17:22 bbloom: Bronsa: you can get around that problem by having a special type of encapsulator that provides for custom equality semantics

17:22 (= (wrap x) (wrap y))

17:22 something like that

17:23 issue comes in when you have equality buried in a data structure

17:23 b/c then you can only wrap an argument & you need to have proxy objects, delegation, etc. gets complicated fast

17:23 Bronsa: bbloom: isn't wrap just seq?

17:24 bbloom: that's one concrete example of a more abstract idea, i guess

17:25 in theory, you could define equality predicates that only operate on a particular type where both arguments are of the same type. then you define some coercion operators. then you can compose a general equality predicate as the composition of coercion and the type-level equality predicate

17:27 a -> a -> Bool vs a -> b -> Bool

17:28 Bronsa: yes, I see what you mean

17:28 bbloom: haskell kinda punts though, requiring the programmer specify a coersion explicitly, which means that general purpose heterogeneous data types are hard to do

17:28 which basically makes 99% of my clojure programs inadmissible to a haskell type checker :-P

17:28 Bronsa: bbloom: in clojure that would get weird with all the various seq implementations

17:29 bbloom: clojure's equality semantics are such a big step up from every other dynamic language i've ever seen, it's hard to complain

17:29 but i can't help but feel like we're so close to something even better :-)

18:19 juliangindi: I keep getting this error I cannot figure out and isolate. Clojure.lang.Character cannot be cast to Clojure.lang.Named

18:19 gfredericks: juliangindi: do you have a stack trace?

18:20 juliangindi: yeah one sec

18:20 Jarda: If I have a value like {:first "f", :second "s", :third "t"} is there an easy way of extracting just a part of it, like {:second "s", :third "t"}

18:20 gfredericks: Jarda: select-keys

18:21 Jarda: gfredericks: thanks! just what I was after

18:21 juliangindi: gfredericks: https://gist.github.com/Julian25/6756907

18:21 cddr: Can the "instance expresion" part of a dot form (e.g. the "ctx"

18:21 in (. ctx (arc ...))) be threaded by the threading macro?

18:21 gfredericks: cddr: yes

18:22 you can also (.arc ctx ...), which works just as well with threading but less parens

18:22 juliangindi: is weatherbeacon.views.main your code?

18:22 juliangindi: gfredericks: part of it, yes

18:22 gfredericks: this looks like a (ns ...) problem

18:23 did you put the docstring in the wrong place?

18:23 juliangindi: hmm. I don't think so. I'm looking into it

18:24 gfredericks: I got that error with (ns user (:require clojure.test) "foo"), for example

18:29 onefourseven: I'm getting this error with http-kit. Anybody know why? "exceed max line 4096"

18:30 SrPx: What is the linguistic/recommended way to represent data/object? For example, in JavaScript you use mostly hashes, but that is inherently slow if not optimized, obviously, because of dynamic hashing

18:32 mtp: i try not to care about performance, and i also try to look at the object system in the language

18:32 gfredericks: SrPx: we don't do object-oriented programming very much. data is still stored in hash-maps, but not "methods"

18:32 mtp: to answer both and neither of your questions

18:33 gfredericks: protocols/records are one anwser, but they aren't used in the common case

18:33 mtp: "stop conflating clojure and OOP"?

18:34 hyPiRion: start out with maps, then go to records if performance is an issue is probably good enough

18:35 gfredericks: then go to byte-array-backed-structs and lots of macros if performance is an issue

18:35 SrPx: Yes, I know, I mean actually just data. My worry (if you just hash maps for everything) is that it will not be as fast as, say, a struct in C (I do some heavy numerical table crunshing stuff)

18:36 I love using hashes, though, so it boils down to, are them optimized to things like C-struct in the end?

18:36 gfredericks: clojure has somewhat of a continuum of features between hashmaps and the lowest level

18:36 hyPiRion: Records are, I think?

18:38 * gfredericks benches hashmap lookup versus record lookup

18:39 hyPiRion: Well, I would guess that for small hashmaps, the difference is roughly 0

18:39 mtp: SrPx‘ "the first thing i said"

18:40 gfredericks: hyPiRion: do you mean arraymaps?

18:40 mtp: just before "the object system in the language"

18:40 gfredericks: 105 ns for singleton hashmap lookup

18:42 15 ns for keyword-lookup on a record

18:45 4 ns for dotted lookup on a record

18:45 hyPiRion: the difference is roughly 0 seconds :P

18:46 hyPiRion: yeah, I was right

18:47 gfredericks: I just had my computer do something three billion times just so I could figure out how long it takes o_O

18:48 technomancy: gfredericks: and that just in order to have an Internet Argument

18:48 clojurebot: Cool story bro.

18:48 technomancy: surely we are like gods

18:48 Brand0: lol

18:48 gfredericks: about once a day I do a (reduce + (range 10000000)) just to show who's boss

18:48 Bronsa: lol

18:49 gfredericks: 123 ns for a large hash-map lookup (10000 entries)

18:49 so large hashmap and small hashmap are not much different

18:50 hyPiRion: yeah, O(log32 n) isn't that much

18:50 As we all know, log n = 1 in Clojure

18:51 gfredericks: last one: small arraymap lookup

18:51 104 ns

19:02 zoldar: the thing that surprised me recently is that frequencies, which has complexity of O(n) processes the same sequence in roughly the same (or even a couple times longer) time as sort which should be O(nlogn). I suppose that native array sort being highly optimized is hard to match... https://gist.github.com/zoldar/6425609

19:04 AimHere: Maybe log n is very close to 1 :)

19:07 gfredericks: asymptotics. sometimes it has something to do with how fast your code runs.

19:07 hyPiRion: zoldar: caching plus JVM's adaptive optimization is funny to work with

19:08 like, if you want to measure time

19:08 zoldar: hyPiRion: clojure doesn't benefit from these too ?

19:09 hyPiRion: zoldar: yeah, that's the exact issue. It's hard to measure or to get a good estimate on what would be faster

19:09 gfredericks: zoldar: given that frequencies is doing hashmap work you might argue that it should be O(nlogn) as well

19:09 hyPiRion: well, not hard to measure, just a bit more involved than a binary

19:10 squidz: Bronsa: Thanks for your work on clojure-in-clojure. Can you tell me if there are any direct benefits this has on clojurescript?

19:12 chord: you guys can't stop me from implementing a*

19:14 dpathakj: why would someone wish to stop you from implementing a*?

19:16 chord: you all think I will fail

19:16 Jarda: if I have several functions that all take a common argument. Somehint like (defn update-user-address [user-id ...] .. and (defn update-user-phone [user-id ...] (these are dummy examples)

19:16 Bronsa: squidz: mostly the CinC analyzer has shown that the children-keys approach works fine for implementing passes over the ast -- I'd like somewhen in the future to try and add the necessary passes in order to use it instead of the (currently) mostly monolithic clojurescript analyzer

19:17 Jarda: is there a way to have a 'wrapping function' so that I could call like (with-user-id 123 (update-user-address ..) (update-user-phone ..))

19:17 to be able to call without repeating the user id

19:18 squidz: Bronsa: what benefits does that have? I\m not familiar with the analyzers of either clojure/clojurescript/clojure-in-clojure

19:18 gfredericks: Jarda: dynamic vars are the normal approach for that kind of thing; I think the sort of use case you're hinting at would be considered overuse by a lot of people, but it's up to you :)

19:19 the `with-user-id` part normally ends up being a macro too

19:20 Jarda: gfredericks: ok, reading up

19:20 hyPiRion: keep two versions of the function, one with the dynamic use, and one without

19:21 at least if you're going to open source that thing

19:21 gfredericks: I remember going back and forth with cemerick on those kind of tactics wrt that couchdb lib I think

19:21 Bronsa: squidz: both the clojure/clojurescript analyzer do all the analysys/validation/annotation in a single pass (that's not entirely true for clojure) while cinc does a "basic" analysis constructing the ast nodes and then walks the ast doing all the validation/annotations required in separate passes

19:22 Jarda: gfredericks: yeah does clutch have some (in-database "foo" ...) stuff?

19:22 hyPiRion: yeah

19:22 Bronsa: this would allow for e.g. reusing some passes between clojure/clojurescript and possibly enable multiple compilation targets/optimizations

19:22 gfredericks: I haven't really used it actually

19:23 Jarda: yeah it seems to have dynamic-scope

19:23 Bronsa: squidz: the short answer is: right now no direct benefit, but it's setting the ground for possible future improvements either having a single analyzer/compiler with different passes attatched or improving/simplifying the current cljs analyzer

19:23 gfredericks: a coworker was writing an HDFS lib recently and asked me if the config should be an explicit arg or dynamic var; I waffled for a bit and then recommended explicit; felt good about that afterwards

19:24 it seemed to make the lib really straightforward to understand

19:24 squidz: Bronsa: cool, that sounds exciting. I know a lot of people have been dreaming of cinc for while now so thanks

19:24 gfredericks: but libs and app code are different things, of course

19:25 Jarda: https://github.com/clojure-clutch/clutch/blob/master/src/com/ashafa/clutch.clj#L26

19:26 Bronsa: squidz: the main reason for ambrose picking CinC for his campaign's first stretch goal is that having CinC's analyzer complete/easly pluggable/hackable would allow him to have better info regarding the source for core.typed

19:26 Jarda: oops, no, that can't be it

19:26 Bronsa: that's probably not clear, I'm going to explain it in a ML post tomorrow

19:27 gfredericks: oh he did go with the dual approach. I wonder if that was my idea.

19:27 squidz: ML post?

19:27 Bronsa: mailing list :)

19:27 squidz: oh okay. Look forward to hearing more. It's really exciting stuff

19:32 chord: i'm so glad that clojure cup is about to end

19:32 so you guys can go back to helping me with my rts project

19:34 mgaare: will be interesting to see if this inspires a fresh round of creative ways to say no

19:40 chord: mgaare why is everyone like you so negative

19:49 paulsamways: Hi all. I'm attempting to build an uberjar, but I'm stuck with clj-time failing when AOT, the exception given at runtime is "java.lang.ClassNotFoundException: clj_time.coerce.ICoerce". I'm new to Clojure/Java, any one able to give some pointers to finding a solution for this?

19:58 gfredericks: paulsamways: my only guess is to try `lein clean` first

20:04 chord: paulsamways: you didn't add the dependency to your porject?

20:17 paulsamways: chord: clj-time is in the dependencies vector in project.clj

20:21 indigo: paulsamways: Pastebin your project.clj

20:23 allenj12: hey guys ive been sruggling on this error can someone help me? https://www.refheap.com/19156

20:24 i commented the error and commented problem spots

20:24 paulsamways: http://pastebin.com/MY8x9QDN

20:30 ambrosebs: allenj12: line 126 looks fishy

20:30 allenj12: the (first board-queue)

20:31 is that guaranteed to be non-nil?

20:31 allenj12: ambrosebs: it seems like it should be right? since its always expanding and we should find a goal before it runs out

20:33 ambrosebs: allenj12: prove it, abstract it out into a let binding and use assert to ensure non-nil :)

20:34 allenj12: ambrosebs: hmm not quite sure what u mean like [let board =...] assert board?

20:34 ambrosebs: allenj12: usually it'd expect (if (seq board-queue) ...) somewhere if your solution is getting smaller, just seems like an odd condition.

20:35 something like this on line 126: (let [fboard (first board-queue) _ (assert fboard)] (recur .... fboard))

20:35 allenj12: hmm

20:36 anbrosebs: kk ty also are u familiar with a* i seem to have an algorithmic problem aswell but not sure what it is

20:38 ambrosebs: allenj12: not comfortably

20:39 allenj12: ambrosebs: kk whats that underscore btw in ur example just a space?

20:39 ambrosebs: allenj12: it's just a convention for a throwaway binding name

20:39 "don't ever use this binding"

20:39 it's for side effects only

20:40 TEttinger: allenj12, in case your professor is up-tight about spelling, it's manhattan, not manhatten. don't want to get marked down for something silly.

20:41 allenj12: Tettinger: hey! and no im sure hes not lol btw can u look at my frontier expansion and check that and conditions? im not sure if thats valid

20:41 ambrosebs: im confused why did u use quotes? lol dont ever use _ or use _

20:41 TEttinger: sure. I've never implemented A* but I've done something close

20:42 allenj12: ambrosebs: btw wouldnt it be better to use a while loop?

20:42 ambrosebs: sry not loop just term lol while not asser...

20:42 Tettinger: THNX!

20:45 callen: oh. my. god.

20:45 * fu86 is away (weg ...)

20:45 callen: Raynes: you were the smart one

20:47 TEttinger: allenj12: is list defined in your code somewhere?

20:47 akurilin: callen, ping. Got a sec or busy with the event atm?

20:48 TEttinger: I'm not sure what (list {}) dos

20:48 ,(doc list)

20:48 clojurebot: "([& items]); Creates a new list containing the items."

20:48 allenj12: makes it a list

20:48 TEttinger: so it's a list of one map?

20:48 allenj12: its essentially making a list of has maps

20:48 TEttinger: ahhh

20:48 metellus: ,(list {:a 1 :b 2})

20:48 clojurebot: ({:a 1, :b 2})

20:48 allenj12: it starts off as one hash map

20:48 then we see the nodes next to it and add to the list

20:49 each hash map a board state

20:52 TEttinger: allenj12: ah. line 172, it prints nil.

20:52 that's one of your boards that it tries to findIndex in

20:53 (sorry, in the paste)

20:53 allenj12: Tettinger: hmm o wow i thought for some reason remove nil? would take care of that

20:54 TEttinger: hm, it's the println on line 101

20:54 you need to call remove on the *movs*

20:54 *moves*

20:55 allenj12: TEttinger: hmm can i just put that right next to it?

20:56 TEttinger: let me check

20:58 allenj12: TEttinger: just tried it no luck i must admit this is a little confusing since *moves* is only of length 4 and shouldnt be running those last 2 times

20:59 benkay: what wouyld a neat, idiomatic approach to getting the second and fourth elements of each vector in a vector of vectors?

20:59 would be*

21:01 allenj12: do you want [[1] [2] [3] [4]] ---> [2] [4]?

21:01 brehaut: ,(map (juxt (partial nth 1) (partial nth 3)) [[1 2 3 4 5] [:a :b :c :d :e]])

21:01 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to java.lang.Number>

21:01 brehaut: ,(nth [1 2] 1)

21:01 clojurebot: 2

21:02 brehaut: ,(map (juxt #(% 1) #(% 3)) [[1 2 3 4 5] [:a :b :c :d :e]])

21:02 clojurebot: ([2 4] [:b :d])

21:03 benkay: more like [[1 2 3 4] [5 6 7 8]] --> [[2 4] [6 8]]

21:03 brehaut: of course that will indexoutofbounds if you pass it a short vector

21:04 benkay: ah

21:04 juxt! how nifty.

21:04 brehaut: so you probably want get

21:04 ~juxt

21:04 clojurebot: if you think 'complement is great, wait till you see 'juxt

21:04 brehaut: ~juxt

21:04 clojurebot: juxt is the bestest option though if it doesn't weird you out

21:05 redinger: Everybody should find a reason to use juxt every day

21:06 benkay: thanks brehaut!

21:06 brehaut: np

21:06 mullr_: In the clojurescript compiler, we have :foreign-libs to deal with non google-closure modules.

21:07 But many times those modules depend on each other implicitly, and require a certain load order.

21:07 Is there a way to express such dependencies with clojurescript :foreign-libs?

21:09 allenj12: TEttinger: tried adding a (if (not (nil? board)) imbetween fn and the other if but didnt work

21:10 brehaut: ,(doc if-not)

21:10 clojurebot: "([test then] [test then else]); Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil."

21:11 brehaut: and if board is a seqable thing then (if (seq board) …

21:15 allenj12: TEttinger: any luck?

21:16 mullr_: The answer to the above, although undocumented, appears to be that you can add a :requires clause to your foreign library definition, which can refer to the "provides" from another.

21:22 allenj12: made some changes https://www.refheap.com/19156 but still having the same problem not sure why some of the board print nil when its being maped to just a set of length 4

21:24 jamii: ztellman: http://hugoagogo.clojurecup.com/

21:24 ztellman: It's pretty close to 10k games / second

21:28 allenj12: WEIRD. if i take away the last condition history-check it runs but just goes back and forth which dosnt make sense

21:32 https://www.refheap.com/19158 more changes took away the third condition in the and statement in frontier function now prints but only back and fourth move

21:41 seangrov`: mullr_: Looking at load-foreign-library*, it doesn't look like it

21:42 mullr_: @seangrov` It looks to me like it passes through the :requires data

21:42 at least, that appears to work

21:43 but it may have simply happened to shift the order of things to a state that works

21:46 allenj12: Seems to solve!!!! but dosnt give optimal path can anyone see something wrong with algorithm?

21:46 https://www.refheap.com/19156

22:07 john2x: how do I map a macro to a vector?

22:08 allenj12: so say i have a list of hash maps ( {:a 1 :b '(1 2 3)} {:a 2 :b '(1 2 3 4 5)}) and i wanted to sort the list of hash maps by first :a but then :b second if theres a tie for :a

22:09 seangrov`: john2x: macros can't be mapped

22:09 john2x: oh ok. I tried doseq but it didn't seem to work as well.

22:09 seangrov`: You can put it in an anonymous function, but it depends on what you're trying to do

22:20 robink: What's the enlive syntax to replace a node with its child nodes? i.e. given (enlive/at myhiccupnode [:img] enlive/nodechildren) turn <div><img src="bigannoyingimage.png"><a href="http://foocorp.com/thisisnecessary">Hey, guy, click here!</a></img></div> into <div><a href="http://foocorp.com/thisisnecessary">Hey, guy, click here!</a></div>

22:21 Sorry s/hiccup/hickory/

22:21 I have a hickory nested map that I'm operating on

22:21 So (at myhickorynode [:img]) works, I'm just not sure how to say "turn those <img> tags into their children, without any contained text"

22:22 marcopolo2: What's the proper way to serialize (round trip) cljs datastructures?

22:24 seangrov`: marcopolo2: goog.json/parse, goog.json/generate ?

22:25 Also edn if your requirements allow for it

22:26 robink: n/m got it

22:26 callen: I am...much more relaxed now.

22:26 marcopolo2: seangrov`: Thanks! :)

22:26 callen: akurilin: around?

22:26 akurilin: callen, yessir.

22:27 callen: akurilin: Clojure cup ended. I'm too tired to type. Google Hangout?

22:27 akurilin: I actually had another person asking about Bulwark, so I wanted to plan some tweaks/updates and discuss them with you based on your email.

22:28 akurilin: callen, sure, sec,

22:28 `cbp: callen: im back to doing the rethinkdb stuff would you give me contribute status or accept pull requests?

22:29 callen: `cbp: oh wow.

22:29 `cbp: yeah let me add you.

22:30 `cbp: cesarbp?

22:30 (on gh)

22:30 `cbp: yeah

22:30 callen: `cbp: nice cactus. you're added. go for it.

22:34 `cbp: :)

22:43 allenj12: It woooooooooooooooooooorrrrrrrrrrrrrrrrrrrrrrrrrrrkkkkkkkkkkkkkkkkkkkkksssssssssssssssssssss11111111

22:44 give it your worst!!!!! https://www.refheap.com/19158

22:52 seangrov`: allenj12: What's example input?

22:52 allenj12: seangrov: what do you mean run any valid input :)

22:52 seangrov: o

22:52 seangrov: 345126780

22:53 seangrov: no spaces no chars etc

23:03 bbloom: allenj12: shesh. maybe you should spend a little time trying to clean up the code to look more idiomatic

23:04 allenj12: bbloom: i am new so any tips would be great!! i do need to hand this in soon tho lol

23:04 bbloom: allenj12: generally, lisp code does not leave trailing )

23:04 use 2 space indents

23:04 aim for < 80 characters per line

23:05 line up arguments if you indent them

23:05 learn about -> and ->>

23:05 you can learn about them with doc:

23:05 (doc ->)

23:05 clojurebot: "([x] [x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."

23:05 allenj12: bbloom: o wow cool

23:05 bbloom: use (condp = …) where case doesn't help

23:06 seangrov`: Interesting, .indexOf will work on clj, but won't work in cljs because (I think) cljs data structures don't implement it

23:06 bbloom: use not= instead of (not (=

23:06 use extra let bindings to break up long lines / expressions

23:07 allenj12: avoid mixing side effects like printing with your other functions

23:07 allenj12: ie instead of print-solution finding AND printing the solution, create one function that finds the solution and another one that prints the solution data

23:07 allenj12: bbloom: ahhh ok

23:08 bbloom: use doseq instead of loop/recur for side effecting over sequences

23:08 start with those & then i'll give you some more tips :-)

23:08 that's a lot of stuff i threw at you :-P

23:10 allenj12: otherwise, you're off to a good start

23:10 i see some nice tricks in there like using sets as predicates ;-)

23:10 seangrov`: allenj12: http://cljsfiddle.net/fiddle/sgrove.eight-puzzle.core

23:10 And use cljsfiddle to share code if you'd like others to play with it a bit

23:11 allenj12: bbloom: thanks i always ask people alot of qustions when first starting so alot of the time i pick up some fancy stuff early

23:11 seangrov: THNX!

23:11 bbloom: that's good!

23:11 SegFaultAX: Also, why introduce vars with earmuffs that aren't dynamic or mutable? They're just constants.

23:11 bbloom: allenj12: doing the puzzles at 4clojure.com is a great way to learn the stdlib and if you follow some top folks on the leaderboard you'll also learn some neat idioms

23:11 sometimes you'll see golfing tricks, but other times there are really good ideas in there!

23:12 seangrov`: allenj12: Also, probably a good idea to use docstrings instead of the comments off to the right

23:12 allenj12: seangrov: yea i saw those but never did that b4 and i was in a little bit if a rush :P

23:12 SegFaultAX: Let allows multiple bindings (and it's recursive)

23:16 bbloom: allenj12: after you submit your assignment, clean it up & resubmit it if your teacher will take it

23:16 or don't bother resubmitting it and enjoy the learning experience :-)

23:17 hiredman:

23:19 allenj12: bbloom: i will definatly clean it up but idk if its worth re submitting.. he has this weird hatred towards lisps

23:19 bbloom: lol

23:19 bbloom: definately wont appreciate the clean up as much

23:20 seangrov`: allenj12: Well, formatting and naming like that can't help

23:21 bbloom: a CS professor who hates lisps is no CS professor

23:23 tomjack: is there no way to do case-like keyword dispatch in java?

23:23 you have to do if (key.equals(Keyword.intern(...))) else if ... ?

23:24 allenj12: bbloom: i know its fucking weird hes kinda joke professor tho thats why im learning new languages class is to easy

23:24 tomjack: I guess == works

23:24 allenj12: bbloom: which is also weird cause his PhD was in machine learning

23:24 bbloom: allenj12: this channel is always happy to educate. submit your homework & then go rock & roll w/ making it pretty :-)

23:24 eh, matrix math has taken over AI :-)

23:27 seangrov`: All about stats now...

23:33 allenj12: bbloom: im very good at linear algebra but suck at everyhing else lol like the probability theory

23:33 bbloom: machine learning here is more theory than algorithms

23:39 seangrov`: "One counter is updated every two seconds and the other every five seconds... The io.pedestal.app.util.platform ... is used in the example above to create a timeout...you could have used JavaScript interop here and called js/setTimeout instead."

23:39 Surely that should be js/setInterval?

23:40 Ah, no, setTimeout is correct, some other part of pedestal is responsible for calling the functions on an interval.

23:46 ddellacosta: smarter way to do this? &(filter #(= (:session-id (val %)) 2) {{:foo "foo"} {:session-id 1} {:bar "bar"} {:session-id 2}})

23:46 &(filter #(= (:session-id (val %)) 2) {{:foo "foo"} {:session-id 1} {:bar "bar"} {:session-id 2}})

23:46 lazybot: ⇒ ([{:bar "bar"} {:session-id 2}])

23:47 ddellacosta: I find myself using filter a lot, and can't help but think I'm missing out on some more declarative ways to do things

23:47 TEttinger: filter seems pretty declarative?

23:48 ddellacosta, is that a map of map keys to map values?

23:48 ddellacosta: TEttinger: hmm, feels so much like I'm processing a data structure, rather than getting a value (or nil), which is what I'd rather do.

23:49 TEttinger: yes.

23:49 TEttinger: I'm wondering if one of the *-in functions would work

23:49 ddellacosta: TEttinger: exactly, I was thinking of get-in when I asked the question.

23:50 TEttinger: or update-in

23:51 ddellacosta: TEttinger: ah, yeah, I guess actually I should use get-in if I can provide the first key

23:51 &(= 2 (get-in {{:foo "foo"} {:session-id 1} {:bar "bar"} {:session-id 2}} [{:bar "bar"} :session-id]))

23:51 lazybot: ⇒ true

23:52 TEttinger: that doesn't seem much clearer tbh

23:52 filter is generally clear enough to me

23:53 is there supposed to be more than one :session-id 2 ?

23:55 ddellacosta: TEttinger: yeah, I guess it depends on what is going on around it (in terms of clarity). There should not be more than one session-id 2, but there may be none.

23:56 TEttinger: then filter will return an empty seq or a seq of one item, right?

23:57 ddellacosta: TEttinger: re: filter vs. other techniques--in any case, just trying to think of all the possibilities. I just don't like it when I get stuck using one trope over and over…it makes me think I should be thinking a bit harder about the patterns I use.

23:57 TEttinger: I'm wondering if there's some search function in clojure that finds the first that satisfies a predicate

23:57 is that some?

23:57 ddellacosta: TEttinger: yes, to answer your question, although because it's a map I get a vector representing the map entry, which is kind of annoying but I guess amounts to the same thing

23:57 TEttinger: ,(doc some)

23:57 clojurebot: "([pred coll]); Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)"

23:57 ddellacosta: ah yeah, some could be a good one to think about too

23:58 TEttinger: err

23:58 some returns true/false

Logging service provided by n01se.net