#clojure log - Nov 05 2013

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

2:10 luxbock: is it possible to have clojure-mode syntax-highlighting available in the nrepl/cider buffer?

2:43 makkalot: hi, i'm trying austin with clojurescript on emacs (newbie) , the C-c C-k doesn't work anymore, any ideas ?

3:15 dmi3y: hi, guys. I'm building a simple rest api in ring and compojure. For some reason my get handler that returns json returns it with header "application/octet-stream;charset=ISO-8859-1" while I'm expecting it to be "application/json". I'm using (wrap-json-response) as middleware. What am I missing here?

3:21 ZujkisNx: Hi, I'm trying to start JAR file which should be a server written in clojure with all dependencies.. but no luck starting it in linux. I'm noob so maybe anyone could tell me how to do it?.. googling for a few hours and still havent figured it out.. :/

3:21 dmi3y: I got it, here's the explanation https://github.com/ring-clojure/ring-json

3:23 ZujkisNx: dmi3y: maybe you know how to run JAR as a server? :)

3:26 dmi3y: @ZujkisNx isn't it "lein ring uberjar" ?

3:27 ZujkisNx: dmi3y: ty, now trying lein uberjar. :)

3:51 I'm trying to run server.jar with "java -jar server.jar" and getting error: "Could not bind to port: 61221".. Any hints? :)

3:57 beppu: ZujkisNx: Type this in your shell: lsof -i :61221

3:57 It will tell you what process bound that port.

4:10 ZujkisNx: beppu: thx! :) You're great! Good luck!

4:14 beppu: ZujkisNx: glad I could help.

4:14 :)

4:32 smiler: Any idea on howto debug the cljsbuild repl-listen thingy? I get the iframe loaded into my DOM but the repl is unresponsive, (+ 1 1) just stalls the repl.

4:41 beppu: smiler: I wish I knew. That happens to me a lot. Sometimes, I get lucky and it works, but who knows why.

4:42 smiler: I had it working then it just didn't work anymore..

4:42 beppu: i know that feeling

4:43 smiler: No idea what I might have done to break it.

4:43 Only thing my app is doing is a .log js/console call :)

4:45 * ucb waves

4:45 ShawnMcCool: what's the preferred ide/editor for clojure in linux?

4:45 i'm assuming vim, if so what plugin is hot right now?

4:46 beppu: smiler, I got lucky and the cljs repl magically worked when I just tried it. I'm using dnolen's mies lein template to get started. http://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/

4:46 ucb: ShawnMcCool: it varies. Emacs has very good support and so does Eclipse afaik

4:47 smiler: beppu: I use something similar. I'll try create a new project.

4:48 ShawnMcCool: so, emacs is sorta hot in the clojure world then?

4:49 beppu: smiler, lein new mies wtf; cd wtf; lein trampoline cljsbuild repl-listen; thttpd -p 8888; open "http://localhost:8888/"

4:50 I think part of the trick is to don't open the page until repl-listen is ready to do work.

4:50 (replace thttpd with the local web server of your choice)

4:53 smiler: beppu: No build step? And the default code dosen't have any (repl/connect) in it

4:53 beppu: actually, i forgot the build step. sorry about that.

4:54 smiler: :)

4:55 beppu: unfortunately, i was not so lucky this time. the cljs repl seems like such a cool thing, but I can't get it to work every time. :-/

4:55 smiler: Didn't work for me either.

4:58 Hmm

4:59 beppu: smiler: dude, I'm an idiot.

4:59 smiler: It works when I use firefox instead of chrome ;/

4:59 beppu: I actually added some code.

4:59 oh?

4:59 Maybe I should try ff, too.

4:59 smiler: https://gist.github.com/anonymous/7316593

5:00 smiler: Yea, exactly..

5:01 beppu: smiler: oh wow, ff worked on the first try. weird, but good to know.

5:02 smiler: That's an annoyance for sure..

5:02 beppu: I've grown accustomed to chrome's debugging tools.

5:02 smiler: Dito

5:06 clgv: $last ztellman

5:06 smiler: I can execute (+ 1 1) while having a chrome window open and it stalls. Then pointing a firefox instance to the same place makes the evaluation complete.

5:06 lazybot: Couldn't find that user.

5:06 clgv: $last zachtellman

5:06 lazybot: Couldn't find that user.

5:06 clgv: $last tellman

5:06 lazybot: tellman last listened to: Journey - Any Way You Want It [Greatest Hits]

5:06 clgv: up

5:07 $when tellman

5:08 $seen tellman

5:08 lazybot: I have never seen tellman.

5:08 clgv: $seen ztellman

5:08 lazybot: ztellman was last seen quitting 5 hours and 21 minutes ago.

5:08 beppu: smiler, The way Chrome sends the long-polling HTTP request to localhost:9000 must be different from the way FF is doing it.

5:09 smiler: Sounds reasonable

5:09 beppu: Not in the mood to debug that one. too noob at the moment at this cljs business.

5:09 smiler: The repl is a part of cljsbuild, not clojurescript itself right?

5:09 beppu: I believe so.

5:10 smiler: https://github.com/emezeske/lein-cljsbuild/blob/master/plugin/src/leiningen/cljsbuild.clj#L152-L161

5:11 smiler: Right

5:15 beppu: https://github.com/emezeske/lein-cljsbuild/blob/master/support/src/cljsbuild/repl/listen.clj

5:16 (surprisingly small)

5:17 smiler: https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/repl/browser.clj is the meat I think

5:18 beppu: looks like it.

5:23 smiler: I tossed up an issue at https://github.com/emezeske/lein-cljsbuild/issues/262. Maybe someone can shed some light on it.

5:26 andrewmcveigh|wo: Say I have some clojure/edn config datastructure(s) on the server (ring/etc.), and I want the client (cljs) to be able to read it on load. What is the best way to do this? Embed edn as string in a js var? json? some other way?

5:27 beppu: smiler: I just came across this: https://github.com/cemerick/austin

5:27 alternative browser repl

5:28 andrewmcveigh|wo: smiler: beppu: I've had better luck with austin's browser repl.

5:28 smiler: I'll give it a shot

5:31 beppu: ( going to sleep now. good luck, smiler )

5:31 smiler: Night night

5:46 sritchie: smiler: made one comment

5:46 smiler: I can get a connection by manually doing the connect at the console

5:46 always works...

5:46 but not on reload, always

5:46 really weird

5:47 smiler: Thanks, I'll check it out after lunch.

5:47 sritchie: lunch! I'm off to bed here in pst :)

5:47 smiler: good luck, I'll keep an eye on the ticket

5:47 smiler: :) Take care

5:56 ubikation: I'm sorry, but can someone help me with this error? thank you!

6:14 dav: (let [b (cons 1 b)] (take 5 b)) <= self reference not working with let while it works fine with def. Is there a trick to resolve that?

6:17 andyfingerhut: dav: Maybe, but not that I can think of off hand. letfn is more like Scheme's letrec, but only for binding functions, not arbitrary values.

6:17 dav: andyfingerhut: yes :(

6:17 letfn is mutual but let isn't :-(

6:18 andyfingerhut: For the particular use case you show, cycle would create the infinite lazy sequence you specify

6:18 dav: andyfingerhut: yes I know that I have a more complex use case in mind ;-)

6:19 on top of that i assume there's no sharing if I use letfn .. :(

6:19 hyPiRion: no sharing?

6:19 andyfingerhut: dav: Sounds like our knowledge of the possibilities in this area run out at about the same place, then :-)

6:21 llasram: dav: Also, self-referencing lazy sequences are not really supported, even though you can make them work with vars

6:22 hyPiRion: ,(letfn [(my-odd? [a] (not (my-even? a))) (my-even? [a] (or (zero? a) (my-odd? (dec a))))] (map my-odd? (range 0 10)))

6:22 clojurebot: (false true false true false ...)

6:35 ubikation: I'm sorry, but can someone help me with this error? thank you! https://gist.github.com/ubikation/7317317

6:36 andyfingerhut: ubikation: Are you using Leiningen to retrieve and manage dependencies?

6:37 ubikation: andyfingerhut: yes

6:38 andyfingerhut: Is it really spelled "ative" and not "active"? Adding project.clj to your gist might help others help you.

6:51 honza: i have a vector of functions and want to "unroll" it so i can use it in a (->) form - so i need something like (apply) but for macros - the documentation says however that (apply-macro) is evil

6:52 andyfingerhut: honza: Maybe you want ((apply comp my-fn-vec) args) ?

6:53 honza: Or something near that.

6:53 honza: andyfingerhut: welp, that's perfect! thanks

7:05 ubikation: andyfingerhut: I am sure it should be ative

7:05 (use 'dk.ative.docjure.spreadsheet)

7:05 and I changed my workspace in the cider repl to the one I am working on but it still doesn't work...

7:05 and lein deps doesn't complain or anything

7:06 andyfingerhut: ubikation: Are you saying that (use 'dk.ative.docjure.spreadsheet) gives no errors in the same REPL session where the gist (ns ...) expression gives an error?

7:06 smiler: cemerick: Hey. I followed your tip and tried out austin. I got the example to work but I fail to integrate it into my minimal app. I don't get anything injected to my DOM nor do I see any connections being made to the repl. Does it need to be used from jetty instead of using my already existant apache setup?

7:06 ubikation: no I get an error for both forms

7:06 and my project.clj is here: https://gist.github.com/ubikation/7318107

7:07 cemerick: smiler: austin doesn't depend upon any particular web server. Are you seeing any errors, etc?

7:08 smiler: cemerick: No, I just don't get any response. The app is the same as in the gist linked to the bug report except for a plugin dependency on [com.cemerick/austin "0.1.1"] and :require [clojure.browser.repl]. Do need to add anything else to inject the required JS?

7:09 cemerick: smiler: Yes. Did you read https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample

7:09 smiler: That's the thing I'm trying to follow

7:09 cemerick: smiler: well, there's more to it than changing the dep and adding a require :-)

7:10 ubikation: it's weird because the error just came out of nowhere... I had a working repl with it loaded a day or so ago and then it just quit working properly

7:11 andyfingerhut: ubikation: I tried a new project with that project.clj here, and no errors on the use. Did you perhaps wipe out your local ~/.m2 repo?

7:11 smiler: cemerick: Ah, the [:script (cemerick.austin.repls/browser-connected-repl-js)] part

7:11 Hmm

7:12 andyfingerhut: ubikation: e.g. do you see any files listed from output of a command like 'find ~/.m2 | grep docjure', assuming you are on a Unix-like OS?

7:12 cemerick: Or similar, depending on what you're using for templating, etc

7:12 smiler: Nothing at all atm. I'm trying to make a client side thingy as I learn this.

7:13 andyfingerhut: Chas! So this is the time of day I have to be on channel to see you talk live?

7:14 ubikation: yeah I just rm -rf'd my ~/.m2 and did lein deps again... same issue

7:14 smiler: cemerick: I'm using some slides from a presentation I attened a while ago. That thing uses domina, I guess I can use that to inject the JS into the DOM somehow.

7:15 andyfingerhut: ubikation: You saw it re-retrieve a bunch of stuff? Try 'lein clean', too, perhaps? If that doesn't do it, I'm close to stumped.

7:15 cemerick: smiler: sounds like you have a static HTML page?

7:15 smiler: cemerick: Yep

7:15 andyfingerhut: ubikation: What lein version?

7:15 cemerick: smiler: you can configure austin to use a fixed port number and session ID; though, you'll be limited to just one REPL at a time

7:16 ubikation: lein 2.3.3

7:17 cemerick: smiler: https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L28

7:17 ubikation: what is the best way to test it outside of emacs? maybe I am doing something weird in cider since I don't really get it yet

7:17 andyfingerhut: ubikation: lein repl

7:17 cemerick: smiler: You can use a particular session ID by providing the corresponding keyword argument to cemerick.austin/repl-env

7:18 ubikation: huh

7:18 wait (use '(dk.ative.docjure.spreadsheet)) works but (:use [dk.ative.docjure.spreadsheet]) doesn't?

7:19 smiler: cemerick: That feels a bit ugly I think. Would it work to append the result from cemerick.austin.repls/browser-connected-repl-js into a script tag?

7:19 andyfingerhut: could be. It is much more common to leave off the [] around namespaces in :use statements if there is just a single namespace.

7:20 cemerick: smiler: that's exactly what [:script (cemerick.austin.repls/browser-connected-repl-js)] does :-)

7:22 andyfingerhut: ubikation: I think (use '(dk.ative.docjure.spreadsheet)) doesn't work. It just doesn't give an error

7:23 ubikation: andyfingerhut: I get "excel-test.core=> (use '(dk.ative.docjure.spreadsheet))

7:23 nil

7:23 "

7:24 luxbock: any ideas why I'm unable to start paredit (or any of the other modes) in the cider repl?

7:24 https://gist.github.com/luxbock/d9ed7a4ccfed8cdf7875

7:24 here is my setup

7:24 andyfingerhut: ubikation: me, too, but (apropos "she") afterwords returns no symbols, whereas it does if I do (use 'dk.ative.docjure.spreadsheet)

7:25 ubikation: Hence my belief that the parens around the namespace in use are causing the use to do nothing, with no error

7:29 ubikation: I'm looking at the source for load-libs, since I've edited it recently for a proposed Clojure patch with better error messages, and it does appear that (use '(dk.ative.docjure.spreadsheet)) does absolutely nothing with no error.

7:30 ubikation: I included something as part of my patch to catch that with an error, I believe, but it was out of scope for the ticket. Guess it is time to file another ticket.

7:30 smiler: cemerick: Cool. I should be able to inject it then.

7:33 ubikation: andyfingerhut: oh... that's weird. so what is use supposed to return? also, what form are you using to load it in the lein repl?

7:33 andyfingerhut: ubikation: To do a successful load, (use 'dk.ative.docjure.spreadsheet)

7:34 ubikation: I think use/require/ns always return nil, if they do not throw an exception

7:36 ubikation: andyfingerhut: what about turning it into a namespace declaration that works in the repl? right now I am trying "(ns excel-test.core (use [dk.ative.docjure.spreadsheet :refer :all]

7:36 [clojure.core.match :only (match) :refer :all]))" to no avail

7:37 andyfingerhut: ubikation: Definitely needs :use instead of use when inside ns

7:37 glosoli: Isn't use some sort of deprecated ?

7:37 andyfingerhut: ubikation: But probably more changes. I don't dream correct ns syntax yet.

7:40 ubikation: (ns excel-test.core (:use dk.ative.docjure.spreadsheet [clojure.core.match :only (match)])) seems to work

7:40 ubikation: Not sure what you are trying to accomplish with the :only (match) :refer :all

7:43 ubikation: Don't mean to be rude, but time for me to crawl back into bed for 2nd sleep.

7:45 smiler: cemerick: Aw snap. Trying to inject it using domina seems to try inject it too late. JS execution has already failed because it can't find nameToPath in cemerick.austin.repls.

7:47 cemerick: smiler: there is no such var in that namespace?

7:49 smiler: Maybe I did something stupid.

7:51 cemerick: I added a require to that ns but that was wrong. Maybe it isn't possible to access cemerick.austin.repls/browser-connected-repl-js from within my cljs-file?

7:52 WWWest: Hi all

7:52 a quick question on node js & cljs dev environment

7:53 I'm using fireplace in vim. I tried using noderepl to start a repl for my project, but fireplace still can't use the repl

7:53 cemerick: smiler: no, that's a Clojure function

7:53 smiler: Hmm

7:54 WWWest: is there a way to get a cljs repl that works with fireplace?

7:54 cemerick: smiler: The connect call really needs to be in the HTML file.

7:54 smiler: Kinda sucks when I don't want server side generated code then :/

7:54 clojurebot: I don't understand.

7:55 cemerick: smiler: well, that's where the options to fix austin's port number and session ID come into play

7:55 smiler: Yea. I'll try to figure that out.

7:56 cemerick: WWWest: Nope. vim-fireplace is Clojure-only; it sends require forms to load namespaces, which doesn't work in ClojureScript.

7:56 WWWest: what do people use when working with cljs then?

7:56 cemerick: I have a fork of fireplace that fixes this, but does much, much more. Unfortunately, it's in a somewhat busted state at the moment. :-P

7:57 WWWest: leiningen? CCW? Emacs?

7:58 WWWest: what's ccw? nothing that works with vim then?

7:58 ShawnMcCool: what is 'cons' short for?

7:58 concatenate sequence or something maybe?

7:58 vijaykiran: construct

7:58 WWWest: construct maybe?

7:59 ShawnMcCool: thanks

7:59 cemerick: WWWest: Counterclockwise. Eclipse plugin.

7:59 WWWest: yuck, no, I'll stick to vim without a repl connection for now

8:01 I'll just follow progress on your fireplace fork

8:02 cemerick: WWWest: haven't been working on it for a while. Vim's architecture seems incompatible with my objectives. Was segfaulting all over the place.

8:03 WWWest: that doesn't sound good...

8:03 cemerick: WWWest: actually, the last change to the fork "fixed" that by queuing all updates to the UI. https://github.com/cemerick/vim-fireplace/tree/async-python

8:04 Yields asynchronous REPLs, but they update at updatetime, not in real time.

8:05 WWWest: I'll give it a try

8:11 using it at commit 053b980296 doesn't work, I get error detected while processing fun. fireplace#pycall...fireplace#pycallk

8:11 and then more errors

8:12 thanks for trying :) I don't have the time right now, but I'll try to take a look at the code in the following weeks/months

8:31 smiler: cemerick: Hmm, actually the austin sample doesn't work for in Chrome either...

8:32 Works under my firefox install.

8:33 cemerick: smiler: any chance you have the google voice extension installed?

8:35 smiler: No, but I'll disable all extensions and try again

8:36 cemerick: smiler: was asking only because of https://github.com/cemerick/austin/issues/17#issuecomment-25328315

8:37 smiler: Wow

8:38 cemerick: smiler: See if you can verify with a third non-chrome(ium) browser

8:38 smiler: https://chrome.google.com/webstore/detail/dictionary-of-numbers/ahhgdmkmcgahbkcbmlkpmmamemlkajaf

8:38 This extension breaks it

8:38 cemerick: smiler: so you have a working REPL in chrome now, with that disabled?

8:38 smiler: Yea

8:38 I got your sample running

8:39 Let me see if that's the problem with the native one

8:39 cemerick: man, that is totally fucked. What in the world are these extensions doing!?

8:39 smiler: There's ~100% chance that your problems with the stock browser REPL were caused by it, too.

8:41 smiler: Indeed it does.

8:41 That's beyond fucked.

8:41 cemerick: smiler: if you could comment on #17 with a link to the offending extension, that'd be great.

8:41 smiler: Will do

8:41 cemerick: Are you certain it's only that extension?

8:41 smiler: Yea

8:42 Tried them one by one and then all other except that one enabled.

8:42 cemerick: ok; its functionality looks simple enough that the source (if it's available) could probably be understood reasonably quickly. I'd love to make it so that austin's injected js will detect when the REPL won't work.

8:43 smiler: I'm trying to find the source

8:49 Doesn't look like the author provides it but the extension isn't garbled in any way

8:50 cemerick: ah, good to know; I figured most extensions would be optimized

8:51 smiler: It's not that much code but I have no knowledge about chrome extensions

8:53 borkdude: what is the shorter form of (if x (conj y x) y)

8:54 mdrogalis: That's pretty short. D:

8:55 piranha: Name *one* language feature would you like to see added to Clojure. - how do I answer this one, damn...

8:55 manutter: (conj y (or x nil)) maybe?

8:55 piranha: just thought about it for a few minutes and it seems I just have no idea what's out there and not present in clojure

8:56 gfredericks: borkdude: (cond-> y x (conj x)) avoids repeating y

8:56 mdrogalis: Proper predicate dispatch

8:56 gfredericks: *rand*

8:56 borkdude: manutter that won't work

8:56 manutter: borkdude: actually I think (conj y x) has the same effect as (if x (conj y x) y)

8:56 borkdude: ,(conj [1 2 3] nil)

8:56 clojurebot: [1 2 3 nil]

8:57 manutter: eh, ok, guess not then

8:57 I thought I remembered some scenario where adding nil to a seq returned just the seq

8:58 gfredericks: ,(concat '(1 2 3) nil)

8:58 clojurebot: (1 2 3)

8:58 gfredericks: ,(merge {2 3 4 5} nil)

8:58 clojurebot: {2 3, 4 5}

8:58 gfredericks: ,(into [8 9 10] nil)

8:58 clojurebot: [8 9 10]

8:58 manutter: into, that's the one I was thinking of

8:58 borkdude: ,(into [1 2 3] 1)

8:58 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>

8:58 borkdude: ,(conj [1 2 3] 1)

8:58 clojurebot: [1 2 3 1]

8:59 manutter: ,(into [1 2 3] (seq nil))

8:59 clojurebot: [1 2 3]

8:59 manutter: ,(into [1 2 3] (seq 1))

8:59 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>

8:59 manutter: lol, ok, ifail

8:59 pjstadig: i was in here the other day talking about byte vector backed utf8 strings, and i accidentally a library https://github.com/pjstadig/utf8

9:02 smiler: cemerick: I put the code I extracted from the extension at http://www.update.uu.se/~smiler/dictionary_of_numbers_1.6.3_0.tar.bz2 if you're curious.

9:07 dav: so I'm looking to implement a lazy prime generator that doesn't use def and that properly shares prior results.

9:07 I've got two version, one that satisfies the 1st req, and one that satisfies the 2nd

9:07 see here: http://paste.debian.net/64105/

9:08 Can't quite get it to work using "let" rather than "def" due to lack of self-referencing in let. Any thoughts?

9:08 llasram: dav: There's an existing such Clojure primes generator

9:08 Is that of interest?

9:08 Or not relevant?

9:09 dav: llasram: it doens't use def or atoms or any of that stuff?

9:09 clgv: llasram: there is a 4clojure problem for that, isn't there?

9:09 llasram: clgv: Maybe? Seems pretty intense

9:09 clgv: yes there is

9:10 rated medium difficulty. http://www.4clojure.com/problem/67

9:10 llasram: Ah, heh

9:10 Mikalv: Hi, does any of you recommend a "non-Lisp-programmer guide" that I can read to get known with the language? (Worked with php,python,java,c++ for some years now)

9:10 clgv: but not with additional requirements, just compute the first n primes

9:11 llasram: dav: I'm now having trouble finding it, and I unfortunately need to dash off

9:11 It was somewhere in the old contrib

9:11 clgv: time limit is larger enough to recompute

9:11 dav: clgv: right. I'm trying to solve it with a less-naive generator

9:11 http://clojuredocs.org/clojure_contrib/clojure.contrib.lazy-seqs/primes <= this uses def

9:12 clgv: I know, I'm doing it for the sport ;-)

9:12 clgv: dav: well you could do pretty memory efficient with a probabilistic prime number test

9:12 dav: clgv: kind of the point of 4clojure..

9:12 the solution I pasted is quite efficient..

9:12 it just requires a def

9:12 it's disappointing that I can't get let to behave sufficiently like def..

9:13 surely there is a way?

9:13 clgv: dav: I was shooting for constant additional memory in addition to the memory the lazyseq allocates ;)

9:15 dav: you could do (filter miller-rabin-test (list* 2 (map #(-> % inc (* 2) inc) (range))))

9:16 it's probabilistic though but you can control the error probability

9:20 dav: grrr bad connection in airport

9:20 i was saying..

9:20 22:17 < dav> clgv: I did that already

9:20 22:17 < dav> I'm not looking to changethe algo

9:20 22:17 < dav> this is a clojure question

9:20 22:17 < dav> not an algorithmic question..

9:20 22:18 < dav> http://stackoverflow.com/questions/1590716/clojure-prime-numbers-lazy-sequence <= this guy has a solution involving an atom..

9:20 cemerick: dnolen: script/build no longer works on HEAD. I think the two sed commands need to have the first empty string args removed.

9:20 At least, that works for me here.

9:21 clgv: dav: ah ok, your are only toying with the language^^

9:23 dav: since you already use lazy-seq there is an easy possibility without an atom

9:24 dav: clgv: ah.. how so?

9:25 clgv: dav: implementing it - please hold the line ...

9:25 dav: damn this customer service ;-)

9:25 upwardindex: More idiomatic way to write (when-let [x (bar)] (foo x))?

9:26 bbloom: (doc some->(

9:26 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

9:26 bbloom: (doc some->)

9:26 clojurebot: "([expr & forms]); When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc"

9:27 bbloom: that's very similar semantically, but it's probably want you want

9:27 (some-> (bar) foo)

9:27 dnolen: cemerick: huh really? I used script/build w/o hitch yesterday while hacking on source map stuff.

9:28 cemerick: dnolen: as it sits, I get

9:28 sed: can't read s/^.def \*clojurescript-version\*.*$/(def *clojurescript-version* "0.0-2005")/: No such file or directory

9:28 dnolen: maybe BSD vs. GNU sed (I'm on ubuntu)

9:29 dnolen: cemerick: build script doesn't work for me w/o them.

9:29 cemerick: heh

9:29 yay for build scripts

9:30 dnolen: whatever, I can make do

9:31 dnolen: cemerick: can you confirm that -ie works for you?

9:32 cemerick: works for me w/ -ie with "" dropped

9:32 nDuff: Where's this script? (willing to provide a patch, if the portability fix is an obvious one)

9:32 dnolen: nDuff: script/build in ClojureScript repo

9:32 bbloom: yeah sed's command line arguments are notoriously non-portable

9:32 nDuff: ...err. I don't see a "build" in https://github.com/swannodette/clojurescript/tree/master/script

9:33 ...ahh.

9:33 dnolen: nDuff: that's my old fork

9:33 clgv: dav: https://www.refheap.com/20495

9:33 cemerick: dnolen: yeah, -ie, no empty first arg works

9:33 nDuff: Ahh. Yeah, sed -i is nonportable as a whole.

9:34 ...if we can use perl as a dependency, that's actually more uniform across platforms.

9:34 (in terms of behavioral consistency)

9:34 cemerick: This conversation is precious. :-D

9:34 clgv: dav: an optimization possibility is to check only all primes up to square root of n

9:34 dnolen: nDuff: eh, well we'll stick w/ -ie until more people complain and/or this doesn't work on the build server

9:34 nDuff: cemerick: sed -i isn't specified in POSIX at all

9:35 cemerick: nDuff: *shrug* I don't have a horse in this either way.

9:35 nDuff: ...the other approach is to do the rename logic ourselves. sed -e '...' <foo >foo.new && mv foo.new foo

9:36 clgv: dav: and you could also avoid lazy-seq instances which do not yield a prime immediately by finding the next prime in one recursive call

9:36 dav: clgv: so you're maintaing a vector on top of the list

9:36 clgv: I did the same thing with a sorted-set earlier

9:37 clgv: yes I had done that too

9:37 bbloom: i think perl is the clear choice

9:37 clgv: dav: I maintain the vector within the lazy-seq

9:37 bbloom: perl -pi -e s,foo,bar,g target.file

9:37 dnolen: CLJS users, I landed a fairly large number of enhancements to source map support in ClojureScript, clone the repo, ./script/build, update your project.clj, and verify that source maps are still working for you (and hopefully behaves more sensibly across incremental builds, auto or once)

9:38 ToBeReplaced: what is the recommendation for CLI in CLJS?

9:39 i don't see anything in tools.cli that would prevent it from being CLJS compatible -- just have to do it -- wondering if people use anything else?

9:42 dnolen: ToBeReplaced: not aware of anything, likely people that need something like that are targeting node

9:42 upwardindex: bbloom: thank you, I didn't know about some->

9:45 ToBeReplaced: dnolen: i'm targeting node as well -- you get a js array of args from process.argv -- wanted to do the parsing in clojure-land if it was readily available

9:51 bbloom: ToBeReplaced: look for jvm-clojure libraries & propose a patch to them. it should be a *very small* interop boundary: just the name of ARGV

9:51 ToBeReplaced: i mean, aget and alength should work the same on java & javascript arrays for CLI purposes

9:57 ljos_: will (fn f [[h & tail]] (if (number? h) h (map f tail))) have the potential to blow the stack, or will the laziness of map prevent that from happening?

9:58 oh a small error, that should be (fn f [t] (if (number? t) t (reduce + (first t) (map f tail))))

10:10 srruby: If I need pointers can I use atoms ?

10:10 gfredericks: srruby: probably? why do you need pointers?

10:11 ljos_: the overall function is eager

10:11 so if your "tree" is deep enough then you will blow the stack

10:11 srruby: gfredericks: I have a parse tree where one data structure needs to 'point' to another part of the tree.

10:11 gfredericks: srruby: I'd consider doing something indirect with ids or something like that first

10:12 I think what you're asking about is circular/self-referential data structures

10:12 srruby: gfredericks: Right. That is what I've been doing but it seems clunky.

10:13 AimHere: If you're pointing at bits of a tree for some reason, might that mean you're doing something that zippers would probably do in a more functional stylee?

10:13 cemerick: dnolen: might be worth spitting *clojurescript-version* into its own file? It's inevitable that that changed line is going to get committed and reverted over and over. :-)

10:14 bbloom: cemerick: it also means no need to update in place :-)

10:14 echo $(get the version) > .version

10:14 lazybot: $(get the version) > .version

10:14 cemerick: bbloom: yup :-)

10:15 oh, it's in two files!

10:15 srruby: AimHere: I've been doing everything so far with postwalk. I'm aware of zippers and might try them in the future.

10:16 bbloom: version numbers in build scripts is like THE classic example of a staging violation, cyclic dependency, broken partition between src / obj files, etc

10:17 seangrove: bbloom: I always wondered how one could do it, seemed a bit tough.

10:18 bbloom: seangrove: the problem is that people always try to do it in place or w/o creating extra files or whatever. the right thing to do is to write a build script which generates your build scripts THEN run *those*

10:19 cemerick: bbloom: lein is an interesting third way, where the "build script" is baked into the artifact

10:20 though, it'd be nicer if, say `lein pprint` output was included, instead of the original project.clj (which needs leiningen-core to read in the general case)

10:26 ljos_: gfredericks: thanks.

10:27 srruby: I was watching Rich's talk on concurrency where he shows his "Ant Colony" simulation. He talks about refs, agents, and vars. Do you know why he doesn't mention atoms?

10:28 llasram: srruby: Probably just because atoms aren't novel

10:29 srruby: Thanks everybody!

10:31 gfredericks: srruby: I think that was a very early talk, and atoms might not have existed at that point?

10:33 clgv: srruby: maybe because he has several stateful entities which need to be coordinated then atoms do not fit

10:38 scottj: how do I change the default license for new lein projects? create a new project template?

10:39 dnolen: cemerick: it is annoying - enhancement patch welcome, I just modified what was on the ticket as I don't see an obvious better way that won't show up as a change to the repo.

10:42 cemerick: dnolen: I won't jump on it straight away, but a regular properties file as with Clojure, plus a derived bit of cljs that is generated when the core cljs stuff is loaded may work

10:42 justin_smith: I think the ants demo does not use atoms because he wanted to demonstrate STM, and atoms are not STM

10:43 dnolen: cemerick: ah ok, so the compiler reads the property file and compiler replaces when it compiled, good idea

10:43 when it compiles core.cljs

10:44 cemerick: ayup

10:44 andrewmcveigh|wo: Say I have some clojure/edn config datastructure(s) on the server (ring/etc.), and I want the client (cljs) to be able to read it on load. What is the best way to do this? Embed edn as string in a js var? json? some other way?

10:44 cemerick: just gitignore the properties file, and you're done

10:44 dnolen: cemerick: ok that sounds good gonna apply 643

10:45 cemerick: dnolen: I was actually thinking of just concatenating a string onto the results of slurping "cljs/core.clj", rather than replacing anything, but whatevs

10:45 * cemerick crosses fingers

10:46 dnolen: cemerick: hey that's good to

10:46 cemerick: dnolen: having it in the source is helpful from a doc perspective, so it's a tradeoff

10:47 dnolen: cemerick: true, but honestly this enhancement was about havoc from switching compilers and stale code.

10:48 cemerick: dnolen: BTW, I'll eventually going to hack in something to cljs.env such that any dereferences of it when it's unbound will throw a helpful error message. Tracking down the stray areas where that's not getting bound was a PITA.

10:48 dnolen: brave new world thread safe CLJS compiler, big thank you to cemerick!!!

10:48 bbiab

10:49 cemerick: gah, clojure.lang.Var is final :-X

10:51 bbloom: nice

10:52 clgv: cemerick: well they were not thorough enough then http://steve-yegge.blogspot.de/2010/07/wikileaks-to-leak-5000-open-source-java.html

10:52 bbloom: cemerick: i like the idea of centralizing state in to it's own namespace. good call

10:53 cemerick: bbloom: Quite necessary. There's lots of little stray bits yet to be pulled in, but a lot of the rest have been around for a long time, and haven't yet caused real problems.

10:54 the constants table and the namespaces map were the two biggies

10:55 justin_smith: clgv: that link is hilarious

11:05 ltw: hi, I just tried to create a map that adds keys for vectors and experienced some different behaviours in map creation

11:05 ,((fn [a] {"asdfasd" a}) {:account 1 :type :foo})

11:05 clojurebot: {"asdfasd" {:account 1, :type :foo}}

11:06 ltw: ,(#({"asdfasd" %1}) {:account 1 :type :foo})

11:06 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: PersistentArrayMap>

11:06 ltw: am I misunderstanding anonymous function creation or something?

11:06 justin_smith: ltw: that second example is applying the map to 0 arguments

11:07 andrewmcveigh|wo: ltw: You're misunderstanding what the #() reader macro does

11:07 justin_smith: the first example was returning the map

11:07 ltw: ahhh, right.

11:07 thanks!

11:10 mdrogalis: killme2008 has starred my GitHub repo. Hm.

11:11 amalloy: cemerick: i just tried to fill in the survey on mobile, and Q3 (order these things) was so painful i gave up: surely there's some better UI - even having the question be totally optional so i can skip it, rather than autofilled with some default answers that i don't want to give, would have been better

11:11 mdrogalis: Not sure how I feel about that.

11:11 ToBeReplaced: tbaldridge: should clojurepy -h print anything? -- i can't get clojurepy to do anything other than bring up a repl

11:11 muhoo: mdrogalis: who is that?

11:12 amalloy: also the "ordered top to bottom" hint was not at all useful, since when you're just typing in numbers there's no top or bottom

11:12 mdrogalis: muhoo: *Shrug* https://github.com/killme2008

11:13 justin_smith: mdrogalis: the juvenile user name could just be a language barrier thing

11:14 cemerick: amalloy: hum, ok. I didn't try it out on an ipad, etc. FWIW, the initial ordering is randomized, but the results are definitely skewing sharply, so I think the aggregate data will still be useful. I don't think changing the question at this point would be useful/fair/etc.

11:14 Thanks for the heads-up though, I'll make sure to test on an ipad or whatever next time :-/

11:14 mdrogalis: justin_smith: That's just what he wants you to think. D:

11:14 amalloy: thanks for putting the survey together again. filling out on desktop this time :)

11:14 cemerick: amalloy: a good call for just about everything IMO :-)

11:15 amalloy: oh, for sure

11:15 * justin_smith is going to register the user eatmypoopfart on github, and harrass people by following their projects and issuing pull requests

11:16 amalloy: cemerick: i'm sure you knew this already, but i discovered today that "chasemerick" looks kinda like "chase me rick"

11:16 cemerick: amalloy: I hadn't thought about it :-P Unfortunately, there was already a cemerick on wordpress.com, so I had to fall back :-/

11:17 mdrogalis: justin_smith: It doesn't say anything good about my maturity that I lol'ed

11:17 muhoo: Mikalv: clojurebook.com

11:20 oich: I am creating a class using gen-class that has several fields with get/set. Is there a way to avoid needing to write the actual functions that only get and set?

11:22 amalloy: oich: best recommendation is to not gen-class a bunch of pointless getters and setters

11:22 muhoo: mdrogalis: looks like a normal enough guy, works at a startup. more interesting than the name is that a startup is using clojure, always good to see

11:22 amalloy: if you're just defining a boilerplate-garbage class, java/eclipse is better at that anyway; and if you're doing something meaningful it doesn't really need getters and setters

11:24 sveri: hi, i have a list which i want to split into n lists (e.g. '(1 2 3) into (1 2) and (3) where n is 2), is there a function in clojure which does that?

11:25 llasram: &(doc partition)

11:25 lazybot: ⇒ "([n coll] [n step coll] [n step pad coll]); Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. If a pad collection is supplied, use its elements as necessary to complet... https://www.refheap.com/20498

11:25 llasram: Actualyl,

11:25 &(doc partition-all)

11:25 lazybot: ⇒ "([n coll] [n step coll]); Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end."

11:25 sveri: ah, i read about partition, but that did not do as expected, and i have not found partition-all

11:25 thats exactly what i am looking for

11:25 thank you very much

11:26 mdrogalis: muhoo: Maybe he doesn't like his start up.

11:26 justin_smith: I'm sure if I follow his projects, I'll see something like "'eatmypoopfart' has opened an issue on 'killme2008's repository"

11:26 Perhaps a GitHub first.

11:27 muhoo: my passwords for some services are loaded with curse words and iinvective

11:28 mdrogalis: *Facepalm*

11:28 muhoo: my fb password was perhaps the crankiest

11:28 mdrogalis: Well it's only funny if you can share the password.

11:28 justin_smith: attempt to create password -- "the character ; is illegal in passwords" -- new password: "hash your fucking passwords your db is insecure fuckhead"

11:28 hyPiRion: It's only funny for NSA, in other words

11:29 seangrove: Is cider-repl-mode a separate package that needs to be installed?

11:29 muhoo: justin_smith: pretty much!

11:29 justin_smith: taking for granted that not allowing certain chars means they are storing unencrypted in the db

11:29 mdrogalis: hyPiRion: Correct.

11:30 Morgawr: is there an alternative to and that is not a macro?

11:30 amalloy: mdrogalis: i'm suddenly sad to discover that poopfeast420 doesn't have a github account

11:30 Morgawr: I need to reduce 'and' to a vector of booleans

11:30 amalloy: Morgawr: ##(doc every?)

11:30 lazybot: ⇒ "([pred coll]); Returns true if (pred x) is logical true for every x in coll, else false."

11:30 Morgawr: amalloy: thanks!

11:30 hyPiRion: mdrogalis: obligatory XKCD: http://xkcd.com/525/

11:30 mdrogalis: amalloy: Is this going to be the next open source trend? Armies of offensive accounts.

11:31 muhoo: how did this turn into /b/ ?

11:31 mdrogalis: hyPiRion: Hah

11:31 I was just thinking that, muhoo.

11:32 justin_smith: probably my fault, somehow I got implanted with the sense of humor of an 8 year old today

11:33 somewhere out there a third grader is making weird esoteric jokes that none of his peers understand

11:33 mdrogalis: Ah, those were the days..

11:33 Not really.

11:34 hyPiRion: justin_smith: only their teacher, which is amused by the vocabulary

11:35 mdrogalis: Even he/she is asking, what the *hell* is a monad?

11:36 hyPiRion: "just a monoid in the category of endofunctors"

11:37 mdrogalis: The small child walks away giggling.

11:37 Pretty sure we can write a screen play about this, you guys.

11:39 justin_smith: mdrogalis: check if Lindsay Lohan is available, it would be a surefire hit

11:39 tbaldrid_: I was about to say, a Geeky Freaky Friday?

11:39 mdrogalis: This is going in today's stand up for sure.

11:40 seangrove: Somehow nrepl/i-mode is getting turned on whenever I open a clojure file in emacs, and it's eating all the commands that should be going to cider, e.g. C-c M-n... this has not been a smooth 'upgrade' to cider.

11:40 Thought since it's on marmalade, it should be ready

11:40 mdrogalis: "Today.. I plan to work on an up and coming screen cast with #clojure. Next."

11:40 justin_smith: the kid in the adult body spends his whole day playing video games, watching anime, reading comics, and trolling internet forums, nobody notices any difference

11:41 muhoo: justin_smith: wait for randall monroe to draw that

11:42 seangrove: I probably need to completely remove nrepl.el

11:43 justin_smith: seangrov1: also look out for any .elc files compiled when you had nrepl, they will prevent newer uncompiled .el files from being used iirc

11:44 or something like that -- I just know the elc / el interaction can lead to weird behavior

11:57 iwo: hi, does anyone know a way to inspect the structure of a clojure function?

11:57 S11001001: iwo: tools.analyzer?

11:57 or analyze or something

11:58 core.typed uses it

11:58 tbaldridge: iwo: please define inspect and structure

11:59 iwo: so, imagine i create this: (def f (fn [x] (if x (fn [y] 1) (fn [y] 2))))

12:00 is it possible to inspect f in some way to find out what the structure of the code that executes when f is called is?

12:00 clgv: Has someone already put thought into how a diagram/chart DSL for easy usage needs to look like?

12:00 please do not refer me to incanter ;)

12:00 hyPiRion: easy usage?

12:01 iwo: basically, i'm working with automatically generated compojure routes, and i'd like to be able to somehow inspect the route & middleware that has been generated

12:01 tbaldridge: iwo: yeah you probably want to look at tools.analyzer.jvm https://github.com/clojure/tools.analyzer.jvm

12:01 eh, then that's not what you want

12:01 hyPiRion: well, I like gnuplot, but that's not easy.

12:01 clgv: hyPiRion: yeah especially for advanced scenarios where you build several plots and charts from one dataset

12:01 bbloom: clgv: http://keminglabs.com/c2/

12:02 tbaldridge: iwo: that's not exactly easly/possible. compojure routes end up being closures and those are pretty hard to inspect.

12:02 ToBeReplaced: mdrogalis: why use slingshot instead of ex-info/ex-data in dire?

12:02 clgv: I just thought I ask if nothing comes up I'll rewrite my current code with the new lib and see where something is missing

12:02 oich: for my avoiding getters setters with gen-class question (I have to create a class with methods getBlah setBlah, etc. because they are expected), I figured out a weird solution: create a java superclass with protected fields and then use :exposes. but, maybe it's better to write a macro that emits a series of defn expressions?

12:03 bbloom: clgv: kevin lynagh is working on various projects in charting. he's the guy to talk to

12:03 tbaldridge: iwo: that's one of the reasons why Pedestal does this a bit differently, but that would require porting your code to a different library: http://pedestal.io/documentation/service-interceptors/

12:03 justin_smith: iwo: you could use something like robert-hooke to track invocation of the functions when the route is hit https://github.com/technomancy/robert-hooke/

12:04 clgv: bbloom: ok thanks

12:04 bbloom: oich: watch this: http://skillsmatter.com/podcast/scala/impromptu-rich-hickey-lightning-talk

12:05 oich: rich explains how he made the java API for datomic while still preserving all the repl-goodness of clojure. short answer: just write java code and indirect through vars

12:05 technomancy: cemerick: does "what version of the JDK do you target?" mean what you use in production deployments or what you require users of your code to have?

12:06 iwo: justin_smith: thanks, i'll definitely investigate that, it might be the only option

12:06 sritchie: is anyone doing facebook or twitter authentication in Ring apps? any "best practice" recommendations?

12:06 cemerick: technomancy: Whatever is more meaningful to the respondent. Sort of a "if you had to choose just one" situation.

12:06 sritchie: cemerick: repl's up, got used to the workflow, it's great :)

12:07 cemerick: sritchie: nice, good to hear :-)

12:07 technomancy: ok

12:07 sritchie: cemerick: I was seeing that ""cemerick" does not exist" error when try to run clojurescript.test, but that's something to fix another day

12:07 iwo: tbaldridge: there _must_ be a way to see something useful surely. maybe debugging with something like ritz would be an option

12:07 technomancy: cemerick does too exist

12:07 I've seen him with me own eyes

12:08 sritchie: he's ascended to a higher plane of compilation

12:08 cemerick: sritchie: sounds like a classpath situation

12:08 technomancy: sometimes I wonder

12:08 sritchie: cemerick: I added it as a plugin,

12:08 perhaps I'll try adding it as a dep too

12:08 cemerick: lein 2.3.3

12:09 iwo: tbaldridge: my first bit of googling suggested serializable.fn

12:09 technomancy: cemerick: kind of a http://dresdencodak.com/2011/04/19/dark-science-09/ type of situation?

12:09 cemerick: dnolen: maybe this is a non-starter with the powers-that-be, but maybe now would be a good time to bump the minor version number of cljs? Every time I contribute large(ish) changes, I feel bad for others that have to puzzle out the difference between effectively-arbitrary changes in a single number.

12:09 iwo: tbaldridge: however i'm not sure the bet way to apply this so that it's used by compojure, alter-var-root is a very bad idea :)

12:10 sritchie: cemerick: I'm expecting a biased answer here: friend > clauth (or equiv) for oauth?

12:11 dnolen: cemerick: I'm not against it, but I would like to get a lot more feedback first. I want incremental compilation, REPLs, and source maps to be solid

12:11 xeqi: did you see my comment about your patch yesterday?

12:12 devn: "Name *one* language feature would you like to see added to Clojure."

12:12 cemerick: dnolen: a lot more feedback before a 0.1-XXXX, you mean?

12:12 dnolen: cemerick: yes

12:12 clojurebot: No entiendo

12:13 cemerick: OK

12:14 llasram: Does "CLJS-style core-interfaces-as-protocols in JVM Clojure" count as a "language feature"

12:14 cemerick: sritchie: I'd much rather see e.g. the stuff in clauth be turned into a friend workflow

12:15 tbaldridge: llasram: in the same way "full language rewrite" counts as a feature :-P

12:15 amalloy: llasram: i doubt cemerick will be calling the police if you ask for something he doesn't count as a language feature

12:15 llasram: He might!

12:15 cemerick: I didn't find the examples of ring usage very compelling. ! this and ! that, etc.

12:15 tbaldridge: then I'm gonna add "make Clojure statically typed so I can use monads".

12:15 hyPiRion: I just want faster startup time atm

12:15 TimMc: car and cdr for me

12:16 tbaldridge: just to see if I end up getting murdered

12:16 sritchie: cemerick: gotcha, good to hear

12:16 llasram: tbaldridge: You don't think it could be done incrementally?

12:16 cemerick: technomancy: eh, more of an internal confusion than lacking external validation

12:16 oich: bbloom thanks. that is really cool. for this case since the getters/setters just expose the field, I think it's less code just to create the java super class with protected fields (or a macro) but, that looks like a very useful technique

12:16 sritchie: cemerick: time to do some learning, then I'll see what I can do

12:16 gfredericks: llasram: it would probably break stuff...so maybe best to break everything at once rather than repeatedly?

12:16 tbaldridge: llasram: yeah, that's the way it has to be done, but it's still really hard. The compiler itself uses the interfaces you'd be rewriting.

12:17 cemerick: sritchie: that's not to say that friend has a super-great oauth story. There's friend-oauth2, which definitely works, but saying friend has "oauth support" is an incredibly broad claim given the "spec", one that I don't want to make.

12:17 bbloom: oich: the summary of my point is: don't be afraid to write java if it's easier than writng clojure for your particular need

12:17 llasram: I'm not really sure why it would break anything. You could keep the existing interfaces, and extend the new protocols to those interfaces

12:17 gfredericks: maybe it wouldn't break much, since defprotocol creates an interface

12:17 by hopefully the original name?

12:17 llasram: Or that

12:17 tbaldridge: gfredericks: that interface is only implemented on new classes, not old ones.

12:18 gfredericks: tbaldridge: I know

12:18 cemerick: llasram: what amalloy said, also, I don't particularly judge anything entered. I get first dibs on commentary, but that's worth about as much as the paper it's written on.

12:18 gfredericks: I was thinking of breakage along the lines of just (:import clojure.lang.IFn) and such

12:19 llasram: cemerick: Yeah, I'm not buying it. I'm pretty sure you've got a team of crack mercenaries, ready to go

12:19 I was mostly just curious what people were considering a "language feature"

12:21 cemerick: llasram: if only. That would imply that there's money to be had being a professional Clojure hatchet man. Alas.

12:21 ivan: dev.clojure.org jira ticket pages intercept ctrl-pgup/pgdn in Firefox (why oh why do browsers let people do this)

12:22 hyPiRion: and it reads the super button, which is annoying.

12:22 technomancy: ivan: wow

12:22 ivan: more pertinently, why do humans inflict this on other humans?

12:23 ivan: some people just use their clicky-mouse for everything or haven't been using browsers very hard. a month ago I found a page that used ctrl-s for search

12:24 justin_smith: llasram: that's easy, macros are language features

12:24 mtp: ugh

12:24 i found some IRC client that used C-f for Fonts

12:24 ivan: heh

12:24 mtp: and afaict didn't have a search-the-scrollback feature at all

12:25 mdrogalis: ToBeReplaced: Hm.. I had a reason..

12:25 Oh, right. Because Slingshot exceptions might propagate from within that try block.

12:25 End-users functions, that is

12:27 TimMc: ivan: Github intercepts / (in-page search in Firefox) and you *can't turn it off*.

12:27 llasram: justin_smith: Well, that is a very specific definition

12:28 ivan: TimMc: the one that starts with / ? seems to be working here

12:28 Morgawr: I have an operation with side effects that needs to be applied to a collection of elements (like a vector) and I do not care about the return value of such operation, is there anything better than calling (doall (map func coll)) ?

12:28 technomancy: TimMc: is there some noscript hacks you could use to fix that?

12:28 TimMc: ivan: Not every page.

12:28 ivan: Firefox 25, at least

12:28 ah

12:29 TimMc: ...or maybe they finally killed it?

12:29 ToBeReplaced: mdrogalis: so it's to deal with user functions that already use slingshot?

12:31 iwo: ivan: ctrl-pgup/ctrl-pgdn work as usual for me when viewing a dev.clojure.org jira ticket in FF 24

12:31 ivan: iwo: try clicking on some ticket text, does it still work?

12:31 mdrogalis: ToBeReplaced: Well, say you define a function that throw+'s something. And then you add a Dire hook.

12:31 technomancy: Morgawr: doseq is more typical for that

12:31 Morgawr: technomancy: thanks

12:31 mdrogalis: If I just used "try" within the Dire hook, it would stacktrace out

12:31 ToBeReplaced: Morgawr: (doseq [c coll] (func c)) or (dorun (map func coll))

12:32 Morgawr: doseq looks perfect, thank you :)

12:32 mdrogalis: ToBeReplaced: I should have just answered that - yes :P

12:32 Morgawr: I knew there was one but I kept forgetting the name, I looked for "for", "while", "do", "doall", "dorun" etc etc

12:32 doseq was what I was looking for :P

12:33 iwo: it seems to do two things, switch tabs _and_ scroll to the top or bottom of the ticket

12:33 ivan: iwo: you lucked out, maybe it's Windows or my FF extensions

12:34 ToBeReplaced: mdrogalis: that feels questionable to me -- do you have users that are asking for slingshot throw+ compatibility?

12:34 justin_smith: llasram: I meant it jokingly, it's kind of a pedantic normative definition of macros that they should only be made if they are creating language features

12:34 mdrogalis: ToBeReplaced: Yeah, a bunch.

12:35 ToBeReplaced: mdrogalis: it feels off that your lib has to eat that dependency ... esp after inclusion of ex-info

12:35 oh, interesting

12:35 mdrogalis: I don't mind it. If the end user never knew that Slingshot existed, his/her world would be exactly the same in the API usage

12:35 ToBeReplaced: i might be out of the loop -- what does slingshot buy you that ex-info/ex-data doesn't?

12:36 mdrogalis: catch+ can do dispatch on predicates

12:36 ToBeReplaced: mdrogalis: yeah, not a deal breaker by any means... just adds an extra dep

12:37 in stead of (catch RuntimeException e (condp (ex-data e)....

12:37 mdrogalis: I'm about to get run-time hook removal out, so Night-Vision will be a lot better.

12:37 Correct. ^

12:37 technomancy: slingshot catching is really fancy

12:37 mdrogalis: technomancy: Yeah I quite like it.

12:37 ToBeReplaced: the fanciness is a positive then? i haven't used it

12:38 Morgawr: am I a monster for making this? https://gist.github.com/Morgawr/7322960

12:38 just for syntactic sugar?

12:38 Raynes: technomancy: Miss slingshot, miss slingshot, miss slingshot: are you fanceh!?!?!?!

12:38 mdrogalis: The win is that the code that blows up just needs to puke up enough context for a predicate to pick the right error handling logic higher up the stack.

12:38 Raynes: technomancy: (reference to https://www.youtube.com/watch?v=LUc_jXBD9DU)

12:39 Morgawr: Well, you're a monster for making it a gist instead of a refheap.

12:39 Morgawr: Raynes: sorry, I like gists for stuff I want to keep around

12:40 Raynes: Anyways, I certainly wouldn't write that macro. It makes the code more confusing to readers (they now have to understand what that macro does) without much gain.

12:40 technomancy: ToBeReplaced: for something with as limited scope as catch, I think fancy is a win =)

12:40 Raynes: Morgawr: I was totally joking, but I am curious as to why you'd rather use gist for things you'd like to keep around (sounds like feedback and feedback is useful for future refheap improvement)

12:41 hyPiRion: Morgawr: maybe you should check out common lisp. You can do (loop for n in '(1 2 3 4 5 6) do (print (* n n)))

12:41 Morgawr: Raynes: I have a gist client on my machine where I can collect all the gists tied to my github account, you can submit pull requests and revisions to gists (as far as I know, never did it myself though) and it is tied to your own github account

12:42 hyPiRion: nah, I don't like common lisp, I think clojure's syntax (and flexibility) is much better :P

12:42 technomancy: Raynes: tying it to an existing github account is kind of a brilliant lock-in move on their part =\

12:43 ToBeReplaced: technomancy: mdrogalis: thanks

12:43 Raynes: Morgawr: Interesting. I can add the first feature to rapture in approximately 4 seconds. Revisions exist on refheap as of about a month now. You can't submit 'pull requests', but I purposely avoided the pastes-backed-by-git gimmick.

12:43 Morgawr: Raynes: nice

12:43 hyPiRion: Morgawr: Well, I avoid syntactic sugar, because it makes it harder to read the code

12:43 Morgawr: honestly I never used refheap that much, any paste service is fine in my opinion

12:43 Raynes: Refheap also has accounts (backed by browserid, so it's pretty easy and usually sign-in-and-forget). I'm thinking of adding github authentication, but TimMc won't pull request me. :P

12:44 Morgawr: Sure, I just wanted to hear feedback and see if there was anything I could do to make the experience better. :)

12:44 Morgawr: hyPiRion: for clojure developers yeah, I am kind of writing a library for game development that can hopefully be used by programming newbies who never used a functional language or a lisp dialect, if I can make it easier with a first approach, I'd like it

12:44 ToBeReplaced: Raynes: can i get some love on my LinkOptions support in fs?

12:44 Raynes: ToBeReplaced: No. Go away. Never.

12:45 ToBeReplaced: (I forgot about the pull request)

12:45 dobry-den: Morgawr: `doseq` itself is a signal for "this has side-effects". I don't know what that wrapper accomplishes except blur the line between things like `for` which return a sequence

12:45 justin_smith: I thought it was a bad joke

12:45 ToBeReplaced: Raynes: hence the friendly ping ... no rush or anything, just putting it back on the radar

12:45 hyPiRion: Well, I am not sure whether adding syntax to Clojure makes it easier to learn

12:45 Raynes: ToBeReplaced: Hehe.

12:46 Morgawr: yeah you guys are probably right, this doesn't make much sense

12:46 it was just fun to implement though :P

12:46 rasmusto: Morgawr: you could have a side-by-side comparison of a clojure doseq and a ruby foreach or something

12:46 Morgawr: and dobry-den raises a really good point

12:47 Raynes: ToBeReplaced: Can you align the docstring text?

12:47 If so, I shall pull this here pull request and I shall do it with pride.

12:49 ToBeReplaced: what do you mean? i aligned it to match the other functions

12:51 it might make sense to split out java 7 work into a separate namespace or separate project even

12:51 Raynes: ToBeReplaced: Oh, I see. I must have missed it. noprompt did the other docstrings.

12:51 This is fine. I'll align them all later on.

12:51 ToBeReplaced: My intention was to release a new major version soon with java 6 deprecated.

12:52 Java 7 just has way too much good stuff to not be used

12:52 ToBeReplaced: deprecated through warnings or broken?

12:52 Raynes: Broken.

12:53 Trying to support both versions is painful.

12:53 And people who need java 6 support can just keep using the old version until they can upgrade.

12:53 ToBeReplaced: yeah, i'd vote for a separate project... java 6 has lots of life left with clojure so i think dropping it is a bad idea

12:53 technomancy: Oracle's JDK6 has been officially EOL'd for nearly a year now

12:54 not openjdk though

12:54 hyPiRion: hmm

12:54 ToBeReplaced: how widespread is jdk6 still in the wild though?

12:54 llasram: Many (most?) Hadoop distros still only experimentally support Java 7 :-/

12:55 hyPiRion: ToBeReplaced: On all debian servers I guess? At least on squeeze and wheezy

12:56 justin_smith: someone said to me that osx came with version 1.6 of the jvm - is that true? just maybe true as of the last time osx shipped with a jvm by default?

12:56 hyPiRion: Jessie runs on 1.7, but running testing in the wild is a rare sight

12:57 llasram: hyPiRion: wheezy at least has an openjdk7 package, unlike squeeze :-/

12:57 indigo: justin_smith: OS X doesn't come with a JVM anymore

12:57 You have to download one from Oracle

12:57 hyPiRion: llasram: what? I thought squeeze had a 1.7 package

12:57 justin_smith: it comes with xcode thought, right?

12:58 hyPiRion: well, squeeze is old now, so people should upgrade to wheezy when they can.

12:59 technomancy: we'll find out more when the state of clojure survey ends

12:59 llasram: hyPiRion: http://packages.debian.org/search?suite=all&arch=any&searchon=names&keywords=openjdk-7-jdk

12:59 technomancy: though I put 1.6 because it's the minimum requirement for lein users; I don't actually use it myself

13:00 llasram: hyPiRion: And yes, but does mean I need to upgrade my corporate universe to wheezy first, before even thinking about Java 7

13:00 ivan: iwo: this was 'fixed' in Firefox 25 ;)

13:00 hyPiRion: llasram: heh, yeah. I haven't bothered yet on my server either =/

13:02 technomancy: http://www.theregister.co.uk/2013/03/08/red_hat_openjdk_6_leadership/

13:02 no mention of how long they plan on keeping it up

13:04 ToBeReplaced: clojure 1.6 drops 1.5, right?

13:04 technomancy: ToBeReplaced: yeah

13:05 1.5 was never part of openjdk though, so it's been EOL'd for longer than you can imagine

13:05 hyPiRion: yeah, was amazed that Clojure actually supported 1.5

13:06 technomancy: Leiningen has never supported it =)

13:07 hyPiRion: not intentionally at least

13:07 technomancy: there's some j.i.File method used in compile or jar or something that makes it blow up

13:07 hyPiRion: To be honest, I'm not sure of the differences between 1.5 and 1.6. It's before my time

13:07 oh, hehe

13:08 TimMc: Young 'un.

13:08 * hyPiRion ticket off "2 years" in the Clojure survey

13:09 hyPiRion: ticked*

13:10 technomancy: leiningen's 4th birthday is the day after the conj

13:10 well, of the 0.5.0 release. the first commit was halloween.

13:13 pjstadig: technomancy: really? hmm time flies

13:13 technomancy: I know, right?

13:14 it's like... mature software or something

13:14 hyPiRion: Well, it's actually post 0.x.y.

13:14 joegallo: BIG BUSINESS, technomancy

13:14 hyPiRion: That's very unusual for any Clojure project out there.

13:14 technomancy: joegallo: time for a certification program

13:15 joegallo: that's where the money's at

13:15 justin_smith: talk to University of Phoenix, they can set up a money faucet

13:16 sshack: Are there any parsing tools for uri's in clojure? Want to parse a DB connect string to feed into korma/lobos.

13:17 justin_smith: You laugh, but Upheonix might be the future. They have no physical buildings, deliver online so they can ab-test out the wazoo, and enough students to hire the best people.

13:17 technomancy: I remember my first bug report; running `mvn package` from a fresh checkout didn't actually work; turned out everyone just used ant and the readme hadn't been updated.

13:18 sshack: They got clayton christensen after all.

13:18 ToBeReplaced: on 0.x.y -- that tilts me... i should have put that in my state of clojure survey

13:19 i don't get the big deal against having version 13.1.2

13:19 technomancy: ToBeReplaced: gotta avoid integer overflows y'know

13:20 java doesn't have unsigned ints

13:20 TimMc: sshack: URIs in general, or specific schemes?

13:21 dnolen: reiddraper: hmm, have you seen this John Hughes video on async testing with QuickCheck? http://vimeo.com/17135313

13:21 bbloom: can i just say how much i appreciate the lack of interposed syntax in lists?

13:21 if i ever debug another trailing slash on a path to a directory issue again,.... grumble gurmble

13:21 sshack: Timmc: database connection strings.

13:21 timmc: korma/lobos want keywords, heroku sets an env var with a connection string.

13:22 bbloom: whoever decided you need a common between array items should be shot

13:22 TimMc: sshack: OK, so it needs to understand how to parse specific DB connect strings.

13:23 sshack: timmc: As far as I know they conform to normal urls: postgresql://user:pass@foobar.com:5432/my_database

13:24 TimMc: java.net.URI will split that into non-specific parts, like host and path

13:24 reiddraper: dnolen: I have not, thanks

13:25 technomancy: bbloom: I wonder if that originally stemmed from a desire to make it "like english" or something

13:25 bbloom: it doesn't work in english either

13:25 hurray oxford comma debates

13:25 dnolen: reiddraper: seems like a pretty solid set of ideas easily implementable by simple-check :)

13:25 sshack: timmc: I was looking at that. It looks to give me everything but the password part.

13:25 hiredman: bbloom: commas in other languages drive me crazy now

13:26 iamjarvo: so i just looked in here an saw a mention of heroku. are there a lot of clojure apps on heroku? i was surprised they had couple awesome clojure tutorials

13:26 stuartsierra: Commas make it easier to distinguish separate items when written by hand.

13:26 TimMc: sshack: At work I've been hammering on a lib to do URI parsing, but it's just focused on http URLs right now and isn't done. :-/

13:26 stuartsierra: But I agree, I dislike typing commas now. :)

13:26 reiddraper: dnolen: excellent, yeah, i'll give it a watch after work today

13:27 technomancy: iamjarvo: there's a decent number, but a lot less than scala and groovy even

13:28 iamjarvo: ahh i see. i come from the ruby world.

13:28 bbloom: hiredman: i just opened a file and saw a ton of /paths/that/looked/like//this

13:28 sshack: timmc: ahh. Hence your interest. Well as far as I know db connect strings are valid URL's.

13:28 bbloom: note the double slash

13:28 *cringe*

13:28 technomancy: iamjarvo: right; on heroku everything else is a rounding error compared to ruby

13:28 TimMc: bbloom: That should be fine, actually.

13:29 bbloom: TimMc: it is fine for bash, etc. but it's not fine when it's like your one primary upstream environment var that gets copied around to dozens of other config files & things

13:29 surely somewhere somebody down the line will barf on that

13:29 justin_smith: a posix system won't care about doubled slashes at least

13:30 the / is interpreted on a filesystem level

13:30 technomancy: bbloom: really? I've never run into anything that barfed on double slashes

13:30 justin_smith: but // in a path is ugly, and is always obviously a mistake

13:31 nDuff: technomancy: I've seen a few places where it can happen.

13:31 bbloom: technomancy: some code trying to convert a absolute path in to a relative path by stripping a prefix. result is a path with a leading /

13:31 justin_smith: you can do a syscall telling the kernel to open a file with // in the path, the kernel won't care

13:31 nDuff: technomancy: ...double slashes are special to some parts of the Andrew Filesystem, f'rinstance

13:31 justin_smith: yeah, but it is an fs level thing

13:32 technomancy: bbloom: sure, but you should probably be normalizing that anyway to take care of symlinks and stuff

13:32 bbloom: technomancy: i didn't write this code :-P

13:33 justin_smith: bbloom: in other words you should avoid // for much the same reason you should avoid space in paths, because it breaks lots of bad code?

13:33 bbloom: justin_smith: yes.

13:34 justin_smith: (alternately one could go the MS route and throw // in paths at every opportunity so that all code that can't handle it breaks constantly)

13:34 bbloom: justin_smith: but it also just makes quick munging harder

13:34 cut -d/ -f2- # for example, is broken

13:34 same for spaces, etc

13:39 Morgawr: mmm.. I have a vector of sets and I want to change the first set in that vector (change = return a copied vector with the modified set, obviously)

13:40 I'm wondering how to do that in an elegant way

13:41 stuartsierra: Morgawr: update-in

13:41 bbloom: (update-in vector-of-sets [0] conj :new-item)

13:41 Morgawr: oh, update-in works with vectors too? great!

13:41 thanks

13:41 pbostrom: is (:require [foo :refer :all]) not allowed in cljs?

13:41 TimMc: Morgawr: Yup, they're associative.

13:41 ~seqs and colls

13:41 dnolen: pbostrom: nope

13:41 clojurebot: seqs and colls is http://www.brainonfire.net/files/seqs-and-colls/main.html

13:56 sshack: timmc java.net.url lets me down. throws an exception because of the postgres protocol in the url.

14:01 TimMc: &(.getHost (java.net.URI. "postgresql://user:pass@foobar.com:5432/my_database"))

14:01 lazybot: ⇒ "foobar.com"

14:01 TimMc: sshack: ^

14:01 Remember to use the .get___Raw version of applicable accessors.

14:02 (j.u.URI will "helpfully" percent-decode stuff that it really shouldn't, otherwise)

14:03 sshack: Huh. Interesting.

14:05 TimMc: sshack: URI, not URL :-)

14:05 sshack: TimMc: Just noticed that.

14:06 Gets me everything I want but user/pass are still entangled. I can live with that.

14:07 TimMc: Yeah, you'll have to split at the first : and percent-decode the two halves (or single piece.)

14:13 technomancy: has anyone implemented a generalized "watch" higher order lein task to subsume these one-off implementations coupled to things like autoexpect and cljsbould :auto?

14:14 ToBeReplaced: technomancy: pyinotify?

14:15 technomancy: um?

14:16 ToBeReplaced: technomancy: that was bothering me a few weeks ago.... feels like doing "watch" right is hard and it sucks that everyone tries to reimplement pyinotify

14:16 technomancy: ToBeReplaced: doing it outside the JVM means re-invoking lein's own startup time

14:16 ToBeReplaced: inotify rather, heh... sorry... i use pyinotify for my watch commands

14:18 technomancy: so you want `lein inotify -d src cljsbuild`?

14:18 technomancy: ToBeReplaced: right

14:18 having cljsbuild implement its own watcher is silly

14:19 ToBeReplaced: agreed

14:19 technomancy: and I'm kind of surprised this hasn't been done right yet


14:19 rightly

14:19 correctly

14:19 whatever

14:20 TimMc: with more better doage

14:20 technomancy: http://p.hagelb.org/correct-answer.gif

14:23 pjstadig: technomancy: what am i even watching?

14:24 and why is it 5 minutes long

14:24 technomancy: pjstadig: difficult to put in words

14:24 TimMc: It is its own best explanation.

14:24 bitemyapp: there needs to be a name for that feeling when you see a meeting invite you don't want to go to, then realize you already agreed to it.

14:24 seangrove: I'd like to (I think) use multimethods that will always the same type given for the first argument, but do dispatch off of the second

14:25 Is there a way to do that?

14:25 TimMc: I think you a verb.

14:25 seangrove: (run simulation 'i81) would trigger one method, (run simulation 'i85) would trigger a different one, etc.

14:26 mdrogalis: technomancy: That is the weirdest thing I've seen in a while.

14:26 seangrove: TimMc: Quite possible.

14:26 technomancy: mdrogalis: thanks

14:26 TimMc: seangrove: Multimethods can do arbitrary dispatch on the arguments.

14:26 mdrogalis: Yeah no problem. I knew you'd take it well.

14:26 TimMc: You just want to dispatch on the second?

14:26 seangrove: TimMc: Ideally, yes

14:27 TimMc: Something like (defmulti run (fn [_ foo & _] foo))

14:27 seangrove: TimMc: Ok, let me try that out

14:29 TimMc: You could dispatch off of whether the first argument is relatively prime to the last if you wanted to.

14:42 bitemyapp: I'm going to just see if I can show up really late to the meeting so that the 10 out of 60 minutes that I can contribute to happen then.

14:44 indigo: Hm, fox news got hacked

14:45 Foxboron: indigo: nothing of value was lost

14:45 indigo: Yep :)

14:46 bitemyapp: I don't particularly like Fox News or agree with their politics but should we be cheering on attacks against news organizations at a time when the NSA is running rampant?

14:46 Sorry if I just ruined the fun :P

14:47 indigo: Not exactly cheering it on

14:47 But still, I don't consider Fox News a proper "news organization"

14:47 More like a propaganda machine

14:48 bitemyapp: indigo: I'm sure Fox News feels similarly about MSNBC

14:48 justin_smith: indigo: do you have a link for that? or a page that shows evidence of hackage?

14:48 bitemyapp: indigo: as frustrating as the polarization of news organizations to political extremes, do we really want fewer possible sources of information?

14:48 extremes is*

14:49 technomancy: it's not like they won't get the site back up

14:49 justin_smith: it is up and looks "normal" right now

14:49 I think

14:49 indigo: justin_smith: http://i.imgur.com/xviXyB1.png

14:50 bitemyapp: justin_smith: looks pretty hacked to me.

14:50 indigo: It's still on their front page

14:50 bitemyapp: Sure, if it would decrease the noise

14:50 justin_smith: oh, I thought that was what they normally looked like

14:50 technomancy: "stuff, yo"? lame =\

14:50 bitemyapp: indigo: it's only noise to you because you disagree with their viewpoint.

14:51 gtrak: bitemyapp: I think us techies are more able to deal with noise than most folks.

14:51 technomancy: they could have at least added something clever

14:51 mtp: i am terrible at handling noise

14:51 mdrogalis: Weeeeeeeeeeee

14:51 mtp: i try to extract signal from it

14:51 indigo: bitemyapp: It's not just fox, it's the death of real journalism in general

14:52 justin_smith: I'm listening to an asmr videos on youtube right now, noise gives me the head tingles

14:52 mdrogalis: justin_smith: I tried it. Didn't work for me.

14:52 TimMc: Hacked, or intern?

14:53 From time to time fake headlines (Lorem ipsum, "headline goes here", etc.) make it out the door.

14:54 justin_smith: "Etaoin shrdlu" is the best (and a great lib name)

14:54 indigo: bitemyapp: Btw, since you worked on Revise... what's your general opinion on RethinkDB?

14:54 justin_smith: http://en.wikipedia.org/wiki/ETAOIN_SHRDLU

14:55 bitemyapp: indigo: it does a better job at what MongoDB purports to do.

14:55 indigo: I'd still use PostgreSQL or Datomic for an "important" OLTP database of record.

14:55 * `cbp gets frustrated with pythons silly == overloading

14:55 bitemyapp: indigo: but if I had slightly lower value data for which I wanted a nice sharding, replicating, auto-clustering document store, RethinkDB is a solid choice.

14:55 indigo: RethinkDB also lends itself nicely to weekend hack projects.

14:56 you could do some nifty things with analytics data roll-ups with RethinkDB too.

14:56 I sincerely hope it supplants MongoDB as the document store of choice, it's vastly superior.

14:56 indigo: Gotcha

14:57 bitemyapp: the only thing I really dislike about RethinkDB is that it's specifically a JSON document store

14:57 indigo: Well... better than BSON

14:57 bitemyapp: well, I understand their reasons for using it

14:57 I just would've preferred something a little better designed schematically.

14:57 ironically, the protocol isn't JSON at all, it's a custom protobuf spec.

14:58 so they're quite free to break away from JSON at any time.

14:58 indigo: A.k.a. edn

14:58 Ah

14:58 Yay protobufs

14:58 bitemyapp: the representation just happens to be...JSON'ish.

14:58 `cbp: yay protobufs!!

14:58 bitemyapp: it's a little odd.

14:58 makes a ton of sense though.

14:58 * nDuff would like to see an XQuery database that paid serious attention to the "database" en d of things.

14:59 nDuff: ...BaseX is wonderful until one starts to care about concurrency and locking semantics, replication, &c.

14:59 bitemyapp: nDuff: take a look at the API: https://github.com/bitemyapp/revise/

14:59 `cbp: you should add a note to the :durability keys what the other options are other than :soft

15:00 `cbp: bitemyapp removed all my protobuf swearing comments

15:00 bitemyapp: `cbp: I can guess :hard, but I don't know for sure because it's not in the README

15:00 indigo: bitemyapp: No issues yet :(

15:00 bitemyapp: indigo: sorry?

15:00 you mean in Revise?

15:00 indigo: Yeah

15:00 I might check it out this weekend :D

15:00 llasram: zarro boogs

15:00 `cbp: indigo: that means its pretty perfect right?

15:00 bitemyapp: indigo: I'm not sweating it. `cbp knows I pimped out the library big time.

15:00 `cbp: I kinda should look into error handling...

15:00 *coughs*

15:00 indigo: `cbp: Of course

15:01 `cbp: Also no protobuf swearing comments because protobufs are everyone's favourite

15:01 >:D

15:01 `cbp: wait till you get messages like EXPECTED TERM BUT FOUND DATUM

15:02 nDuff: bitemyapp: ...hmm. Cute.

15:02 indigo: Just convert all error messages to EHRMEHGERD

15:02 bitemyapp: nDuff: `cbp's nice work.

15:02 nDuff: a lot of how the lambda-based API is dictated by how RethinkDB works.

15:02 `cbp: bitemyapp: I'll check the docs later today

15:05 bitemyapp: `cbp: I'm going to add some error handling test-cases tonight or tomorrow and see what I can do to clean it up.

15:07 `cbp: bitemyapp: okies

15:13 xeqi: dnolen: you're refering to using readers/indexing-push-back-reader rather than LineNumberingPushbackReader. ?

15:19 dnolen: xeqi: yes

15:28 xeqi: patch does not apply to master, needs a rebase

15:28 xeqi: also is this configurable? would be nice to enable for browser REPL but default disabled for everyone else.

15:37 xeqi: dnolen: ack, pulling

15:39 and not currently configurable. IJavaScriptEnv doesn't have a method for emitting js from a form. Is there a way to ask the repl-env if it is a browser REPL?

15:45 dnolen: hrm

15:47 xeqi: k, don't worry about config for the patch - I'll poke around and enhancement after I apply it

15:57 rbuchmann: Does anyone have an idea why this: (js->clj (.readdirSync fs path)) would return something that isn't ISeqable?

15:57 fs is nodes fs

15:58 It seems to be a js array still

16:00 hiredman: rbuchmann: clojurescript may not extend the protocols to native javascript stuff anymore, I seem recall there was something of a purge of that kind of stuff

16:01 rbuchmann: ok, granted, but isn't that what js-clj is supposed to be for?

16:01 *->

16:01 hiredman: no idea, I am just guessing

16:02 rbuchmann: if I have to do a for [i (range (count foo))] loop I am going to cry bitter tears

16:02 counting and agetting the result seems to work

16:10 interesting, calling array? on it returns false...

16:17 yeoj___: is there a better way to do this? (= (str (type s)) "class java.lang.String")

16:18 rbuchmann: maybe (isa? ...)

16:18 technomancy: ,(string? "yeoj___")

16:19 clojurebot: true

16:19 rbuchmann: or that :)

16:20 yeoj___: ok thanks.

16:20 llasram: And probably `instance?`, not `isa?`, for the general case

16:21 rbuchmann: right

16:21 yeoj___: i think i'm going with string? that makes sense to me.

16:24 dnolen: xeqi: hmm, something still wrong with that patch, trying to see how it affects Rhino REPL and I get a bunch errors about set! when testing with ./script/repljs

16:27 rbuchmann: no one volunteering for the node array issue? I got it working using the aforementioned loop, but it bugs the hell out of me

16:30 dnolen: rbuchmann: it should get converted into a vector

16:30 rbuchmann: well, it definitely isn't :)

16:31 It's not sequable, and the output to the console is the freaky #< foo > stuff

16:31 Does node do anything differently with its arrays?

16:32 dnolen: rbuchmann: are you sure it's an array and not some weird JS Array like?

16:32 rbuchmann: no, although the type was given as something like "Array function() { ... }"

16:32 Any way to find out?

16:34 #<function Array() { [native code] }> to be precise

16:34 and I can aget and count it

16:34 js is weird...

16:35 dnolen: rbuchmann: ok this seems like a bad predicate on ClojureScript's side, instanceof Array on the result of calling fs.readdirSync -> false

16:35 even through fs.readdirSync("./").constructor == Array

16:35 s/through/though

16:35 rbuchmann: aha

16:36 so, what does cljs do to get a different result...? gonna look at the source...

16:37 dnolen: rbuchmann: the array? predicate in CLJS is not right, it appears we have to use multiple tests

16:37 (x && x.constructor == Array) I think

16:38 rbuchmann: so it is a proper cljs bug?

16:38 dnolen: rbuchmann: yep

16:38 arkh: I'd like to learn how to use core.match but I haven't learned pattern matching previously. Google searches don't turn up much useful for learning pattern matching (and most examples are in haskell). Anyone know of a good pattern matching resource?

16:38 rbuchmann: hooray, my first ;)

16:38 should I report it?

16:39 dnolen: rbuchmann: yes please, should be simple to fix, but very annoying - JS really goes out of it's way to make shit slow

16:39 edw: Hey guys. We're hiring in NYC again. <https://gist.github.com/edw/7326822>

16:39 rbuchmann: haha

16:39 ok, will do

16:39 thanks!

16:40 arkh: edw: your gist returns a 404

16:40 juxovec: Hi do any of you have experience with core typed?

16:41 edw: That is unpossible.

16:41 Do you include the ">"?

16:41 juxovec: each time I try to use it, it throws exception: "Exception in thread "main" java.lang.AssertionError: Assert failed: (not *compile-files*), compiling:(state.clj:68:1) "

16:41 arkh: edw: I did ... and I've failed the pre-interview ...

16:41 dnolen: what an abomination - http://jsperf.com/isarray-vs-instanceof/7

16:42 edw: Sense of humor (and self deprecation) is highly prized.

16:43 arkh: edw: ; )

16:43 hiredman: juxovec: if I had to guess, you have a call to the type checking stuff somewhere that is being evauluated when you compile your project, and it really doesn't want to be called when the project is being compiled

16:43 juxovec: how are you running it? lein-type(d)?

16:44 juxovec: I have not task called lein typed

16:44 hiredman: it is a plugin for lein

16:44 juxovec: yes I added (cf) or (check-ns) directly to namespace

16:44 hiredman: https://github.com/frenchy64/lein-typed

16:44 juxovec: don't do that

16:45 edw: For what it's worth, I hired our second-most recent addition to the team from #clojure.

16:45 bitemyapp: Has anybody used this generic resource pooling library for Clojure or know of something they like? -> https://github.com/robertluo/clj-poolman

16:46 juxovec: thanks

16:46 I didnt know about that plugin

16:49 rbuchmann: dnolen: haha, totally straightforward

16:50 dnolen: rbuchmann: oh hmm ...

16:50 rbuchmann: -.-

16:51 dnolen: rbuchmann: actually going to have think about this some more, may not be a bug and a problem with JS values crossing contexts

16:51 which I have no desire to handle

16:51 rbuchmann: hm, ok

16:51 gonna file anyway, can always close it later :)

16:52 dnolen: rbuchmann: ok a reasonable approach for that patch.

16:52 rbuchmann: would be to emit different code if the compile target is Node.js

16:53 Array.isArray(x) for Node.js and everyone else will continue to use instanceof

16:53 hlship: A quick question about the (ns) macro

16:53 rbuchmann: oh, ok

16:53 hlship: From what I can tell, the requirement for the clauses (use / require / etc.) to be keywords was lifted back in 1.2-ish

16:53 dnolen: rbuchmann: so ticket welcome, it's a easy thing to patch.

16:54 rbuchmann: ok ^^

16:54 hlship: So I prefer (ns x.yz (require [p.d.q :as q])) stile

16:54 style

16:54 that is, symbols, not keywords

16:54 dnolen: rbuchmann: thanks for the report!

16:54 hlship: it seems like the vast majority of the world still uses keywords

16:54 rbuchmann: sure, np, thanks for the help

16:54 technomancy: hlship: ns allows you to do all kinds of insane things. resist the temptation

16:54 rbuchmann: sorry for not figuring out the patch myself, not that familiar with the cljs source

16:54 technomancy: it is a known problem

16:55 dnolen: rbuchmann: pretty non-obvious I'd say :)

16:55 bitemyapp: oh look, a new problem for which there isn't a satisfactory solution. Better write a new library.

16:55 rbuchmann: yeah ^^

16:55 hlship: true; but if the ability to use symbols, not keywords, was intentionally introduced ... was that intention to move towards symbols and away from keywords?

16:56 rbuchmann: dnolen: oh, actually that wouldn't help me :D I use node-webkit, so the target is standard js, it just has access to node stuff

16:56 dnolen: but that's probably a vast minority ^^

16:57 ToBeReplaced: bitemyapp: apache-commons?

16:57 bitemyapp: ToBeReplaced: locks, icky.

16:57 also, java.

16:57 technomancy: hlship: symbols in ns actually works in 1.0.0

16:58 hlship: interesting; I looked at the source and thought the changes to support symbols was more recent

16:59 ToBeReplaced: what is the difference between (use 'foo :only [bar]) and (require 'foo :refer [bar])?

16:59 hlship: So, is the history something like "hey, require inside the ns macro is different than outside it, let's fix that by making it a keyword, e.g., :require" ?

16:59 ToBeReplaced: assuming there is one since the require :refer isn't available in cljs

17:00 technomancy: hlship: right; ns is supposed to read as being declarative

17:00 even though you can put whatever you want in it

17:00 hlship: Maybe I'll change some of my code; I prefer the look using symbols rather than keywords.

17:00 technomancy: (ns insane.stuff (println :some :thing))

17:01 hlship: But apparently it might through people for a loop.

17:01 technomancy: hlship: down that road lies bracket placement wars

17:01 it's just not worth it

17:02 yeoj___: the source says flush is simply (. *out* (flush)) ... how but if i call flush while a long-running function is happening nothing comes out at the repl when i issue a println ?

17:04 indigo: bitemyapp: I just had the most terrible idea... ClojurePHP

17:05 dnolen: indigo: there have already been several attempts at that

17:08 rbuchmann: dnolen: You do know that Halloween is over? :D

17:08 TimMc: Halloween is a state of mind.

17:09 indigo: dnolen: Thankfully none of those have been successful

17:11 llasram: It sometimes seems like the most frequently-mentioned languages on this channel are Clojure, then PHP, then Java

17:12 noncom: what is the best solution for interleaved better-be-tailrec loops? here is a pseudocode: https://www.refheap.com/20503

17:12 yeoj___: english is often mentioned

17:13 noncom: i know that this look tooooo imperative and non-clojuric, but i have to put this little if-based algorithm into my program in one single tiny place...

17:13 llasram: noncom: AFAIK there isn't a good one. There was some discussion of named `recur` targets on the dev list, but I don't believe has left the design-discussion stage

17:14 noncom: llasram: yeah, i googled into them a few minutes ago..

17:14 llasram: yeoj___: I'm going to call use/mention distinction on that one :-p

17:14 gfredericks: I thought amalloy had written something

17:14 S11001001: noncom: iterate, dorun

17:14 er, iterate, drop-while, first

17:14 noncom: oh

17:15 i guess i will have to create an artificial mocking infinite lazy pseudo-seq for that.. right?

17:16 TimMc: llasram: grep counts 957 instances of \bphp\b (case-insensitive) since March 2011.

17:17 indigo: Ruby is probably mentioned more

17:17 llasram: If you go an inflate the numbers like that, sure :-p

17:18 noncom: so looks like (iterate) handles this sequence-creation part

17:18 bitemyapp: other than apache commons, are there any libraries people tend to use for resource pooling?

17:18 TimMc: If I filter out "java.", I still get ~15k instances of java.

17:19 Clojure, with word boundaries and excluding #clojure, counts to nearly 100k.

17:19 Ruby: 2315

17:20 llasram: I'm glad to know my impression in this regard is false

17:20 noncom: S11001001: i can't really figure how to do that.. could you refheap the main structure, somehthing like my pseudocode?

17:21 seangrove: I wonder if js's function.length is an artifact of implementation (I doubt it) or a special case where someone thought "Oh, we could pretend arity is length!"

17:22 bitemyapp: seangrove: I smell a place where a type system could've saved some pain >:)

17:22 my spidey-types are tingling!

17:22 `cbp: you can do that? :/

17:22 bitemyapp: ucb: http://www.youtube.com/watch?v=a4Bb1g8k8mQ

17:23 seangrove: bitemyapp: Well, the pain was burned in ages ago, I know about .length now..

17:23 bitemyapp: `cbp: terrifying, no?

17:23 TimMc: seangrove: Whoa.

17:24 noncom: http://ejohn.org/blog/javascript-method-overloading/

17:25 bitemyapp: Watching my rabbitmq socket descriptors go from "3 -> 138 (out of 138 available)" and watch it blast to "red" is way more entertaining than it should be.

17:26 seangrove: noncom: Clean and neat T.T

17:26 bitemyapp: What're you using rabbitmq for? We need to get off of clojure-resque, the lag is hirrific

17:27 S11001001: noncom: on second thought, welp, (loop [] (if a? (something) (loop [] (when-not b? (recur)))) (recur))

17:27 bitemyapp: seangrove: that's how data gets propagated to the data warehouse I'm working on

17:27 seangrove: it's been integral to the system I'm building/have built

17:27 I'm really just hardening it up and doing some resource exhaustion whack-a-mole :)

17:28 turns out, when you use a fast language that is capable of spawning n-threads, you can exhaust resources *really* quickly compared to your coworkers' python code

17:28 noncom: S11001001: but won't that be nested loops instead of interleaved?

17:29 really i can think of a solution where i use a couple of atoms to semaphore the correct branching but it... uh well.. smells..

17:30 S11001001: noncom: what you wrote was nested

17:31 llasram: S11001001: yeah, but the inner `loop` needs to `recur` to the outer `loop`

17:31 noncom: S11001001: it would be nested with current clojures loop-recur implementation. however, i put imaginary loop names there to stress the interleaving..

17:32 S11001001: noncom: if you want mutual recursion, put a switch in a single loop and use it to pick which path you want on each go-round.

17:32 noncom: yes, i think thats the only way..

17:32 well at least you think so too :D

17:36 llasram: letfn + trampoline would be (maybe) slower, but might be more readable

17:45 brainproxy: anyone know what's up with ctrl-meta-... sequences in terminal emacs on mac using iterm2?

17:46 it's like iterm2 is swallowing the ctrl key

17:47 bitemyapp: brainproxy: it's not great, I use Emacs for Mac OS X, not the terminal.

17:48 casper1: I am wondering, is it possible to create a default implementation in extend-protocol? (like providing :else in a cond)

17:48 llasram: casper1: Sure. Just extend the protocol to `Object`

17:49 Er, assuming you were talking about JVM Clojure

17:49 casper1: indeed i am :)

17:49 brainproxy: bitemyapp: i prefer "graphical" emacs on mac os x too; but when pairing, it's simpler to use wemux and terminal emacs

17:50 S11001001: brainproxy: mess with your terminal preferences, IIRC 10.6 added the needed tweaks

17:50 bitemyapp: brainproxy: nuts.

17:50 casper1: and thanks, i'll try that one

17:50 S11001001: oh, iterm2, no idea

17:51 ubikation: hey what is it called if I want to write a function to deal with multiple kinds of arguments?

17:51 abaranosky: polymorphic

17:51 ubikation: am I looking for dynamic dispatch or typed clojure or what?

17:51 ah

17:51 abaranosky: ubikation: you can use multimethods or protocols

17:52 llasram: brainproxy: I know that for (u)xterm I needed to (re)define some of emacs' input->key mappings for my terminal settings

17:52 https://github.com/llasram/rcfiles/blob/master/basic/emacs.d/init.el#L164-L171

17:52 ubikation: abaranosky: which would you recommend? which has better performance?

17:52 llasram: brainproxy: If you can figure out what your terminal is dishing up, it shouldn't be too hard to get emacs to accept it as the right key-combos

17:53 abaranosky: ubikation: it depends :)

17:53 but protocols have better performance

17:53 but I usually only care about performance to any degree *after* profiling

17:54 llasram: And they do have properties which I think distinguish them more than performance...

17:55 It definitely makes them very different that you can extend multimethods to arbitrary non-type things, and that you can `reify` protocols

18:08 j`ey: TimMc: hiya

18:09 TimMc: oh, maybe a case of mistaken identity

18:10 TimMc: Perhaps. This is Tim McCormack.

18:10 j`ey: TimMc: wrong Tim

18:10 TimMc: sorry for the noise!

18:11 akurilin: If you write a guide on iostreams for clojure cookbook, you will enjoy eternal glory.

18:11 TimMc: Hah, no worries.

18:12 indigo: #include <iostream>

18:12 >:D

18:13 akurilin: indigo, :P

18:14 ubikation: abaranosky: which are easier to play around with?

18:35 hlship: Is there a lein plugin for copying documentation to an FTP server? Right now, I'm doing that manually, producing docs via codox.

18:35 Didn't see anything on the lein plugins wiki page.

18:37 technomancy: hlship: lein-shell+rsync?

18:40 * technomancy pretends he didn't hear "FTP"

18:41 mtp: what is ftp?

18:41 technomancy: mtp: ask your grandpa

18:41 mtp: Ah! a protocol that existed before TCP/IP

18:42 neat historical find, surely it isn't used on today's internet

18:42 hlship: That's nothing; I think I once used gopher

18:42 gfredericks: when a file and a computer love each other very much...

18:42 hlship: and there was a time when I was king because I had the only 1200 baud modem

18:43 TimMc: Email used to run on FTP, IIRC.

18:43 hlship: I'm not sure rsync is an option for me; I'll have to see what my hosting provider allows

18:43 it's really just a static site

18:43 TimMc: hlship: If you have SSH, you have rsync.

18:43 hlship: And I don't have SSH, so that's the issue.

18:43 I can FTP, or use their web dashboard.

18:44 TimMc: Solution: Get a better host. :-P

18:44 (Only 1/4 joking.)

18:44 hlship: True, I just already have this one, and don't want to bother.

18:44 At some point, I should learn how to use Amazon's EC2 for this kind of stuff.

18:44 It's on my endless to do list

18:44 TimMc: nearlyfreespeech.net is pretty great, especially for static sites.

18:45 hlship: But I think I'd rather learn how to use Unity3d than EC2 right now

18:45 TimMc: (Dynamic options are limited to PHP and I think some CGI stuff, oh well.)

18:45 hlship: if I had an free time

18:45 s/an/any/ :)

18:47 * TimMc looks askance at mtp's claim about TCP coming after FTP

18:47 mtp: TimMc‘ read the dates on the relevant RFCs

18:48 TimMc: OK, so what the crap did it use?

18:49 mtp: s,dates on,, ???

18:49 lazybot: mtp: How could that be wrong?

18:49 TimMc: RFC 765 mentions TCP

18:50 But that's 1980, which is not what Wikipedia mentioned...

18:50 WP has 1971 for FTP and 1974 for TCP.

18:51 brehaut: [citation needed]

18:53 TimMc: Well, RFC 114 (first FTP RFC) mentions https://en.wikipedia.org/wiki/Network_Control_Program

18:54 brehaut: huh intersting

18:55 TimMc: Yeah. I've never dug into the pre-TCP stuff.

18:57 mtp: <mtp> neat historical find, surely it isn't used on today's internet

18:58 :)

19:01 akurilin: Is it fair to say that contains? cannot be used on a sequence, and you need to use something like into [] to make it work?

19:06 also: are there any good clojure parser libraries are usable with clojurescript?

19:09 dnolen: also: a port of instaparse to CLJS would be awesome

19:12 bitemyapp: akurilin: correct, but contains? on a vector is probably not what you want.

19:12 akurilin: contains? is about associative data.

19:12 ,(contains? [:a :b :c :d] :a)

19:12 clojurebot: false

19:12 bitemyapp: ,(contains? #{:a :b :c :d} :a)

19:12 clojurebot: true

19:12 bitemyapp: you want a set.

19:13 sets are associative by value, maps are associative by key (pointing to value), and vectors are associative by integral index (pointing to value)

19:13 akurilin: bitemyapp, probably explains why it's not listed under vectors in the cheatsheet

19:13 bitemyapp: but the "subject" of the "associative by" is what you're checking for WRT contains?

19:13 it's got a grammar/logic to it.

19:15 what's a verb for a basin?

19:15 I need NLP-as-a-service.

19:15 akurilin: bitemyapp, thanks for explaining, that's helpful.

19:15 also: dnolen: yeah, that would be exactly what i wanted if it existed.

19:15 bitemyapp: akurilin: thumbs_up.gif

19:16 also: has anyone written about porting from clojure to clojurescript? experiences or tools?

19:16 dnolen: also: probably wouldn't be much work to port, probably possible to do with cljx

19:17 also: dnolen: i'll give that a try

19:23 bja: does anyone know of clojure opportunities in chicago or remote?

19:23 I'd prefer to stay working within clojure or another functional language

19:23 technomancy: isn't groupon in chicago?

19:25 bitemyapp: bja: I've seen a couple of Chicago lookin' posts on the mailing list.

19:25 technomancy: oh they're still in business?

19:25 technomancy: bitemyapp: well... act fast

19:26 could be a limited time employment offer

19:28 gfredericks: groupon is in chicago and we have at least a dozen people writing clojure

19:28 bitemyapp: technomancy: heard more good things about Seattle from some developers recently. Still concerned about the state of FP/Lisp (Clojure)/ML/Haskell out there.

19:28 gfredericks: if you can answer, what sort of things does Clojure get used for there?

19:29 technomancy: bitemyapp: I think Bartosz Milewski (formerly of D) recently started up a haskell thing here

19:29 muhoo: good things are always niche

19:29 sturgeon's law

19:30 bitemyapp: technomancy: oh god no, he's one of those Yesod people

19:30 I'd rather get flayed with a Cat o' Nine Tails covered in salt

19:30 technomancy: haha

19:30 bitemyapp: brilliant people, but the stack is &_____&

19:31 technomancy: he visited a seajure meeting once asking concurrency questions to steal ideas for D

19:31 gfredericks: bitemyapp: lots of data services; some storm

19:31 bitemyapp: ~/code/basin/src/basin/holds/ya/resources/in/da/pool.clj

19:31 clojurebot: Cool story bro.

19:31 pjstadig: clojurebot: botsnack

19:31 clojurebot: thanks; that was delicious. (nom nom nom)

19:31 technomancy: bitemyapp: also: home of F# =D

19:32 bitemyapp: technomancy: HUE HUE HUE HUE

19:32 (╯°□°)╯︵ ┻━┻

19:33 hiredman: gfredericks: how is storm?

19:34 technomancy: bitemyapp: there is a seafunc group, but they meet like 3-4x a year

19:34 in grocery stores and stuff; it's really weird

19:34 bitemyapp: o_O

19:34 gfredericks: hiredman: I haven't used it personally; I think the team that does has had good success on the whole

19:34 bitemyapp: technomancy: they're mad category theorists?

19:35 technomancy: bitemyapp: I only have been to one meeting

19:36 brehaut: i managed to read one page of Basic Category Theory for Computer Scientists before my brain combusted.

19:36 S11001001: muhoo: naw man https://twitter.com/odersky/status/395831667333406722

19:36 technomancy: the one I went to didn't strike me as such; they were talking about Okasaki and how to make circular references with immutability or something

19:36 S11001001: haha

19:36 like he doesn't know?

19:37 bitemyapp: brehaut: really? http://www.cs.toronto.edu/~sme/presentations/cat101.pdf‎

19:37 S11001001: technomancy: I don't know

19:37 technomancy: it's very confusing

19:39 sritchie: do you guys have recommendations on embedding a product blog into a site?

19:39 embedding a little jekyll blog seems slightly overkill,

19:39 with a redeploy for each new post

19:39 brehaut: bitemyapp: nope. http://www.amazon.com/Category-Computer-Scientists-Foundations-Computing/dp/0262660717

19:39 bitemyapp: sritchie: I made a micro-CMS, you could reuse the routes.

19:39 https://github.com/bitemyapp/neubite/ I don't know if you want to use MongoDB just for that though.

19:40 I don't know if you want to use MongoDB at all really.

19:41 sritchie: hmm

19:41 yeah, maybe not

19:41 maybe jekyll's not too bad of an option

19:41 bitemyapp: Pedestal has a pretty useful componentization of sub-apps and routes within a global router, that would make it fairly straight-forward to make a sub-CMS thingy.

19:41 sritchie: I would tend to say jekyll's a good idea if your needs are limited.

19:42 if you need something full-blown like a Django app wedded to Django CMS, then...some work will need to be done.

19:42 yogthos: need an embeddable CMS.

19:42 yogthos: static and db-backed.

19:42 bja: bitemyapp: as someone who has been responsible for a django-cms-based product, you'll need to do some work on Django CMS if you want to use it too

19:43 sritchie: yeah, we don't really need a CMS, this is more for product announcements

19:43 bitemyapp: bja: I know.

19:43 sritchie: jekyll / hakyll / misaki / static time then.

19:47 yogthos: also, sub-application routing.

19:47 (in Ring)

19:56 Just found an improper resource acquisition in my code, made this gesture in front of my computer: http://i.imgur.com/v7mvMJh.jpg

20:06 bja: bitemyapp: any suggestions on github issues that a non-CLA-signed developer might work on in clojure land?

20:06 I'm bored and in a hotel room

20:06 bitemyapp: bja: you can't contribute anything to Clojure itself as a non-signatory of the CA, but there are independent open source projects

20:06 bja: I actually have something in Revise you could work on!

20:07 there are other libraries I could recommend if that doesn't interest you.

20:07 bja: what sort of thing do you want to work on?

20:08 yogthos: bitemyapp: ? :)

20:08 bitemyapp: yogthos: what?

20:08 yogthos: (bitemyapp) yogthos: also, sub-application routing.

20:08 bitemyapp: yogthos: I'm sharing ideas.

20:08 yogthos: embeddable CMS Ring app (embeddable in existing web apps) and sub-application routing.

20:09 yogthos: ah

20:09 bja: bitemyapp: nothing in particular I want to work on. I'm just bored and want to make contributions on github

20:09 yogthos: could work

20:10 bitemyapp: bja: https://github.com/bitemyapp/revise/issues/2

20:16 blr: out of interest, is anyone building anything in pedestal that doesn't fit the 'real-time, collaborative' usecase that relevance describe the framework is ideal for?

20:56 muhoo: is there some magick to make byte arrays in clojure without "java.lang.IllegalArgumentException: Value out of range for byte: 184" etc?

20:56 brehaut: muhoo: short arrays ?

20:56 muhoo: or sadness?

20:57 muhoo: i tried (-> seq-of-bytes-as-ints (map (partial bit-and 0xff)) (into-array Byte/TYPE))

20:57 fucking signed bytes in java

20:57 brehaut: ,Byte/MAX_VALUE

20:57 clojurebot: 127

20:57 hyPiRion: muhoo: (partial unchecked-byte) instead

20:57 ,(unchecked-byte 255)

20:57 clojurebot: -1

20:57 hyPiRion: ,(unchecked-byte 256)

20:57 clojurebot: 0

20:58 muhoo: hyPiRion: perfect! thanks!

20:58 hyPiRion: Actually, you can just remove the (partial ...) wrapper, and just do unchecked-byte

20:58 np, been there, felt the pain

21:00 blr: does anyone have any recommendations for getting started with frp in cljs? widje looks potentially useful

21:01 lynaghk: blr: https://github.com/lynaghk/todoFRP

21:01 might give you some ideas

21:01 blr: cool, hadn't come across that yet, thank you

21:04 lynaghk: have you had a crack at a todo in pedestal-app?

21:12 sritchie: technomancy: is there a way to force the prep tasks to occur BEFORE aot all, in the uberjar profile?

21:12 getting errors because the cljx files aren't ready yet

21:18 anyone have any experience with that,

21:18 with getting prep-tasks to run before aot?

21:22 lynaghk: sritchie: what version of cljx are you running?

21:23 sritchie: [com.keminglabs/cljx "0.3.1"]

21:23 lynaghk: sritchie: I think your best bet is doing two lein invocations manually.

21:24 sritchie: where you twiddle the with-profiles option as necessary.

21:24 sritchie: gotcha

21:24 I think so - but this is on heroku, and I'm not sure how to override the uberjar task

21:24 lynaghk: sritchie: you may need to use a custom buildpack, then

21:25 but yeah. if you're on heroku then you definitely want to get an official answer from technomancy

21:25 = )

21:26 sritchie: I really enjoyed your blog post about running Leadville, btw. That's boss.

21:26 sritchie: thanks, man

21:26 far, far shorter runs have been kicking my ass lately, not sure how it all came together on the day :)

21:27 lynaghk: sritchie: yeah dude, I just did my usual run around the PDX-area volcano and my achilles is pissed. it's slowly dawning on me that I'm no longer 14 and invincible.

21:29 sritchie: so! my solution for that, for combating that a bit longer -

21:29 I'm leaving Twitter on Friday and probably moving to Boulder around jan or feb

21:29 and working full time on this clojure webapp I keep asking about, www.paddleguru.com

21:30 lynaghk: sritchie: oh, rad! congrats dude.

21:31 sritchie: I'm going to the Go conference in Denver in April, if you want to try and meet up for a beer

21:31 xuser: Go is bad word here

21:31 lynaghk: xuser: Go does a lot of stuff right, and we've taken quite a number of their good ideas.

21:32 sritchie: awesome, that sounds great

21:32 I'll be speaking at the conj as well

21:32 lynaghk: xuser: e.g., core.async.

21:32 sritchie: I'm missing it this year, unfortunately.

21:32 sritchie: ah, too bad

21:32 yeah, denver it is

21:32 lynaghk: sritchie: rad. catch you in a few months, then = )

21:32 sritchie: boom

21:33 lynaghk: I've got to run for now though. Good luck with cljx

21:33 sritchie: I'll try to be more wizardly in cljs by then

21:33 trying my custom buildpack now

21:33 blr: I find it disconcerting that "import 'github.com/foo'" is apparently standard practice in golang

21:34 xuser: lynaghk: just joking cause some here like to make fun of Go ;)

21:35 lynaghk: I'm still learning clojure, is core.async similar to gorotines and channels?

21:35 blr: xuser: actually _based_ on it iirc

21:36 xuser: blr: oh ok

21:36 I hear Haskell implements every concurrency model under the sun

21:37 ddellacosta: what am I doing wrong to get "ReasonPhrase: Forbidden" when calling lein deploy clojars? I've double-checked my clojars pwd and my gpg keys, and they are correct to the best of my knowledge.

21:37 *correct/working

21:42 `cbp: bitemyapp: I suck with git and probably made a mess but i improved the docs i think

21:42 bitemyapp: Gonna work on providing backtraces for rql errors

21:43 sritchie: technomancy: I ended up forking the buildpack and adding a call to cljx first

21:44 amalloy: `cbp: you're talking about https://github.com/bitemyapp/revise/commits/master ? it would be a little more polite/tidy to rebase rather than merge when it turns out upstream has moved on, but you don't seem to have made a big mess

21:45 `cbp: amalloy: I just did git pull and it merged automatically :-P

21:45 amalloy: yeah, i know

21:46 i don't really like the "pull" command - it's nice when you're totally clueless, but after you get past that stage it's better to fetch, and then decide whether to merge, rebase, or something else. that's just my opinion, of course - git is *very* flexibly and there are a lot of reasonable workflows

21:51 * `cbp gonna work to stop being clueless

21:54 concur: Is there a function like pmap which is good at iterating non-lazily with a function that has side effects?

21:55 brehaut: doc doall, dorun, doseq

21:55 concur: all I care about are the side effects

21:55 it has to run in parallel though

21:55 I guess I could use futures

21:55 within a doseq

21:56 wait, side-effects are a big no-no in futures, right?

21:56 I mean, they're bad in general

21:57 but aren't they particularly bad with futures?

21:59 seangrove: concur: (dorun (pmap ...))?

21:59 MrJones98: anyone here use groovy from clojure?

22:00 i'm looking at lein-groovyc and getting an NPE

22:00 concur: ooh, dorun isn't what I expected

22:00 that's probably perfect

22:01 seangrove: concur: It should be good for computer-intensive, vs io-bound

22:02 brehaut: ~pmap

22:02 clojurebot: pmap is not what you want

22:02 brehaut: sigh. i thought it explained that more because ive forgotten the details

22:02 ddellacosta: well, that's certainly definitive

22:03 * brehaut waves hands

22:03 brehaut: chunking, thread pools, something something

22:03 http://blog.raek.se/2011/01/24/executors-in-clojure/ springs to mind

22:04 ddellacosta: brehaut: there's the standard doc too I suppose: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/pmap

22:08 concur: hmm, wrapping pmap in dorun didn't work on the whole sequence

22:09 in fact it made less of the sequence get run

22:09 maybe it's a problem in my function

22:13 oh

22:13 the side effects are working

22:13 I'm running tests on those side effects

22:13 and only some of the assertions are running for some reason

22:14 they're all passing

22:16 I'm in essense doing this:

22:18 I was going to write it in a more general way

22:18 but I'm just going to paste my code actually

22:18 (dorun (pmap (fn [x] (rwl :write assoc x (* 2 x))) data))

22:18 (dorun (pmap (fn [x] (is (= ((rwl :read) x) (* 2 x)))) data))

22:18 so basically the first run populates a map

22:19 and the second run asserts that each key is mapped to the right value

22:19 yet for some reason it only does 970 assertions when there are 1000 items in the map

22:26 `cbp: bitemyapp: erm actually i have no clue what im doing so lets leave the backtrace for later...

22:38 Raynes: amalloy: I started using fetch about a month ago exclusively.

22:38 Fwiw.

22:38 amalloy: man, i thought you meant fetch the cljs library or whatever it is

22:39 Raynes: heh

22:43 technomancy: sritchie: huh, so :prep-tasks didn't work for you?

22:43 sritchie: well, aot was running pre-prep task

22:43 and then my clojure.tools.reader issue came back :)

22:43 so I'm o to other issues

22:44 technomancy: sritchie: :prep-tasks runs before compilation

22:44 can you provide a repro case where that doesn't happen?

22:44 sritchie: in the uberjar profile, that wasn't happening

22:45 sure

22:47 ddellacosta: so, is it possible to re-deploy a jar that you've signed to clojars if you pushed it unsigned the first time? I'm having trouble figuring out how to do so.

22:48 amalloy: ddellacosta: is there a reason you can't just deploy a new version?

22:48 like, announce that version 2.1 is no good, here's 2.2

22:50 technomancy: sritchie: I can reproduce having issues with :aot in the :uberjar profile, but all I'm seeing is that AOT is skipped entirely; prep-tasks still run

22:50 ddellacosta: amalloy: yah, I guess that's the easiest since it is a provisional release of someone else's library to fix a bug. But if it was a release of a real lib, it would bother me that I would have to bump the version number because the deploy went badly.

22:50 sritchie: okay, got a repro

22:50 technomancy: sritchie: oh, try this: :prep-tasks ^:replace ["cljx" "javac" "compile"]

22:50 sritchie: hmm

22:50 https://gist.github.com/sritchie/7330591

22:52 technomancy: sritchie: this is really weird how I can't trigger compilation *at all* during jarring

22:53 sritchie: oh, you know what it is...

22:53 sritchie: what's that?

22:53 technomancy: for some reason the default :prep-tasks is set to ^:displace

22:53 so the existing value gets blown away when you specify your own value

22:53 I have no idea why it works that way; hrm

22:53 anyway, you'll need to put "compile" in :prep-tasks and it should be fine

22:54 ddellacosta: yeah, I'm thinking about allowing redeploys of libs that don't have signatures that check out

22:54 feel free to open an issue

22:55 ddellacosta: technomancy: I guess the main thing that I'm uneasy about is, are there security issues involved with allowing re-deploys? Was that why the choice was made initially?

22:55 technomancy: or does it have to do more with repeatability?

22:56 that seems like it would be a more cogent reason

22:56 technomancy: ddellacosta: more about security; if we assume immutability by default then any change to checksums is suspicious

22:56 much easier to verify the repo in the case of a possible intrusion

22:57 but maybe we can just say "hey, if it isn't signed, we shouldn't be trusting it anyway"

22:57 or there could be an hour window or something

22:57 ddellacosta: technomancy: yah, okay, that's what I suspected. Yeah, I suspect that it could be conditional--the obvious thing would be, if it is unsigned allow pushing a signed version. Otherwise don't allow updates.

22:58 technomancy: ddellacosta: unfortunately it's not that simple

22:58 you have to accept one file at a time; there is no transactionality about it

22:58 concur: is it possible that running multiple assertions with the is macro simultaneously could shadow one of the assertions?

22:58 technomancy: so you can't accept a jar provisionally assuming it's followed by an .asc

22:58 because HTTP is stateless =(

22:58 this is one place where scp is way better

22:59 concur: for some reason, some of my assertions are not being made in my call to pmap

22:59 and it's a random number

22:59 ddellacosta: technomancy: ah, okay, I see. Hmm...so in that case allowing a window of time may make the most sense. During that time it can be considered untrusted...and after that no updates are allowed.

22:59 concur: I'm only seeing about 90-95% of the assertions I should be seeing

23:00 * ddellacosta shuffles off to go poke around in leiningen's codebase

23:00 technomancy: ddellacosta: yeah, that makes verification mostly sound without annoying package authors

23:00 probably a reasonable compromise

23:01 ddellacosta: technomancy: yeah, and I would agree with your suggestion earlier that unsigned packages should be considered untrusted, definitely. But in any case allowing a window would give someone like me who fumbled their first push the option to get a signed version up (for example, I'm sure there are other good reasons to allow a bit of a window).

23:02 cespare: Is there something like take for a string that just returns a string?

23:03 tim_: cespare: http://clojuredocs.org/clojure_core/clojure.core/subs

23:03 cespare: tbaldridge: thanks

23:52 logic_prog: is there something more efficient than (apply vector (concat .... ) ) ?

23:52 I need something to return a vector, but concat returns a list

23:56 jared314: logic_prog: apply vec?

23:56 logic_prog: wait, that won't work

23:56 hfaafb: vec is apply vector

23:57 logic_prog: hmm, good to know

23:57 but is a list still constructed "in between" ?

23:58 well wait

23:58 (apply vector 1 2 3 '(4 5 6)) is okay

23:58 but (vec 1 2 3 '(4 5 6)) is not

23:58 seems like vec only takes 1 argument

Logging service provided by n01se.net