2012-03-19
| 02:12 | scottj | what does dup in print-dup stand for? |
| 02:13 | scottj | duplicate? |
| 02:14 | alexbaranosky | my guess was duplicate |
| 02:14 | alexbaranosky | just a educated guess of mine though |
| 05:08 | jave | hello |
| 05:09 | jave | im 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:14 | raek | you want to implenent a build step in Clojure? |
| 05:14 | jave | raek: indeed |
| 05:17 | raek | that's dead simple to in Leiningen, btw |
| 05:18 | jave | yes, this is an existing maven build. |
| 05:19 | raek | I don't know much Maven so I can't help you there... |
| 05:19 | jave | its 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:20 | jave | ok, thans raek |
| 05:21 | raek | there should be maven users in this channel |
| 05:21 | raek | but they might not be awake now |
| 05:22 | jave | okay, np |
| 05:44 | wink | anyone tried hiccup with bootstrap? Either I'm doing it wrong or the resulting code is a huge mess |
| 06:22 | fliebel | Can I complement a goal in minikanren/core.logic? |
| 09:46 | zakwilson | Why is it now necessary to declare vars dynamic to make them re-bindable? |
| 09:47 | Licenser | zakwilson to prevent accidential mutation of state |
| 09:47 | Chousuke | I think because it allows the more common case to be more efficient |
| 09:47 | Chousuke | dynamic vars are rare |
| 09:47 | Licenser | that way you make it explictly clear that your var is bound to the context |
| 09:47 | Licenser | or Chousuke is right that might be too ^^ |
| 09:47 | Licenser | or both |
| 09:48 | zakwilson | It 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:48 | Chousuke | that case is not common enough I suppose. |
| 09:49 | Licenser | zakwilson but you might not know what breaks because of that o.O |
| 09:49 | Chousuke | Clojure is more about what actually *is* useful rather than what might be useful |
| 09:49 | zakwilson | I'm specifically thinking of cases in Common Lisp where one might define an around method. |
| 09:49 | zakwilson | Licenser: with great power comes great responsibility. |
| 09:49 | Chousuke | I'm not sure if there was a way around this in any case. |
| 09:50 | Chousuke | but as it stands, non-dynamic vars being efficient trumps the convenience of always having dynamic vars. |
| 09:50 | zakwilson | I know 1.2 didn't have that requirement. |
| 09:50 | Chousuke | yeah, it was changed. |
| 09:51 | Chousuke | the default used to be slow. now, the default is fast :P |
| 09:51 | zakwilson | Well, that seems like a good reason. "You shouldn't want to do that because it's dangerous" does not. |
| 09:52 | Chousuke | I'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:53 | Licenser | zakwilson hey save by default is a good reason, you also don't give everyone your root password ^^ |
| 09:54 | zakwilson | It's a programming language. It shouldn't try to protect me from myself. |
| 09:54 | Chousuke | there's nothing really unsafe about rebinding vars anyway |
| 09:54 | Chousuke | it's just slow to do by default |
| 09:54 | zakwilson | I mean... it shouldn't point guns at my foot FOR me, but if I say (point-gun :at "foot")... |
| 09:55 | raek | you can still redefine the root value |
| 09:56 | Wild_Cat | y'know, there's something to be said in favor of protecting programmers from themselves. |
| 09:57 | dan_b | (peek 53281 15_ |
| 09:57 | dan_b | ) |
| 09:58 | dan_b | there's a limit to how far you can legitimately say "the computer is stopping me doing what I want and that's bad" |
| 09:59 | Wild_Cat | dan_b: nice, very oldschool. I wonder how things would have turned out, had the C64 had Scheme instead of Basic ^^ |
| 09:59 | Licenser | I don't even undestand what that peek means o.O |
| 10:00 | dan_b | change border colour to ... I can't remember what 15 was |
| 10:00 | dan_b | light grey, maybe |
| 10:00 | Wild_Cat | also, 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:00 | Wild_Cat | kinda like how Haskell forces you to mark impure sections of your code. |
| 10:00 | Wild_Cat | dan_b: shouldn't that be poke, in that case? |
| 10:00 | dan_b | damn, yes. you're absolutely right |
| 10:01 | Wild_Cat | Licenser: peek reads and returns the byte at the target address. |
| 10:01 | Wild_Cat | conversely, poke writes a byte at the target address. |
| 10:02 | Licenser | I see I see |
| 10:02 | Wild_Cat | it's a classic from the 8-bit BASIC days |
| 10:03 | Licenser | I'm too young for that :P |
| 10:03 | osa1 | does 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:14 | TimMc | osa1: Hinting object types only matters for interop |
| 10:15 | TimMc | (.foo bar) cares about the hinting on bar |
| 10:15 | TimMc | (some-fn bar) erases any hinting info |
| 10:20 | Wild_Cat | isn't type hinting supposed to make things faster overall, though? |
| 10:20 | TimMc | Only where it can. |
| 10:21 | Wild_Cat | and where is that? Does it only serve to avoid reflection in (.bar foo)-type calls? |
| 10:21 | TimMc | It is used for two almost entirely separate optimizations: 1) Non-boxed primitives, 2) reflectionless interop |
| 10:22 | Wild_Cat | aha. Gotcha. Forgot about the primitives thing. |
| 10:22 | Wild_Cat | thanks. |
| 10:22 | michaelr525 | hello |
| 10:29 | j_king | sorry this isn't clojure-specific: does anyone know if there's a # for nathanmarz's storm? google isn't being terribly helpful |
| 10:30 | TimMc | "a #"? |
| 10:30 | j_king | channel |
| 10:31 | TimMc | ah, got it |
| 10:39 | true_droid | j_king: #storm-user |
| 10:40 | j_king | true_droid: thanks. |
| 10:40 | true_droid | j_king: no problem |
| 11:10 | irc2samus | hi guys, anyone know why I'm getting these errors with lein? http://pastebin.com/szUJSrqt |
| 11:11 | irc2samus | (their channel is a bit quiet) |
| 11:12 | heow | hmmm, that's a new one for me |
| 11:13 | vijaykiran | irc2samus: lein 1 or 2 ? |
| 11:14 | irc2samus | I think 1, the latest stable |
| 11:15 | irc2samus | this: https://raw.github.com/technomancy/leiningen/stable/bin/lein |
| 11:16 | vijaykiran | lein version should print the version - seems like there's some problem with classpath |
| 11:18 | irc2samus | lein version shows: Leiningen 1.7.1-SNAPSHOT on Java 1.6.0_26 Java HotSpot(TM) 64-Bit Server VM |
| 11:19 | irc2samus | unsetting the classpath prevents the errors on the help command |
| 11:22 | vijaykiran | may be try emptying your ~/.m2 ? |
| 11:22 | vijaykiran | or rename it |
| 11:22 | vijaykiran | install lein again with self-install |
| 11:24 | irc2samus | tried that before but it didn't help, but unsetting my classpath seems to fix it |
| 11:25 | irc2samus | it sucks that some programs crash if they don't have classpath while others crash if they have it :/ |
| 11:25 | irc2samus | anyway thanks guys |
| 11:26 | babilen | What was your CLASSPATH set to? |
| 11:27 | irc2samus | the system jars |
| 11:38 | RickInGA | I think it is time to get new glasses, my favorite emacs command is C-X C-+ |
| 11:39 | mdeboard | haha |
| 11:39 | mdeboard | I foudn that accidentally last night |
| 12:13 | pelleb_ | 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:13 | raek | pelleb_: you use the apply function |
| 12:13 | raek | you don't use quoting for that |
| 12:13 | pelleb_ | ah. I new there was an easier way than what I've been doing. |
| 12:14 | pelleb_ | Thanks |
| 12:14 | rlb | pelleb_: (apply + [1 2 3]) |
| 12:14 | rlb | ,(apply + [1 2 3]) |
| 12:14 | raek | ,(apply assoc [{:a 1} :b 2]) |
| 12:14 | clojurebot | 6 |
| 12:14 | clojurebot | {:b 2, :a 1} |
| 12:14 | pelleb_ | That is exactly what I need |
| 12:15 | rlb | pelleb_: and of course it doesn't have to be a vector specifically. |
| 12:15 | pelleb_ | sure |
| 12:15 | raek | if you do (apply f a b c [x y z]), it's equivalent to (apply f [a b c z y z]) |
| 12:15 | gfredericks | ,(apply + (range 1000)) |
| 12:15 | clojurebot | 499500 |
| 12:15 | raek | well, modulo seqs/vectors |
| 12:16 | raek | so python f(a, b, *x) translates to (apply f a b x) |
| 12:20 | Wild_Cat | oh, nice. Ish. |
| 12:20 | Wild_Cat | raek: what happens when one argument to the function is in fact supposed to be a vector? |
| 12:25 | rlb | Wild_Cat: you mean like (apply vec [[1 2 3]])? |
| 12:25 | rlb | ,(apply vec [[1 2 3]]) |
| 12:25 | clojurebot | [1 2 3] |
| 12:25 | rlb | ,(apply vec [1 2 3] []) |
| 12:25 | clojurebot | [1 2 3] |
| 12:25 | Wild_Cat | rlb3: like that, yeah. Thanks. |
| 12:26 | TimMc | &(apply #(class %&) [1 2 3]) |
| 12:26 | lazybot | ⇒ clojure.lang.PersistentVector$ChunkedSeq |
| 12:26 | TimMc | &(apply #(class %&) (range 1 4)) |
| 12:26 | lazybot | ⇒ clojure.lang.ChunkedCons |
| 12:26 | TimMc | ...but you shouldn't rely on that |
| 12:29 | edw | For traditional server-side html templating in clojure, is there a generally preferred solution? |
| 12:30 | RickInGA | edw: noir is a library that is often used for serving the templates |
| 12:31 | RickInGA | edw: for building the actual templates, noir uses hiccup by default |
| 12:31 | RickInGA | edw: you can also use stencil, which implements the moustache spec |
| 12:31 | edw | RickInGA: I use Noir. As you said, Noir "likes" hiccup. Ah, yes, I need something to deal with text-based templates. |
| 12:31 | RickInGA | edw: enlive is also pretty common, but I hear it is complex |
| 12:33 | edw | What 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:33 | ibdknox | edw: stencil or comb should fit the bill |
| 12:33 | edw | I'll check them out. Thanks, ibdknox and RickInGA. |
| 12:34 | TimMc | comb... is that a mo?ustache joke? |
| 12:34 | ibdknox | TimMc: we don't make jokes here. |
| 12:34 | RickInGA | edw: that was a recursive thanks to ibdknox, my answers were what he told me last week :) |
| 12:36 | edw | There is also fleet... |
| 12:37 | ibdknox | edw: use comb, not fleet |
| 12:37 | edw | OK. |
| 12:37 | ibdknox | https://github.com/weavejester/comb |
| 12:37 | edw | I' there. |
| 12:37 | edw | I'm, even. |
| 12:38 | ibdknox | it's beautifully simple :) |
| 12:38 | edw | And it doesn't do any wheel reinvention either... |
| 12:56 | edw | E.g., ibdknox, I'm about to smash your watchtower together with comb... |
| 12:57 | ibdknox | lol |
| 12:57 | ibdknox | to spit out static resources or something? |
| 12:57 | ibdknox | noir-static is a GSOC project and it sounds like I may have someone interested in working on it :) |
| 12:58 | edw | To watch a template folder and re-eval template/fn if the template files changed. |
| 12:58 | edw | I'm not a student! I'm way too old! |
| 12:59 | edw | It would be nice if the JVM exposed if available a kevent-like facility. |
| 12:59 | edw | Polling is tres schlecht. |
| 13:01 | fdaoud | speaking of "jokes", isn't there burp to go with hiccup? |
| 13:01 | mdeboard | Just don't get any of it on your mustache |
| 13:02 | edw | HTML templates are the third thing for which I need to define a function for cache-purging. |
| 13:02 | ibdknox | edw: haha I wasn't implying you were a student, just saying that a general solution might appear soon |
| 13:02 | edw | slurp, squirt, hiccup, burp, I like the direction these names are taking |
| 13:03 | mdeboard | (projectile-vomit/splash) |
| 13:03 | mdeboard | &(projectile-vomit/splash) |
| 13:03 | lazybot | java.lang.RuntimeException: No such namespace: projectile-vomit |
| 13:03 | mdeboard | darn |
| 13:03 | fdaoud | &(spew) |
| 13:03 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: spew in this context |
| 13:03 | mdeboard | sounds like a nathanmarz thing |
| 13:03 | Wild_Cat | all of those would make cool names for death metal bands. |
| 13:03 | mdeboard | spewing tuples |
| 13:04 | mdeboard | I think we immatured him away |
| 13:08 | dnolen | jonasen: so did my example make some sense? |
| 13:16 | TimMc | barf/spit is the opposite of slurp |
| 13:16 | TimMc | traditionally |
| 13:19 | RickInGA | haha, "best of Clojure West: best hair: if you have to ask, stop reading now" |
| 13:20 | rhc | RickInGA: hahaha |
| 13:20 | jodaro | heh |
| 13:20 | owain`` | does anyone know if the Clojure West talks will be online anytime? |
| 13:20 | RickInGA | owain`` 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:21 | owain`` | ah great thanks. |
| 13:21 | babilen | Hi 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:22 | RickInGA | this best of list is on planet clojure, and I am really enjoying it |
| 13:22 | dnolen | babilen: lein install |
| 13:23 | babilen | dnolen: Which I assume installs it to ~/.m2 where it can then be found when I run "lein deps" in another project? |
| 13:23 | dnolen | babilen: yes |
| 13:23 | ibdknox | RickInGA: link? |
| 13:23 | babilen | dnolen: Perfect -- Exactly what I needed. |
| 13:23 | RickInGA | ibdknox http://blog.darevay.com/2012/03/best-of-clojurewest-2012/ |
| 13:30 | jonasen | dnolen: definitely! It's implemented (with some small changes) in the 'more-logic' branch |
| 13:32 | ibdknox | jonasen: dnolen: have you guys used core.logic over the analyzer much yet? |
| 13:32 | dnolen | jonasen: excellent |
| 13:33 | jonasen | ibdknox: I have not. But I've been thinking about doing it |
| 13:33 | dnolen | ibdknox: I haven't tried that. |
| 13:33 | ibdknox | I was tinkering a little last night. I think we'll be able to do some really neat stuff with it |
| 13:33 | dnolen | ibdknox: definitely! |
| 13:34 | jonasen | Bringing the analyzer into kibit is definitely a goal |
| 13:35 | jonasen | I've used ambrosebs analyzer in another lint tool: https://github.com/jonase/eastwood |
| 13:35 | jonasen | but there's no core.logic there yet |
| 13:35 | technomancy_ | can you have it warn if anyone uses java.util.Date. =) |
| 13:37 | ibdknox | lol |
| 13:37 | jonasen | technomancy_: maybe it should :). Currently it looks for 'Deprecated' annotations |
| 13:37 | ibdknox | for my sanity project, I'm working on a touch-based interface for code exploration (and eventually writing) :D |
| 13:56 | gtrak | hey guys, does clojure avoid using permgen for classes due to its classloader, and is that also true for AOT stuff? |
| 13:58 | gtrak | hmm, on further reading it looks like the ethereal classloader is only for the repl? |
| 14:23 | ekoontz_ | is there a way to tell leiningen to look in search.maven.org for jars i wonder? |
| 14:24 | ekoontz_ | 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:24 | ekoontz_ | well, actually find http://search.maven.org/remotecontent?filepath=org/apache/hadoop/hadoop-core/1.0.1/hadoop-core-1.0.1.jar |
| 14:25 | lynaghk | Is 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:25 | gtrak | ekoontz_, well, search.maven.org uses maven central, why not just add the dep? |
| 14:25 | lynaghk | ekoontz_, you should be able to add extra repository URLs in your project.clj |
| 14:25 | ekoontz_ | gtrak, lynaghk, thanks, cool |
| 14:26 | gtrak | ekoontz_, just to clarify, it's not an 'extra' repository, it's the standard one that's always available, along with clojars |
| 14:27 | ekoontz_ | gtrak: well to be honest, i'm not sure how to add new urls..looking for the big example project.clj :) |
| 14:27 | dnolen | lynaghk: btw, C2 looks great, the site is nice as well. |
| 14:27 | technomancy_ | ekoontz_: if you specify the dependency correctly you don't need to do anything else. what did you try? |
| 14:28 | ekoontz_ | hi technomancy_, https://github.com/ekoontz/hsk/blob/master/project.clj |
| 14:28 | lynaghk | dnolen: 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:28 | ekoontz_ | that's what i've got right now |
| 14:28 | gtrak | ekoontz_, [org.apache.hadoop/hadoop-core "1.0.1"] is what you add to dependencies in project.clj |
| 14:28 | ekoontz_ | oh.. |
| 14:29 | ekoontz_ | it's the SNAPSHOT that's causing problems, isn't it |
| 14:30 | ekoontz_ | cool that did it, thanks guys |
| 14:30 | tomoj | one should probably put hadoop in dev-dependencies |
| 14:30 | geoffeg_c | technomancy: 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:30 | tomoj | dunno, though.. if you need to run outside the context of a hadoop job.. |
| 14:31 | technomancy_ | geoffeg_c: sure. what Emacs are you running, and have you added the marmalade package repository? |
| 14:32 | ekoontz_ | tomoj, yeah, it seems from my understanding that dev-dependencies would not work |
| 14:32 | ekoontz_ | since we need the hadoop jar at runtime |
| 14:32 | geoffeg_c | GNU 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:33 | ekoontz_ | technomancy_ thanks again for the great swarm session at clojure west |
| 14:33 | tomoj | will you be running an uberjar? |
| 14:33 | technomancy_ | ekoontz_: glad you liked it. =) |
| 14:34 | ekoontz_ | tomoj: no, i don't think i need an uberjar |
| 14:34 | tomoj | how do you run it, then? `lein run`? |
| 14:34 | ekoontz_ | lein clean, jar, test |
| 14:34 | ekoontz_ | is pretty much all it does :) |
| 14:34 | tomoj | the problem is, say I use a different version of hadoop than you require |
| 14:35 | tomoj | now I have two hadoop jars on my classpath when trying to run a job? |
| 14:35 | technomancy | geoffeg_c: if you've done (add-to-list ...), be sure you hit M-x package-refresh-contents to load in the source listing |
| 14:35 | geoffeg_c | technomancy_: "Error during download request: Not found" |
| 14:35 | tomoj | or just the one old version when running from lein |
| 14:35 | tomoj | s/old/different/ |
| 14:36 | ekoontz_ | tomoj: are you saying don't specify a version number in project.clj? |
| 14:36 | tomoj | I'm saying put it in dev-deps :) |
| 14:36 | tomoj | it will be on the classpath for `lein test`, it just won't get put into uberjars |
| 14:36 | ekoontz_ | oh..and then make an uberjar with hadoop 1.0.1 or whatever version is explicitly given in project.clj |
| 14:36 | ekoontz_ | ? |
| 14:36 | technomancy | geoffeg_c: either a network issue or a typo in the repository URL I guess |
| 14:37 | tomoj | no, if you make an uberjar to submit to hadoop, hadoop should not be inside the uberjar |
| 14:37 | ekoontz_ | i see hmm |
| 14:37 | geoffeg_c | technomancy: i see a ~/.emacs.d/elpa/archives/marmalade/ |
| 14:37 | tomoj | if you make an uberjar to run on your own outside of hadoop, then this won't work |
| 14:37 | geoffeg_c | and archive-contents in that dir |
| 14:37 | ekoontz_ | tomoj, let me try that (moving to dev-dependencies) |
| 14:38 | tomoj | that 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:39 | ekoontz_ | right..because hadoop won't be in the hsk uberjar |
| 14:44 | ekoontz_ | fixed and pushed, thanks tomoj |
| 14:48 | ekoontz_ | would be nice in leiningen to have a way to list preferered versions and back off to others if they're not found |
| 14:48 | ekoontz_ | like specify 1.0.1-SNAPSHOT, but if it's not there, 1.0.1 |
| 14:49 | technomancy | ekoontz_: checkout dependencies might be a better solution for that |
| 14:49 | technomancy | specify 1.0.1 in project.clj, but your local copy can use an in-development checkout |
| 14:50 | ekoontz_ | thanks |
| 14:51 | ekoontz_ | 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:52 | ekoontz_ | (that is you put -SNAPSHOT as part of the jar file name |
| 14:52 | ekoontz_ | so you'd need to break that convention to install the jar i think |
| 14:52 | technomancy | yeah, that's not what checkout deps are for |
| 14:52 | ekoontz_ | for lein to find it |
| 14:52 | technomancy | but I don't think it would work for maven projects anyway |
| 14:52 | technomancy | if you need features from the snapshot version, you must specify it in project.clj |
| 14:53 | ekoontz_ | fair enough :) |
| 14:53 | technomancy | and if it's not in the standard repos, you should get it into a snapshot repo |
| 14:53 | geoffeg_c | technomancy: i nuked .emacs_d and things seem to be working |
| 14:53 | technomancy | ekoontz_: unless you're the only one working on the project; then mvn install:install-file is OK |
| 14:57 | ekoontz_ | 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:03 | septomin | ibdknox: around? |
| 15:04 | ibdknox | septomin: sup? |
| 15:04 | septomin | just wanted to say thanks for hosting the friday session |
| 15:05 | septomin | i asked about opinionated interfaces |
| 15:05 | ibdknox | ah, of course! |
| 15:06 | ibdknox | glad it was of some use |
| 15:06 | septomin | it went in interesting directions |
| 15:07 | septomin | I'm still amazed that a library of ~1kloc is not only useful but one of the most popular |
| 15:07 | Raynes | Noir? |
| 15:07 | clojurebot | noir is great |
| 15:07 | ibdknox | lol |
| 15:07 | amalloy | nice work, clojurebot |
| 15:07 | ibdknox | who added that one? |
| 15:07 | amalloy | ibdknox: i wouldn't be astonished to learn he picked it up by accident |
| 15:08 | Raynes | nosrsly, are you talking about noir? |
| 15:08 | ibdknox | amalloy: smart bot, that one ;) |
| 15:09 | samaaron | he's clearly not talking about overtone |
| 15:09 | clojurebot | Huh? |
| 15:09 | samaaron | ~1kloc would be soo much easier to handle :) |
| 15:09 | clojurebot | It's greek to me. |
| 15:10 | ibdknox | samaaron: how big is overtone now? |
| 15:10 | Wild_Cat | I still need to watch the video of that Overtone clojure/conj presentation that blew everyone away |
| 15:10 | samaaron | ibdknox: i was just about to look |
| 15:10 | samaaron | i think it's about 25k with all libs |
| 15:11 | ibdknox | that's quite the clojure project then |
| 15:11 | samaaron | yeah, it's a big effort |
| 15:11 | samaaron | and we're only getting started |
| 15:11 | ibdknox | :) |
| 15:11 | samaaron | hopefully user contributed sounds and fx will ramp that number up |
| 15:12 | septomin | i looked last night, find . -name "*.clj" | wc -l for noir is like 1100 something, including some sample code i think |
| 15:12 | TimMc | samaaron: So, that "<3 <3 <3" I sent you was because I started playing with Overtone and independently discovered binaural beats. |
| 15:12 | Wild_Cat | TimMc: what's a binaural beat? |
| 15:12 | samaaron | TimMc: awesome |
| 15:13 | TimMc | Wild_Cat: Are you familiar with what happens when you play two sine waves of nearby frequencies at the same time? |
| 15:13 | Wild_Cat | TimMc: you get partial cancellations/comb filtering of sorts, correct? |
| 15:13 | TimMc | There's an aliasing effect that makes it sounds like wib-wib-wib-wib |
| 15:13 | TimMc | right |
| 15:14 | samaaron | Wild_Cat: it's best experienced by trying it out in Overtone ;-) |
| 15:14 | TimMc | Definitely. |
| 15:14 | Wild_Cat | samaaron: this is my work machine, I don't have it installed :D |
| 15:14 | samaaron | (demo (+ (sin-osc 440) (sin-osc 441))) |
| 15:14 | tomoj | it happens with headphones too, is the weird thing |
| 15:14 | TimMc | right |
| 15:14 | samaaron | ok, eating time for me |
| 15:14 | Wild_Cat | wib-wib-wib? Is that like midrangey dubstep? :p |
| 15:14 | samaaron | haha |
| 15:15 | TimMc | heh |
| 15:15 | Bronsa | lol |
| 15:15 | samaaron | the dubstep I created was similar - only with saw waves |
| 15:15 | samaaron | and also a modulated low pass filter |
| 15:15 | samaaron | (which was modulated with a triangle wave) |
| 15:15 | ekoontz_ | we need a irc bot like clojurebot but plays the music through your speakers |
| 15:15 | samaaron | that would rock |
| 15:15 | Wild_Cat | +1 |
| 15:15 | TimMc | I was having hella fun with just (+ (sin-osc (mouse-x:kr 50 500 EXP)) (sin-osc (mouse-y:kr 50 500 EXP))) |
| 15:16 | Wild_Cat | Overtone radio. |
| 15:16 | samaaron | haha, the simplest things are often the most fun |
| 15:16 | samaaron | it really is surprising how joyful it is to control your own sounds |
| 15:16 | TimMc | Anyway, try this in Overtone via headphones: (demo 60 (sin-osc [500 (mouse-y 500 530)])) and move your mouse up and down. |
| 15:16 | Wild_Cat | hmm... That kind of stuff might be fun to control via a Kaoss Pad and modulate a guitar through |
| 15:17 | samaaron | totally |
| 15:17 | samaaron | yeah, that's a "find your favourite beat" synth |
| 15:17 | samaaron | it can make some people woozy |
| 15:18 | TimMc | samaaron: Did you see my idea about using Marginalia with Overtone libs and putting pre-rendered demo clips next to each synth? |
| 15:18 | samaaron | i'm very keen on that |
| 15:18 | samaaron | i think the examples dir would be the best place to start |
| 15:18 | samaaron | right, i do need to eat now |
| 15:18 | samaaron | bbl |
| 15:19 | Bronsa | if only i was able to setup jack |
| 15:26 | TimMc | Bronsa: What OS? |
| 15:26 | Bronsa | linux |
| 15:26 | Bronsa | well, ubuntu |
| 15:27 | TimMc | `jackd -r -d alsa -r 44100` worked on my Ubuntu box, although it did lock out all other audio while it was running |
| 15:27 | TimMc | Failed on my Linux Mint box. |
| 15:28 | Bronsa | let's have a try. |
| 15:28 | TimMc | I couldn't figure out qjackctl |
| 15:28 | Bronsa | yeah, me neither |
| 15:28 | Bronsa | on arch linux i was able to get jack working easly |
| 15:29 | Bronsa | well, nevermind. |
| 15:29 | Iceland_jack | Well I'm a hard worker |
| 15:29 | TimMc | Haha, are we highlighting you? |
| 15:29 | Iceland_jack | yes ;) |
| 15:29 | Bronsa | lol |
| 15:44 | si14 | is there any decent way to use websockets in clijurescript? |
| 15:45 | si14 | *clojurescript |
| 15:51 | tomoj | si14: https://groups.google.com/d/topic/clojure/3nCW2FtCYys/discussion |
| 15:51 | tomoj | https://github.com/neotyk/ws-cljs/ |
| 15:58 | 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:01 | muhoo | also, w.r.t. overtone and dubstep, this tutorial might be useful: http://www.youtube.com/watch?v=QBStbd2B8Jk |
| 16:02 | Bronsa | 20: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:02 | Bronsa | ops. |
| 16:03 | ibdknox | muhoo: because I set :main in your project |
| 16:03 | muhoo | aha |
| 16:04 | muhoo | i guess i don't fully understand what trampoline does, or doesn't do. |
| 16:04 | geoffeg_c | technomancy: hmm.. trying clojure-jack-in: "error in process filter:make client process failed"? |
| 16:07 | technomancy | geoffeg_c: maybe it can't find leiningen? |
| 16:08 | geoffeg_c | technomancy: yea, i had that error earlier and threw lein in my .zshenv PATH |
| 16:10 | Wild_Cat | muhoo: also see http://www.youtube.com/watch?v=IEdGA-FmENY |
| 16:11 | technomancy | geoffeg_c: emacs isn't going to launch zsh just to find leiningen though |
| 16:11 | Wild_Cat | (which is part of what I was thinking of when I suggested controlling modulators hooked to a real instrument through Overtone) |
| 16:11 | geoffeg_c | technomancy: the first time i tried clojure-jack-in i got an error saying zsh couldn't find lein in the path |
| 16:12 | technomancy | oh, ok; I guess there's more going on there than I thought |
| 16:14 | technomancy | geoffeg_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:14 | geoffeg_c | poop |
| 16:14 | geoffeg_c | i mean "thanks, i'll check that out" |
| 16:15 | geoffeg_c | next year there should be a "getting emacs and vi working for clojure development" talk at clojure wst |
| 16:15 | geoffeg_c | west too |
| 16:18 | technomancy | it would either be a short talk or an infinitely long one |
| 16:18 | technomancy | because getting it right only takes a few steps, but there are an infinite number of ways to mess it up |
| 16:19 | muhoo | there 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:20 | TimMc | technomancy: Infinite? Hey now, most of us are still using finite state machines. |
| 16:20 | technomancy | TimMc: well, assuming infinite disk space |
| 16:20 | technomancy | s3 over fuse or something |
| 16:20 | TimMc | heh |
| 16:22 | amalloy | (comp vec list)...? isn't that just...vector? |
| 16:22 | Raynes | Haha |
| 16:23 | muhoo | no |
| 16:23 | muhoo | &(vec "foo") |
| 16:23 | lazybot | ⇒ [\f \o \o] |
| 16:23 | amalloy | &(vector "foo") |
| 16:23 | lazybot | ⇒ ["foo"] |
| 16:23 | muhoo | &(vec (list "foo")) |
| 16:23 | lazybot | ⇒ ["foo"] |
| 16:23 | muhoo | oh, vector not vec |
| 16:25 | TimMc | polyrhythms! |
| 16:25 | ropeters | Could someone explain ~@ ? |
| 16:25 | muhoo | learning clojure is like learning chinese. there's like 2000 characters and you can't really communicate till you memorize all of them |
| 16:25 | ropeters | Keep running into it in 4clojure solutions |
| 16:25 | amalloy | anyway, i would just write that as ##(map vector ["foo" "bar" "baz"] (cycle ["blah" "doh"])), muhoo |
| 16:25 | lazybot | ⇒ (["foo" "blah"] ["bar" "doh"] ["baz" "blah"]) |
| 16:25 | TimMc | ropeters: ~@ is a splicing unquote, only meaningful inside ` |
| 16:26 | amalloy | all 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:26 | muhoo | amalloy: thanks! |
| 16:26 | ropeters | TimMc: thanks |
| 16:26 | TimMc | &(let [x [1 2 3]] `(:a :b :c ~@x :d :e :f)) |
| 16:26 | lazybot | ⇒ (:a :b :c 1 2 3 :d :e :f) |
| 16:28 | TimMc | muhoo: I remember learning to play that polyrhythm. (It's the only one I know.) |
| 16:28 | muhoo | TimMc: i'm a good musician and an awful coder. however, poverty sucks, so i'm trying to learn to be a competent coder. |
| 16:28 | TimMc | heh |
| 16:30 | muhoo | i have a looong way to go :-/ |
| 16:31 | ieure | Can you use loop/recur with lazy-seq? |
| 16:31 | ieure | Guessing no. |
| 16:32 | technomancy | ieure: you generally don't need to |
| 16:33 | ieure | technomancy, I'm concerned about holding references to stuff in this lazy seq fn. |
| 16:33 | ieure | I need to check a val before calling back. |
| 16:33 | ieure | Or maybe I'm just not using lazy-seq right |
| 16:34 | ieure | (defn x [] (lazy-seq (let [y …] (when y (cons y (x)))))) |
| 16:34 | ieure | Essentially. |
| 16:36 | ieure | Looks like if-let is really what I want here. |
| 16:39 | geoffeg_c | looks like "lein swank" lies when it says "connection opened on localhost port 4005" |
| 16:39 | TimMc | ieure: I think that's all if-let does. |
| 16:40 | TimMc | &(macroexpand-1 '(if-let [x 4] 5 6)) |
| 16:40 | lazybot | ⇒ (clojure.core/let [temp__3695__auto__ 4] (if temp__3695__auto__ (clojure.core/let [x temp__3695__auto__] 5) 6)) |
| 16:41 | TimMc | Oh, cute. |
| 16:41 | geoffeg_c | yep, 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:43 | tomoj | put `ping localhost` works as expected? |
| 16:43 | tomoj | why could that be? |
| 16:43 | TimMc | Unix sockets vs. TCP? |
| 16:44 | arohner | tomoj, is localhost in your /etc/hosts? It's sometimes broken for me on Ubuntu 11.10 |
| 16:44 | arohner | geoffeg_c: ^ |
| 16:44 | tomoj | ubuntu 11.10 sometimes gives you a broken /etc/hosts? |
| 16:44 | amalloy | heh, i remember a similar problem someone had. he swore he could ping localhost:4005, despite ping being an IP tool rather than TCP |
| 16:44 | TimMc | I 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:44 | tomoj | or localhost doesn't work for other reasons sometimes? |
| 16:45 | geoffeg_c | localhost is in /etc/hosts on OS X, yea. removing localhost from /etc/hosts is a dangerous thing |
| 16:45 | arohner | tomoj: localhost is not present in /etc/hosts for me, on the AWS official image |
| 16:45 | TimMc | Hah, weird. |
| 16:45 | amalloy | it turned out his dns server was reporting localhost:4005 as some server in russia |
| 16:45 | geoffeg_c | sorry. localhost IS present in /etc/hosts |
| 16:46 | technomancy | maybe the /etc/hosts version of localhost is pushing ipv6 and your emacs or jvm build isn't compiled with ipv6? |
| 16:46 | geoffeg_c | possibly, i've been meaning to get jdk1.7 working on my mac for a while so i'll try that tonight |
| 16:46 | TimMc | amalloy: Ouch. |
| 16:47 | amalloy | TimMc: that shouldn't matter, of course, unless you're crazy enough to use $ ping localhost:4005 as a debugging tool |
| 16:48 | muhoo | TimMc: 11 over 5 polyrhythm, but reduces down basically to 2 over 3: http://bace.s3.amazonaws.com/5-over-11.ogg |
| 16:50 | romanandreg | dnolen: hey, I pushed a new patch for the bug on cljs, I took care of the broken tests and added a few more |
| 16:53 | TimMc | muhoo: Funky. I don't have enough musical training to pull out the rhythms, though. :-( |
| 16:53 | TimMc | All I can tell is that something unusual is going on, rhythmically. |
| 16:56 | Wild_Cat | muhoo: where's the 11? All I can pick out is the 5. |
| 16:56 | Luyt_ | Muhoo: Interesting clip. Who are the musicians/band, and what is the track title? |
| 16:57 | muhoo | an old band of mine. i'm playing keyboards |
| 16:58 | muhoo | the song is part of a medley, the transition between this bizarre thing in 11, transitioning to "morning bell" by radiohead |
| 16:58 | muhoo | which is in 5 |
| 16:59 | Luyt_ | 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:59 | muhoo | so the bass and left hand is 11, subdivided into 3 somehow i don't remember, and the chords are 2 groups of 5. |
| 17:00 | muhoo | Luyt_: brubeck classic, i like the paddy milner version |
| 17:00 | Luyt_ | He did however display some SQL knowledge, so we hired him. Other candidates couldn't even formulate a SELECT query. |
| 17:01 | Luyt_ | muhoo: I only know the Brubeck version... |
| 17:02 | sritchie | cemerick! I have a quick question about clutch |
| 17:02 | sritchie | cemerick: do you know of any way to use a clojure view server on Cloudant? |
| 17:03 | sritchie | cemerick: 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:03 | Luyt_ | ...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:03 | ibdknox | SELECT query + SQL = data |
| 17:03 | ibdknox | ^ formulated |
| 17:03 | ibdknox | :D |
| 17:03 | muhoo | if 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:03 | dnolen | romanandreg: I looked at it, why don't understand why we need generate a fn for handling arity? |
| 17:03 | ibdknox | uhhh |
| 17:03 | dnolen | I don't understand, I mean. |
| 17:04 | romanandreg | dnolen: the single arty version for both str* and str is different |
| 17:04 | ibdknox | that is a normalization hyper-failure |
| 17:04 | Luyt_ | 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:04 | ibdknox | lol |
| 17:04 | cemerick | sritchie: No, you can't use a Clojure view server on cloudant. There are a couple of alternatives, though. |
| 17:04 | romanandreg | we were using the multi arity function of str* for str |
| 17:04 | romanandreg | that's why the bug was there |
| 17:04 | romanandreg | we can either |
| 17:04 | romanandreg | copy paste the code |
| 17:04 | ibdknox | Luyt_: I don't really know how to write SQL either.. I get the computer to do it for me ;) |
| 17:04 | sritchie | cemerick: I was thinking of writing a pallet deploy, but other options for local/remote couch would be great |
| 17:04 | romanandreg | or… just generate a function that gets the simple arity function as a parameter |
| 17:04 | muhoo | ibdknox: i'm kind of a normalization fetishist, yes. |
| 17:05 | cemerick | sritchie: (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:05 | Luyt_ | 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:05 | cemerick | or, (b) write your views in ClojureScript |
| 17:05 | romanandreg | s/arty/arity/g |
| 17:05 | sritchie | cemerick: oh, that's interesting |
| 17:05 | sritchie | cemerick: that would take away all config issues, I guess |
| 17:05 | ibdknox | Luyt_: I was mostly kidding. I think everyone should learn some |
| 17:05 | cemerick | sritchie: https://github.com/clojure-clutch/clutch-clojurescript |
| 17:06 | sritchie | you'd rec that over running my own install of couch, I suppose? |
| 17:06 | dnolen | romanandreg: 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:06 | cemerick | Yes, it's far superior to mucking with a custom view server IMO |
| 17:06 | ibdknox | if for no other reason to realize why things are hard lol |
| 17:06 | sritchie | cemerick: okay, great |
| 17:06 | Luyt_ | ibdknox: We've tried bolting some ORMs onto our data model, but ORMs clearly have their shortcomings. |
| 17:06 | sritchie | cemerick: any thoughts on a good local dev environment? |
| 17:06 | muhoo | Luyt_: http://www.youtube.com/watch?v=4sRYrKYFXZU |
| 17:06 | sritchie | working on a homebrew install, but I'm grappling with |
| 17:06 | sritchie | {'EXIT',"Driver compiled with incorrect version of erl_driver.h"} |
| 17:06 | Luyt_ | muhoo: Thanks! |
| 17:07 | ibdknox | Luyt_: I've written three ORMs, in the end I dumped all of them. :) That's why I wrote korma instead |
| 17:07 | cemerick | sritchie: 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:07 | dnolen | romanandreg: and by better, I mean eliminating str* |
| 17:07 | geoffeg_c | is 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:07 | sritchie | cemerick: I'll see if I can get around to it before you |
| 17:07 | romanandreg | dnolen: 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:07 | ibdknox | cemerick: I want to try a public priority queue experiment |
| 17:07 | romanandreg | str* is being used in some other places, it seems you need a str function that doesn't pay attention on keywords and symbol |
| 17:07 | romanandreg | s |
| 17:07 | sritchie | ibdknox: reddit? |
| 17:08 | muhoo | i'm weird. i look at lazy seqs and zippers and i think polyrhythms for some reason. |
| 17:08 | ibdknox | sritchie: but for my todo-list |
| 17:08 | cemerick | sritchie: 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:08 | romanandreg | that's why it broke in the first place, probably fix the functions that I broke initially to use something different from str |
| 17:08 | cemerick | Look under downloads for an OS X build. |
| 17:08 | romanandreg | ? |
| 17:08 | ibdknox | sritchie: I guess I could use reddit as the mechanism to do that.. you can just create random subreddits right? |
| 17:08 | dnolen | romanandreg: yes also, there nothing wrong with code duplication here. correct behavior is more important. |
| 17:08 | cemerick | I'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:09 | sritchie | ibdknox: yup, don't know how well it would map to your todo list, but you can |
| 17:09 | cemerick | ibdknox: with a slick viz, presumably? Otherwise, it's a plan file |
| 17:09 | sritchie | I tried it for getting ideas for large-scale data tutorials out of the cascading community |
| 17:09 | sritchie | http://www.reddit.com/r/Cascading/comments/qnodc/cascading_tutorial_ideas/ |
| 17:09 | cemerick | oh, you mean something interactive so others can upvote, etc? |
| 17:09 | sritchie | got one comment :) |
| 17:09 | ibdknox | cemerick: I meant more one that other people could prioritize/add to, I'm curious what the result would be |
| 17:09 | ibdknox | yeah |
| 17:10 | romanandreg | dnolen: 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:10 | sritchie | cemerick: great, so any code that works with this local rcouch instance will work with the remote cloudant instance |
| 17:10 | romanandreg | dnolen: don't know exactly why do you need the function str*, the documentation just says: "internal usage only"... |
| 17:11 | dnolen | romanandreg: lemme check where we use it. |
| 17:11 | sritchie | cemerick: (just a cautionary double check to make sure I'm going down the right road :) |
| 17:11 | dnolen | romanandreg: we need str* for symbol and keyword constructor fns. |
| 17:12 | dnolen | romanandreg: str* is lower level str concat form which doesn't handle symbols or keywords. |
| 17:12 | romanandreg | dnolen: ok, so str should not use str* multiple arity version |
| 17:12 | romanandreg | because str needs to pay attention on escaping keywords and symbols correctly |
| 17:14 | romanandreg | dnolen: I'll just replicate the StringBuffer code in both str and str* and submit a new patch, does that sounds good? :-) |
| 17:14 | dnolen | romanandreg: oh yes, I understand now. yes str can't call str* multiple arity case. |
| 17:16 | dnolen | romanandreg: 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:17 | romanandreg | dnolen: awesome… going to work on the new patch then |
| 17:17 | cemerick | sritchie: code, as in, js views? Yes, should. |
| 17:18 | dnolen | romanandreg: cool, thx. |
| 17:18 | cemerick | There's the mozjs statement/expression wonkiness, but I'm still not clear on the practical effect of that for us (users). |
| 17:20 | sritchie | cemerick: sounds good to me. thanks, man |
| 17:21 | cemerick | sritchie: 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:21 | cemerick | Hopefully the cljs compilation APIs and such won't move around much… :-) |
| 17:21 | gfredericks | am I correct that there is fundamentally no way to add to the beginning of a vector in sub-linear time? |
| 17:21 | si14 | tomoj: thanks |
| 17:22 | sritchie | cemerick: so if I have this view code somewhere in a cljs namespace that gets required, |
| 17:22 | sritchie | my couchdb server will go ahead and create the view |
| 17:22 | sritchie | and then I can access it using the clutch api from clojure |
| 17:22 | technomancy | gfredericks: yeah, you need finger trees for that |
| 17:23 | gfredericks | technomancy: I shoulda made a bet |
| 17:23 | cemerick | sritchie: yes; couch knows nothing about cljs itself though. The cljs view is just another js view to it. |
| 17:23 | cemerick | ibdknox: don't troll me, bro |
| 17:23 | cemerick | :-D |
| 17:23 | ibdknox | hahaha |
| 17:23 | ibdknox | cemerick: http://imgur.com/gallery/04937 |
| 17:23 | sritchie | cemerick: yup, definitely, just getting a feel for the workflow of making sure a view exists |
| 17:23 | cemerick | sure |
| 17:24 | sritchie | I guess a namespace with a bunch of bare "add-view" calls would work |
| 17:24 | cemerick | sritchie: you can certainly use clutch-clojurescript as-is to see how it works |
| 17:24 | sritchie | okay, I'll look at that project for examples to get a feel for how you develop against this |
| 17:24 | cemerick | oh, of course my meticiously-produced asciidoc readme is mangled by github, but try to ignore that |
| 17:25 | cemerick | sritchie: there's no standalone examples or tests (?!?!), just what's in the readme. |
| 17:25 | cemerick | ping if you hit a pothole tho |
| 17:25 | sritchie | k |
| 17:26 | sritchie | it makes sense to me that a database is created the first time I try to access it -- |
| 17:26 | sritchie | I suppose I should be thinking of a view in the same way |
| 17:26 | sritchie | always access the view by sending in its map and reduce functions all will work fine |
| 17:26 | cemerick | That 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:26 | sritchie | and 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:26 | sritchie | I hope I can help w/ the infrastructure once I get this working a bit better |
| 17:26 | cemerick | Yes, that's just about the right way to think of it. |
| 17:27 | cemerick | A view *is* a couch db, with the sole restriction that you can't produce other views from a view. |
| 17:27 | cemerick | something that is apparently being considered for future revs. |
| 17:30 | ibdknox | emezeske: 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:30 | emezeske | ibdknox: Cool. I think maybe I'm behind the times, I don't know what new organization you speak of |
| 17:31 | emezeske | ibdknox: BTW, I'm pissed that I didn't get to talk to you this weekend |
| 17:31 | emezeske | ibdknox: I saw you for 3 seconds while an elevator door closed, and then didn't see you again ^_^ |
| 17:31 | ibdknox | I didn't realize you were there |
| 17:31 | ibdknox | I'm a man of shadow ;) |
| 17:31 | emezeske | I was totally going to your unsession, but didn't get back from rock climbing in time :( |
| 17:31 | ibdknox | emezeske: new organization: https://github.com/weavejester/hiccup/tree/master/src/hiccup |
| 17:32 | ibdknox | emezeske: yeah I didn't really think that timing through |
| 17:32 | ibdknox | I thought it would be late enough |
| 17:32 | ibdknox | but with it raining and all, people ended up out a lot later for dinner |
| 17:32 | emezeske | Ahh yeah |
| 17:32 | emezeske | Okay, so he basically busted things out into more granular namespaces? |
| 17:32 | tdrgabi1 | can I use a function before I define it (it's defined later in the file)? |
| 17:32 | emezeske | Looks like things are mostly the same other than that |
| 17:32 | cemerick | emezeske: It's impossible to talk to everyone you want to at a conf. :-) |
| 17:33 | emezeske | tdrgabi1: (doc declare) |
| 17:33 | tdrgabi1 | emezeske: thanks |
| 17:33 | emezeske | cemerick: Yeah, true. There were a *ton* of awesome people to talk to, I think just time-wise it couldn't happen |
| 17:33 | ibdknox | emezeske: yeah, as far as I can tell it's all basically the same |
| 17:34 | ibdknox | cemerick: emezeske: I'm sad I missed talking with fogus again :( |
| 17:34 | emezeske | ibdknox: :) |
| 17:35 | technomancy | emezeske: I didn't realize you were at the conf; sorry to miss you. |
| 17:35 | emezeske | ibdknox: I might have time to reorganize the crate pullreq to be like hiccup tonight |
| 17:35 | emezeske | technomancy: That's okay, it's my fault for not running you down |
| 17:35 | ibdknox | emezeske: 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:36 | ibdknox | emezeske: seriously, he's like the tallest guy there - hard to miss |
| 17:36 | wink | ibdknox: 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:36 | emezeske | ibdknox: Haha, that's what everyone kept telling me. They also said he might be on a unicycle with keyboard pants |
| 17:37 | ibdknox | wink: 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:37 | ibdknox | emezeske: lol |
| 17:37 | gtrak | is processing-js close enough to the java one for a port of quil to make sense? |
| 17:37 | technomancy | yeah, chewbranca didn't make it, so I got to be the tallest |
| 17:38 | redinger | However, I did not see a unicycle |
| 17:38 | wink | ibdknox: 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:38 | ibdknox | technomancy: do you own a unicycle? |
| 17:38 | technomancy | I do not |
| 17:39 | technomancy | only a blog post about unicycles |
| 17:39 | septomin | technomancy: swarm coding was sweet. I was the guy who was flailing around with paredit on |
| 17:39 | technomancy | septomin: great! =D |
| 17:39 | technomancy | I always forget to turn it off for those kinds of things |
| 17:39 | wink | your conferences sound a lot more fun than the ones I attended |
| 17:40 | ibdknox | wink: ah, yeah that's why I tend not to use them, I don't like littering my markup with classes. |
| 17:40 | y3di | does anyone a good estimation for when the clojure west vids will start goin up? |
| 17:40 | ibdknox | wink: btw, you can use the shortcut [:div.someclass.someotherclass ..] to make that a lot less painful |
| 17:40 | septomin | I wonder if anyone's implemented some kind of simultaneous diff-merge thing in emacs, sort of wavey |
| 17:40 | ibdknox | y3di: it took a few months for the strange loop ones I think |
| 17:41 | ibdknox | er a couple months I guess |
| 17:41 | ibdknox | not a few |
| 17:41 | technomancy | septomin: yeah, rudel uses the same inclusion transformation algorithms as wave IIRC |
| 17:41 | wink | ibdknox: if only. for a form I need [:fieldset.control-group (label {:class "wtf"} ...) (input-field {:class "foo" |
| 17:41 | ibdknox | ah |
| 17:41 | wink | ibdknox: it was a quick look, but I think it's really unsuitable for hiccup |
| 17:41 | wink | you'd need a hiccup-bootstrap fork I'd say |
| 17:42 | ibdknox | wink: sounds like mustache or comb would be a much better fit |
| 17:42 | ibdknox | wink: weavejester was working on such a thing |
| 17:42 | ibdknox | I think |
| 17:42 | weavejester | I plan to, but I haven't started yet :) |
| 17:42 | wink | ibdknox: yea. wasjust curious because a colleague of mine was very happy with bootstrap :) |
| 17:42 | weavejester | I have some time set aside in a couple of weeks to start. |
| 17:42 | weavejester | Hiccup + bootstrap seem a natural fit. |
| 17:42 | y3di | ibdknox: ah so long =/ |
| 17:42 | wink | if you do usual "*.tpl" it's kind of not a great deal |
| 17:43 | aperiodic | swarm coding was super fun |
| 17:43 | wink | weavejester: 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:44 | aperiodic | i hope to do it again once we actually have a clojure user group around these parts |
| 17:44 | wink | wait. now I see it. right there in the docs. |
| 17:44 | ibdknox | wink: he added it recently |
| 17:44 | ibdknox | based on some discussion in here |
| 17:44 | ekoontz_ | aperiodic: i enjoyed it a lot too |
| 17:44 | wink | hehe |
| 17:45 | ibdknox | weavejester: is there anything new in hiccup aside from the reorg? |
| 17:45 | ibdknox | weavejester: we're working on making crate match up |
| 17:45 | weavejester | ibdknox: For 1.0? Nope. |
| 17:46 | ibdknox | weavejester: okidoke :) |
| 17:46 | weavejester | ibdknox: For 1.1 I'll replace the compiler, but I want to get Ring 1.1 out first. |
| 17:46 | ibdknox | weavejester: anything end-user there? Or just better/more efficient? |
| 17:46 | aperiodic | ekoontz_: were you in the go group? |
| 17:46 | ekoontz_ | sure was, were you? |
| 17:47 | aperiodic | yup! I was the vim user that keep messing things up |
| 17:47 | aperiodic | *kept |
| 17:47 | weavejester | ibdknox: It will be able to compile to clojure.xml format, for better Enlive integration (and anything else using clojure.xml format). |
| 17:47 | ekoontz_ | hmm i don't remember any vim users :) |
| 17:47 | weavejester | ibdknox: I was also probably going to use core.logic to add in more optimizations. |
| 17:47 | ibdknox | VIM users ftw |
| 17:47 | ekoontz_ | thought we had you guys over in the vim ghetto |
| 17:47 | Raynes | Vim power, unite! |
| 17:47 | ibdknox | weavejester: sweet :) |
| 17:48 | aperiodic | i came in late and missed that distinction |
| 17:48 | ibdknox | ekoontz_: you better watch it dude. I'm pretty sure 40% of VIM users are legit crazy |
| 17:48 | wink | lol |
| 17:48 | aperiodic | heh, i was in that elevator with emezeske |
| 17:48 | ekoontz_ | yep i watch my back walking around berkeley |
| 17:48 | wink | think I don't use the same IDE for any 2 languages. |
| 17:49 | wink | phpstorm, VIM (c), CCW |
| 17:49 | wink | hm, maye python also in vim. damn |
| 17:49 | aperiodic | ekoontz_: but yeah, i was sitting next to phil (I was the one who suggested implementing go) |
| 17:49 | ekoontz_ | ah ok, i think you and i were across from each other then |
| 17:50 | aperiodic | ekoontz_: you weren't the one with the HUB sticker on your laptop, were you? |
| 17:50 | muhoo | arthur, IIRC? |
| 17:50 | ibdknox | everyone remember's their position relative to technomancy :p |
| 17:50 | ekoontz_ | aperiodic, that was me yep :) |
| 17:50 | ibdknox | remembers* |
| 17:50 | aperiodic | ekoontz_: are you in portland? |
| 17:50 | ekoontz_ | no, berkeley, CA, but my sister lives there though |
| 17:50 | aperiodic | aw, darn |
| 17:51 | wink | weavejester: how do you render the API docs? |
| 17:51 | ekoontz_ | i like portland a lot though! |
| 17:51 | ekoontz_ | is that where you are? |
| 17:51 | weavejester | wink: Codox: https://github.com/weavejester/codox |
| 17:51 | weavejester | wink: Not yet Lein 2 compatible, but soon! |
| 17:52 | wink | weavejester: thanks. |
| 17:52 | muhoo | if those swarmcoding things use tmux and ssh, is anyone doing them remotely via the net? |
| 17:52 | technomancy | weavejester: anything particularly tricky blocking it? |
| 17:52 | muhoo | seems like it'd be just as convenient to do it over irc or whatever as sitting in a room with laptops |
| 17:52 | aperiodic | ekoontz_: yup. I was hoping to run into some portland folks at the conference, but didn't |
| 17:52 | technomancy | muhoo: not yet AFAIK, but there's no reason you couldn't |
| 17:52 | aperiodic | i think it'd be hard to coordinate without voice |
| 17:53 | technomancy | muhoo: what you don't want to do is have one that's split between real-life and the net |
| 17:53 | technomancy | aperiodic: mumble or something |
| 17:53 | weavejester | technomancy: No, I just need to factor it out into two pieces; a small Leiningen plugin, and a core library. |
| 17:53 | technomancy | that is, http://mumble.sourceforge.net/ |
| 17:53 | technomancy | weavejester: cool |
| 17:53 | muhoo | technomancy: good point. i've tried to do meetings that way, one group always gets left out of the discussion |
| 17:53 | emezeske | muhoo: I was thinking that tmux+ssh+google-hangouts might be a good combo |
| 17:54 | aperiodic | ooh, that's a good idea |
| 17:54 | technomancy | mumble is designed for games, but it's a pretty good fit for swarming too |
| 17:55 | Apage43 | used to use mumble for work conference calls =P |
| 17:55 | aperiodic | does that have a UI, or do you have to recognize voices? |
| 17:55 | Apage43 | it has a UI |
| 17:56 | Apage43 | if you have the window up you can see who you're hearing |
| 17:56 | technomancy | Apage43: how did it work for you? |
| 17:56 | Apage43 | mind, I also really like google hangouts, which switches to the webcam of the speaker |
| 17:56 | technomancy | I don't think having a video feed would scale |
| 17:57 | Apage43 | technomancy: reasonably well. Once we got past a certain size there was always someone who had some kind of audio issue. |
| 17:57 | technomancy | well, it would just require everyone to have a beefy pipe |
| 17:57 | Apage43 | technomancy: right. I've only used hangouts for calls with 5 or so folks. |
| 17:57 | devn | how was clojure/west all? |
| 17:58 | emezeske | devn: Twas awesome |
| 17:58 | devn | i'm "stuck" on the beach at the momenbt |
| 17:58 | devn | moment* |
| 17:58 | devn | hoping to make it to euroclojure if things go according to plan |
| 17:58 | technomancy | Apage43: unfortunately skype is the only one I know of that does that kind of thing peer-to-peer |
| 17:58 | Apage43 | yeah |
| 17:59 | Apage43 | use skype a good bit too |
| 17:59 | septomin | would you expect to scale beyond the equivalent of an in-person swarm? |
| 18:00 | septomin | that seems pretty unwieldy for other reasons |
| 18:00 | technomancy | septomin: no, probably less given the lack of visual cues for speaker collision |
| 18:01 | technomancy | we sorta did it with 4 or 5 at my last job during a couple particularly nasty debugging sessions |
| 18:01 | devn | septomin: im trying to remember which "Look Around You" mentions Harfatum Septomin |
| 18:01 | gfredericks | sounds like a chemistry episode |
| 18:01 | septomin | maths |
| 18:01 | devn | what's the line? |
| 18:01 | devn | oh right |
| 18:02 | septomin | http://2.bp.blogspot.com/_hO11SI_xkrI/TFwqS_-cqTI/AAAAAAAAAcY/0uSRVlLKACM/s1600/lay+01.jpg |
| 18:02 | devn | MATHS => ...Teleharsic Harfatum Septomin |
| 18:02 | devn | can't remember the first two letters |
| 18:02 | gfredericks | haha |
| 18:02 | devn | nice |
| 18:03 | daaku | i'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:04 | gfredericks | daaku: that sounds dangerous when combined with with-redefs |
| 18:04 | gfredericks | s/when/if/ |
| 18:04 | devn | daaku: wish i had a good solution for you. ive been using sauce labs to parallelize test runs against different browsers |
| 18:05 | daaku | gfredericks: haven't used that yet, though i can see that being useful for the non webdriver tests |
| 18:05 | daaku | devn: how did you parallelize them? did you use their snippets or are you using clojure.test? |
| 18:06 | lancepantz | daaku: there are all sorts of reasons not to do that |
| 18:07 | Raynes | TimMc: Did you know that you got paste 666? https://refheap.com/paste/666 |
| 18:07 | daaku | lancepantz: 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:08 | lancepantz | the 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:08 | dakrone | daaku: https://github.com/mtyaka/lein-ptest ymmv |
| 18:08 | lancepantz | and to parallel test with a db, you'll have to multiple dbs for your test environment |
| 18:10 | daaku | it'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:10 | daaku | dakrone: that looks interesting - thanks! |
| 18:11 | lancepantz | fair enough |
| 18:12 | technomancy | dakrone: did you guys try that out? |
| 18:14 | wink | Raynes: did you have any problems with browserid or did it work nicely? |
| 18:14 | TimMc | wink: They had a problem. |
| 18:14 | TimMc | Me. |
| 18:14 | wink | ^666? :) |
| 18:15 | devn | daaku: we're just booting threads for each browser, nothing fancy |
| 18:15 | devn | sauce handles booting up fresh VMs |
| 18:15 | TimMc | 10: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:15 | devn | heh |
| 18:16 | hagna | so how do I catch an exception like #<Stone slingshot.Stone: clj-http: status 503> |
| 18:17 | raek | hagna: that looks like an exception from slingshot |
| 18:18 | raek | it's a library that makes it simple to define new exception types in clojure |
| 18:18 | TimMc | wink: My major problem with it is that even though it is a Mozilla product, it does not work with Firefox's password manager. |
| 18:18 | hagna | raek: yeah I just want to do something different if I get a 503 status vs 404 status |
| 18:18 | raek | if you use the slingshot API, it should be easy to extract the cotained info |
| 18:18 | TimMc | but I hated it even before I tried using it. |
| 18:19 | wink | TimMc: 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:19 | dakrone | technomancy: didn't help much since we were IO bound |
| 18:19 | technomancy | of course |
| 18:19 | hagna | raek: yeah I'm not really sure what to put (catch <in here>) |
| 18:19 | dakrone | hagna: you can catch it with (catch slingshot.Stone e ...), or (catch Exception e ...) |
| 18:20 | dakrone | or (try+ ... (catch [:status 503] e ...)) |
| 18:20 | dakrone | depending on what you want to do with it |
| 18:20 | hagna | (catch [:status 503] e ...) yeah that's it |
| 18:25 | hagna | dakrone: why does [:status ...] e work? |
| 18:26 | dakrone | [:status ...] uses Slingshot's selectors on the map https://github.com/scgilardi/slingshot/blob/master/README.md |
| 18:26 | dakrone | which is why it has to be inside a try+ |
| 18:29 | cjfrisz | Is there a way to create a macro without defmacro, i.e. a macro that has function-local scope? |
| 18:30 | cemerick | weavejester: 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:30 | cjfrisz | Like in Scheme, I'd use: (let-syntax ([x (syntax-rules ...)]) <some code>) |
| 18:30 | weavejester | cemerick: Which version of lein-ring? |
| 18:30 | dakrone | cjfrisz: tools.macro https://github.com/clojure/tools.macro has `macrolet` |
| 18:30 | cemerick | weavejester: 0.6.1 |
| 18:31 | dakrone | and symbol-macrolet |
| 18:31 | cjfrisz | dakrone: is there anything in core? |
| 18:31 | cemerick | actually, an 0.6.2-SNAPSHOT that uses the lein-version-flexible eval-in-project in lein.ring.war |
| 18:31 | cjfrisz | I don't really *have* to avoid defmacro, but I'd like to if I can |
| 18:31 | dakrone | cjfrisz: not that I know of, other than creating your own macrolet |
| 18:32 | hagna | dakrone: might be easier to not raise exceptions as long as I get status back in the response |
| 18:32 | cjfrisz | I'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:32 | weavejester | cemerick: I don't know… I think technomancy might have written that part, unless I'm confusing people. |
| 18:32 | cjfrisz | dakrone: alright, thanks |
| 18:32 | dakrone | hagna: the response will always have the status assuming the connection didn't fail/timeout |
| 18:32 | weavejester | cemerick: I'd have to investigate, but when I tested it manually it seemed to work... |
| 18:33 | technomancy | I 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:34 | weavejester | technomancy: Ah, sorry for not remembering right. I know you ported *something* in lein-ring! |
| 18:35 | weavejester | technomancy: But it sounds like you know the cause of the problem anyway |
| 18:35 | technomancy | it's freaking protocols. |
| 18:35 | technomancy | more trouble than they're worth. =P |
| 18:37 | technomancy | cemerick: are you using a checkout of lein2 or the self-installed preview? |
| 18:38 | cemerick | technomancy: checkout |
| 18:38 | cemerick | shall I scrub classfiles from lein and lein-core? |
| 18:39 | technomancy | yeah, give that a try |
| 18:39 | technomancy | and try my latest push |
| 18:40 | technomancy | I had a classes vs target/classes mismatch that could be biting you |
| 18:40 | technomancy | but 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:42 | cemerick | technomancy: nice, rm-ing classes in leiningen fixed that |
| 18:42 | cemerick | Now to see if it'll flow through to lein-beanstalk nicely |
| 18:46 | eggsby | can 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:47 | eggsby | should take in (build-bucket 2 {:a 1}) and return ([:a] 1) |
| 18:50 | eggsby | anyone have any clue where my hangup might be? |
| 18:50 | aperiodic | eggsby: the let form is double-wrapped, so the returned list is being invoked as a function |
| 18:51 | gfredericks | man I stared at that for a minute and didn't see that just cause it was indented/formatted so weird |
| 18:52 | eggsby | gfredericks: I'm new to clojure, how can I indent it better? |
| 18:52 | gfredericks | eggsby: what editor are you using? |
| 18:52 | eggsby | right now just sublime text |
| 18:53 | gfredericks | I think most clojure code is indented with two spaces, or else to line things up with something above |
| 18:53 | gfredericks | but it usually doesn't end up veering off to the right so strongly |
| 18:54 | gfredericks | also having the open paren with nothing after it doesn't happen |
| 18:54 | gfredericks | that's probably the main reason I didn't see it |
| 18:54 | aperiodic | yeah, it took me a little while because of the indentation |
| 18:55 | gfredericks | eggsby: something like this is closer: http://pastie.org/3631263 |
| 18:56 | gfredericks | probably most people do whatever emacs clojure-mode does |
| 19:14 | Raynes | Every time you use pastie for a Clojure paste, Rich Hickey strangles a Java programmer. |
| 19:15 | gfredericks | that is a statement full of mixed incentives |
| 19:46 | TimMc | gfredericks: I suppose we should distinguish between people who cod ein Java for a living and people who self-identify as "a Java programmer". |
| 19:46 | TimMc | because I imagine an awful lot of Clojure folks do the former but not the latter. |
| 19:47 | gfredericks | TimMc: I saw a funny thingy somewhere about something |
| 19:47 | gfredericks | luckily I tweeted it so I can go find it that way if nothing else |
| 19:47 | tmciver | TimMc: you just don't want to be strangled by Rich Hickey. |
| 19:48 | TimMc | tmciver: I will admit to that being one of my phobias. |
| 19:48 | gfredericks | oh found it; now let's hope the link still has the same thing on it |
| 19:49 | gfredericks | TimMc: https://twitter.com/#!/gfrlog/status/162588289554071552 |
| 19:49 | gfredericks | gotta scroll down a screen or two to the 3 columns |
| 19:50 | wink | TimMc: how would you define self-identifying as a jave programmer? suiting up? :P |
| 19:51 | TimMc | wink: Personal identity. |
| 19:51 | wink | TimMc: only the last part was tongue-in-cheek. what traits do you mean? |
| 19:52 | TimMc | gfredericks: Nice. |
| 19:52 | gfredericks | wink: probably he just means being willing to say "I'm a Java Programmer" |
| 19:52 | wink | gfredericks: when did Java become cool |
| 19:52 | gfredericks | wink: Java didn't, but jave did |
| 19:52 | wink | oh |
| 19:52 | TimMc | haha |
| 19:52 | wink | gfredericks: I'd say a lot of things if the pay is ok :P |
| 19:53 | gfredericks | wink: okay, probably he means being willing to say it to somebody who does not make pay decisions |
| 19:53 | gfredericks | like a peer |
| 19:53 | TimMc | I learned^W started using Java in, like... 2001? |
| 19:53 | gfredericks | TimMc: I was still in diapers |
| 19:53 | gfredericks | in 2001 I mean |
| 19:53 | gfredericks | not when I learned Java |
| 19:53 | TimMc | It was at v1.2 then. I think I picked it up again at v1.5 |
| 19:54 | wink | think it was 1.2 for me as well |
| 19:54 | wink | and I'm not a Java Programmer |
| 19:54 | wink | I'm just using it on and off for... a while |
| 19:54 | TimMc | There were definitely already certification courses. |
| 19:54 | gfredericks | NOW are you a Java Programmer? |
| 19:54 | technomancy | I've been working with Jabba since the Empire Strikes Back |
| 19:54 | wink | maybe I should be a Java Programmer. :P |
| 19:55 | technomancy | oh no, my cover's blown. |
| 19:55 | aperiodic | ~guards |
| 19:55 | clojurebot | SEIZE HIM! |
| 19:55 | wink | technomancy: Return to your J IDE. Now! |
| 19:55 | photex | has anybody used clojure-control recently? |
| 19:55 | technomancy | aperiodic: no disintegrations! |
| 19:56 | photex | I 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:56 | aperiodic | technomancy: unfortunately someone stuck a piranha plant in the sarlacc pit so you'll get off easy |
| 19:57 | photex | I'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:59 | rhc | hmm, 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:59 | ibdknox | big docs update on http://sqlkorma.com |
| 19:59 | ibdknox | all updated to 0.3.0-beta7 |
| 20:00 | rhc | i 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:00 | rhc | should i just use loop/recur? |
| 20:01 | tmciver | rhc: what about (vec (map #(re-find %1 "str") ..))? |
| 20:01 | gfredericks | &(doc keep) might help |
| 20:01 | lazybot | ⇒ "([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:02 | rhc | tmciver: ahh, cause the nil's will removed, thanks |
| 20:03 | tmciver | rhc: hmm, maybe not. |
| 20:03 | tmciver | rhc: vec doesn't remove nils |
| 20:03 | gfredericks | keep does |
| 20:03 | gfredericks | (keep #(re-find % "str") vec-of-regexes) |
| 20:04 | tmciver | gfredericks: ah yes, and then vec the result. |
| 20:04 | gfredericks | if he needs a vector |
| 20:04 | rhc | ah cool |
| 20:04 | rhc | yeah i dont need a vector, just a coll |
| 20:05 | tmciver | rhc: Oh OK, you said you were building anothe vector. |
| 20:05 | rhc | is that still considered best practice? to build up a big list of nils only to destroy it? |
| 20:05 | rhc | tmciver: my mistake |
| 20:05 | gfredericks | rhc: I don't think it "builds up a big list of nils" |
| 20:05 | gfredericks | you don't know which are nil until you try |
| 20:05 | gfredericks | it's not doing anything beyond that |
| 20:05 | rhc | ok |
| 20:05 | gfredericks | unless you mean tmciver's suggestion |
| 20:05 | gfredericks | which is still probably lazy |
| 20:05 | gfredericks | and thus not much different |
| 20:05 | rhc | i mean yours, i was wondering if it was lazy |
| 20:06 | rhc | cool. |
| 20:06 | gfredericks | rhc: the source for keep is probably straightforward and would show how that works |
| 20:08 | rhc | interesting, it is: http://clojuredocs.org/clojure_core/clojure.core/keep |
| 20:09 | rhc | so lazy-seq almost lets you write tail-recursive functions because its invoked lazily? |
| 20:09 | TimMc | It does use trampolining. |
| 20:10 | TimMc | Although I'd have to think about the more general claim you're making. |
| 20:14 | gfredericks | oh the chunking cluttered up the source |
| 20:14 | rhc | i assumed that was some special case and just looked at the last 4 lines |
| 20:15 | gfredericks | rhc: exactly |
| 20:17 | gfredericks | oh the clunking chuttered up the source |
| 20:17 | tmciver | gfredericks: you can say that again. |
| 20:18 | gfredericks | oh the sunking chluttered up the course |
| 20:25 | Frozenlock | Is there a way to save a file to another directory using file-str? (from clojure contrib) |
| 20:25 | choffstein | technomancy, are you around? If so, can I PM you a heroku question regarding clojure? |
| 20:26 | technomancy | choffstein: sure |
| 20:27 | amalloy | is 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:27 | technomancy | amalloy: as someone who gets a fair number of PMs that belong in public channels, I support this behaviour. |
| 20:27 | mdeboard | lol |
| 20:28 | lancepantz | i agree with you both, but i have nightmares of having getting chewed out for doing that on efnet #perl 10 years ago |
| 20:28 | gfredericks | technomancy: sorry I tried my best to refrain but I failed miserably |
| 20:28 | lancepantz | there's some graybeards out there who will freak out for that |
| 20:30 | TimMc | There's also a difference between social backchanneling and private requests for technical assistance. |
| 20:32 | gfredericks | maybe you want the questionee to have to publically ignore you |
| 20:33 | gfredericks | or let him get public credit for helping? |
| 20:37 | technomancy | it's better than bug reports over personal email or twitter though |
| 20:38 | lancepantz | what about bitching about you guys not supporting websockets :P |
| 20:39 | lancepantz | that's the appropriate channel for that? |
| 20:39 | lancepantz | *what's |
| 20:39 | technomancy | mark.mcgranaghan@heroku.com =D |
| 20:39 | lancepantz | :) |
| 20:42 | Raynes | lancepantz: Bitch about how much they charge for SSL as well. |
| 20:43 | devn | PMs are treated like email addresses |
| 20:43 | devn | i think that's been said, but that's my understanding, and in many places on IRC it is preferred that you ask |
| 20:44 | ibdknox | they did support websockets briefly |
| 20:44 | ibdknox | though there was a timeout :( |
| 20:44 | gfredericks | man I will have to start asking |
| 20:44 | gtrak | hmmm, why does it seem that you don't have to do #' for clojure to pick up recompiled functions now? |
| 20:46 | llasram | gtrak: 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:46 | arohner_ | 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:47 | llasram | gtrak: 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:47 | arohner | clj-webdriver & firefox works just fine |
| 20:48 | gtrak | llasram, 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:48 | gtrak | it seems that's not the case in 1.3 |
| 20:49 | llasram | gtrak: 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:49 | daaku | arohner_: java -jar selenium*.jar -Dwebdriver.chrome.driver="/path/to/chromedriver" should do it |
| 20:50 | gtrak | I used to have to type #' all the time to avoid it, now it seems it's not the case! |
| 20:50 | arohner | daaku: oh, I was confused. Didn't realize there was native code to install to make chrome work :-( |
| 20:50 | arohner | that didn't used to be the case |
| 20:50 | daaku | arohner: 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:54 | amalloy | gtrak: pretty sure you're wrong - you probably typed #' all the time but *needed* to type #' substantially less frequently |
| 20:54 | gtrak | are there some rules on where it's not an issue? |
| 20:55 | cemerick | ibdknox: do you have an ETA for 0.3.0 release of korma? |
| 20:55 | gtrak | amalloy, 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:56 | amalloy | rule: 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:56 | ibdknox | cemerick: I just updated the site to 0.3.0-beta7 - should be very soon |
| 20:56 | amalloy | and that hasn't changed in 1.3 |
| 20:56 | amalloy | eg, (run-jetty myfn) - you're passing the current value of myfn, not its var, so that matters |
| 20:56 | gtrak | well, I'll never use #' and see what happens :-) |
| 20:57 | amalloy | (defn whatever [] (myfn 1)) - that goes through the var myfn because it's in the call position and is a known var |
| 20:57 | gtrak | ahhh |
| 20:58 | cemerick | ibdknox: ok; just keeping an eye out for whether we should have a qualified rev number in the book, is all :-) |
| 21:00 | gtrak | amalloy, 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:00 | amalloy | yeah, call position gets treated specially |
| 21:01 | gtrak | learn something every day |
| 21:13 | TimMc | Is this where :static comes in? |
| 21:15 | gtrak | i think all the vars are static now |
| 21:15 | gtrak | that has more to do with the thread-local bindings |
| 21:19 | ibdknox | lol |
| 21:19 | ibdknox | I closed 16 issues today |
| 21:20 | amalloy | ibdknox: that's only encouraged if you also fixed 16 problems |
| 21:20 | ibdknox | I did |
| 21:20 | ibdknox | :D |
| 21:21 | TimMc | gtrak: :static is not the opposite of :dynamic |
| 21:21 | TimMc | but I don't know what :static is/was |
| 21:21 | gtrak | frick, what? |
| 21:22 | Frozenlock | How would you save a file to a subfolder using duck-stream.file-str? (It replaces \ and /) |
| 21:23 | Raynes | You wouldn't because duck-stream has been deprecated for like 3 versions. |
| 21:24 | Frozenlock | oh... |
| 21:25 | Frozenlock | Which function is replacing it? |
| 21:29 | Raynes | duck-streams was mostly replaced by clojure.java.io (a built in Clojure library). |
| 21:29 | Raynes | Not sure about that specific function. |
| 21:29 | Frozenlock | Thanks, I should have enough info to find it! |
| 21:54 | weavejester | arohner: 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:54 | amalloy | also see just java.io.File, which has the barebones |
| 21:54 | arohner | weavejester: sorry, not yet. Hopefully this week though |
| 21:54 | weavejester | arohner: Okay, if it does fix it, I'll release a 0.2.2 version. |
| 21:55 | arohner | weavejester: I'm using "-XX:+UseConcMarkSweepGC" and "-XX:+CMSClassUnloadingEnabled" if that's any help |
| 21:56 | weavejester | arohner: All I did was to memoize the s3-client function, therefore retaining a reference at all times. |
| 21:57 | weavejester | Which should be okay in theory... |
| 21:57 | weavejester | Or were you giving me the options so I could try for myself? :) |
| 21:57 | arohner | weavejester: I was giving you the options I'm using, if you wanted to try to reproduce before I have time to test myself |
| 21:58 | weavejester | arohner: Ah, I initially misunderstood. |
| 21:58 | weavejester | arohner: I'll try and reproduce if I have time, and if I can find a file large enough :) |
| 22:03 | pandeiro | lynaghk: 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:13 | rhc | why doesn't this work? (def myf #({:a %})) (myf 1) |
| 22:15 | rhc | nevermind, figured out how to google it http://stackoverflow.com/questions/2020570/common-programming-mistakes-for-clojure-developers-to-avoid |
| 23:04 | TimMc | gfredericks: Download Overtone and make sure it works. Then you will be able to keep yourself occupied, no problem. |
| 23:04 | TimMc | Or grab some SICP videos. |
| 23:15 | gfredericks | it would be nice if I could commit the melodies that pop into my head into my git repo |
| 23:15 | gfredericks | for posterity of course |
| 23:19 | amalloy | gfredericks: get a microphone. problem solved |
| 23:19 | gfredericks | amalloy: I want a microphone that emits ASCII |
| 23:21 | gfredericks | I want a microphone with a fixed-width font |
| 23:21 | gfredericks | if 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:27 | TimMc | :-D |
| 23:49 | gfredericks | holy crap overtone just made a noise |
| 23:52 | TimMc | \o/ |
| 23:52 | gfredericks | TimMc: you just made airports slightly more interesting |
| 23:53 | TimMc | gfredericks: (demo 16 (+ (sin-osc (mouse-x:kr 50 500 EXP)) (sin-osc (mouse-y:kr 50 500 EXP)))) |
| 23:54 | gfredericks | that bothered my left ear |
| 23:54 | gfredericks | wait I bet I was supposed to move my mouse |
| 23:55 | gfredericks | that is the weirdest thing that has happened to me this evening |
| 23:55 | gfredericks | TimMc: do another |
| 23:56 | TimMc | gfredericks: Overtone doesn't come with safety belts. I recommend keeping the volume low. |
| 23:56 | TimMc | You might need to wrap that + call with a pan2 call to make it left-right balanced. |
| 23:57 | TimMc | gfredericks: Check out the examples/dubstep.clj file. |
| 23:57 | TimMc | Crazy shit. |
| 23:57 | gfredericks | I don't know any of these things |
| 23:59 | gfredericks | man I thought I knew what music was. |
| 23:59 | muhoo | http://blog.60works.com/ |
| 23:59 | gfredericks | clearly it is something else. |
| 23:59 | muhoo | and, http://moldover.com/ |