#clojure logs

2012-03-19

02:12scottjwhat does dup in print-dup stand for?
02:13scottjduplicate?
02:14alexbaranoskymy guess was duplicate
02:14alexbaranoskyjust a educated guess of mine though
05:08javehello
05:09javeim trying to figure out if there is existing support to do the following, but with Clojure: http://www.sonatype.com/books/mcookbook/reference/sect-scala-script-inline.html
05:14raekyou want to implenent a build step in Clojure?
05:14javeraek: indeed
05:17raekthat's dead simple to in Leiningen, btw
05:18javeyes, this is an existing maven build.
05:19raekI don't know much Maven so I can't help you there...
05:19javeits just supposed to iterate a couple dependencies and do some things in sequential order. It would probably be 10 lines of Groovy code, but I thought it would be more interesting to do it in Clojure
05:20javeok, thans raek
05:21raekthere should be maven users in this channel
05:21raekbut they might not be awake now
05:22javeokay, np
05:44winkanyone tried hiccup with bootstrap? Either I'm doing it wrong or the resulting code is a huge mess
06:22fliebelCan I complement a goal in minikanren/core.logic?
09:46zakwilsonWhy is it now necessary to declare vars dynamic to make them re-bindable?
09:47Licenserzakwilson to prevent accidential mutation of state
09:47ChousukeI think because it allows the more common case to be more efficient
09:47Chousukedynamic vars are rare
09:47Licenserthat way you make it explictly clear that your var is bound to the context
09:47Licenseror Chousuke is right that might be too ^^
09:47Licenseror both
09:48zakwilsonIt seems like that's giving up a lot of the power of dynamic binding - that it might be really useful sometimes to rebind someone else's var that they didn't intend to be rebound.
09:48Chousukethat case is not common enough I suppose.
09:49Licenserzakwilson but you might not know what breaks because of that o.O
09:49ChousukeClojure is more about what actually *is* useful rather than what might be useful
09:49zakwilsonI'm specifically thinking of cases in Common Lisp where one might define an around method.
09:49zakwilsonLicenser: with great power comes great responsibility.
09:49ChousukeI'm not sure if there was a way around this in any case.
09:50Chousukebut as it stands, non-dynamic vars being efficient trumps the convenience of always having dynamic vars.
09:50zakwilsonI know 1.2 didn't have that requirement.
09:50Chousukeyeah, it was changed.
09:51Chousukethe default used to be slow. now, the default is fast :P
09:51zakwilsonWell, that seems like a good reason. "You shouldn't want to do that because it's dangerous" does not.
09:52ChousukeI'm pretty sure you could define non-dynamic vars at some point so you couldn't rely on being able to rebind arbitrary vars anyway
09:53Licenserzakwilson hey save by default is a good reason, you also don't give everyone your root password ^^
09:54zakwilsonIt's a programming language. It shouldn't try to protect me from myself.
09:54Chousukethere's nothing really unsafe about rebinding vars anyway
09:54Chousukeit's just slow to do by default
09:54zakwilsonI mean... it shouldn't point guns at my foot FOR me, but if I say (point-gun :at "foot")...
09:55raekyou can still redefine the root value
09:56Wild_Caty'know, there's something to be said in favor of protecting programmers from themselves.
09:57dan_b(peek 53281 15_
09:57dan_b)
09:58dan_bthere's a limit to how far you can legitimately say "the computer is stopping me doing what I want and that's bad"
09:59Wild_Catdan_b: nice, very oldschool. I wonder how things would have turned out, had the C64 had Scheme instead of Basic ^^
09:59LicenserI don't even undestand what that peek means o.O
10:00dan_bchange border colour to ... I can't remember what 15 was
10:00dan_blight grey, maybe
10:00Wild_Catalso, sure, there's nothing wrong with accessing the bare metal, but IMO it should be done in restricted pieces of code, explicitly marked as such.
10:00Wild_Catkinda like how Haskell forces you to mark impure sections of your code.
10:00Wild_Catdan_b: shouldn't that be poke, in that case?
10:00dan_bdamn, yes. you're absolutely right
10:01Wild_CatLicenser: peek reads and returns the byte at the target address.
10:01Wild_Catconversely, poke writes a byte at the target address.
10:02LicenserI see I see
10:02Wild_Catit's a classic from the 8-bit BASIC days
10:03LicenserI'm too young for that :P
10:03osa1does type hinting on defrecord or deftypes mean anything? because even if I use ^Integer, I can create a record with string in the slot I hinted as ^Integer
10:14TimMcosa1: Hinting object types only matters for interop
10:15TimMc(.foo bar) cares about the hinting on bar
10:15TimMc(some-fn bar) erases any hinting info
10:20Wild_Catisn't type hinting supposed to make things faster overall, though?
10:20TimMcOnly where it can.
10:21Wild_Catand where is that? Does it only serve to avoid reflection in (.bar foo)-type calls?
10:21TimMcIt is used for two almost entirely separate optimizations: 1) Non-boxed primitives, 2) reflectionless interop
10:22Wild_Cataha. Gotcha. Forgot about the primitives thing.
10:22Wild_Catthanks.
10:22michaelr525hello
10:29j_kingsorry this isn't clojure-specific: does anyone know if there's a # for nathanmarz's storm? google isn't being terribly helpful
10:30TimMc"a #"?
10:30j_kingchannel
10:31TimMcah, got it
10:39true_droidj_king: #storm-user
10:40j_kingtrue_droid: thanks.
10:40true_droidj_king: no problem
11:10irc2samushi guys, anyone know why I'm getting these errors with lein? http://pastebin.com/szUJSrqt
11:11irc2samus(their channel is a bit quiet)
11:12heowhmmm, that's a new one for me
11:13vijaykiranirc2samus: lein 1 or 2 ?
11:14irc2samusI think 1, the latest stable
11:15irc2samusthis: https://raw.github.com/technomancy/leiningen/stable/bin/lein
11:16vijaykiranlein version should print the version - seems like there's some problem with classpath
11:18irc2samuslein version shows: Leiningen 1.7.1-SNAPSHOT on Java 1.6.0_26 Java HotSpot(TM) 64-Bit Server VM
11:19irc2samusunsetting the classpath prevents the errors on the help command
11:22vijaykiranmay be try emptying your ~/.m2 ?
11:22vijaykiranor rename it
11:22vijaykiraninstall lein again with self-install
11:24irc2samustried that before but it didn't help, but unsetting my classpath seems to fix it
11:25irc2samusit sucks that some programs crash if they don't have classpath while others crash if they have it :/
11:25irc2samusanyway thanks guys
11:26babilenWhat was your CLASSPATH set to?
11:27irc2samusthe system jars
11:38RickInGAI think it is time to get new glasses, my favorite emacs command is C-X C-+
11:39mdeboardhaha
11:39mdeboardI foudn that accidentally last night
12:13pelleb_I am a bit confused by quoting, unquoting etc. How do I do something similar to ruby's splat? Take an vector of things and turn them into arguments for a function.
12:13raekpelleb_: you use the apply function
12:13raekyou don't use quoting for that
12:13pelleb_ah. I new there was an easier way than what I've been doing.
12:14pelleb_Thanks
12:14rlbpelleb_: (apply + [1 2 3])
12:14rlb,(apply + [1 2 3])
12:14raek,(apply assoc [{:a 1} :b 2])
12:14clojurebot6
12:14clojurebot{:b 2, :a 1}
12:14pelleb_That is exactly what I need
12:15rlbpelleb_: and of course it doesn't have to be a vector specifically.
12:15pelleb_sure
12:15raekif you do (apply f a b c [x y z]), it's equivalent to (apply f [a b c z y z])
12:15gfredericks,(apply + (range 1000))
12:15clojurebot499500
12:15raekwell, modulo seqs/vectors
12:16raekso python f(a, b, *x) translates to (apply f a b x)
12:20Wild_Catoh, nice. Ish.
12:20Wild_Catraek: what happens when one argument to the function is in fact supposed to be a vector?
12:25rlbWild_Cat: you mean like (apply vec [[1 2 3]])?
12:25rlb,(apply vec [[1 2 3]])
12:25clojurebot[1 2 3]
12:25rlb,(apply vec [1 2 3] [])
12:25clojurebot[1 2 3]
12:25Wild_Catrlb3: like that, yeah. Thanks.
12:26TimMc&(apply #(class %&) [1 2 3])
12:26lazybot⇒ clojure.lang.PersistentVector$ChunkedSeq
12:26TimMc&(apply #(class %&) (range 1 4))
12:26lazybot⇒ clojure.lang.ChunkedCons
12:26TimMc...but you shouldn't rely on that
12:29edwFor traditional server-side html templating in clojure, is there a generally preferred solution?
12:30RickInGAedw: noir is a library that is often used for serving the templates
12:31RickInGAedw: for building the actual templates, noir uses hiccup by default
12:31RickInGAedw: you can also use stencil, which implements the moustache spec
12:31edwRickInGA: I use Noir. As you said, Noir "likes" hiccup. Ah, yes, I need something to deal with text-based templates.
12:31RickInGAedw: enlive is also pretty common, but I hear it is complex
12:33edwWhat I don't want to do is spend a lot of time encoding Bootstrap or Foundation or whatever in hiccup DSL. I'm happy using hiccup to render specific containers, but it seems pointlessly pedantic to waste time recreating other people's work.
12:33ibdknoxedw: stencil or comb should fit the bill
12:33edwI'll check them out. Thanks, ibdknox and RickInGA.
12:34TimMccomb... is that a mo?ustache joke?
12:34ibdknoxTimMc: we don't make jokes here.
12:34RickInGAedw: that was a recursive thanks to ibdknox, my answers were what he told me last week :)
12:36edwThere is also fleet...
12:37ibdknoxedw: use comb, not fleet
12:37edwOK.
12:37ibdknoxhttps://github.com/weavejester/comb
12:37edwI' there.
12:37edwI'm, even.
12:38ibdknoxit's beautifully simple :)
12:38edwAnd it doesn't do any wheel reinvention either...
12:56edwE.g., ibdknox, I'm about to smash your watchtower together with comb...
12:57ibdknoxlol
12:57ibdknoxto spit out static resources or something?
12:57ibdknoxnoir-static is a GSOC project and it sounds like I may have someone interested in working on it :)
12:58edwTo watch a template folder and re-eval template/fn if the template files changed.
12:58edwI'm not a student! I'm way too old!
12:59edwIt would be nice if the JVM exposed if available a kevent-like facility.
12:59edwPolling is tres schlecht.
13:01fdaoudspeaking of "jokes", isn't there burp to go with hiccup?
13:01mdeboardJust don't get any of it on your mustache
13:02edwHTML templates are the third thing for which I need to define a function for cache-purging.
13:02ibdknoxedw: haha I wasn't implying you were a student, just saying that a general solution might appear soon
13:02edwslurp, squirt, hiccup, burp, I like the direction these names are taking
13:03mdeboard(projectile-vomit/splash)
13:03mdeboard&(projectile-vomit/splash)
13:03lazybotjava.lang.RuntimeException: No such namespace: projectile-vomit
13:03mdeboarddarn
13:03fdaoud&(spew)
13:03lazybotjava.lang.RuntimeException: Unable to resolve symbol: spew in this context
13:03mdeboardsounds like a nathanmarz thing
13:03Wild_Catall of those would make cool names for death metal bands.
13:03mdeboardspewing tuples
13:04mdeboardI think we immatured him away
13:08dnolenjonasen: so did my example make some sense?
13:16TimMcbarf/spit is the opposite of slurp
13:16TimMctraditionally
13:19RickInGAhaha, "best of Clojure West: best hair: if you have to ask, stop reading now"
13:20rhcRickInGA: hahaha
13:20jodaroheh
13:20owain``does anyone know if the Clojure West talks will be online anytime?
13:20RickInGAowain`` I think infoq is the one that will be putting them out. people at the conference said that they tend to take a while
13:21owain``ah great thanks.
13:21babilenHi all -- What is the easiest way to install development versions of libraries in a local "repository" (so I can depend on it in leiningen's project.clj) -- I don't need anything fancy (web access, ...), just a way to deploy development versions/forks of libraries to a directory/repository/...
13:22RickInGAthis best of list is on planet clojure, and I am really enjoying it
13:22dnolenbabilen: lein install
13:23babilendnolen: Which I assume installs it to ~/.m2 where it can then be found when I run "lein deps" in another project?
13:23dnolenbabilen: yes
13:23ibdknoxRickInGA: link?
13:23babilendnolen: Perfect -- Exactly what I needed.
13:23RickInGAibdknox http://blog.darevay.com/2012/03/best-of-clojurewest-2012/
13:30jonasendnolen: definitely! It's implemented (with some small changes) in the 'more-logic' branch
13:32ibdknoxjonasen: dnolen: have you guys used core.logic over the analyzer much yet?
13:32dnolenjonasen: excellent
13:33jonasenibdknox: I have not. But I've been thinking about doing it
13:33dnolenibdknox: I haven't tried that.
13:33ibdknoxI was tinkering a little last night. I think we'll be able to do some really neat stuff with it
13:33dnolenibdknox: definitely!
13:34jonasenBringing the analyzer into kibit is definitely a goal
13:35jonasenI've used ambrosebs analyzer in another lint tool: https://github.com/jonase/eastwood
13:35jonasenbut there's no core.logic there yet
13:35technomancy_can you have it warn if anyone uses java.util.Date. =)
13:37ibdknoxlol
13:37jonasentechnomancy_: maybe it should :). Currently it looks for 'Deprecated' annotations
13:37ibdknoxfor my sanity project, I'm working on a touch-based interface for code exploration (and eventually writing) :D
13:56gtrakhey guys, does clojure avoid using permgen for classes due to its classloader, and is that also true for AOT stuff?
13:58gtrakhmm, on further reading it looks like the ethereal classloader is only for the repl?
14:23ekoontz_is there a way to tell leiningen to look in search.maven.org for jars i wonder?
14:24ekoontz_e.g. i want leiningen to find: http://search.maven.org/remotecontent?filepath=org/apache/hadoop/hadoop-core/1.0.1/hadoop-core-1.0.1.pom
14:24ekoontz_well, actually find http://search.maven.org/remotecontent?filepath=org/apache/hadoop/hadoop-core/1.0.1/hadoop-core-1.0.1.jar
14:25lynaghkIs it possible to read forms with metadata from a file using a PushbackReader? I dug into the LispReader.java source, it it looks like the ListReader class doesn't do anything to read metadata (or merge the line number into it, in the case of a LineNumberingPushbackReader)
14:25gtrakekoontz_, well, search.maven.org uses maven central, why not just add the dep?
14:25lynaghkekoontz_, you should be able to add extra repository URLs in your project.clj
14:25ekoontz_gtrak, lynaghk, thanks, cool
14:26gtrakekoontz_, just to clarify, it's not an 'extra' repository, it's the standard one that's always available, along with clojars
14:27ekoontz_gtrak: well to be honest, i'm not sure how to add new urls..looking for the big example project.clj :)
14:27dnolenlynaghk: btw, C2 looks great, the site is nice as well.
14:27technomancy_ekoontz_: if you specify the dependency correctly you don't need to do anything else. what did you try?
14:28ekoontz_hi technomancy_, https://github.com/ekoontz/hsk/blob/master/project.clj
14:28lynaghkdnolen: thanks! The ClojureScript bits are still up in the air, but I am trying to work out clj/cljs sharing with evan (lein-cljsbuild)
14:28ekoontz_that's what i've got right now
14:28gtrakekoontz_, [org.apache.hadoop/hadoop-core "1.0.1"] is what you add to dependencies in project.clj
14:28ekoontz_oh..
14:29ekoontz_it's the SNAPSHOT that's causing problems, isn't it
14:30ekoontz_cool that did it, thanks guys
14:30tomojone should probably put hadoop in dev-dependencies
14:30geoffeg_ctechnomancy: i'm trying to follow https://github.com/technomancy/emacs-starter-kit but trying to install the starter-kit package says "[No Match]". mind helping out a first time emacs, longtime vim user?
14:30tomojdunno, though.. if you need to run outside the context of a hadoop job..
14:31technomancy_geoffeg_c: sure. what Emacs are you running, and have you added the marmalade package repository?
14:32ekoontz_tomoj, yeah, it seems from my understanding that dev-dependencies would not work
14:32ekoontz_since we need the hadoop jar at runtime
14:32geoffeg_cGNU emacs 24.0.94.1 and yes, i tried to add the marmalade package repo but i'm not sure emacs successfully grabbed it. let me try again
14:33ekoontz_technomancy_ thanks again for the great swarm session at clojure west
14:33tomojwill you be running an uberjar?
14:33technomancy_ekoontz_: glad you liked it. =)
14:34ekoontz_tomoj: no, i don't think i need an uberjar
14:34tomojhow do you run it, then? `lein run`?
14:34ekoontz_lein clean, jar, test
14:34ekoontz_is pretty much all it does :)
14:34tomojthe problem is, say I use a different version of hadoop than you require
14:35tomojnow I have two hadoop jars on my classpath when trying to run a job?
14:35technomancygeoffeg_c: if you've done (add-to-list ...), be sure you hit M-x package-refresh-contents to load in the source listing
14:35geoffeg_ctechnomancy_: "Error during download request: Not found"
14:35tomojor just the one old version when running from lein
14:35tomojs/old/different/
14:36ekoontz_tomoj: are you saying don't specify a version number in project.clj?
14:36tomojI'm saying put it in dev-deps :)
14:36tomojit will be on the classpath for `lein test`, it just won't get put into uberjars
14:36ekoontz_oh..and then make an uberjar with hadoop 1.0.1 or whatever version is explicitly given in project.clj
14:36ekoontz_?
14:36technomancygeoffeg_c: either a network issue or a typo in the repository URL I guess
14:37tomojno, if you make an uberjar to submit to hadoop, hadoop should not be inside the uberjar
14:37ekoontz_i see hmm
14:37geoffeg_ctechnomancy: i see a ~/.emacs.d/elpa/archives/marmalade/
14:37tomojif you make an uberjar to run on your own outside of hadoop, then this won't work
14:37geoffeg_cand archive-contents in that dir
14:37ekoontz_tomoj, let me try that (moving to dev-dependencies)
14:38tomojthat way you can test locally with whatever version you specify, but if someone builds an uberjar and submits it to a compatible version of hadoop (maybe cloudera oslt), it should still work
14:39ekoontz_right..because hadoop won't be in the hsk uberjar
14:44ekoontz_fixed and pushed, thanks tomoj
14:48ekoontz_would be nice in leiningen to have a way to list preferered versions and back off to others if they're not found
14:48ekoontz_like specify 1.0.1-SNAPSHOT, but if it's not there, 1.0.1
14:49technomancyekoontz_: checkout dependencies might be a better solution for that
14:49technomancyspecify 1.0.1 in project.clj, but your local copy can use an in-development checkout
14:50ekoontz_thanks
14:51ekoontz_technomancy_: the only thing is, by convention you do mvn install:install-file -DgroupId=org.apache -DartifactId=hadoop-core -Dversion=1.0.1 -Dpackaging=jar -Dfile=build/hadoop-core-1.0.1-SNAPSHOT.jar
14:52ekoontz_(that is you put -SNAPSHOT as part of the jar file name
14:52ekoontz_so you'd need to break that convention to install the jar i think
14:52technomancyyeah, that's not what checkout deps are for
14:52ekoontz_for lein to find it
14:52technomancybut I don't think it would work for maven projects anyway
14:52technomancyif you need features from the snapshot version, you must specify it in project.clj
14:53ekoontz_fair enough :)
14:53technomancyand if it's not in the standard repos, you should get it into a snapshot repo
14:53geoffeg_ctechnomancy: i nuked .emacs_d and things seem to be working
14:53technomancyekoontz_: unless you're the only one working on the project; then mvn install:install-file is OK
14:57ekoontz_technomancy_: your https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L119 looks helpful if i wanted to set up a snapshot repository
15:03septominibdknox: around?
15:04ibdknoxseptomin: sup?
15:04septominjust wanted to say thanks for hosting the friday session
15:05septomini asked about opinionated interfaces
15:05ibdknoxah, of course!
15:06ibdknoxglad it was of some use
15:06septominit went in interesting directions
15:07septominI'm still amazed that a library of ~1kloc is not only useful but one of the most popular
15:07RaynesNoir?
15:07clojurebotnoir is great
15:07ibdknoxlol
15:07amalloynice work, clojurebot
15:07ibdknoxwho added that one?
15:07amalloyibdknox: i wouldn't be astonished to learn he picked it up by accident
15:08Raynesnosrsly, are you talking about noir?
15:08ibdknoxamalloy: smart bot, that one ;)
15:09samaaronhe's clearly not talking about overtone
15:09clojurebotHuh?
15:09samaaron~1kloc would be soo much easier to handle :)
15:09clojurebotIt's greek to me.
15:10ibdknoxsamaaron: how big is overtone now?
15:10Wild_CatI still need to watch the video of that Overtone clojure/conj presentation that blew everyone away
15:10samaaronibdknox: i was just about to look
15:10samaaroni think it's about 25k with all libs
15:11ibdknoxthat's quite the clojure project then
15:11samaaronyeah, it's a big effort
15:11samaaronand we're only getting started
15:11ibdknox:)
15:11samaaronhopefully user contributed sounds and fx will ramp that number up
15:12septomini looked last night, find . -name "*.clj" | wc -l for noir is like 1100 something, including some sample code i think
15:12TimMcsamaaron: So, that "<3 <3 <3" I sent you was because I started playing with Overtone and independently discovered binaural beats.
15:12Wild_CatTimMc: what's a binaural beat?
15:12samaaronTimMc: awesome
15:13TimMcWild_Cat: Are you familiar with what happens when you play two sine waves of nearby frequencies at the same time?
15:13Wild_CatTimMc: you get partial cancellations/comb filtering of sorts, correct?
15:13TimMcThere's an aliasing effect that makes it sounds like wib-wib-wib-wib
15:13TimMcright
15:14samaaronWild_Cat: it's best experienced by trying it out in Overtone ;-)
15:14TimMcDefinitely.
15:14Wild_Catsamaaron: this is my work machine, I don't have it installed :D
15:14samaaron(demo (+ (sin-osc 440) (sin-osc 441)))
15:14tomojit happens with headphones too, is the weird thing
15:14TimMcright
15:14samaaronok, eating time for me
15:14Wild_Catwib-wib-wib? Is that like midrangey dubstep? :p
15:14samaaronhaha
15:15TimMcheh
15:15Bronsalol
15:15samaaronthe dubstep I created was similar - only with saw waves
15:15samaaronand also a modulated low pass filter
15:15samaaron(which was modulated with a triangle wave)
15:15ekoontz_we need a irc bot like clojurebot but plays the music through your speakers
15:15samaaronthat would rock
15:15Wild_Cat+1
15:15TimMcI was having hella fun with just (+ (sin-osc (mouse-x:kr 50 500 EXP)) (sin-osc (mouse-y:kr 50 500 EXP)))
15:16Wild_CatOvertone radio.
15:16samaaronhaha, the simplest things are often the most fun
15:16samaaronit really is surprising how joyful it is to control your own sounds
15:16TimMcAnyway, try this in Overtone via headphones: (demo 60 (sin-osc [500 (mouse-y 500 530)])) and move your mouse up and down.
15:16Wild_Cathmm... That kind of stuff might be fun to control via a Kaoss Pad and modulate a guitar through
15:17samaarontotally
15:17samaaronyeah, that's a "find your favourite beat" synth
15:17samaaronit can make some people woozy
15:18TimMcsamaaron: Did you see my idea about using Marginalia with Overtone libs and putting pre-rendered demo clips next to each synth?
15:18samaaroni'm very keen on that
15:18samaaroni think the examples dir would be the best place to start
15:18samaaronright, i do need to eat now
15:18samaaronbbl
15:19Bronsaif only i was able to setup jack
15:26TimMcBronsa: What OS?
15:26Bronsalinux
15:26Bronsawell, ubuntu
15:27TimMc`jackd -r -d alsa -r 44100` worked on my Ubuntu box, although it did lock out all other audio while it was running
15:27TimMcFailed on my Linux Mint box.
15:28Bronsalet's have a try.
15:28TimMcI couldn't figure out qjackctl
15:28Bronsayeah, me neither
15:28Bronsaon arch linux i was able to get jack working easly
15:29Bronsawell, nevermind.
15:29Iceland_jackWell I'm a hard worker
15:29TimMcHaha, are we highlighting you?
15:29Iceland_jackyes ;)
15:29Bronsalol
15:44si14is there any decent way to use websockets in clijurescript?
15:45si14*clojurescript
15:51tomojsi14: https://groups.google.com/d/topic/clojure/3nCW2FtCYys/discussion
15:51tomojhttps://github.com/neotyk/ws-cljs/
15:58muhooi'm curious. in a noir project, why does lein repl get me a repl (in the sitename.server namespace) and with the socket listener working, but lein trampoline repl just gives me a user repl with no socket listener?
16:01muhooalso, w.r.t. overtone and dubstep, this tutorial might be useful: http://www.youtube.com/watch?v=QBStbd2B8Jk
16:02Bronsa20:57:03 muhoo: i'm curious. in a noir project, why does lein repl get me a repl (in the sitename.server namespace) and with the socket listener working, but lein trampoline repl just gives me a user repl with no socket listener?
16:02Bronsaops.
16:03ibdknoxmuhoo: because I set :main in your project
16:03muhooaha
16:04muhooi guess i don't fully understand what trampoline does, or doesn't do.
16:04geoffeg_ctechnomancy: hmm.. trying clojure-jack-in: "error in process filter:make client process failed"?
16:07technomancygeoffeg_c: maybe it can't find leiningen?
16:08geoffeg_ctechnomancy: yea, i had that error earlier and threw lein in my .zshenv PATH
16:10Wild_Catmuhoo: also see http://www.youtube.com/watch?v=IEdGA-FmENY
16:11technomancygeoffeg_c: emacs isn't going to launch zsh just to find leiningen though
16:11Wild_Cat(which is part of what I was thinking of when I suggested controlling modulators hooked to a real instrument through Overtone)
16:11geoffeg_ctechnomancy: the first time i tried clojure-jack-in i got an error saying zsh couldn't find lein in the path
16:12technomancyoh, ok; I guess there's more going on there than I thought
16:14technomancygeoffeg_c: "make client process failed" means it can't launch Leiningen though, so whether it's a path issue or not that's still the problem
16:14geoffeg_cpoop
16:14geoffeg_ci mean "thanks, i'll check that out"
16:15geoffeg_cnext year there should be a "getting emacs and vi working for clojure development" talk at clojure wst
16:15geoffeg_cwest too
16:18technomancyit would either be a short talk or an infinitely long one
16:18technomancybecause getting it right only takes a few steps, but there are an infinite number of ways to mess it up
16:19muhoothere is a more efficient way to do this, i'm sure. but i don't know what it is: https://refheap.com/paste/1219
16:20TimMctechnomancy: Infinite? Hey now, most of us are still using finite state machines.
16:20technomancyTimMc: well, assuming infinite disk space
16:20technomancys3 over fuse or something
16:20TimMcheh
16:22amalloy(comp vec list)...? isn't that just...vector?
16:22RaynesHaha
16:23muhoono
16:23muhoo&(vec "foo")
16:23lazybot⇒ [\f \o \o]
16:23amalloy&(vector "foo")
16:23lazybot⇒ ["foo"]
16:23muhoo&(vec (list "foo"))
16:23lazybot⇒ ["foo"]
16:23muhoooh, vector not vec
16:25TimMcpolyrhythms!
16:25ropetersCould someone explain ~@ ?
16:25muhoolearning clojure is like learning chinese. there's like 2000 characters and you can't really communicate till you memorize all of them
16:25ropetersKeep running into it in 4clojure solutions
16:25amalloyanyway, i would just write that as ##(map vector ["foo" "bar" "baz"] (cycle ["blah" "doh"])), muhoo
16:25lazybot⇒ (["foo" "blah"] ["bar" "doh"] ["baz" "blah"])
16:25TimMcropeters: ~@ is a splicing unquote, only meaningful inside `
16:26amalloyall this extra conjing and vecing just makes the code impossible to read; i had to paste it into a repl to see what you were actually doing
16:26muhooamalloy: thanks!
16:26ropetersTimMc: thanks
16:26TimMc&(let [x [1 2 3]] `(:a :b :c ~@x :d :e :f))
16:26lazybot⇒ (:a :b :c 1 2 3 :d :e :f)
16:28TimMcmuhoo: I remember learning to play that polyrhythm. (It's the only one I know.)
16:28muhooTimMc: i'm a good musician and an awful coder. however, poverty sucks, so i'm trying to learn to be a competent coder.
16:28TimMcheh
16:30muhooi have a looong way to go :-/
16:31ieureCan you use loop/recur with lazy-seq?
16:31ieureGuessing no.
16:32technomancyieure: you generally don't need to
16:33ieuretechnomancy, I'm concerned about holding references to stuff in this lazy seq fn.
16:33ieureI need to check a val before calling back.
16:33ieureOr maybe I'm just not using lazy-seq right
16:34ieure(defn x [] (lazy-seq (let [y …] (when y (cons y (x))))))
16:34ieureEssentially.
16:36ieureLooks like if-let is really what I want here.
16:39geoffeg_clooks like "lein swank" lies when it says "connection opened on localhost port 4005"
16:39TimMcieure: I think that's all if-let does.
16:40TimMc&(macroexpand-1 '(if-let [x 4] 5 6))
16:40lazybot⇒ (clojure.core/let [temp__3695__auto__ 4] (if temp__3695__auto__ (clojure.core/let [x temp__3695__auto__] 5) 6))
16:41TimMcOh, cute.
16:41geoffeg_cyep, if i "lein swank 4005 localhost" i cannot connect to localhost 4005, if i "lein swank 4005 127.0.0.1" i can connect to it on 4005
16:43tomojput `ping localhost` works as expected?
16:43tomoj why could that be?
16:43TimMcUnix sockets vs. TCP?
16:44arohnertomoj, is localhost in your /etc/hosts? It's sometimes broken for me on Ubuntu 11.10
16:44arohnergeoffeg_c: ^
16:44tomojubuntu 11.10 sometimes gives you a broken /etc/hosts?
16:44amalloyheh, i remember a similar problem someone had. he swore he could ping localhost:4005, despite ping being an IP tool rather than TCP
16:44TimMcI think the only time I've run into that distinction was when I tried to connect to a MySQL server over a forwarded port.
16:44tomojor localhost doesn't work for other reasons sometimes?
16:45geoffeg_clocalhost is in /etc/hosts on OS X, yea. removing localhost from /etc/hosts is a dangerous thing
16:45arohnertomoj: localhost is not present in /etc/hosts for me, on the AWS official image
16:45TimMcHah, weird.
16:45amalloyit turned out his dns server was reporting localhost:4005 as some server in russia
16:45geoffeg_csorry. localhost IS present in /etc/hosts
16:46technomancymaybe the /etc/hosts version of localhost is pushing ipv6 and your emacs or jvm build isn't compiled with ipv6?
16:46geoffeg_cpossibly, i've been meaning to get jdk1.7 working on my mac for a while so i'll try that tonight
16:46TimMcamalloy: Ouch.
16:47amalloyTimMc: that shouldn't matter, of course, unless you're crazy enough to use $ ping localhost:4005 as a debugging tool
16:48muhooTimMc: 11 over 5 polyrhythm, but reduces down basically to 2 over 3: http://bace.s3.amazonaws.com/5-over-11.ogg
16:50romanandregdnolen: hey, I pushed a new patch for the bug on cljs, I took care of the broken tests and added a few more
16:53TimMcmuhoo: Funky. I don't have enough musical training to pull out the rhythms, though. :-(
16:53TimMcAll I can tell is that something unusual is going on, rhythmically.
16:56Wild_Catmuhoo: where's the 11? All I can pick out is the 5.
16:56Luyt_Muhoo: Interesting clip. Who are the musicians/band, and what is the track title?
16:57muhooan old band of mine. i'm playing keyboards
16:58muhoothe song is part of a medley, the transition between this bizarre thing in 11, transitioning to "morning bell" by radiohead
16:58muhoowhich is in 5
16:59Luyt_That reminds me of a programmer I had to interview for a PHP/Python job. He wrote in his resume that he was a hobby drummer, yet he couldn't recognize the excerpt from 'unsquare dance' I played for him as a 7.4 beat ;-)
16:59muhooso the bass and left hand is 11, subdivided into 3 somehow i don't remember, and the chords are 2 groups of 5.
17:00muhooLuyt_: brubeck classic, i like the paddy milner version
17:00Luyt_He did however display some SQL knowledge, so we hired him. Other candidates couldn't even formulate a SELECT query.
17:01Luyt_muhoo: I only know the Brubeck version...
17:02sritchiecemerick! I have a quick question about clutch
17:02sritchiecemerick: do you know of any way to use a clojure view server on Cloudant?
17:03sritchiecemerick: I was also curious if you had any recs for running a couch client locally -- I know you'd used Couchbase Single Server, but that's been discontinued
17:03Luyt_...and knowing a 4/4 apart from 7/4 isn't a hard job requirement at the company I work for ;-) [I threw in the musical question as a joke]
17:03ibdknoxSELECT query + SQL = data
17:03ibdknox^ formulated
17:03ibdknox:D
17:03muhooif you'd seen the select queries i used to write, you'd have run out of the room screaming. example: https://refheap.com/paste/1222
17:03dnolenromanandreg: I looked at it, why don't understand why we need generate a fn for handling arity?
17:03ibdknoxuhhh
17:03dnolenI don't understand, I mean.
17:04romanandregdnolen: the single arty version for both str* and str is different
17:04ibdknoxthat is a normalization hyper-failure
17:04Luyt_ibdknox: I show the candidate a table and ask him to extract all adresses in 'New York' with a SQL statement. Most candidates didn't even know they had to use 'select' for that...
17:04ibdknoxlol
17:04cemericksritchie: No, you can't use a Clojure view server on cloudant. There are a couple of alternatives, though.
17:04romanandregwe were using the multi arity function of str* for str
17:04romanandregthat's why the bug was there
17:04romanandregwe can either
17:04romanandregcopy paste the code
17:04ibdknoxLuyt_: I don't really know how to write SQL either.. I get the computer to do it for me ;)
17:04sritchiecemerick: I was thinking of writing a pallet deploy, but other options for local/remote couch would be great
17:04romanandregor… just generate a function that gets the simple arity function as a parameter
17:04muhooibdknox: i'm kind of a normalization fetishist, yes.
17:05cemericksritchie: (a) you can deploy extensions to their Lucene-based views; with some imagination, that would end up being equivalent to a clutch view server
17:05Luyt_ibdknox: Well, at the company I work for, we use a lot of databases, and knowing some basic SQL is viewed as a foundation.
17:05cemerickor, (b) write your views in ClojureScript
17:05romanandregs/arty/arity/g
17:05sritchiecemerick: oh, that's interesting
17:05sritchiecemerick: that would take away all config issues, I guess
17:05ibdknoxLuyt_: I was mostly kidding. I think everyone should learn some
17:05cemericksritchie: https://github.com/clojure-clutch/clutch-clojurescript
17:06sritchieyou'd rec that over running my own install of couch, I suppose?
17:06dnolenromanandreg: str* is an implementation detail. if you see something better let me know. str should be written with an eye for perf, string concat is common op in JS.
17:06cemerickYes, it's far superior to mucking with a custom view server IMO
17:06ibdknoxif for no other reason to realize why things are hard lol
17:06sritchiecemerick: okay, great
17:06Luyt_ibdknox: We've tried bolting some ORMs onto our data model, but ORMs clearly have their shortcomings.
17:06sritchiecemerick: any thoughts on a good local dev environment?
17:06muhooLuyt_: http://www.youtube.com/watch?v=4sRYrKYFXZU
17:06sritchieworking on a homebrew install, but I'm grappling with
17:06sritchie{'EXIT',"Driver compiled with incorrect version of erl_driver.h"}
17:06Luyt_muhoo: Thanks!
17:07ibdknoxLuyt_: I've written three ORMs, in the end I dumped all of them. :) That's why I wrote korma instead
17:07cemericksritchie: Note that the latest release of clutch-clojurescript is pre-ClojureScript-release, so that's a TODO that's rising in my priority queue
17:07dnolenromanandreg: and by better, I mean eliminating str*
17:07geoffeg_cis there a good resource for lisp/repl-related emacs commands/keys? i want to take the current form, copy it into the repl that's running via swank and execute
17:07sritchiecemerick: I'll see if I can get around to it before you
17:07romanandregdnolen: ok, we can have the multiple arity function of str and str* generated once and then used in the str/str* fn instead of generating it each time on the fly, that should keep perf the same way
17:07ibdknoxcemerick: I want to try a public priority queue experiment
17:07romanandregstr* is being used in some other places, it seems you need a str function that doesn't pay attention on keywords and symbol
17:07romanandregs
17:07sritchieibdknox: reddit?
17:08muhooi'm weird. i look at lazy seqs and zippers and i think polyrhythms for some reason.
17:08ibdknoxsritchie: but for my todo-list
17:08cemericksritchie: the couchbase UI is fine, and what I still use. There's also https://github.com/refuge/rcouch, which looks like it's going to be rolled in as the standard binary distribution mechanism for couchdb.
17:08romanandregthat's why it broke in the first place, probably fix the functions that I broke initially to use something different from str
17:08cemerickLook under downloads for an OS X build.
17:08romanandreg?
17:08ibdknoxsritchie: I guess I could use reddit as the mechanism to do that.. you can just create random subreddits right?
17:08dnolenromanandreg: yes also, there nothing wrong with code duplication here. correct behavior is more important.
17:08cemerickI've wanted to dig into re-making a CouchBase OS X UI that uses rebar binaries, but that's much lower in the queue. :-)
17:09sritchieibdknox: yup, don't know how well it would map to your todo list, but you can
17:09cemerickibdknox: with a slick viz, presumably? Otherwise, it's a plan file
17:09sritchieI tried it for getting ideas for large-scale data tutorials out of the cascading community
17:09sritchiehttp://www.reddit.com/r/Cascading/comments/qnodc/cascading_tutorial_ideas/
17:09cemerickoh, you mean something interactive so others can upvote, etc?
17:09sritchiegot one comment :)
17:09ibdknoxcemerick: I meant more one that other people could prioritize/add to, I'm curious what the result would be
17:09ibdknoxyeah
17:10romanandregdnolen: will keep that in mind then, so what should we do, remove str* completely, or just replicate the StringBuffer code in both str and str*?
17:10sritchiecemerick: great, so any code that works with this local rcouch instance will work with the remote cloudant instance
17:10romanandregdnolen: don't know exactly why do you need the function str*, the documentation just says: "internal usage only"...
17:11dnolenromanandreg: lemme check where we use it.
17:11sritchiecemerick: (just a cautionary double check to make sure I'm going down the right road :)
17:11dnolenromanandreg: we need str* for symbol and keyword constructor fns.
17:12dnolenromanandreg: str* is lower level str concat form which doesn't handle symbols or keywords.
17:12romanandregdnolen: ok, so str should not use str* multiple arity version
17:12romanandregbecause str needs to pay attention on escaping keywords and symbols correctly
17:14romanandregdnolen: I'll just replicate the StringBuffer code in both str and str* and submit a new patch, does that sounds good? :-)
17:14dnolenromanandreg: oh yes, I understand now. yes str can't call str* multiple arity case.
17:16dnolenromanandreg: actually I see where fn creation is useful here. We want to lift out the StringBuffer anon fn, and construct a fn specialized to str or str*.
17:17romanandregdnolen: awesome… going to work on the new patch then
17:17cemericksritchie: code, as in, js views? Yes, should.
17:18dnolenromanandreg: cool, thx.
17:18cemerickThere's the mozjs statement/expression wonkiness, but I'm still not clear on the practical effect of that for us (users).
17:20sritchiecemerick: sounds good to me. thanks, man
17:21cemericksritchie: re: cljs views, my plan was to bring https://github.com/clojure-clutch/clutch-clojurescript/blob/master/src/com/cemerick/clutch/cljs_views.clj into cluch proper, and add an optional dep to a release of ClojureScript
17:21cemerickHopefully the cljs compilation APIs and such won't move around much… :-)
17:21gfredericksam I correct that there is fundamentally no way to add to the beginning of a vector in sub-linear time?
17:21si14tomoj: thanks
17:22sritchiecemerick: so if I have this view code somewhere in a cljs namespace that gets required,
17:22sritchiemy couchdb server will go ahead and create the view
17:22sritchieand then I can access it using the clutch api from clojure
17:22technomancygfredericks: yeah, you need finger trees for that
17:23gfrederickstechnomancy: I shoulda made a bet
17:23cemericksritchie: yes; couch knows nothing about cljs itself though. The cljs view is just another js view to it.
17:23cemerickibdknox: don't troll me, bro
17:23cemerick:-D
17:23ibdknoxhahaha
17:23ibdknoxcemerick: http://imgur.com/gallery/04937
17:23sritchiecemerick: yup, definitely, just getting a feel for the workflow of making sure a view exists
17:23cemericksure
17:24sritchieI guess a namespace with a bunch of bare "add-view" calls would work
17:24cemericksritchie: you can certainly use clutch-clojurescript as-is to see how it works
17:24sritchieokay, I'll look at that project for examples to get a feel for how you develop against this
17:24cemerickoh, of course my meticiously-produced asciidoc readme is mangled by github, but try to ignore that
17:25cemericksritchie: there's no standalone examples or tests (?!?!), just what's in the readme.
17:25cemerickping if you hit a pothole tho
17:25sritchiek
17:26sritchieit makes sense to me that a database is created the first time I try to access it --
17:26sritchieI suppose I should be thinking of a view in the same way
17:26sritchiealways access the view by sending in its map and reduce functions all will work fine
17:26cemerickThat project was put together mostly to see if it would work, prior to any official word on cljs releases, so I didn't build up a ton of tutorial or QA bits.
17:26sritchieand then if I wanted to destroy a single view, it sounds like I'd remove it from my source and actually destroy w/ a repl call
17:26sritchieI hope I can help w/ the infrastructure once I get this working a bit better
17:26cemerickYes, that's just about the right way to think of it.
17:27cemerickA view *is* a couch db, with the sole restriction that you can't produce other views from a view.
17:27cemericksomething that is apparently being considered for future revs.
17:30ibdknoxemezeske: I'm merging in your crate change, but I wonder if it would be better off if we just used hiccup's new organization right off the bat
17:30emezeskeibdknox: Cool. I think maybe I'm behind the times, I don't know what new organization you speak of
17:31emezeskeibdknox: BTW, I'm pissed that I didn't get to talk to you this weekend
17:31emezeskeibdknox: I saw you for 3 seconds while an elevator door closed, and then didn't see you again ^_^
17:31ibdknoxI didn't realize you were there
17:31ibdknoxI'm a man of shadow ;)
17:31emezeskeI was totally going to your unsession, but didn't get back from rock climbing in time :(
17:31ibdknoxemezeske: new organization: https://github.com/weavejester/hiccup/tree/master/src/hiccup
17:32ibdknoxemezeske: yeah I didn't really think that timing through
17:32ibdknoxI thought it would be late enough
17:32ibdknoxbut with it raining and all, people ended up out a lot later for dinner
17:32emezeskeAhh yeah
17:32emezeskeOkay, so he basically busted things out into more granular namespaces?
17:32tdrgabi1can I use a function before I define it (it's defined later in the file)?
17:32emezeskeLooks like things are mostly the same other than that
17:32cemerickemezeske: It's impossible to talk to everyone you want to at a conf. :-)
17:33emezesketdrgabi1: (doc declare)
17:33tdrgabi1emezeske: thanks
17:33emezeskecemerick: Yeah, true. There were a *ton* of awesome people to talk to, I think just time-wise it couldn't happen
17:33ibdknoxemezeske: yeah, as far as I can tell it's all basically the same
17:34ibdknoxcemerick: emezeske: I'm sad I missed talking with fogus again :(
17:34emezeskeibdknox: :)
17:35technomancyemezeske: I didn't realize you were at the conf; sorry to miss you.
17:35emezeskeibdknox: I might have time to reorganize the crate pullreq to be like hiccup tonight
17:35emezesketechnomancy: That's okay, it's my fault for not running you down
17:35ibdknoxemezeske: that would be wonderful. I'll push a 0.2.0-alpha as soon as you do, and we can be on our merry way
17:36ibdknoxemezeske: seriously, he's like the tallest guy there - hard to miss
17:36winkibdknox: did you by chance think of/tried to integrate bootstrap into a noir project? I was probably doing stupid things, but it did horrible things to my code
17:36emezeskeibdknox: Haha, that's what everyone kept telling me. They also said he might be on a unicycle with keyboard pants
17:37ibdknoxwink: twitter bootstrap? It should work fine. I haven't tried it myself, mainly because I don't tend to like those kind of frameworks personally
17:37ibdknoxemezeske: lol
17:37gtrakis processing-js close enough to the java one for a port of quil to make sense?
17:37technomancyyeah, chewbranca didn't make it, so I got to be the tallest
17:38redingerHowever, I did not see a unicycle
17:38winkibdknox: yeah that one. the default (without doing all the LESS stuff) heavily relies on custom classes, so basically there's lots of extra [:div and {:class "whatever"} sprinkled inbetween. Whereas usually (at least with what I do) I just write my css loose enough to work fine with hiccup
17:38ibdknoxtechnomancy: do you own a unicycle?
17:38technomancyI do not
17:39technomancyonly a blog post about unicycles
17:39septomintechnomancy: swarm coding was sweet. I was the guy who was flailing around with paredit on
17:39technomancyseptomin: great! =D
17:39technomancyI always forget to turn it off for those kinds of things
17:39winkyour conferences sound a lot more fun than the ones I attended
17:40ibdknoxwink: ah, yeah that's why I tend not to use them, I don't like littering my markup with classes.
17:40y3didoes anyone a good estimation for when the clojure west vids will start goin up?
17:40ibdknoxwink: btw, you can use the shortcut [:div.someclass.someotherclass ..] to make that a lot less painful
17:40septominI wonder if anyone's implemented some kind of simultaneous diff-merge thing in emacs, sort of wavey
17:40ibdknoxy3di: it took a few months for the strange loop ones I think
17:41ibdknoxer a couple months I guess
17:41ibdknoxnot a few
17:41technomancyseptomin: yeah, rudel uses the same inclusion transformation algorithms as wave IIRC
17:41winkibdknox: if only. for a form I need [:fieldset.control-group (label {:class "wtf"} ...) (input-field {:class "foo"
17:41ibdknoxah
17:41winkibdknox: it was a quick look, but I think it's really unsuitable for hiccup
17:41winkyou'd need a hiccup-bootstrap fork I'd say
17:42ibdknoxwink: sounds like mustache or comb would be a much better fit
17:42ibdknoxwink: weavejester was working on such a thing
17:42ibdknoxI think
17:42weavejesterI plan to, but I haven't started yet :)
17:42winkibdknox: yea. wasjust curious because a colleague of mine was very happy with bootstrap :)
17:42weavejesterI have some time set aside in a couple of weeks to start.
17:42weavejesterHiccup + bootstrap seem a natural fit.
17:42y3diibdknox: ah so long =/
17:42winkif you do usual "*.tpl" it's kind of not a great deal
17:43aperiodicswarm coding was super fun
17:43winkweavejester: actually I didn't know of the {:class} thingy in defelem until yesterday, so I tried to reimplement that. I really need to do a docs PR to showcase that feature :P
17:44aperiodici hope to do it again once we actually have a clojure user group around these parts
17:44winkwait. now I see it. right there in the docs.
17:44ibdknoxwink: he added it recently
17:44ibdknoxbased on some discussion in here
17:44ekoontz_aperiodic: i enjoyed it a lot too
17:44winkhehe
17:45ibdknoxweavejester: is there anything new in hiccup aside from the reorg?
17:45ibdknoxweavejester: we're working on making crate match up
17:45weavejesteribdknox: For 1.0? Nope.
17:46ibdknoxweavejester: okidoke :)
17:46weavejesteribdknox: For 1.1 I'll replace the compiler, but I want to get Ring 1.1 out first.
17:46ibdknoxweavejester: anything end-user there? Or just better/more efficient?
17:46aperiodicekoontz_: were you in the go group?
17:46ekoontz_sure was, were you?
17:47aperiodicyup! I was the vim user that keep messing things up
17:47aperiodic*kept
17:47weavejesteribdknox: It will be able to compile to clojure.xml format, for better Enlive integration (and anything else using clojure.xml format).
17:47ekoontz_hmm i don't remember any vim users :)
17:47weavejesteribdknox: I was also probably going to use core.logic to add in more optimizations.
17:47ibdknoxVIM users ftw
17:47ekoontz_thought we had you guys over in the vim ghetto
17:47RaynesVim power, unite!
17:47ibdknoxweavejester: sweet :)
17:48aperiodici came in late and missed that distinction
17:48ibdknoxekoontz_: you better watch it dude. I'm pretty sure 40% of VIM users are legit crazy
17:48winklol
17:48aperiodicheh, i was in that elevator with emezeske
17:48ekoontz_yep i watch my back walking around berkeley
17:48winkthink I don't use the same IDE for any 2 languages.
17:49winkphpstorm, VIM (c), CCW
17:49winkhm, maye python also in vim. damn
17:49aperiodicekoontz_: but yeah, i was sitting next to phil (I was the one who suggested implementing go)
17:49ekoontz_ah ok, i think you and i were across from each other then
17:50aperiodicekoontz_: you weren't the one with the HUB sticker on your laptop, were you?
17:50muhooarthur, IIRC?
17:50ibdknoxeveryone remember's their position relative to technomancy :p
17:50ekoontz_aperiodic, that was me yep :)
17:50ibdknoxremembers*
17:50aperiodicekoontz_: are you in portland?
17:50ekoontz_no, berkeley, CA, but my sister lives there though
17:50aperiodicaw, darn
17:51winkweavejester: how do you render the API docs?
17:51ekoontz_i like portland a lot though!
17:51ekoontz_is that where you are?
17:51weavejesterwink: Codox: https://github.com/weavejester/codox
17:51weavejesterwink: Not yet Lein 2 compatible, but soon!
17:52winkweavejester: thanks.
17:52muhooif those swarmcoding things use tmux and ssh, is anyone doing them remotely via the net?
17:52technomancyweavejester: anything particularly tricky blocking it?
17:52muhooseems like it'd be just as convenient to do it over irc or whatever as sitting in a room with laptops
17:52aperiodicekoontz_: yup. I was hoping to run into some portland folks at the conference, but didn't
17:52technomancymuhoo: not yet AFAIK, but there's no reason you couldn't
17:52aperiodici think it'd be hard to coordinate without voice
17:53technomancymuhoo: what you don't want to do is have one that's split between real-life and the net
17:53technomancyaperiodic: mumble or something
17:53weavejestertechnomancy: No, I just need to factor it out into two pieces; a small Leiningen plugin, and a core library.
17:53technomancythat is, http://mumble.sourceforge.net/
17:53technomancyweavejester: cool
17:53muhootechnomancy: good point. i've tried to do meetings that way, one group always gets left out of the discussion
17:53emezeskemuhoo: I was thinking that tmux+ssh+google-hangouts might be a good combo
17:54aperiodicooh, that's a good idea
17:54technomancymumble is designed for games, but it's a pretty good fit for swarming too
17:55Apage43used to use mumble for work conference calls =P
17:55aperiodicdoes that have a UI, or do you have to recognize voices?
17:55Apage43it has a UI
17:56Apage43if you have the window up you can see who you're hearing
17:56technomancyApage43: how did it work for you?
17:56Apage43mind, I also really like google hangouts, which switches to the webcam of the speaker
17:56technomancyI don't think having a video feed would scale
17:57Apage43technomancy: reasonably well. Once we got past a certain size there was always someone who had some kind of audio issue.
17:57technomancywell, it would just require everyone to have a beefy pipe
17:57Apage43technomancy: right. I've only used hangouts for calls with 5 or so folks.
17:57devnhow was clojure/west all?
17:58emezeskedevn: Twas awesome
17:58devni'm "stuck" on the beach at the momenbt
17:58devnmoment*
17:58devnhoping to make it to euroclojure if things go according to plan
17:58technomancyApage43: unfortunately skype is the only one I know of that does that kind of thing peer-to-peer
17:58Apage43yeah
17:59Apage43use skype a good bit too
17:59septominwould you expect to scale beyond the equivalent of an in-person swarm?
18:00septominthat seems pretty unwieldy for other reasons
18:00technomancyseptomin: no, probably less given the lack of visual cues for speaker collision
18:01technomancywe sorta did it with 4 or 5 at my last job during a couple particularly nasty debugging sessions
18:01devnseptomin: im trying to remember which "Look Around You" mentions Harfatum Septomin
18:01gfrederickssounds like a chemistry episode
18:01septominmaths
18:01devnwhat's the line?
18:01devnoh right
18:02septominhttp://2.bp.blogspot.com/_hO11SI_xkrI/TFwqS_-cqTI/AAAAAAAAAcY/0uSRVlLKACM/s1600/lay+01.jpg
18:02devnMATHS => ...Teleharsic Harfatum Septomin
18:02devncan't remember the first two letters
18:02gfrederickshaha
18:02devnnice
18:03daakui'm working on some clj-webdriver testing stuff and was wondering if anyone has suggestions for a way to parallelize deftest runs.. (hoping to run them on agents and aggregate the results)
18:04gfredericksdaaku: that sounds dangerous when combined with with-redefs
18:04gfrederickss/when/if/
18:04devndaaku: wish i had a good solution for you. ive been using sauce labs to parallelize test runs against different browsers
18:05daakugfredericks: haven't used that yet, though i can see that being useful for the non webdriver tests
18:05daakudevn: how did you parallelize them? did you use their snippets or are you using clojure.test?
18:06lancepantzdaaku: there are all sorts of reasons not to do that
18:07RaynesTimMc: Did you know that you got paste 666? https://refheap.com/paste/666
18:07daakulancepantz: but there are also all sorts of reasons to speed up test runs, but if there are other approaches i'd love to know
18:08lancepantzthe main one being that any given test is really fast, so if they are slow it is probably because of something external to your app, like your db
18:08dakronedaaku: https://github.com/mtyaka/lein-ptest ymmv
18:08lancepantzand to parallel test with a db, you'll have to multiple dbs for your test environment
18:10daakuit's very likely these are slow for external reasons, since they are more like integration tests rather than unit tests -- but running even a handful of these across the top 3 browsers quickly ends up being slow
18:10daakudakrone: that looks interesting - thanks!
18:11lancepantzfair enough
18:12technomancydakrone: did you guys try that out?
18:14winkRaynes: did you have any problems with browserid or did it work nicely?
18:14TimMcwink: They had a problem.
18:14TimMcMe.
18:14wink^666? :)
18:15devndaaku: we're just booting threads for each browser, nothing fancy
18:15devnsauce handles booting up fresh VMs
18:15TimMc10:58 < TimMc> Raynes: You can tell BrowserID is evil because when I finally signed up, the paste number I got was... https://refheap.com/paste/666
18:15devnheh
18:16hagnaso how do I catch an exception like #<Stone slingshot.Stone: clj-http: status 503>
18:17raekhagna: that looks like an exception from slingshot
18:18raekit's a library that makes it simple to define new exception types in clojure
18:18TimMcwink: My major problem with it is that even though it is a Mozilla product, it does not work with Firefox's password manager.
18:18hagnaraek: yeah I just want to do something different if I get a 503 status vs 404 status
18:18raekif you use the slingshot API, it should be easy to extract the cotained info
18:18TimMcbut I hated it even before I tried using it.
18:19winkTimMc: that's maybe a killer for a real end-user-facing site, but I really just need any sort of "don't have to reinvent everything"
18:19dakronetechnomancy: didn't help much since we were IO bound
18:19technomancyof course
18:19hagnaraek: yeah I'm not really sure what to put (catch <in here>)
18:19dakronehagna: you can catch it with (catch slingshot.Stone e ...), or (catch Exception e ...)
18:20dakroneor (try+ ... (catch [:status 503] e ...))
18:20dakronedepending on what you want to do with it
18:20hagna(catch [:status 503] e ...) yeah that's it
18:25hagnadakrone: why does [:status ...] e work?
18:26dakrone[:status ...] uses Slingshot's selectors on the map https://github.com/scgilardi/slingshot/blob/master/README.md
18:26dakronewhich is why it has to be inside a try+
18:29cjfriszIs there a way to create a macro without defmacro, i.e. a macro that has function-local scope?
18:30cemerickweavejester: Any ideas as to why `lein2 ring war` would fail with: No implementation of method: :emit-element of protocol: #'clojure.data.xml/Emit found for class: clojure.data.xml.Element
18:30cjfriszLike in Scheme, I'd use: (let-syntax ([x (syntax-rules ...)]) <some code>)
18:30weavejestercemerick: Which version of lein-ring?
18:30dakronecjfrisz: tools.macro https://github.com/clojure/tools.macro has `macrolet`
18:30cemerickweavejester: 0.6.1
18:31dakroneand symbol-macrolet
18:31cjfriszdakrone: is there anything in core?
18:31cemerickactually, an 0.6.2-SNAPSHOT that uses the lein-version-flexible eval-in-project in lein.ring.war
18:31cjfriszI don't really *have* to avoid defmacro, but I'd like to if I can
18:31dakronecjfrisz: not that I know of, other than creating your own macrolet
18:32hagnadakrone: might be easier to not raise exceptions as long as I get status back in the response
18:32cjfriszI'm doing some code transformation where I need to insert a macro, and I'd rather not pollute the namespace with a new variable
18:32weavejestercemerick: I don't know… I think technomancy might have written that part, unless I'm confusing people.
18:32cjfriszdakrone: alright, thanks
18:32dakronehagna: the response will always have the status assuming the connection didn't fail/timeout
18:32weavejestercemerick: I'd have to investigate, but when I tested it manually it seemed to work...
18:33technomancyI didn't port to data.xml, but I ran into a similar problem with leiningen; turns out to be one of those AOT messes where removing .class files won't allow it to fall back to the non-AOT'd version of a protocol
18:34weavejestertechnomancy: Ah, sorry for not remembering right. I know you ported *something* in lein-ring!
18:35weavejestertechnomancy: But it sounds like you know the cause of the problem anyway
18:35technomancyit's freaking protocols.
18:35technomancymore trouble than they're worth. =P
18:37technomancycemerick: are you using a checkout of lein2 or the self-installed preview?
18:38cemericktechnomancy: checkout
18:38cemerickshall I scrub classfiles from lein and lein-core?
18:39technomancyyeah, give that a try
18:39technomancyand try my latest push
18:40technomancyI had a classes vs target/classes mismatch that could be biting you
18:40technomancybut I'd like to point out that if everyone just used multimethods where dispatch weren't a bottleneck, this wouldn't be an issue. =P
18:42cemericktechnomancy: nice, rm-ing classes in leiningen fixed that
18:42cemerickNow to see if it'll flow through to lein-beanstalk nicely
18:46eggsbycan anyone explain to me why this is giving me "java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn" -- http://pastie.org/3631230
18:47eggsbyshould take in (build-bucket 2 {:a 1}) and return ([:a] 1)
18:50eggsbyanyone have any clue where my hangup might be?
18:50aperiodiceggsby: the let form is double-wrapped, so the returned list is being invoked as a function
18:51gfredericksman I stared at that for a minute and didn't see that just cause it was indented/formatted so weird
18:52eggsbygfredericks: I'm new to clojure, how can I indent it better?
18:52gfrederickseggsby: what editor are you using?
18:52eggsbyright now just sublime text
18:53gfredericksI think most clojure code is indented with two spaces, or else to line things up with something above
18:53gfredericksbut it usually doesn't end up veering off to the right so strongly
18:54gfredericksalso having the open paren with nothing after it doesn't happen
18:54gfredericksthat's probably the main reason I didn't see it
18:54aperiodicyeah, it took me a little while because of the indentation
18:55gfrederickseggsby: something like this is closer: http://pastie.org/3631263
18:56gfredericksprobably most people do whatever emacs clojure-mode does
19:14RaynesEvery time you use pastie for a Clojure paste, Rich Hickey strangles a Java programmer.
19:15gfredericksthat is a statement full of mixed incentives
19:46TimMcgfredericks: I suppose we should distinguish between people who cod ein Java for a living and people who self-identify as "a Java programmer".
19:46TimMcbecause I imagine an awful lot of Clojure folks do the former but not the latter.
19:47gfredericksTimMc: I saw a funny thingy somewhere about something
19:47gfredericksluckily I tweeted it so I can go find it that way if nothing else
19:47tmciverTimMc: you just don't want to be strangled by Rich Hickey.
19:48TimMctmciver: I will admit to that being one of my phobias.
19:48gfredericksoh found it; now let's hope the link still has the same thing on it
19:49gfredericksTimMc: https://twitter.com/#!/gfrlog/status/162588289554071552
19:49gfredericksgotta scroll down a screen or two to the 3 columns
19:50winkTimMc: how would you define self-identifying as a jave programmer? suiting up? :P
19:51TimMcwink: Personal identity.
19:51winkTimMc: only the last part was tongue-in-cheek. what traits do you mean?
19:52TimMcgfredericks: Nice.
19:52gfrederickswink: probably he just means being willing to say "I'm a Java Programmer"
19:52winkgfredericks: when did Java become cool
19:52gfrederickswink: Java didn't, but jave did
19:52winkoh
19:52TimMchaha
19:52winkgfredericks: I'd say a lot of things if the pay is ok :P
19:53gfrederickswink: okay, probably he means being willing to say it to somebody who does not make pay decisions
19:53gfrederickslike a peer
19:53TimMcI learned^W started using Java in, like... 2001?
19:53gfredericksTimMc: I was still in diapers
19:53gfredericksin 2001 I mean
19:53gfredericksnot when I learned Java
19:53TimMcIt was at v1.2 then. I think I picked it up again at v1.5
19:54winkthink it was 1.2 for me as well
19:54winkand I'm not a Java Programmer
19:54winkI'm just using it on and off for... a while
19:54TimMcThere were definitely already certification courses.
19:54gfredericksNOW are you a Java Programmer?
19:54technomancyI've been working with Jabba since the Empire Strikes Back
19:54winkmaybe I should be a Java Programmer. :P
19:55technomancyoh no, my cover's blown.
19:55aperiodic~guards
19:55clojurebotSEIZE HIM!
19:55winktechnomancy: Return to your J IDE. Now!
19:55photexhas anybody used clojure-control recently?
19:55technomancyaperiodic: no disintegrations!
19:56photexI just tried the basic date task and found that no matter what I do I get the error: "Task <taskname> just needs -2 args"
19:56aperiodictechnomancy: unfortunately someone stuck a piranha plant in the sarlacc pit so you'll get off easy
19:57photexI'd like to dig around and perhaps make a patch, but I don't know if I have enough time and should just use Fabric :/
19:59rhchmm, i feel like i'm missing some intuitive way of doing this in clojure: i have a vector of regex patterns, and i want to iterate them a build another vector of the result of re-find'ing each of them on a single string
19:59ibdknoxbig docs update on http://sqlkorma.com
19:59ibdknoxall updated to 0.3.0-beta7
20:00rhci could do (filter #(re-find %1 "str") vec) and then do (map #(re-find %1 "str") ..) on the result, but thats doubling each match
20:00rhcshould i just use loop/recur?
20:01tmciverrhc: what about (vec (map #(re-find %1 "str") ..))?
20:01gfredericks&(doc keep) might help
20:01lazybot⇒ "([f coll]); Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f must be free of side-effects."
20:02rhctmciver: ahh, cause the nil's will removed, thanks
20:03tmciverrhc: hmm, maybe not.
20:03tmciverrhc: vec doesn't remove nils
20:03gfrederickskeep does
20:03gfredericks(keep #(re-find % "str") vec-of-regexes)
20:04tmcivergfredericks: ah yes, and then vec the result.
20:04gfredericksif he needs a vector
20:04rhcah cool
20:04rhcyeah i dont need a vector, just a coll
20:05tmciverrhc: Oh OK, you said you were building anothe vector.
20:05rhcis that still considered best practice? to build up a big list of nils only to destroy it?
20:05rhctmciver: my mistake
20:05gfredericksrhc: I don't think it "builds up a big list of nils"
20:05gfredericksyou don't know which are nil until you try
20:05gfredericksit's not doing anything beyond that
20:05rhcok
20:05gfredericksunless you mean tmciver's suggestion
20:05gfrederickswhich is still probably lazy
20:05gfredericksand thus not much different
20:05rhci mean yours, i was wondering if it was lazy
20:06rhccool.
20:06gfredericksrhc: the source for keep is probably straightforward and would show how that works
20:08rhcinteresting, it is: http://clojuredocs.org/clojure_core/clojure.core/keep
20:09rhcso lazy-seq almost lets you write tail-recursive functions because its invoked lazily?
20:09TimMcIt does use trampolining.
20:10TimMcAlthough I'd have to think about the more general claim you're making.
20:14gfredericksoh the chunking cluttered up the source
20:14rhci assumed that was some special case and just looked at the last 4 lines
20:15gfredericksrhc: exactly
20:17gfredericksoh the clunking chuttered up the source
20:17tmcivergfredericks: you can say that again.
20:18gfredericksoh the sunking chluttered up the course
20:25FrozenlockIs there a way to save a file to another directory using file-str? (from clojure contrib)
20:25choffsteintechnomancy, are you around? If so, can I PM you a heroku question regarding clojure?
20:26technomancychoffstein: sure
20:27amalloyis it really netiquette to ask someone if you can PM them? i've seen this a few times now, and it just seems absurd to me; can anyone explain the rationale?
20:27technomancyamalloy: as someone who gets a fair number of PMs that belong in public channels, I support this behaviour.
20:27mdeboardlol
20:28lancepantzi agree with you both, but i have nightmares of having getting chewed out for doing that on efnet #perl 10 years ago
20:28gfrederickstechnomancy: sorry I tried my best to refrain but I failed miserably
20:28lancepantzthere's some graybeards out there who will freak out for that
20:30TimMcThere's also a difference between social backchanneling and private requests for technical assistance.
20:32gfredericksmaybe you want the questionee to have to publically ignore you
20:33gfredericksor let him get public credit for helping?
20:37technomancyit's better than bug reports over personal email or twitter though
20:38lancepantzwhat about bitching about you guys not supporting websockets :P
20:39lancepantzthat's the appropriate channel for that?
20:39lancepantz*what's
20:39technomancymark.mcgranaghan@heroku.com =D
20:39lancepantz:)
20:42Rayneslancepantz: Bitch about how much they charge for SSL as well.
20:43devnPMs are treated like email addresses
20:43devni think that's been said, but that's my understanding, and in many places on IRC it is preferred that you ask
20:44ibdknoxthey did support websockets briefly
20:44ibdknoxthough there was a timeout :(
20:44gfredericksman I will have to start asking
20:44gtrakhmmm, why does it seem that you don't have to do #' for clojure to pick up recompiled functions now?
20:46llasramgtrak: It took me a little while and some help from here to wrap my head around. If the compiled code contains a reference to the var (like calling a function by the var it is bound too), then any changes are picked up dynamically
20:46arohner_does anyone have experience w/ clj-webdriver & chrome on OSX? I'm getting " The path to the chromedriver executable must be set by the webdriver.chrome.driver system property;", but the wiki docs say it looks in the default path
20:47llasramgtrak: You only need to reference the var explicitly if you're going to pass the value to something which will hold a reference to it. If you just pass the value of the var, you get the backing function, which won't change with recompilation.
20:47arohnerclj-webdriver & firefox works just fine
20:48gtrakllasram, so here's the thing, defn fxn 1 and 2, 2 calls 1, defn 1 again and 2 would still call the old 1
20:48gtrakit seems that's not the case in 1.3
20:49llasramgtrak: I can't say with confidence what the behavior was for 1.2, but agreed -- 1.3 will definitely pick up the change automatically through the var
20:49daakuarohner_: java -jar selenium*.jar -Dwebdriver.chrome.driver="/path/to/chromedriver" should do it
20:50gtrakI used to have to type #' all the time to avoid it, now it seems it's not the case!
20:50arohnerdaaku: oh, I was confused. Didn't realize there was native code to install to make chrome work :-(
20:50arohnerthat didn't used to be the case
20:50daakuarohner: yeah, chromedriver is actually a full blown webdriver server, selenium proxies to it.. it nice since that part is maintained by the chrome guys
20:54amalloygtrak: pretty sure you're wrong - you probably typed #' all the time but *needed* to type #' substantially less frequently
20:54gtrakare there some rules on where it's not an issue?
20:55cemerickibdknox: do you have an ETA for 0.3.0 release of korma?
20:55gtrakamalloy, I would type #' on any function that would be annoying if I wanted to change it during interactive development, for instance a jetty handler
20:56amalloyrule: it's generally not an issue? seriously though, the only time i remember running into it is if you try to depend on a function at the top level during compile-time, rather than calling it from within another function
20:56ibdknoxcemerick: I just updated the site to 0.3.0-beta7 - should be very soon
20:56amalloyand that hasn't changed in 1.3
20:56amalloyeg, (run-jetty myfn) - you're passing the current value of myfn, not its var, so that matters
20:56gtrakwell, I'll never use #' and see what happens :-)
20:57amalloy(defn whatever [] (myfn 1)) - that goes through the var myfn because it's in the call position and is a known var
20:57gtrakahhh
20:58cemerickibdknox: ok; just keeping an eye out for whether we should have a qualified rev number in the book, is all :-)
21:00gtrakamalloy, so I guess the compiler makes the distinction if it's in a call-site? I always thought symbols got resolved to values, but then with-redefs makes no sense
21:00amalloyyeah, call position gets treated specially
21:01gtraklearn something every day
21:13TimMcIs this where :static comes in?
21:15gtraki think all the vars are static now
21:15gtrakthat has more to do with the thread-local bindings
21:19ibdknoxlol
21:19ibdknoxI closed 16 issues today
21:20amalloyibdknox: that's only encouraged if you also fixed 16 problems
21:20ibdknoxI did
21:20ibdknox:D
21:21TimMcgtrak: :static is not the opposite of :dynamic
21:21TimMcbut I don't know what :static is/was
21:21gtrakfrick, what?
21:22FrozenlockHow would you save a file to a subfolder using duck-stream.file-str? (It replaces \ and /)
21:23RaynesYou wouldn't because duck-stream has been deprecated for like 3 versions.
21:24Frozenlockoh...
21:25FrozenlockWhich function is replacing it?
21:29Raynesduck-streams was mostly replaced by clojure.java.io (a built in Clojure library).
21:29RaynesNot sure about that specific function.
21:29FrozenlockThanks, I should have enough info to find it!
21:54weavejesterarohner: Did you get time to try out clj-aws-s3 0.2.2-SNAPSHOT to fix the problem you were having with 0.2.1?
21:54amalloyalso see just java.io.File, which has the barebones
21:54arohnerweavejester: sorry, not yet. Hopefully this week though
21:54weavejesterarohner: Okay, if it does fix it, I'll release a 0.2.2 version.
21:55arohnerweavejester: I'm using "-XX:+UseConcMarkSweepGC" and "-XX:+CMSClassUnloadingEnabled" if that's any help
21:56weavejesterarohner: All I did was to memoize the s3-client function, therefore retaining a reference at all times.
21:57weavejesterWhich should be okay in theory...
21:57weavejesterOr were you giving me the options so I could try for myself? :)
21:57arohnerweavejester: I was giving you the options I'm using, if you wanted to try to reproduce before I have time to test myself
21:58weavejesterarohner: Ah, I initially misunderstood.
21:58weavejesterarohner: I'll try and reproduce if I have time, and if I can find a file large enough :)
22:03pandeirolynaghk: is the cljs version of c2 ready to be used? i'd like to try it out but i can't figure out how to include it
22:13rhcwhy doesn't this work? (def myf #({:a %})) (myf 1)
22:15rhcnevermind, figured out how to google it http://stackoverflow.com/questions/2020570/common-programming-mistakes-for-clojure-developers-to-avoid
23:04TimMcgfredericks: Download Overtone and make sure it works. Then you will be able to keep yourself occupied, no problem.
23:04TimMcOr grab some SICP videos.
23:15gfredericksit would be nice if I could commit the melodies that pop into my head into my git repo
23:15gfredericksfor posterity of course
23:19amalloygfredericks: get a microphone. problem solved
23:19gfredericksamalloy: I want a microphone that emits ASCII
23:21gfredericksI want a microphone with a fixed-width font
23:21gfredericksif I thought of several more attributes I wanted in microphones (like a short skirt and a long jacket) I could perhaps make a song about it
23:27TimMc:-D
23:49gfredericksholy crap overtone just made a noise
23:52TimMc\o/
23:52gfredericksTimMc: you just made airports slightly more interesting
23:53TimMcgfredericks: (demo 16 (+ (sin-osc (mouse-x:kr 50 500 EXP)) (sin-osc (mouse-y:kr 50 500 EXP))))
23:54gfredericksthat bothered my left ear
23:54gfrederickswait I bet I was supposed to move my mouse
23:55gfredericksthat is the weirdest thing that has happened to me this evening
23:55gfredericksTimMc: do another
23:56TimMcgfredericks: Overtone doesn't come with safety belts. I recommend keeping the volume low.
23:56TimMcYou might need to wrap that + call with a pan2 call to make it left-right balanced.
23:57TimMcgfredericks: Check out the examples/dubstep.clj file.
23:57TimMcCrazy shit.
23:57gfredericksI don't know any of these things
23:59gfredericksman I thought I knew what music was.
23:59muhoohttp://blog.60works.com/
23:59gfredericksclearly it is something else.
23:59muhooand, http://moldover.com/