#clojure logs

2011-11-27

00:08alexbaranoskywhat the heck is &form ?
00:08alexbaranosky:)
00:08cgray`in what context?
00:08alexbaranoskyI'm not sure if its a Clojure thing or a Midje code-base thing
00:08alexbaranoskyI see it in some code I'm reading
00:09cgray`is it an argument to a function?
00:09alexbaranosky(in Midje)
00:09alexbaranoskyyes, as well as to a macro, and also in a backtick empalte like such : '~&form
00:10alexbaranoskyempalte => template
00:10alexbaranoskyahhh is it anaphora or something/
00:11cgray`it's not something i've seen :)
00:11alexbaranoskya way to reference the form of macro that you're inside of?
00:16cgray`it could just be a weird name for a variable...
00:17cgray`i would think it would be here: http://clojure.org/reader if it was actually something
00:24technomancy&form and &env are implicit arguments to every macro
00:24lazybotjava.lang.RuntimeException: Unable to resolve symbol: form in this context
00:28amalloyalexbaranosky: it's anaphorically added to every macro definition: (defmacro foo [x] (println &form) x) (foo (+ 1 2)) prints (foo (+ 1 2)) and expands to (+ 1 2)
00:29amalloyit's not mentioned in the reader because it's unrelated to the reader
00:29alexbaranoskytechnomancy, what does &env do?
00:32alexbaranoskyamalloy, that's neat
00:32amalloyit's a map containing information about the lexical environment into which the macro will be expanded
00:33amalloyalexbaranosky: you have an example of &env in action, in utilize - the datatypes namespace checks out &env to figure out what typehint its argument has been given
00:33alexbaranoskyamalloy, checking..........
00:33quotemstrWait --- rest is being changed, and the lazy sequence model redesigned?
00:34amalloyquotemstr: that is *very* old. the change has happened
00:34quotemstrOh, okay. Good.
00:41alexbaranoskyare there any good links to read more about &env?
00:41alexbaranoskynevermind: http://blog.jayfields.com/2011/02/clojure-and.html
00:42alexbaranoskydidn't think I could effectively google for things starting with &
01:31lghtng,&env
01:31clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: &env in this context, compiling:(NO_SOURCE_PATH:0)>
01:31lghtng,google &env
01:31clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>
01:31lghtng,g &env
01:31clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: g in this context, compiling:(NO_SOURCE_PATH:0)>
01:32lghtng,search &env
01:32clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: search in this context, compiling:(NO_SOURCE_PATH:0)>
01:32lghtng,uptime
01:32clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: uptime in this context, compiling:(NO_SOURCE_PATH:0)>
01:32amalloylghtng: if you're going to try to brute-force this, could you do it im PM?
01:32lghtnglol, ok
01:32devnheh
01:32lghtngsry
01:32amalloy$google &env
01:32lazybot[Jay Fields' Thoughts: Clojure: &env and &form] http://blog.jayfields.com/2011/02/clojure-and.html
01:32devnlghtng: np bro u r kewl
01:33lghtngwhat happened to the keywords in fsbot?
01:33lghtngtnx
01:33devnur so welcome bro
01:34amalloylghtng: you're not in #emacs, buddy. we don't have fsbot
01:35devn"you're not in #emacs anymore"
01:36justicefriesthe new vim chantitle
01:36devnjusticefries: in madison?
01:36justicefriesme?
01:36clojurebotslime-installer is deprecated
01:37justicefrieslike the city?
01:37devnjusticefries: indeed
01:37justicefriesno, I spoke there at madison ruby conf...fell in love with it, wouldn't mind going back. why?
01:37justicefriesor living there.
01:37devn<-bendyworks
01:38justicefriesoh nice.
01:38justicefriesyeah, seems like the main place for a rubyist to work.
01:41justicefriesI may end up moving there, we'll see. coolest place ever.
01:45cgray`ok, to answer my question from about 45 minutes ago, typehinting with ^"[Ljava.lang.Object;" is the way to go
01:45amalloy^objects
01:45cgray`damn
01:45cgray`i thought i tried that
01:46amalloywell, i guess it might not work anymore, but i think it's supposed to
01:46cgray`i might have tried ^Objects
01:46amalloyany you still want to know the general syntax for things that don't have a shortcut like objects
01:47cgray`yeah, you can get it with (type foo)...
01:47cgray`it sped my code up by about 100x
03:53quotemstrWhy is /= an "invalid token"?
04:00amalloyquotemstr: / is the namespace separator
04:05quotemstramalloy: But it's not separating anything.
04:05amalloythat's why it's invalid
04:06quotemstrSymbols _starting_ with / are unambiguous and should be treated normally.
04:06amalloymeh
04:06quotemstr( /= is what Lisp uses, so it'd be nice to be able to use the same symbol.)
04:06amalloythere's an exception for clojure.core//, but in general / isn't a legal part of a symbol
04:07amalloyusing /= instead of not= just because you're used to a different lisp is kinda gross. you can't use 1+ either; just dive in and use clojure's names
04:07amalloyor +1 - i could never remember which order the dang things went in
04:08quotemstr1+.
04:08quotemstr+1 is an integer.
04:27quotemstrIs there a way of writing (new foo bar) so that bar is evaluated?
04:27quotemstrThat is, is there a way to choose the constructor used at runtime?
04:28nickmbaileythat is how it will work by default
04:29amalloyi assume quotemstr meant he wants foo evaluated
04:29nickmbailey(new foo (bar))?
04:29nickmbaileywait, foo or bar
04:30amalloyquotemstr: reflection. you can muddle through the javadocs to do it by hand, or let clojure.lang.Reflector/invokeConstructor do it
04:30quotemstrErr, yes, I meant foo.
04:30quotemstrThanks.
04:32nickmbaileyis it fairly standard to rebind *in* and *out* to new stream readers and use things like println and read-line for working with streams?
04:34quotemstrnickmbailey: I do it all the time in Lisp.
04:35nickmbaileyjust encountered it recently and the idea took me by surprise
04:36quotemstrHeck, I've seen people do that in C, with printf.
04:37amalloyreally? surely it's easier to just use fprintf there
04:38quotemstramalloy: Easier than reassigning stdout?
04:38amalloyyeah
04:40quotemstramalloy: You might want to temporarily reassign stdout for the same reason you might want to temporarily bind *out*.
04:40amalloyi guess that's true
04:41amalloythe only serious C programming i ever did was on a device with no stdout, so i guess i'm out of touch there
04:48gmaggiorExcuse me, can you tell me why (defn bbb [x y] ((get (vec x)) y)) and (bbb '(1 2 3) 1) give invalid argument exception to get?
04:49amalloygmaggior: your parens are way off
04:49amalloyinside of bbb
04:49gmaggioroh
04:50amalloy(defn bbb [x y] (get (vec x) y)) ;; although this would be simpler: (def bbb nth)
04:51alexbaranoskyamalloy, I should remember to use nth next time I am writing a bbb util function
04:51alexbaranoskyit's so much more concise
04:52gmaggioramalloy: thank you very much amalloy. It works. Actually I'm writing a function to simulate nth instead of using it (it is a 4clojure problem)
04:53alexbaranoskyaha! nice, do they wouldn't let you try the old (def bbb nth) trick anyway
04:53tomojalexbaranosky: consider (nth (range) 3)
04:54Raynes(def bbc "Doctor Who")
04:54alexbaranoskytomoj, ?
04:55amalloyyeah, i guess we should have added a test to verify that your nth works for infinite sequences. too late to change now, though
05:26quotemstrWhy is :keys necessary when an :or is present?
05:26quotemstrA bare :or provides all the information you need.
05:26amalloythey're orthogonal
05:27quotemstrI want to write a destructuring expression with default key values, and I don't want to repeat the key names.
05:27amalloy(let [{user-name :user-record-data-name :or {user-name "no user"}} the-data] (do stuff with user-name...))
05:27quotemstr{:keys [a b] :or [a 0 b 2]} seems silly when the :or part indicates that key parsing is desired.
05:28amalloyno; the keys in the or refer to your local names, which are not by any means always the same as the keys in the original map
05:28quotemstrErr, {a 0 b 2}.
05:29quotemstrStill, I want is fairly common, I imagine.
05:29amalloyi don't really see :or get used that often. once in a while, sure
05:30quotemstrMaybe that's because you have to repeat the local names.
05:30amalloyhaha
05:32quotemstrWhy not follow CL and allow :keys [(key default-form)...] ?
05:32amalloyso, write a let+ macro that finds {:keys-or {a 0 b 2}} and replaces it with {:keys [a b] :or {a 0 b 2}}
05:33amalloyquotemstr: or if you only use the value once, don't destructure it at all. (let [m (...)] (+ (m :a 0) (m :b 2)))
05:33quotemstrI'd have to provide a + version of every destructuring form.
05:51BahmanHi all!
06:01_ulisesmorning folk
06:02fbru02hey guys !! I still have the same question that a couple days ago, before when evaluating sth with the same name it issued a warning , now it gives an IlligalStateException : x already refers to ... , is there away to enforce this evaluation?
06:04_ulisescan one have different :pre and :post conditions for different arities of a function? or even, how do pre and post-conditions work when one defines functions like (defn foo ([] ...) ([p] ...) ...)?
06:05_ulisesfbru02: have any code to show what you're getting?
06:05_ulisesa simple example that is
06:06fbru02_ulises: no, is just more like the order i was using when developing... but let me think on how i can clarify
06:06_ulisesfbru02: are you using slime?
06:06fbru02_ulises: yes
06:06_ulisesI get that sometimes when I move things about between files and my swank server maintains state
06:07_ulisesI tried with (ns-unmap ...) but perhaps I wasn't using it correctly
06:07_ulisesI think you may want to experiment with that
06:07_ulisesas in, it didn't work for me, but in theory that's what you'd want to clear a namespace
06:08fbru02_ulises: awesome didn't know about its existence , thanks
06:09_ulisesno worries
06:09_uliseslet me know if this works and how you got it to work though :)
08:53gfredericks_ulises: I know it's been a couple hours, but I just confirmed at the repl that you can enter separate conditions for each arity-definition.
08:53gfredericksSpecifically I did (defn foo ([a] {:pre [(pos? a)]} (inc a)) ([a b] {:pre [(= 15 (+ a b))]} (- a b))) and it worked as you would expect
08:55RaynesYeah. I imagine I'd have tried it rather than asking about it for two days with no answers. :P
08:57gfredericksRaynes: does clojurebot have a snarky phrase handy for that?
08:57gfredericks~try-it
08:57RaynesDon't think so.
08:57clojurebotI don't understand.
08:57Raynesclojurebot: try-it |is| Why not just try it? It's quicker that way.
08:57clojurebot'Sea, mhuise.
08:58Raynes~try-it
08:58clojurebottry-it is Why not just try it? It's quicker that way.
08:58RaynesWell... close enough.
08:58Raynesclojurebot: try-it |is| <reply>Why not just try it? It's quicker that way.
08:58clojurebot'Sea, mhuise.
08:58gfredericksdang what was the syntax for that.
08:58Raynes~try-it
08:58clojurebottry-it is Why not just try it? It's quicker that way.
08:58gfredericks~try-it
08:58RaynesWell, something like that.
08:58clojurebotWhy not just try it? It's quicker that way.
08:58RaynesThere we go.
08:58gfredericksRaynes: it worked, he's just got both now
08:58gfredericksclojurebot: forget try-it
08:58clojurebotWhy not just try it? It's quicker that way.
08:58gfredericks~try-it
08:58clojurebottry-it is Why not just try it? It's quicker that way.
08:59RaynesI concede.
08:59gfredericksclojurebot: forget try-it |is| Why not just try it? It's quicker that way.
08:59clojurebotI forgot that try-it is Why not just try it? It's quicker that way.
08:59gfredericks~try-it
08:59clojurebotWhy not just try it? It's quicker that way.
08:59gfredericksokay I think he's better now
08:59ejacksoni think clojurebot had too much turkey
09:00gfredericks~turkey
09:00clojurebotExcuse me?
09:12biallymHey is there a way to have a function called on or around garbage collection of an object?
09:13biallymLike an Idisposable for C#
09:52ambrosebshas anyone explored adding compiler hooks to Clojurescript?
10:03tauntaunGlad to see that clojurebot is freely available. I'll assume that the absence of a user guide means it's trivially easy to use :-)
11:27fliebelIs there a 1.3 Clojure lib for dealing with complex numbers?
11:37reiddraperWhat's the rationale behind the namespace naming pattern foo.core? Is it not possible to put code in the foo namespace directly?
12:00fliebelreiddraper: You can, I think the idea is that when you have a large app, it makes sense to have a core.
12:00technomancy_reiddraper: it's not possible in certain contexts
12:06reiddraperok, it's not a restriction for me or anything, just curious. thanks
12:43fliebeltechnomancy_: re namespaces: in which cases is it not possible?
12:49gtrak``Raynes, so are you considering university?
12:50Raynesgtrak``: Not particularly. At some point, possibly.
12:50Raynesfliebel: I don't remember the details, but I know of some classloader bizarreness that is the result of single-segment namespaces.
12:51RaynesMan, why isn't the guy who did this here: https://github.com/jedahu/story
12:51RaynesI need to tell him how awesome he is.
12:52fliebelRaynes: Ok, so we should have more names like del.ico.us, because I dislike core.
12:53RaynesI like core. Core is cool.
12:54mdeboardRaynes: Great blog post
12:54Raynesmdeboard: Thanks. :>
12:56TimMcco/re.clj
12:57gtrak``core/.clj
13:00Raynesfliebel: Just start using namespaces like fliebel.moar and fliebel.coar.
13:01fliebelRaynes: For some reason, IRC is the only place I'm called fliebel.
13:01Raynesfliebel: That's because it is impossible to pronounce your name.
13:03mdeboardRaynes: Dude god, I thought I was doing good getting my career started. Your first job is backend dev with Clojure? I quit.
13:03fliebelRaynes: I suppose you can say Dijkstra's algorithm, right?
13:03RaynesHeh. Did you praise me for my post before you finished reading it? :p
13:03Raynesfliebel: I'm not entirely confident that I know how to pronounce his name either.
13:03RaynesI *think* I do though.
13:04mdeboardRaynes: Well since you're just a child I thought you could use some positive encouragement. Just kidding -- I read through the 2010 part then my ADHD attacked. :P
13:04RaynesHeh
13:07fliebelRaynes: Maybe I can teach you how to say my name on (next conj), I'm already devising things to talk about and ways to make money :P
13:07Raynes:p
13:09fliebel&(next ())
13:09lazybot⇒ nil
13:09Raynes&(-> () next next next next next)
13:09lazybot⇒ nil
13:10fliebelRaynes: I still can't remember rest/next ##(-> () rest rest rest rest)
13:10lazybot⇒ ()
13:14alexbaranoskyRaynes, nice article.
13:15gtrak``i need to get off my ass and learn haskell, this is an encouragement
13:16jamiltronSorry to backtrack, but what article?
13:16gtrak``http://blog.raynes.me/blog/2011/11/27/the-clojure-community-and-me/
13:16mdeboardgtrak``: Ditto. Haskell is awesome. I use it to work on stuff in my discrete math course
13:17jamiltronSame here. I love Haskell but feel so humbled by it I never feel like I can run with it for long enough.
13:17gtrak``mdeboard, yea, I need to see what all the fuss is about with types, i talked to djspiewak once about it and he convinced me it's interesting
13:18Deranderglorious, glorious types
13:18Raynesalexbaranosky: Thanks. :)
13:18mdeboardThe deeper I get into discrete math the more I understand haskell
13:18mdeboardAnd I understand essentially nothing.
13:18alexbaranoskyDerander: timewasting, pain-in-the ass, types ;-)
13:18gtrak``discrete-math like fields and groups?
13:19gtrak``finite field?
13:19Deranderalexbaranosky: :-P
13:19mdeboardI understand Haskell the way someone who once flew over a library with a book about Italian food understands the Mona Lisa.
13:20alexbaranoskyHaskell's a lot like Clojure but with all these annoying types all over the place - and without all the delicious power that homoiconicity provides
13:20Derandermooonaaaaadddssss
13:20gtrak``i do like my power delicious
13:20alexbaranosky:P
13:20RaynesHaskell is also painfully non-dynamic. lazybot would have been so much of a bitch to write if I had done it in Haskell.
13:21gtrak``i'm starting up 'reasoned schemer' because of what was said about core.logic and ad-hoc typing
13:23Derandersomeone wrote a pattern matching library for clojure.. does anyone know the name?
13:23gtrak``core.match
13:23Derandergtrak``: danke :-)
13:27gtrak``anyone have a good guide to starting a meetup? I want a Baltimore FP meetup, it seems like there's a small group of people that would do it.
13:30ckirkendallgtrack: In cincy carin miers and I started up one. We spread the word through twitter and through the leaders of other meetups. Our first meeting had 30 people much of that was carin's sales job.
13:31gtrak``ah, ckirkendall I remember talking to you about this :-)
13:31ckirkendallWe got a simple websites through wordpress. We created a google group.
13:31ckirkendallall of this was done before the first meetup
13:32gtrak``ckirkendall, it seems like there's some interest and programming talent around, but not much going on in the way of meetups here. We have a javascript meetup, though they meet like less than once a month
13:33gtrak``but i could totally run a site
13:33gtrak``and I could do an intro to clojure talk probably
13:35ckirkendallgtrak: we also made the decision to do a functional programming group and not just a clojure group.
13:36gtrak``yea, at this point i want to be inclusive
13:36gtrak``and i'm interested in FP in general
13:37ckirkendallWe were all amazed at how many people were interested in FP
13:37ckirkendallI also have done presentation at other meetups pitching cincyfp
13:38gtrak``awesome
13:38ckirkendallIf you have some technical friends that have a good following on twitter in balt. That was our best way to get the word out.
13:39gtrak``yea, i don't have enough contacts to piggyback off of stuff like that, it might take a while
13:39gtrak``but that's ok
13:40mdeboardI think I'm going to disable the 80+ minor mode for clojure
13:41mdeboardThe highlighting drives me bananas
13:42Rayneshttp://blog.raynes.me/blog/2011/11/27/the-clojure-community-and-me/#comment-373681480
13:42Raynes"Continue being awesome."
13:43ckirkendallI didn't even know what twitter really was before meeting carin. It was here contacts that got the word out.
13:43gtrak``maybe she knows people in balty :-)
13:48SaturnationRaynes, nice post
13:49RaynesSaturnation: Thanks. :)
13:50SaturnationBrilliant talk at the Conj to, btw. :)
13:52RaynesSaturnation: Double thanks. :)
13:55SaturnationAnd thanks for your work on 4Clojure
13:57RaynesI haven't actually done a whole lot on 4Clojure.
13:58RaynesDefinitely not enough to earn any ecreds.
14:00RaynesOh shit -- I got hn'd: http://news.ycombinator.com/item?id=3282837
14:00tolstoyRaynes: Yep. I'm reading your blog post right now as a result. ;)
14:05mdeboardRaynes: So I'm trying to get lazybot up and running, but when I run `lein uberjar` it tells me that "Release versions may not depend upon snapshots", or set an env var. Should I just set the env var and move on or ..?
14:06RaynesYes.
14:06RaynesOr just do 'lein run'.
14:06RaynesThat should work.
14:06RaynesI think.
14:06ibdknoxit will
14:07RaynesI should update the docs about that.
14:07ibdknoxwe have to be careful though... at the rate we're going there will be a lazybot army
14:07RaynesHeh
14:07mdeboardLink them all together
14:07shtutgarthm, i'm getting "error in process filter: Wrong number of arguments: nil, 0" after sending (keys (:members (r/reflect "foo"))) to REPL. I've tried to relaunch swank, but the problem persist. (vals ...) or just (:members ...) work fine
14:07mdeboardI mean, lisps ARE all about AI after all right
14:07RaynesThere was a fellow who PMed me a few days ago because he wanted to run his own instance of the bot.
14:08shtutgartideas? is it a bug?
14:08ibdknoxshtutgart: what's returned from members?
14:10shtutgartibdknox: it's a set of clojure.reflect.Method
14:11ibdknoxshtutgart: https://github.com/technomancy/swank-clojure/issues/31
14:11shtutgartnot only Method, Field, Constructor etc
14:11ibdknoxnot sure if that's related
14:12ibdknoxbut it appears to be an issue at the swank-clojure/slime level
14:12ibdknoxwhich means I'm useless
14:12ibdknox:)
14:13ibdknoxRaynes: you're famous! #2 on HN
14:14shtutgartibdknox: not really, other expressions like (+ "foo" "bar") and even (vals (:members (r/reflect "foo"))) work fine (I mean, throw exceptions), just this one causes the problem
14:14RaynesI know. I didn't even realize it was hn'd until like 10 minutes ago. Saw it was on the front page and pissed myself.
14:14ibdknoxRaynes: so now that you're doing all this writing... when will I be getting some chapters? :p
14:15mdeboardOnly bad part about getting frontpaged on HN is it usually draws out the worst HN commenters, at least IME
14:15ibdknoxshtutgart: yeah, but the error itself is a swank one. Try it in lein repl and see what happens? Maybe that will give some clues
14:15Raynesibdknox: Once I finish reviewing Keith's reviews and he reviews my reviews of his reviews and I review... yeah. After that, he should send the first chapter down your pipe.
14:15shtutgartibdknox: yeah, already trying...
14:15RaynesThere is only one chapter at this point that is close to ready for technical review.
14:16ibdknoxmdeboard: it's true. There are some scary people on HN.
14:16RaynesAnother one is currently under developmental review, and I should be submitting another chapter around the 5th.
14:16ibdknoxRaynes: awesome :D
14:17mdeboardibdknox: I wrote to Dr. Norvig to see if he would chime in on people using his "Teach Yourself Programming in Ten Years" as a bludgeon to beat up on new programmers. He did so, graciously.
14:17ibdknoxmdeboard: :D
14:20mdeboardRaynes: Am I missing a config step with mongo here? When I `lein run` or run the jarfile I get this error: http://paste.pocoo.org/show/513666/ I haven't touched mongo except to get its daemon running. I didn't see anything in .lazybot/config.clj about mongo config.
14:22Raynesmdeboard: I have no idea what that means.
14:22RaynesIs there a stacktrace?
14:22mdeboardya
14:22mdeboardsec
14:23mdeboardhttp://paste.pocoo.org/show/513668/
14:23RaynesHuh.
14:23Raynesmdeboard: Maybe the port is wrong?
14:23RaynesWhat port is mongo running on?
14:24mdeboard27017 & 28017
14:24RaynesWell..
14:24mdeboardIs :servers-port supposed to be the mongo port?
14:25RaynesNo.
14:25mdeboardOk
14:25mdeboardDidn't think so, but maybe I was going crazy
14:25RaynesWell, one problem here is that printStackTrace isn't real.
14:25RaynesLet's fix that first. Give me a sec.
14:29Raynesmdeboard: Could you hop over to #flatland?
14:30mdeboardsure
14:34sritchieRaynes, are you around?
14:34sritchiequick question on lein-nenew
14:34sritchies/nenew/newnew
14:34Raynessritchie: I am.
14:34RaynesSure. Shoot.
14:35sritchiehow do you recommend creating a new templates? forking lein-newnew and adding them directly, or is there some way to pull a template in separately and have "lein templates" pick it up?
14:35RaynesAh, that's the beauty of it! Templates need only be maven artifacts.
14:35RaynesJust create your template and then publish it on clojars.
14:36RaynesYou can then 'lein plugin install' your template just like any other leiningen plugin and it'll be picked up by lein-newnew.
14:36ibdknoxjust think of all the awesome template packs
14:37sritchieawesome, that's great
14:38sritchieso for a template called "axelrod", I'd create a project with "leiningen/new/axelrod.clj" and "leiningen/new/axelrod/<templatefiles>"
14:38RaynesYes.
14:38sritchieboom
14:38ibdknoxsritchie: there's a template for creating templates :D
14:38sritchiehow about a recursive template template
14:38Raynessritchie: Since lein-newnew is in Leiningen now (master), the templates that currently exist are probably the only ones that'll ever be included with it.
14:38sritchienice
14:38Raynes`lein new template mytemplate`
14:38Raynes:D
14:39sritchieI'm making a template for *-koans projects
14:39sritchieI pulled the macros, etc out of clojure-koans, so now anyone can make koan projects for their own libraries
14:39RaynesExcellent usage.
14:40ibdknoxsritchie: I still need to look into that cljs-watch change you made :)
14:40ibdknoxsritchie: I think though, that it won't work without changes to the CLJS compiler :(
14:40sritchieyeah, I realized after I sent it in that it'll only work for local files
14:40sritchiefiles in your project
14:40sritchieit's a very anti-social pull request
14:40ibdknoxhaha
14:41devnwhat are people's feelings about including swank-clojure as a dev-dependency?
14:41ibdknoxdon't do it
14:41devnI often find it annoying that I need to add it to the project.clj for every project I pull down
14:41ibdknoxuser level plugins ftw
14:41Raynesdevn: You totally don't.
14:41ibdknoxlein plugin install swank-clojure some-version
14:41sritchiedevn: you can install it locally
14:41Raynesdevn: lein plugin install swank-clojure 1.3.3
14:42devnlol, when did I miss this memo
14:42sritchieI just figured this out too
14:42ibdknoxtotally 6 months behind :p
14:42ibdknoxa while back during the 1.3.0 transition I sent out a post telling everyone to remove it
14:42ibdknoxlol
14:43ibdknoxwith some other general clean up things
14:43Raynesmarginalia has a lein-vimclojure plugin in the dev deps.
14:43RaynesMakes me want to kill myself.
14:43ibdknoxnow now. Vim is a special case :D
14:43ibdknoxwe have to wave our flag proudly
14:43ibdknoxas we are the few here
14:44RaynesHeh.
14:44RaynesYou should be the transitioning.
14:44ibdknoxsritchie: you were building something with Noir, right? How did that go?
14:45ibdknoxRaynes: pfft, where's the fun in that? Then I'd have to *actually* help with swank issues and such... for now I can just claim ignorance.
14:45sritchieibdknox: it's going really well -- I've had to let it sit for a bit while I rework this elephantdb project
14:45gfredericks$inc ibdknox
14:45lazybot⇒ 5
14:45RaynesThere isn't any helping to be done.
14:45RaynesM-x clojure-jack-in and stfu.
14:45ibdknoxlol
14:46gfredericksevery other question in #clojure has something to do with skank-swim-mode or whatever
14:46ibdknoxlol
14:46RaynesI bet ejackson thinks that was directed at him now.
14:46ibdknoxsritchie: haha
14:46ibdknoxsritchie: there's always something :)
14:46sritchieibdknox: I'm starting to play with clojurescript, though
14:46technomancygfredericks: and they're all answered by the documentation!
14:46RaynesHe's probably sitting there muttering "what did I do" in his little English accent.
14:46sritchieibdknox: I set up a little google maps demo with noir: https://github.com/sritchie/contour
14:47ejacksonRaynes: I'm struggling with the XML aspersions, to take any more on board
14:47Raynestechnomancy: You should really get some t-shirts made of the docs.
14:47devnibdknox: did you see some of the conversation that happened around how noir puts the V and C in the same file?
14:47gfrederickstechnomancy: I know, I just get bitter that my editor isn't all tricked out so I have to find something to complain about
14:47ibdknoxdevn: you should read my epic response :)
14:47devnibdknox: is it on the issue that was submitted?
14:47ibdknoxsritchie: oh awesome
14:47sritchiealong with my clojurescript "getting started" tips, as if there aren't enough floating around
14:47ibdknoxdevn: http://groups.google.com/group/clj-noir/browse_thread/thread/1718a9b1312156d3
14:48devnbe back in 7 hours after I finish reading this
14:48ibdknoxsritchie: that's really cool :)
14:49ibdknoxsritchie: how was working with CLJS?
14:49devnhave you guys seen trail?
14:50devnhttps://github.com/bobby/trail
14:50ibdknoxyeah
14:51ibdknoxI was going to sit down and start figuring that stuff out for pinot soon. I actually don't think the classic approach is necessarily the best one in this case
14:51ibdknoxbut I haven't really gone into it yet, so I could be totally wrong :D
14:52gfredericksibdknox: I am glad you wrote this.
14:53ibdknoxgfredericks: why's that?
14:53sritchieibdknox: I found that the browser repl helped a lot; it was a bit difficult to figure out how to examine javascript objects, etc, but that's more my problem
14:53gfredericksibdknox: because I like the ideas and I hadn't thought of it that way before.
14:54sritchieI'm heading to pinot next
14:54ibdknoxgfredericks: yeah, I mean the main thing they wanted to accomplish with MVC was separation of business and presentation
14:55ibdknoxgfredericks: controllers seems a bit of an after thought, but were important in contexts where any number of actions might cause changes (e.g. in a standard client interface)
14:55ibdknoxsritchie: let me know how that goes. I think most of what you need is there, but I won't claim it's "good" yet :) The hiccup over dom objects is really fun though
14:56ibdknoxlots of cool things you can do with that
14:56Raynessritchie: Let me know when your template is out.
14:57Raynesibdknox: Also. Trynoir. Do it.
14:57ibdknoxI know
14:57ibdknoxugh, just have too much going on :(
14:57RaynesYou just think you do.
14:57ibdknoxhaha
14:58mdeboardibdknox: Don't get yourself burnt out
14:58sritchieibdknox: this maps project is going to evolve into the front end for a clojure-based deforestation-monitoring system I've been working on
14:58RaynesIf he gets burnt out he'll just make me maintain his stuff until he is okay.
14:59Raynes"Hi, I'm Anthony Grimger here to talk about Noir and Korma."
14:59ibdknoxsritchie: interesting. Where are you going to get the data?
14:59cgagDid you make noir? I'm just getting into clojure and was thinking of trying it. I was going to ask what the current options were as far as web dev with clojure.
14:59DyscreteRaynes, your blog post on HN sent me here :D
14:59RaynesDyscrete: Hi! :)
14:59ibdknoxcgag: yep, I wrote it :) It'll be by far the easiest starting point if you're new
14:59Raynescgag: ibdknox wrote noir.
14:59sritchieibdknox: I've got a hadoop workflow that processes NASA's MODIS dataset back to 2000; the bulk of the work is generating timeseries, extracting some trends and running a classification algorithm over all of the pixels
15:00ckirkendallRaynes: I second that.
15:00mdeboardDyscrete: Welcome
15:00cgagIf yours was the post about the clojure community that's what sent me here as well :)
15:00Dyscretethanks all
15:00sritchieso the final dataset is, for every pixel, a percent chance of deforestation in the next time period
15:00Raynescgag: It was.
15:00sritchieRaynes: you KNOW it
15:00sritchiealmost done here, just need to test this thing out
15:01ibdknoxsritchie: that's cool stuff, are you going to open source it? I'd love to see what that ends up looking like
15:01sritchieibdknox: yup, hopefully in the next month or two
15:02ibdknoxsritchie: cool. You're not in the bay area are you?
15:02sritchieyeah, actually, I'm at twitter
15:02ibdknoxhah
15:02sritchieI need throw an interface between my thrift schema and the hadoop logic, and then it should be good to go
15:02ibdknoxsritchie: we should get together sometime
15:02sritchiesounds good, man
15:03sritchieI'm back in town tomorrow, I'll send you a note
15:03ibdknoxawesome.
15:03ibdknoxThere are a lot of us around here, it's funny that none of us seem to find eachother though
15:04ibdknoxyou guys don't come to the user group :p
15:04mdeboardWild_Cat: ping
15:04devnget thee to a user group!
15:04sritchiehaha, I busted in late at the last one
15:04sritchierudely interrupting your pinot demonstration
15:04ibdknoxhaha
15:04pmooserok I am going to go read this article
15:05pmooserand maybe I'll be so impressed that I'll join IRC a second time
15:05ibdknoxdevn: did you read that response?
15:05sritchiebut it's a fair point, I'll add myself to the meetup
15:05ibdknox:)
15:05ibdknoxNow I need to convince mark to go
15:06ibdknoxand other heroku people
15:06Wild_Catmdeboard: pong?
15:06devnibdknox: I did. I liked it. :)
15:07zmanjiIs there a document that enumerates the difference between Clojure and Scheme/Racket? I have used Scheme before and I am interested in learning and using Clojure
15:07devnzmanji: yes, as a matter of fact there is :)
15:07dnolenzmanji: too many to list :)
15:07ibdknoxmy deep dark secret: Noir is the 4th web framework I've built
15:07devnzmanji: http://hyperpolyglot.org/lisp
15:07zmanjithanks devn
15:07devnnp
15:07mdeboardibdknox: When you say web framework, what do you mean, specifically? Just a collection of abstractions for common HTTP-handling tasks?
15:08devndnolen: someone did the work :)
15:08ibdknoxmdeboard: depends, is that what you would label rails?
15:08dnolendevn: well that's a detail oriented list, but it doesn't list the bigger philosophical differences
15:09mdeboardibdknox: I've never used rails, but I'd describe a subset of Django's codebase that way
15:09devndnolen: it
15:09devndnolen: it's a very, *very* long list. They get into some of that later on in the document.
15:09ibdknoxmdeboard: I've always struggled with the difference between "library" and "framework", the distinction I ultimately settled on was that a framework is something you write code *in* while a library is something you write code around
15:09pmooserNice article, Raynes.
15:09Raynes<3
15:10ibdknoxmdeboard: I wrote two at the level of django
15:10Wild_Catmdeboard: say, since you appear to be involved in both the Python andClojure communities, would you have a couple Clojure-for-the-Python-programmer tutorials to recommend? I've gone through Mark Volmann's, which is good but apparently written for an older version of Clojure
15:10dnolendevn: for "define class" it says use Java :P
15:10ibdknoxmdeboard: one more like noir
15:10pmooserI was at the conj this year and your talk was cool and entertaining, and it didn't seem like you were nervous at all ;)
15:10dnolenfor the Clojure table entry
15:10devndnolen: haha, no one said it was perfect! :)
15:10jgrimesI came here because of that article Raynes, it was quite good
15:10RaynesHappy you enjoyed it. :)
15:10devndnolen: I was using it to translate what I've learned about Clojure back to scheme
15:11mdeboardWild_Cat: Unfortunately not, I basically just learn by doing/tinkering :-\ I think a "CLojure for Python programmers" tutorial would do a grave injustice to Clojure. "Python for Clojure programmers" would be more appropriate, but I've not seen that either.
15:11Wild_Cat(more specifically, the actors and destructuring parts were out of date, and I/O was mostly glossed over)
15:12ibdknoxmdeboard: the first one I wrote was a PHP MVC framework, well before django ever existed :)
15:12mdeboardWild_Cat: I always recommend picking up either Joy of Clojure or Practical Clojure
15:12devnthe new pragprog clojure book is quite good
15:12pmooserThe updated edition of the old one ?
15:12devn*nod*
15:12ibdknoxmdeboard: the one after that was a crazy declarative metaprogramming thing that let you write out your site in xml. It was very cool, but meh.
15:12ibdknoxmdeboard: the last was called trigger, it was a very lightweight event-based framework for building sites
15:13devnibdknox: bad memories! *shows you a cross*
15:13mdeboard"xml... very cool..." aka "a face only a mother could love"
15:13ibdknoxlol
15:13devnhey, don't beat up on XML
15:13ibdknoxit was all we had!
15:13devnwhen we ran out of zeros, we just used 1s
15:13mdeboardI have a new appreciation for XML after taking that Stanford online DB class
15:14devnand then we had to walk 4 miles up hill both ways to get more zeros.
15:14devnand we liked it.
15:14ibdknoxexactly
15:14Raynesjgrimes: Hey. I just realized you and I have the same last name.
15:14Wild_Catmdeboard: Joy of Clojure? Nice. I'll take a look at it, probably once I've completed my move and can justify buying books :p
15:14jgrimesRaynes: oh, nice :)
15:14RaynesIt took me way too long to notice that.
15:14jgrimeshaha
15:15mdeboardWild_Cat: If you have a Kindle it's one of hte few tech books I think reads quite well in ebook format
15:16Wild_Catmdeboard: well, since I'm planning to buy a Kindle shortly before the aforementioned move, I'll add that one to my initial buy-list
15:16BahmanIs there any easy way to copy a byte array into another one?
15:18Wild_Catmdeboard: does it include a guide to the Clojure ecosystem too (Leiningen, Clojars, useful libs, etc.?)
15:18mdeboardWild_Cat: No not at all. Definitely use irc for that
15:18raekBahman: http://docs.oracle.com/javase/6/docs/api/java/util/Arrays.html#copyOf(T[], int)
15:19ibdknoxsupposedly the 2nd edition of Programming Clojure has Noir in it
15:19mdeboardibdknox: nice
15:19Wild_Catmdeboard: ah, bit of a shame, that.
15:19mdeboardI do like Noir a lot
15:19RaynesMy book will have whole chapters on Leiningen and Noir.
15:19Wild_Catwhat's Noir?
15:19ibdknoxmeh, it's ok ;)
15:19mdeboardI'm kind of burnt out on hand-wavey we frameworks
15:19BahmanThanks raek!
15:19devnI will love noir when I can get haml templates :X
15:19mdeboards/we/web
15:19ibdknoxthere's not a java haml implementation?
15:20ibdknoxdevn: https://github.com/mmikulicic/haml-macro
15:20devnibdknox: yes, it needs some work though
15:20ibdknoxWild_Cat: it's a web framework I wrote: www.webnoir.org
15:21devnI'm not so hot with parsers, so that's been a bit of a stumbling block for me with haml-macro
15:21ibdknoxdevn: I'd just find a java lib, wrap it real quick, and be done
15:21Wild_Catibdknox: hmm. A web framework for the JVM that doesn't suck harder than a black hole? That could be nifty.
15:22ibdknoxWild_Cat: 100% less suck ;)
15:22Wild_Catwhat, you mean it blows? :p
15:22mdeboardlol
15:22ibdknoxdamn
15:22ibdknoxbeat at my own game
15:22gfredericksI'm writing some clojure code to use from java/jruby, and am curious how poor everyone thinks this idea is: a macro called at the end of a file that creates a class with a static method for every public function in the namespace.
15:22Wild_Cat:D
15:22ibdknoxdevn: this one seems active: https://github.com/raymyers/JHaml
15:22ericmoritz\0100% less suck means it neither sucks nor blows
15:23ibdknoxtrue.
15:23ibdknoxit's neutral
15:23Wild_Catibdknox: looks cool. No boilerplate. I like that.
15:23devnibdknox: it seems to be missing quite a bit
15:24devnno interpolation is a bummer
15:24ibdknoxdevn: I didn't look much into it :)
15:24ibdknoxnever really wanted haml myself
15:24Wild_Catwhile we're on the topic of noob stuff, is there a good lib, preferably in the stdlib, that I could use to scrape HTML?
15:25mdeboardWild_Cat: Get used to most things not being in the std lib
15:25Wild_Catack :(
15:25devnthis isn't common lisp! :)
15:25ibdknoxthere appears to be a scala haml impl
15:25mdeboardWild_Cat: https://github.com/heyZeus/clj-web-crawler
15:25devnibdknox: yeah, i'll have to do some more digging.
15:25mdeboardWild_Cat: I was looking at that last night for similar reasons
15:25Wild_Catdevn: well, I'm a Python guy, really. That's where I got the "hey, it's in the stdlib"-itis from ;)
15:27mdeboardWild_Cat: Ya ditto on that
15:28devnheh, I've been a Ruby guy, so "The standard library is a ghetto!" has always made me a little bit iffy about locking into stdlib
15:28Wild_Catto be fair, the Python stdlib includes a lot of really dodgy stuff, and no HTML scraping lib.
15:29devnWild_Cat: same with Ruby. so much of it has been abandoned or was written to work with pre-1.0 ruby
15:29Wild_Cat(if I'd had a dollar for every time someone came to #python trying to parse HTML with regxes...)
15:29devnit's a lot of garbage and a couple of useful bits
15:31devnWild_Cat: there are a bunch of options for HTML parsing. I know of html-parse which uses tagsoup, there's also a lib called apricot-soup, and a couple hundred more written in Java I'm sure that you could use from clojure
15:31devnI'm sure I'm leaving dozens of options out
15:32Wild_Catyeah, figures. I was mostly looking for the standard clojuric way of doing that ;)
15:33Wild_Cat(i.e. the local equivalent to "use lxml or BeautifulSoup"
15:33Wild_Cat)
15:35devnWild_Cat: well, you already seem to be matching your parens. seems like you're well on your way to mastery. :)
15:35Wild_Cathaha
15:37Wild_CatI gotta say, I still find all those parens somewhat ugly. In fact, Clojure scored tons of points in my book by using vectors for function signatures and by including set/dict/vector literals. Suddenly the code looks tons more readable.
15:39devnyeah, even without syntax highlighting I have very little trouble parsing clojure code due to binding forms being delimited by []s
15:39devnparens in lisp and scheme are overloaded. they mean everything.
15:41Wild_Catyeah, that's how I felt.
15:42Wild_Catbesides, I consider the dict/map an important enough data structure that it deserves syntax-level support in any language.
15:43cgagi feel like i've read people actually complaining about the fact that it's not all parens, which I don't get at all. The literal syntaxes are excellent imo.
15:43Wild_Catpracticality beats purity ;)
15:44samaaronare there any linux-based clojurians willing to test out the new Overtone asset manager in here?
15:50Saturnationasset manager?
15:50samaaronSaturnation: yup
15:51samaaronSaturnation: do you rock the linux?
15:51mdeboardlol
15:51mdeboardbrogrammers
15:51samaaronmdeboard: brogramming motherfucker!
15:52SaturnationI use the linux :)
15:52Saturnationit doesn't rock when I use it, fairly stable :)
15:52pmooserHey Sam, what was the name of that input device you were using during your talk at the conj ?
15:52samaaronSaturnation: nice - and have you ever installed Overtone?
15:52Saturnationyes, but was painful :(
15:52samaaronpmooser: It's called a monome: http://monome.org
15:52Wild_Catoh, is there a video of the Overtone conj vid? I heard it was awesome?
15:53pmooserThank you
15:53Wild_Cats/vid/talk/ >.<
15:53samaaronSaturnation: painful? How? And why didn't you share your pain on the mailing list?
15:53SaturnationWild_Cat, not yet and it was :)
15:53Wild_Catffffffuuuuuuuuuu--
15:54sritchieRaynes: all done! I've got to wait for abedra and trptcolin to make me a few github projects, then I'll announce it and ping you
15:54Saturnationthe one thing is that it doesn't seem to start the super collider server when running local or whatever it is...
15:54sritchielove the plugin :)
15:54Raynes:D
15:54sritchieRaynes: pardon me for asking before checking the lein-newnew source myself, BUT is it possible to keep file permissions on template copying?
15:54Nick_11
15:54Saturnationsamaaron, for reference, I was the guy at the Overtone unconj with the computer...
15:55Saturnations/with/without
15:55samaaronSaturnation: oh cool - hello :-)
15:55Saturnationhello :)
15:55Raynessritchie: Nope. Not at the moment.
15:55sritchieno worries, thanks again
15:55samaaronSaturnation: did you ever get the internal server working? (use 'overtone.live)
15:56SaturnationI did
15:56samaaronperfect
15:56Raynessritchie: I would accept a patch for that though. And migrate it to Leiningen.
15:56Saturnationis it meant to be using super collider internally?
15:56sritchieI'll see if I can take a peek in the next few days
15:57samaaronSaturnation: yep, if (use 'overtone.live) works for you, then it will have booted an internal server
15:57samaaronSaturnation: could you do a fresh pull of the master branch on http://github.com/overtone/overtone
15:57Saturnationecho wasn't working when I tried some of the examples with internal server (didn't try them with the external server...)
15:57samaaronSaturnation: did you manage to make *any* kind of sound with the internal server?
15:58SaturnationOK, give a sec, was just firing up a clojar version
15:58Saturnationlots of good noises :)
15:58Saturnationloved the examples
15:58devnwub wub wub
15:58Saturnationkeen to give the jazz chords a go as well
15:58samaaronSaturnation: ok, so it'll be a bug in the examples, not a problem with the internal server
15:58Saturnationcool
15:58samaaronSaturnation: if you come across any such bugs, please either file an issue or fire off a message to the mailing lists
15:59Saturnation'k
15:59devnsamaaron: how cool is this random jazz scales thread? Apparently the key is to just incredibly open ended questions about an interesting topic.
15:59devnjust post*
15:59samaarondevn: it's crazy cool
15:59samaarondevn: I'm just suffering from a severe loss in the family, so i haven't been able to devote too much brain time to it yet
15:59devnsamaaron: speaking of overtone, I still need to write up those remote server notes
16:00devnsamaaron: sorry to hear that. :\
16:00samaarondevn: that would be cool
16:00samaarondevn: me too - particularly as we don't know if it's suicide or murder
16:00devnsamaaron: i don't even know how to properly respond to that. that's terrible.
16:01samaaronand both options are too hideous to contemplate
16:01SaturnationI can just lein swank from overtone, yes?
16:01samaarondevn: i don't think there is a proper response - that's why i'm still pretty numb
16:01samaaronso i'm spending time with the family and hacking on stuff i can wrap my brains around, which currently is the asset manager stuff
16:02samaaronSaturnation: you should just need to `lein deps` and then `lein swank` from within the freshly pulled overtone dir
16:02Saturnation"Warning - old config directory detected. Moved to ~/.overtone-old and replaced with new, empty config."
16:02samaaronSaturnation: that's a good sign :)
16:02Saturnationlein swank appears to have done a lein deps
16:03BahmanIs it possible to return a string from -main to the invoking program?
16:03Saturnationswank seems to have died :(
16:03Wild_CatBahman: write it to stdout
16:03samaaronSaturnation: oh. How?
16:03BahmanWild_Cat: Is it considered "return"ing?
16:03SaturnationJVM segfault
16:04samaaronSaturnation: but you got the internal server working before?
16:04Saturnation:(
16:04Saturnationyes
16:04SaturnationI can act insane and try again? :)
16:04samaaronhmm, that's odd - i haven't touched the server code
16:04samaaronsure, do a `lein deps` for sanity purposes
16:04Wild_CatBahman: well, the thing is, a program's return code is always an integer. For any kind of more complicated communication between processes (any processes) you'll have to use something beefier than a simple return statement in your main.
16:05BahmanSaturnation: If you're on Windoze, restart the computer several times to solve the problem :-P
16:05Wild_CatBahman: those ways include stdin/stdout (the parent process can read from the child's stdout and write to its stdin), files, UNIX pipes, general-purpose IPC libs like DBus...
16:05samaaronBahman: I believe he's on Linux - but if there are any windows users, i'd love them to lend a hand testign out the latest overtone
16:05BahmanWild_Cat: You're right. Now I recall that from C times.
16:05Wild_Catyeah, it's a language-independent problem ;)
16:05SaturnationOK, doing lein deps
16:06Saturnationfor what its worth "JackServer::Open() failed with -1"
16:06Wild_CatBahman: if you can get away with simple stdout reading, do it. ;)
16:06samaaronSaturnation: damned jack
16:06SaturnationUm, when I got it working, wasn't with github, but lein and clojars dependencies
16:07daniel___can anyone explain this error? https://gist.github.com/1398139
16:07samaaronSaturnation: sure, but I don't remember changing any jack-related code since 0.5.0
16:07BahmanWild_Cat: That's a good suggestion. I just worry that if there are runtime exceptions the caller may get garbage instead of a useful result :-)
16:07daniel___im using openjdk6
16:07BahmanOr exceptions are written to stderr?
16:07Wild_CatBahman: that's where the return code comes in handy.
16:07Saturnation(require 'overtone.live) sufficient/correct way to do this?
16:07samaaronSaturnation: do you have SuperCollider installed?
16:08SaturnationPretty sure I do, what's the command line for it?
16:08samaaronscsynth
16:08devnsamaaron: i have noticed that a lot of the examples are out of date or are missing some info. for instance, there is composed_dubstep, but overtone.sc.machinery.defcgen seems to have moved
16:08Wild_CatBahman: if the subprocess returns 0, it means it executed correctly. Otherwise, it means an error of some sort occurred, in which case you shouldn't bother with whatever data it produced
16:08samaarondevn: that issue is fixed in 0.6-dev
16:08BahmanWild_Cat: Thank you. That gave me an idea.
16:08Saturnationthat's the front end, isn't it?
16:09samaaronSaturnation: well, it's a separate program entirely
16:09samaaronbut if scsynth is in your PATH then you're probably good
16:09SaturnationI'm good
16:09Saturnationfrom that point of view
16:09samaaronok, so just stick with lein repl for the time being
16:09Saturnationdid that, still died :(
16:10samaaronit dies when you do `lein repl`?
16:10Saturnationfor sanity, going to do this from my lein project...
16:10samaaronSaturnation: wait a moment
16:10devnsamaaron: should I be using the localhost server or the internal server as my default for local dev?>
16:11samaaronSaturnation: just for the record, you just need to type `lein repl` and the JVM crashes?
16:11Saturnationno
16:11samaaronSaturnation: well, you're rushing ahead of yourself then ;-)
16:11Saturnationuser => (require 'overtone.live) and JVM crashes
16:11samaaronSaturnation: I just mentioned `lein repl` nothing else...
16:12quotemstr#clojure, we need to talk about keyword arguments. I'm trying to get CL-equivalent semantics. Is there a concise way to provide a list of keys, a list of default values for each key, and means to signal an error if keys not on the list are supplied?
16:12SaturnationOK, reset, what would you like me to test?
16:12samaarondevn: this page might help https://github.com/overtone/overtone/wiki/Connecting-scsynth
16:12samaaronSaturnation: right now, I just want to see if you can make a sound with the master branch
16:12daniel___can anyone explain this error? https://gist.github.com/1398139
16:12daniel___im using openjdk6
16:13samaaronit seems that your jack<->overtone setup is broken
16:13SaturnationOK, what's the best way to make a sound?
16:13Saturnationagreed
16:13samaaronso i think we're best going with an external server
16:13samaaronso for that, you don't (use 'overtone.live)
16:13samaaroninstead you (use 'overtone.core)
16:13samaaronand then (boot-external-server)
16:14Saturnationdon't think I ever got (boot-external-server) to work ever
16:15Saturnationbut was able to start the super collider server then connect to it fully the tutorials
16:15Saturnationspoke too soon maybe :)
16:15devnsamaaron: curiously enough I'm blowing up now on overtone.live
16:16samaarondevn: which os?
16:16devnOSX, 10.7.2, I'm using a Presonus Firestudio
16:16samaarondevn: I have no idea what a "Presonus Firestudio" is. Which version of Overtone?
16:16devn0.5.0
16:17samaaronSaturnation: did booting the external server blow up?
16:17Saturnationnope, looked like it connected
16:17Saturnationbut I accidentally killed the repl and can't get it to reconnect :(
16:17devnIn SC: Number of Devices: 6, 0: ..., 2: ..., etc. followed by
16:17samaarondevn: is that a non-apple machine?
16:18devninput and output sample rates do not match. 44100 != 48000, could not initialize audio
16:18samaaronSaturnation: sounds like you're having fun!
16:18Wild_CatCould Overtone be used as a VST-type audio source in a DAW?
16:18Saturnation:P
16:18devnI then start a swank server, and connect to the swank server
16:18mdeboardthis kills the swank server
16:18samaarondevn: ah, that's an annoying problem - i'm not sure how to automatically fix it. The solution is to go open up Audio MIDI Setup and set the rate of built-in output to 44100Hz
16:19devnsamaaron: will that cause overtone to crash?
16:19samaarondevn: yep, it causes SC to freak out, which causes Overtone to crash if you're trying to boot an internal server (internal server crashes kill the JVM process)
16:19devnsamaaron: that fixed it. thanks.
16:20samaarondevn: great - i should really document that fix - unless someone knows some magic AppleSCript vodoo
16:20samaaronSaturnation: so do you have a repl fired up yet?
16:22Saturnationyep, but not connected to the server... Getting a message to stop the application using hw:0, but NOOO idea what applicaiton that is :(
16:23samaaronSaturnation: I'm not sure what that means...
16:23Saturnationit means I needed to kill my browser :)
16:23SaturnationOK, I'm there and started :)
16:24samaaronSaturnation: great
16:24samaaronSaturnation: so (demo (sin-osc)) works?
16:24SaturnationHouston, we have a beep! :)
16:24Saturnationyes it does
16:24samaaronSaturnation: hell yeah
16:24samaaronok, now for the real test...
16:24SaturnationOh :)
16:24quotemstrWhy does Clojure use vector syntax for lambda lists again?
16:24samaarondo a (use 'overtone.inst.sampled-piano)
16:25SaturnationFailed to create temporary directory after 10000 attempts.
16:25samaaronSaturnation: oh crap
16:25Saturnation:(
16:25samaaroni wonder why that failed
16:26SaturnationI have no idea, but that won't stop me from having a look...
16:26samaaronSaturnation: are you still keen to help out?
16:26Saturnationas much as I'm able to
16:27samaarongo into the overtone.helpers.file ns
16:27Saturnationuse use?
16:27SaturnationOK?
16:28samaaron(in-ns 'overtone.helpers.file)
16:28Saturnationeek
16:28samaaronSaturnation: still with it?
16:28devnsamaaron: where do I get mdapiano?
16:29Saturnationyep, but some errors or warnings
16:29SaturnationException Error in checker for ugen binary-op-u-gen. Error: after initialisation, not all inputs to this ugen were numbers or other ugens (inputs which are explicitly allowed to be other data types (i.e strings) will have been converted to numbers at this point): [#<sc-ugen: binary-op-u-gen:ir [2]> overtone.helpers.file] overtone.sc.machinery.ugen.specs/with-ugen-checker-fn (specs.clj:133)
16:29Saturnationsorry
16:30samaarondevn: mdapiano sucks - you want to use the new sampled piano in 0.6-dev
16:30samaarondevn: but if you do want it, you need to use an external server with the bonus ugens installed
16:30samaaronSaturnation: what did you do?
16:31Saturnationtyped the wrong thing, sorry :/
16:31SaturnationOK, in overtone.helper.file
16:31samaarondevn: it would be cool to see if you can get the sampled-piano working too - just do a fresh pull of overtone in a new dir, lein deps, lein repl, (use 'overtone.live), (use 'overtone.inst.sampled-piano)
16:32samaaronSaturnation: it should be overtone.helpers.file
16:32Saturnationyes, I typed badly :)
16:32Saturnationbut I am there
16:32samaarontry (mk-tmp-dir!)
16:32samaaronsame error?
16:33Saturnationyep, that failed
16:33devnsamaaron: It's downloading it now
16:33SaturnationException Failed to create temporary directory after 10000 attempts. overtone.helpers.file/mk-tmp-dir! (file.clj:339)
16:33samaarondevn: awesome!!
16:33devnsamaaron: I'll say. This is crazy.
16:33samaarondevn: :-) It's great when things work
16:33devnI did not expect that at all. I assumed I'd need to go all over creation moving things into the proper directories, installing stuff, etc.
16:34samaarondevn: haha - Overtone is the magic source
16:34samaaronwell, only on OS X at the moment it seems...
16:34devnsamaaron: since I'm using sampled-piano, do I just replace calls to piano with sampled-piano?
16:34samaarondevn: yup
16:35samaarondevn: and once you've downloaded it, it's cached in your ~/.overtone dir
16:35samaaronSaturnation: try (System/getProperty "java.io.tmpdir")
16:35devnsamaaron: I'm trying to run the example Jeff Rose posted
16:35Saturnationit's /tmp
16:35Saturnationjust looking at the code now
16:36samaarondevn: did it download already?
16:36devnHe built a player fn that took piano as its second arg
16:36devnah, wrong number of args
16:36samaarondevn: does (sampled-piano 60) work?
16:37devnsamaaron: no unfortunately
16:37samaaronSaturnation: could you try evaluating (System/getProperty "java.io.tmpdir")
16:37SaturnationI did, it's tmp
16:37samaarondevn: oh - did it download successfully?
16:38devnsamaaron: "Download successful", yes
16:38Saturnationjust walking through the code at the repl now
16:38samaaronSaturnation: the output is "tmp"?
16:38samaaronSaturnation: not "/tmp"
16:38samaarondevn: could you take a look inside ~/.overtone/assets
16:39devnsamaaron: I think it is actually playing, but it's not being routed to the right outputs
16:39Saturnationit is the tmp directory "/tmp"
16:39samaaronSaturnation: ok, great
16:39Saturnationsamaaron, give a few minutes, I'll chase this one down...
16:39devn(sampled-piano 60) => 28, (sampled-piano 60) => 29, etc.
16:39devnso it looks like it's working, but the output is wrong
16:40samaarondevn: the 28 and 29 are the synth ids
16:40samaarondevn: does (demo (sin-osc)) work?
16:40devnsamaaron: *nod*, my firestudio uses output 3/4 instead of 1/2 for the headphones
16:40devnso that's where the issue is I think
16:40SaturnationI think the issue may be that it's /tmp and not /tmp/?
16:41samaarondevn: weird that the sin-osc plays though
16:41Saturnationnope, not right...
16:41devnsamaaron: it doesn't
16:41devnsamaaron: do you know how to set the outputs explicitly to be 3/4 instead of 1/2?
16:41samaarondevn: ah, so you can't get any sound?
16:41devnsamaaron: correct
16:41samaarondevn: where i come from *nod* means yes ;-)
16:42devnsamaaron: ah, well it does "work", but I just don't hear it
16:42devn:)
16:42samaarondevn: also 0 is typically left and 1 is right
16:42samaaronso you might be on 2/3
16:42SaturnationI was right
16:43samaarondevn: but i have no quick solution for routing output to 2/3
16:43Saturnationsamaaron, the file to string doesn't print the trailing / on directories it would appear
16:43samaaronSaturnation: cool - swap str with mk-path in the second line of the let clause after base-name
16:44samaaronSaturnation: we need to deal with windows which uses \
16:45quotemstr*sigh* Also, is anyone working on fixing contrib.error-kit to work with 1.3?
16:45Saturnationit's downloading now :)
16:45quotemstrcontrib.error-kit is relying on the implicit dynamicness of *variables*.
16:45samaaronplease try mk-dir - so i know i have a fix
16:45devnsamaaron: regardless, how would one go about changing the outputs for a selected output device. I have 6 outputs and I just need to change which ones it is using
16:45SaturnationOK
16:45samaarondevn: i honestly don't know
16:46samaarondevn: i'll have to think about it
16:47Saturnationnope, didn't like mk-path :(
16:47samaarondevn: we've ever considered 2 channels - 0 and 1
16:47samaaronSaturnation: ah, my bad - that wouldn't work
16:48Saturnationit looks correct when printed out...
16:49samaaronSaturnation: could you try this: https://gist.github.com/1398198
16:50samaarondevn: so would would a solution look like for you?
16:50devnsamaaron: i switched the cable and sure enough it is sending to 1/2 instead of 3/4
16:51samaarondevn: so you have sound now?
16:51devnwell, sort of
16:51samaarononly the right channel works?
16:51devnmy external device has a number of inputs and outputs
16:51Saturnationyay! :)
16:51Saturnationdownloading now
16:52samaaronSaturnation: nice
16:52devnthe default outputs are split left and right, but I use the output for headphones which is 3/4
16:52samaarondevn: if you unplug the external device, can you make a sound?
16:52Saturnationyou did the hard bits
16:52Saturnation3% complete, this may take some time
16:52samaaronSaturnation: :-)
16:52devnsamaaron: i know for a fact i can make sound, im just trying to figure out how to tell supercollider to use different default outputs
16:52Saturnationbrb
16:53devnit has 6 outputs to choose from, it chooses the first two it sees. I want to tell it to use different ones
16:53samaarondevn: ok
16:53samaarondevn: the mailing list might be the best place for this
16:54samaarondevn: so with your external device, you have 0 and 1 on speakers and 2 and 3 on headphones?
16:55devnsamaaron: in OSX they get referred to in the audio midi setup as: Master, 1: DAW 1, 2: DAW 2...6: DAW 6
16:55devn1 is Left, 2 is Right, 3 and 4 map to the headphone output
16:55samaarondevn: annoyingly supercollider is zero-indexed
16:56samaaronso (demo (sin-osc)) comes through the speakers, but not the headphones?
16:57devnsamaaron: i moved the cable I had going from my headphone out to my speakers, and changed it to be the first output on the device (which is Left) going to the speakers
16:57Saturnationmy new tag line may have to be "I'm Sam Aaron's code monkey..." :)
16:57devnI can get sound this way, but it is on one channel
16:57samaaronSaturnation: code monkey boy, code!
16:57samaarondevn: the demo will be one channel only
16:57Saturnation30%
16:58samaarondevn: can you hear the sampled-piano?
16:58samaaroneven only on one channel?
16:58devnsamaaron: yes, out of one channel, because i have two outputs, one of them is left, the other is right. do you see what I mean?
16:58samaaronYEY!
16:58samaaronso the asset manager thingy is working
16:58devnIt is using the first outputs it finds. I want to say: no. start here instead.
16:59devnor no, use these specific outputs
16:59samaarondevn: that's not built in yet
16:59duck1123I just set up Overtone and played through the samples on the wiki. Pretty neat
16:59samaaronduck1123: brilliant
16:59devnsamaaron: it seems like it must be. People have to have needed this in supercollider before.
16:59samaarondevn: oh, outputting to specific channels is
17:00devnyes, how do I do that?
17:00samaaronyou'd have to write your own synths
17:00devnwha? this seems crazy. I'll figure it out
17:00samaarondevn: it's only crazy because you're the first to try to get Overtone working with a crazy powerful external device
17:01samaaronOvertone tries to make things easy for people
17:01devnsamaaron: I think we are misunderstanding eachother.
17:01samaaronand so far everyone has just got stereo systems
17:01samaaronbut if you stick to the primitives, you should be fine :-)
17:01devnThis is not a problem with overtone. it is a supercollider setting or a hardware setting. I'm trying to determine how to get supercollider to change it's default outputs, not overtone.
17:01samaarontry: (demo (out 3 (sin-osc)))
17:01devnovertone should just send where supercollider knows to send to
17:02samaarondevn: I don't think you can get supercollider to change its default outputs
17:02samaarondevn: it's crazy low-level like that - we probably need to build those smarts into overtone itself
17:02samaarondevn: just like the noise limiting system i built
17:02devnsamaaron: zero indexing indeed!
17:02samaarondevn: which you would expect sueprcollider to have
17:03devn(demo (out 2 (sin-osc))) and (demo (out 3 (sin-osc))) are where I want to send
17:03samaaronperfect
17:03samaaronok, we need to think of a nice solution for overtone to handle this case
17:04samaaronso you essentially want to offset all output by n channels?
17:04devnyeah, basically
17:04samaaronso you'd lose access to 0 and 1
17:04samaaronbut that would be ok?
17:05devnsamaaron: yeah, that'd be fine -- i think the ideal solution would be something like:
17:05devn(defchannel speakers [0 1])
17:05devnor something like that, so you could define channel output groups to send to
17:06samaarondevn: yeah, maybe - ideas like that will need a lot of fleshing out
17:06samaaronwe could definitely do with this kind of abstraction though
17:07samaaronwe want to move away from supercollider's super low-level attitude to everything
17:07Saturnation83%
17:08devnsamaaron: yeah, i don't mean to be a pain, honestly this could be fixed by just getting a couple of cables out of a box, but based on my experience with other applications like logic pro, etc. you can just say: "for this track, send output to 3/4"
17:08devnI figured the same would be true for supercollider
17:09samaarondevn: we have to start somewhere :-)
17:10samaaronSaturnation: be pleased you're getting % updates - I worked on that today :-)
17:10Saturnationsomething to do while we wait :)
17:10samaaron:-)
17:11samaarondevn: btw, if i'm coming across less friendly than usual - my apologies, but my mind isn't where it normally is
17:11devnsamaaron: nono, not at all, i'm struggling to explain my setup and there were some small hurdles with 0 indexed outputs and so on
17:11devnsamaaron: thanks for your help
17:11SaturnationHouston, we have sampled-piano!
17:11samaaronSaturnation: very cool
17:11samaaronso linux is in the house
17:11Saturnationanything else?
17:12samaaronSaturnation: yes - you now need to have fun with it! :-)
17:12samaaronSaturnation: devn: thanks so much for your help
17:12Saturnationthank you for all the work you've put into it
17:12SaturnationI'll do my best to play later
17:12devnsamaaron: annnddd I fixed it.
17:12samaaronSaturnation: youan thank me by having fun with it
17:13samaarons/youan/you can/
17:13samaarondevn: what did you do?
17:13devnsamaaron: I opened up the configuration utility that came with the device that up until now seemed useless
17:13devnand I switched outputs 3-4 to be mixer instead of 1-2
17:14samaarondevn: ah, so you found a device-oriented fix?
17:15devnsamaaron: *nod*
17:15samaarondevn: cool
17:15devn<-fool
17:15samaarondevn: although i still think you raise some important points
17:15samaarondevn: overtone should also be able to handle this sort of thing
17:16devnnow to figure out how to get this to play with sampled-piano instead of piano
17:16devnpiano sure took a lot of args
17:18devnsamaaron: will there be additional params added to sampled-piano to set the length?
17:19samaarondevn: perhaps - it's just a pre-recorded sample being played back
17:19samaarondevn: we could run an envelope over it
17:20samaarondevn: but it does sound *much* better than the synth piano
17:21samaarondevn: happy to accept sample-piano improvement patches. I've not put any time into it - I just got it working. My efforts have been put into the asset manager stuff
17:22samaaronOvertone can now reference arbitrary wav files on thh web and cache them locally
17:22samaaronI feel like it's a huge step forward
17:28kylert\exit
17:28lnostdaldoes clojure hava a "common" (parent) data type that covers all integer types?
17:30devnsamaaron: muahaha, sorry, got totally distracted with playing generated jazz progressions
17:31Rayneslnostdal: Number, I'd think.
17:31lnostdalbut that covers non-integer types too, Raynes
17:32RaynesOh, Integer types.
17:32RaynesSorry, I've been awake for too long.
17:32lnostdal:)
17:32samaarondevn: that's ok, i got distracted by the cat wanting some fuss
17:32samaaronnow it's time for bed
17:32samaarondevn: it's super cool that you're having fun with the jazz progressions :-)
17:32devnsamaaron: thanks for the help. feel better.
17:32Rayneshttp://raynes.me/hfiles/mraow.mov
17:33samaarondevn: i'll try - but i'm sure it'll take quite some time
17:33Raynes<3 cats.
17:35gfredericksRaynes: they're fluffy.
17:35Raynesgfredericks and cute. :>
17:36gfredericksRaynes: that'd be an interesting slogan for me
17:36RaynesYeah, linkinus decided to not put a semicolon there.
17:36gfredericksnow I'm imagining it as the subtitle of a movie
17:42technomancyRaynes: seeing the backscroll about permissions, you can't actually read or set octal permissions until JDK 7
17:42technomancyyou can just set the executable bit
17:43Raynestechnomancy: Ah. Makes sense. /cc sritchie
17:43technomancywell... I would posit that it does not make sense.
17:43technomancybut that's how it is
17:48danlarkinbecause permissions aren't a feature of all the platforms to which java has been ported
17:48danlarkintherefore it cannot be supported
17:48danlarkinit's genius!
18:02zakwilsonI had no idea Raynes was a teenager. On the internet, nobody knows you're a dog.
18:05Rayneszakwilson: Indeed.
18:06zakwilsonWell, good work. I know I'm using a library or two you've written somewhere, and that's more than I've contributed to any open source community as far as I'm aware.
18:06RaynesHeh, thanks.
18:18alexbaranoskyhey guys, is cake still going to exist after the merger with Leiningen?
18:19Raynesalexbaranosky: It isn't going to be taken down and eliminated from the internet, one file system at a time if that's what you mean.
18:19RaynesIt'll only be actively developed as long as we still need it for our projects at Geni.
18:19RaynesWhich realistically means a couple of months, probably.
18:21alexbaranoskyRaynes, I tried to download it via the script I found on the site, but the url wasn't found
18:21alexbaranoskyRaynes, I'm wondering if I should be keeping the cake-midje plugin up to date with the lein one
18:21RaynesDon't bother.
18:22RaynesAs for the URL problem, no clue. It's been down for a while and I'm unclear about whether or not it is intentionally not being brought back up.
18:24alexbaranoskyRaynes, thanks for the info, I now know I can leave cake's Midje plugin to rot :)
18:25RaynesFeels good, doesn't it? Being able to only maintain one thing.
18:25alexbaranoskyyes, especially since I don't even have cake setup on my machine -- I couldn't even get past that one initial stage =D
18:31zakwilsonWhat's this? Lein/cake merger?
18:32ibdknoxand the people rejoice :)
18:32zakwilsonYes, probably a good thing.
18:33ibdknoxdefinitely a good thing!
18:33zakwilsonHey, wait. You're the korma guy, aren't you?
18:33ibdknoxmaybe
18:33ibdknox:)
18:33zakwilsonYes if I have a compliment, no if I have a complaint?
18:33ibdknoxbasically.
18:33ibdknoxhaha
18:33ibdknoxWhat's up?
18:34zakwilsonI haven't used it yet. I did poke around the site and source though. What does it do with dates?
18:34ibdknoxJDBC turns them into java.sql.TimeStamps
18:34alexbaranoskyzakwilson, if you're looking for help with your love life, korma's not that kind of thing
18:35ibdknoxeveryone loves indian food!
18:35ibdknox:p
18:35zakwilsonalexbaranosky: I disagree. My girlfriend loves it when I make curry.
18:35ibdknoxmine does too :D
18:35zakwilsonAre java.sql.TimeStamps those horrible things based on java.util.Date?
18:36ibdknoxI believe so
18:36ibdknoxI just convert them into millis
18:36ibdknoxthat isn't specific to Korma though
18:36ibdknoxall java.jdbc will do that
18:36ibdknoxI believe
18:37zakwilsonRight, I had that impression. I wonder how hard it would be to make it use clj-time.
18:37zakwilsonAnd what were the people who wrote the Java data libraries smoking?
18:37ibdknoxlol
18:37ibdknoxwell the trivial solution is to just convert them
18:38ibdknoxfixing the use of java.sql.timestamp would likely mean changing the sql drivers
18:38ibdknoxwhich isn't worth the effort
18:39zakwilsonhttp://pastebin.com/CUyv7rSA <-- is this reasonable, or is there a better way?
18:41ibdknoxnot sure, like I said, I always just convert to millis :)
18:43zakwilsonFair enough. Thanks for trying to make the nasty little problems a little nicer. SQL has the most horrid syntax....
18:44ibdknoxhaha you're telling me, ugh
18:44ibdknoxpeople keep telling me about quirks between them
19:02zakwilsonYeah, that's potentially nasty too. I think it actually might be better if databases all had different query languages and abstraction was done at the library level.
19:11gfrederickszakwilson: we could call it JDBC
19:12ibdknoxlol
19:16zakwilsonJDBC, as I understand it doesn't abstract away any of the differences in SQL.
19:16gfredericksoh. then that would be a bad name for it.
19:17gfredericksmaybe korma?
19:17amalloyyes it does
19:18amalloyeg getting table metadata takes different describe commands in postgres vs mysql,. but i'm fairly sure it's the same in jdbc
19:18zakwilsonOf course, I haven't used JDBC directly and don't know what the hell I'm talking about.
19:19ibdknoxJDBC does do some unification
19:19ibdknoxthough it doesn't unify SQL differences itself
19:19ibdknoxthings like "AS" for example
19:20ibdknoxbasically it's a mess :)
19:21zakwilsonI bet half the nosql movement wouldn't exist if relational databases came with a nice query language.
19:21ibdknoxhm, how would you do it better?
19:22RaynesHe wouldn't do it at all and would instead opt to write things his application needs to store down on paper and place them in file cabinents.
19:22ibdknoxwoah
19:22ibdknoxthat's awesome, isn't storage space pretty limited though?
19:22zakwilsonIt has already been done better, I suspect. QUEL looks like a nicer language than SQL.
19:23ibdknoxhow's lookup time?
19:23gfredericksibdknox: I think your wrist would be the bottleneck before the cabinet size would be
19:23ibdknoxlol
19:23ibdknoxtrue
19:23zakwilsonTo generalize, I'd give it a more regular syntax and try to make it easy for the query language to be a compiler target.
19:23gfrederickshence cabinet size is effectively infinite, and we all need to switch to cabinet-persistence
19:24ibdknoxzakwilson: my sql compiler is < 500 lines
19:24zakwilsonI'd probably just make it based on data structure literals. I suspect it would look lispy.
19:25ibdknoxSQL would be fine if everyone adhered cleanly to the specs
19:26ibdknoxand for the most part they do
19:26ibdknoxotherwise korma wouldn't work at all
19:26ibdknoxlol
19:26zakwilsonAs a compiler target, sure. As a language for using directly... it's pretty bad.
19:27tolstoyThe guys I knew who worked a lot with it would always "tune" queries to appeal to the underlying engine. And re-arrange tables to work at "scale". The promise of SQL sort of disappears after a while.
19:27ibdknoxthat's true
19:28zakwilsonThe relational model is actually pretty nice for most apps, but real databases feel like they're from the stone age.
19:28gfredericksfunny when the stone age things are the ones with all the features
19:28tolstoyYeah, I like SQL if I get to use it without thinking about "performance" and so on. Nice and declarative.
19:29gfredericksand the new things are the simple ones
19:29amalloyseancorfield: is your clj-time repo the official one?
19:29RaynesIt is.
19:29ibdknoxwhat happened to the other one?
19:30ibdknoxhuh
19:30ibdknoxI missed this... when did getwoven disappear?
19:30ibdknoxand why?
19:32zakwilsonSQL is declarative, but it isn't very nice. Mixed prefix, infix and postfix, prepositions that don't actually do anything, but have to be there, different syntax for closely related operations (I'm thinking of create/alter and insert/update)
19:33zakwilsonIf I tried to push a programming language with nice semantics (say... those of Clojure) and a syntax like that, somebody would probably force me to have a psych evaluation.
19:33ibdknox:D
19:33zakwilsonJS has some warts, but it's no SQL.
19:33gfrederickso_O
19:33ibdknox...
19:34gfredericksI think in terms of obvious ways it could have been better....
19:34tolstoyzakwilson: I guess so. But when faced with an SQL string vs Hypernate (or some such scheme)….
19:34zakwilsonPHP is bad too, but everyone here probably knows that already.
19:34tolstoyHibernate? Something like that.
19:34ibdknoxPHP is bad for very different reasons than JS
19:34zakwilsonI've never used Hibernate. The only ORMs I've used a clsql and activerecord.
19:34ibdknoxand very different reasons the SQL
19:35gfredericksI can't imagine anyone choosing to use JavaScript if it hadn't been defaulted on them
19:35zakwilsonAre you aware of node.js? It's the latest trendy thing. Everybody's doing it.
19:35gfredericksyes I am.
19:35ibdknoxbecause they started with JS
19:35zakwilson(except me - I'm with you on that - don't see the point)
19:36tolstoyMy boss LOVES node.js. I keep getting hints. Like "Threaded app servers are a legacy architecture."
19:36ibdknoxhaha
19:36ibdknoxI've tried building something large and performant in node
19:36ibdknoxIt was painful
19:36ibdknoxand not performant :)
19:37zakwilsonUsing events by default seems backwards. Most things you'd want to do probably shouldn't be event-based. Futures are nice.
19:37tolstoySeems like it might be okay for a simple, single-purpose API, but I end up writing apps which have (say) and MQ broker sending stuff out, or what have you, and I don't see how node handles that.
19:37tolstoyErlang, on the other hand....
19:37ibdknoxzakwilson: are you zak on HN?
19:38tolstoyzakwilson: I've been trying to find research about events vs threads, and I can't make much sense of it. events for mostly do-nothing, long-running connections, threads for quick request/response. *shrug*
19:38zakwilsonibdknox: yes
19:39zakwilsontolstoy: thread pools managed by your runtime for all of it.
19:39tolstoyzakwilson: By "much sense" I mean most of it seem alike advocacy.
19:39ibdknoxzakwilson: did my response on the reasoning behind Korma answer your question?
19:39zakwilsontolstoy: oh, of course it is.
19:40zakwilsonibdknox: yes. I'm convinced enough to give it a try on the project I should work on later tonight after I get the project I've been procrastinating on done.
19:40ibdknoxhaha
19:40ibdknoxuse 0.3.0-alpha5
19:41Raynesibdknox: We require new noir version with new lein-noir version using my fork.
19:41zakwilsonWhy?
19:41clojurebotwhy not?
19:41ibdknoxRaynes: haha we require it, huh?
19:41alexbaranosky~shrimp
19:41clojurebotshrimp are small
19:42Raynesibdknox: I REQUIRE IT.
19:42Raynes(require new.lein.noir.version)
19:43ibdknoxwell
19:43ibdknoxI think 1.2.2 will be coming out next weekend probably
19:43ibdknoxI need to do a docs pass
19:44RaynesAcceptable.
19:44Raynesibdknox: Have you considered marginalia? As in, would you accept a patch to add marg docs?
19:44zakwilsonWhy do I want to use the alpha? Will it differ greatly from the docs?
19:44ibdknoxzakwilson: bug fixes, and a better syntax for with
19:45ibdknoxRaynes: marg couldn't run over the project last time I tried
19:45Raynesibdknox: Bullshit.
19:45RaynesGive me 20 seconds.
19:45ibdknoxRaynes: hah
19:45RaynesI'm the bloody king of marginalia.
19:45gfredericksone of those bots needs a stopwatch
19:45ibdknoxRaynes: there was some issue with having hiccup in it
19:51ambrosebswho's got a Confluence admin account? My account needs editing privs (ambrosebs)
19:51ambrosebsplease
19:56devnambrosebs: any rush? i think i saw you posted to the ML about this, yeah?
19:56ambrosebs:) just excited about creating a page for compiler hooks
19:57ambrosebsI can wait
19:57ibdknoxcompiler hooks?
19:58ambrosebscurrently there is no entry point for customizing the compiler
19:58devnambrosebs: I don't have admin. Sorry man.
19:58ambrosebsfor example, I want to perform some type checking when every top level form is evaled
19:58ambrosebsor "analyse"d
19:59ibdknoxI see
19:59ambrosebsmuch easier to target Clourescript atm
20:00ibdknoxyeah, there was talk of this at the Conj
20:00ibdknoxabout exposing analysis
20:00ibdknoxit would be very useful for tools :)
20:01devnibdknox: you need some noir and pinot logos
20:02ibdknoxas I am a mediocre visual designer, I always do text logos :)
20:02ibdknoxPinot needs to have a real release too
20:02devnibdknox: if i came up with a couple for you to peek at maybe?
20:03ibdknoxsure!
20:09devnI'm not so great at it myself, but I've been trying to learn. I have an eye but I don't know a lot of the tools well enough to make what I want.
20:10ibdknoxdevn: yeah, I'm the same. Worked with some world class designers, so I *know* good graphic design, I just haven't worked enough at it to get above "meh"
20:13devnyour colors are really nice
20:22brehautibdknox: it makes a huge difference having worked with good designers though
20:23ibdknoxbrehaut: yes it does
20:23brehautyou do internalize a lot of the smaller details
20:25devnibdknox: https://skitch.com/thinkslate/gma6i/noir
20:25devnibdknox: ;)
20:32devnibdknox: that is of course, a picture of dick tracy
20:33alexbaranoskydevn, ibdknox: Dick Tracey is of course, the shit
20:34devnhah
20:34alexbaranoskydevn: did I see you had an autotest project on github?
20:35alexbaranoskyor lazytest - something near to that
20:38devnalexbaranosky: I'm cleaning up my github, that's Stuart Sierra's
20:40alexbaranoskyAre there any Boston-area Clojure jobs with opening these days? I'd love to be going to work tomorrow to do Clojure instead of Java/Scala... I know there's Sonian, but not sure if they're hiring.
20:55devnalexbaranosky: careful, this channel is logged publicly
20:55devn:)
20:55alexbaranoskyha
20:59tolstoyI have to admit, being able to use a Mac and work in a fun language (Clojure, Erlang, even Scala) would be a plus for me, but what I'd REALLY like is a shop with clear business goals. Even if they last one month at a time.
21:01devntolstoy: what if they last for more than a month but they aren't your own?
21:01devni don't know that i value consistency over evolvability
21:02tolstoydevn: I value clarity, more and more.
21:02devnbut maybe that is a false dichotomy
21:02tolstoyYeah.
21:02devna thing can be consistent in its evolvability, or evolvably consistent
21:03tolstoyA lot of times we argue for this or that architecture, this or that technology choice. The sad thing is, just about anything can work. But clear business goals help focus the decisions.
21:03devntolstoy: to what end?
21:04tolstoyTo the end of achieving the goals.
21:04devngoals are too specific IMO. "intentions" are more important.
21:05devnthey're more malleable.
21:05tolstoyWell, hm.
21:06tolstoyMaybe we mean the same thing with goals/intentions.
21:06devnmaybe. but goals are often hard-coded. "this is the concrete goal"
21:06alexbaranoskytolstoy, you're just saying you want to work somewhere with direction?
21:06tolstoyI don't mean, "A web form with three fields," as a goal, for instance. But it would be nice to know if keeping petabytes of data for 10 years is a goal.
21:07tolstoyalexbaranosky: Yeah. Well, I mean, over time, I find myself less concerned with my tools, and more interested in having clarity on the problem I need to solve.
21:07devnconcreteness in the face of uncertainty seems foolish, which is why i prefer to think of intentions instead. if our intention is to get a lot of users, that is different from a goal of getting a lot of users. one of them is a finish line, the other is a sequence of possible finish lines
21:08tolstoyOr maybe more accurately, why these problems and not others need to be solved, or the context in which the problems are even meaningful beyond just your boss telling you to do it.
21:08devnheh, well, that is one for the ages.
21:08alexbaranoskytolstoy: I agree, to an extent, but certain tools are better fits for certain jobs, and certain tools are just better all around - just mho
21:09tolstoyalexbaranosky: Yep. I agree wholeheartedly.
21:09mdeboardNoir's philosophy in 38 seconds: http://www.youtube.com/watch?v=USlnfTGlhXc
21:10devnmdeboard: hahahahaha
21:10tolstoyHeh. That's what I tell all my slaves.
21:11mdeboarddevn: ibdknox's post on the listserv reminded me
21:11devnmdeboard: we should put stuart halloway's face over bruce lee's
21:14alexbaranoskyWould anyone local to the Boston are be interested in getting together for Clojure hacking sessions?
21:15alexbaranoskyactually that might be a good question for the mailing list
21:15tmciveralexbaranosky: absolutely!
21:15devnalexbaranosky: start a meetup
21:15alexbaranoskydev: do you have your graphic design software out to get to work on that?
21:16alexbaranoskytmciver: are you around beantown? I'm in E. Boston
21:16tmciverThere is a Boston Clojure meetup already and they're due for another one soon.
21:16tolstoymdeboard: That post is great.
21:16tmciveralexbaranosky: yeah, north of Boston
21:16mdeboardtolstoy: It is indeed
21:16mdeboardI don't compare just anyone to Bruce lee
21:17alexbaranoskytmciver, yeah, but they're so infrequent, and also, I think it'd be cool to focus on contributing to open source
21:17alexbaranoskytmciver: I didn't meet you at the Conj did I ?
21:18tmciveralexbaranosky: I'm not sure :\
21:18alexbaranoskytmciver: me neither hehe
21:19tmciveralexbaranosky: are you a member of the Boston meetup group?
21:19alexbaranoskytmciver: I am - I was at the last one with the angry Racket programmer
21:19tolstoymdeboard: I get the idea that ibdknox has begun to think of web development as a fine art. I like it.
21:20tmciverOh yeah, we did meet! :)
21:21alexbaranoskytmciver: is your name Tim? I think Rob and I might have talked to you about our BAZNEX group??
21:21lazybotalexbaranosky: Definitely not.
21:21tmciverYes, I was just trying to remember that name.
21:22alexbaranoskywell, we were sortof thinking that something like that, but only for Clojure programmers might be interesting, because we could send out messages to the different lips/clojure groups locally and get more people to hack with
21:23alexbaranoskytmciver: http://groups.google.com/group/baznex
21:23tmciveralexbaranosky: Yeah, I was just checking it out. Did you guys ever meet at Sprout?
21:24alexbaranoskyprobably this wweek, the day before thanksgiving was a dumb idea
21:24mdeboardtolstoy: He's been doing it a long time, he probably doesn't even see the numbers anymore; all he sees now is blonde, brunette, redhead.
21:26tmciveralexbaranosky: I'll definitely be at the next meeting if I can make it.
21:27alexbaranoskytmciver: how much time in advance is it best for you to know, for scheduling? We've been being very impromptu about it, but that should really change - we should make the schedule firmer for people like you who have to travel into Boston a little
21:29tmciveralexbaranosky: it's no problem. I work in Cambridge and have been going into town from work occasionally lately. I'm flexible.
21:30tmciveralexbaranosky: in fact, I'll sign up for the google group now.
21:30alexbaranoskytmciver: great, we always talk on the google group about upcoming gatherings
21:31alexbaranoskyI've hit a bit of a wall in adding method stubbing/mocking to Midje
21:31mdeboardIndianapolis y u no have clojure meetups
21:31tmciveralexbaranosky: Done. So is there a meetup planned for Wednesday?
21:31alexbaranoskymdeboard, why u no started one?
21:32mdeboardalexbaranosky: I don't have the time or I would have already
21:32alexbaranoskylet me post about it. I think yes is the answer
21:32alexbaranoskytime is an underrepresented form of wealth
21:33mdeboardalexbaranosky: Indeed. Single parenthood + an hour-long commute every day = huge time drain
21:33gfredericksmake the kid do the commute instead: both problems solved.
21:35alexbaranoskyhey tmciver: just add yourself to the thread I started saying you're interested :)
21:38tmciveralexbaranosky: Done.
21:41alexbaranoskytmciver: great. !
21:41alexbaranoskyit's always good to bring your laptop, since we pair a lot on stuff, more laptops is best
21:45tmciveralexbaranosky: Yup, I was going to anyway.
21:50tmciveralexbaranosky: Wednesday is the 30th . . .
21:50tmciveralexbaranosky: did you mean this Wednesday?
21:50alexbaranoskycrap
21:50alexbaranoskyhehe
21:51alexbaranoskylet me fix post again. I'll add your interest to my post, so you don't have to post again
21:51tmcivercool
21:51alexbaranoskyI looked at the calendar for November... durrr
21:51tmciverand you call yourself a geek . . .
21:51alexbaranoskyI'm a dumb geek though
21:52tmciverIt's OK, me too.
22:02quotemstrWhat's wrong with (use 'clojure.string '(split)) ?
22:04tmciverquotemstr: are you referring to the warnings from name conflicts?
22:04trptcolin,(use '[clojure.string :only [split]])
22:04clojurebotnil
22:04quotemstrtrptcolin: The documentation says "list", so I thought round brackets.
22:04trptcolinthat'll work too
22:04quotemstrtmciver: I'm trying to work around those warnings.
22:04trptcolin,(use '[clojure.string :only (split)])
22:04clojurebotnil
22:04quotemstruser=> (refer 'clojure.string :only '(split))
22:04quotemstrException No namespace: clojure.string clojure.core/refer (core.clj:3761)
22:05quotemstruse gives the same error.
22:05trptcolinyou need the whole thing wrapped in a vector like mine
22:06quotemstrAh!
22:07trptcolinit would be nice to have an examples in the use docstring, but until then: http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
22:08trptcolinerr, pretend i know about grammar and that i said "an example"
22:08quotemstrOkay, (use '[clojure.string :only (split)]) works but (use '(clojure.string :only (split))) doesn't.
22:09quotemstrAren't both just seqs?
22:09quotemstrIs there a way to just refer to string.split directly?
22:10trptcolinlibspecs have to be vectors
22:10trptcolinor symbols
22:10quotemstrActually, that reminds me: if I'm storing pairs of things, should I use a two-element vector, a two-element list, or something else?
22:11amalloytwo-element vectors are most common
22:11quotemstrAha!
22:11quotemstrThanks for the blog post.
22:12quotemstrAnd while we're on namespaces: I want to load-file, but in the context of a particular namespace (or a particular lexical environment, more generally). Is there a high-level way to do that?
22:12quotemstrAnd in the repl, once I (ns foo), doc no longer works. Where does it come from?
22:12amalloyyou can't really eval code in a non-null lexical environment
22:12quotemstrAh, repl.
22:13quotemstramalloy: Well, I want to load a configuration file, and I want to define some primitives for the configuration file to use.
22:13amalloy(eval `(let [...] ~(read the file)))
22:14amalloyis the only way i can think to do it
22:20quotemstrOr just have the configuration file begin with a namespace directive. I'll just do that.
22:20quotemstrThanks.
22:21quotemstrActually, one more thing: using immutable locals is _very_ inconvenient in some cases. One example is doing some complex text layout where multiple sets of coordinates need to be maintained and updated.
22:21quotemstrHow bad is it to use vars even when there's no thread-dependent state?
22:22amalloyvars are usually the wrong tool. a ref or atom makes more sense, if you can't restructure it to be immutable (which is always possible, of course, but might not be most convenient, as you say)
22:23quotemstrUsing a ref for something only modified by one thread feels wrong somehow.
22:23amalloynot as wrong as a var for something that isn't top-level
22:24quotemstrHrm, okay.
22:24quotemstrWhy is #' a reader macro? Is (var foo) all that common?
22:24amalloyplus they're move convenient anyway, with alter/swap! functions instead of var-set/var-get
22:25amalloyhuh, good question. it does seem like an odd choice, just to save three or four characters
22:28amalloyperhaps it's a remnant from a time when vars were more-special in some way, and (var foo) didn't exist
22:28amalloybut that's just a crazy guess. who can know why rich added #'
22:30quotemstrWell, it does conveniently stomp on a common CLism. :-)
22:30amalloyi don't get "stomp on" in this context. i mean, i know what #' does in CL, but...?
22:31quotemstrIt conflicts, that's all.
22:31quotemstrIt's still habit to write #'function.
22:32amalloyquotemstr: well, that still works
22:32amalloy&(map #'inc [1 2 3 4])
22:32lazybot⇒ (2 3 4 5)
22:32quotemstrOh, right.
22:32quotemstrBecause functions are vars.
22:32amalloyit's a bad habit, but not an actual problem
22:32amalloybecause vars are functions
22:32amalloyor i guess you could think of it that way
22:32quotemstramalloy: The other way around, yes?
22:33amalloy&(ifn? #'inc)
22:33lazybot⇒ true
22:33amalloyvars are functions which, when called, delegate to their current value'
22:33amalloywhereas not every function is a var
22:34quotemstrAh.
22:34quotemstrSo that's why all defs are highlighted in font-lock-function-name-face.
22:38amalloyi doubt if that's related. it's not like the parser knows "clojure thinks this is a function"; whoever wrote the syntax highlighter just figured things you def at the top level should stand out and might as well be highlighted as functions
22:39trptcolinbefore i post this to the dev list, anybody see anything silly i'm missing with this clojure.java.io issue? https://gist.github.com/1398972
22:40trptcolini have a patch ready for it, just would love another set of eyes - getting shot down over IRC doesn't hurt as bad
22:42amalloytrptcolin: doesn't really seem like an issue related to java.io, does it?
22:43trptcolini feel like the Coercions protocol should handle the encoding/decoding
22:43trptcolinas-file / as-url
22:43ambrosebsgtrak: you might be interested in following this project https://github.com/frenchy64/typed-clojure
22:43amalloyjio/resource is just delegating to .getResource on the classloader
22:43trptcolinyeah jio/resource is cool
22:44trptcolinbut when readers & writers get constructed, that's the problem
22:44amalloymaybe you could clarify what change you plan to make?
22:45trptcolinyep, that'll help :)
22:45trptcolinhttps://gist.github.com/1398988
22:49trptcolin.toURL is what's currently used on the File (as-url ...) coercion, and that's deprecated in java 1.6; but my real issue is with slurping resource URLs, and i'm feeling decent about the change
22:50trptcolinbut usually when i feel this confident about a problem in clojure i'm wrong :)
22:52trptcolini guess normally resources are in jarfiles, so things like spaces would be much rarer...
22:54technomancytrptcolin: hey... someone suggested that your ns blog post would make a good replacement for http://clojure.org/libs
22:56jodarohrm
22:56trptcolinthat came up on the mailing list awhile back (I think on Alex's initial clojure.org push), didn't seem to get much clojure/core traction
22:56jodarolein daemon should fork and return me to the shell, no?
22:57technomancytrptcolin: if you know the thread I can pipe up in favour
22:57trptcolinnot sure if it just fell through the cracks or if there was actual opposition. i can understand wanting clojure.org to be docstring-y
22:57trptcolinlemme take a look
22:57technomancyRich actually said during dinner at the conj that he always has to look up examples to remember how ns works, so ... I think that's a pretty good argument for needing better docs =)
22:58technomancytrptcolin: did you see http://dev.clojure.org/jira/browse/CLJ-879 ?
22:58trptcolinyeah, i like it
22:59trptcolini also kind of like the idea that came up on the list (maybe hiredman?) about using symbols instead of keywords in the ns macro
22:59trptcolinespecially since it already works, as someone (amalloy?) pointed out
23:00trptcolinso (ns foo (require bar))
23:00technomancyI think the point of keywords is that it looks more declarative, which I can buy
23:00technomancyto switch to symbols you would have to rewrite require-the-function to make it work exactly like the require clause of ns
23:00technomancyotherwise you're just asking for confusion
23:01trptcolinrequire-the-function?
23:01trptcolinoh, nm
23:01trptcolingotcha
23:02technomancydiscussing breaking changes right after 1.3 has landed definitely falls into the category of long-term dreaming =)
23:03trptcolin:)
23:07trptcolinhere's that thread: https://groups.google.com/d/topic/clojure-dev/JluIepQCGbI/discussion - looks like Andy, Alex, & I had a brief offline chat about it, but didn't land anywhere
23:07technomancythanks
23:17ckirkendalldoes anyone no a good way in clojure script to check for the type NodeList
23:17ckirkendall*know
23:17dnolendid you try (instance? js/NodeList x)
23:19ckirkendalldnolen: crap I forgot the "js" thx!
23:20quotemstrWhy isn't every deref in a transaction an ensure?
23:21hiredmanquotemstr: deref derefs many things besides refs
23:23quotemstrOkay, so why isn't every deref or a ref an ensure?
23:23hiredmanderef on a ref?
23:24hiredmanbecause then there would be no way to get the value of a ref without ensuring it
23:24quotemstrWhy would you want to do that?
23:25hiredmanbecause you may have a most unrelated ref you just want to grab whatever value from
23:25hiredmanmostly
23:30amalloyeg maybe you want to log a message like "about N% done" - doesn't have to be super-accurate, but you'd like to deref the %-done ref
23:31mdeboardalexbaranosky: nice :P http://news.ycombinator.com/item?id=3283713