#clojure logs

2013-01-05

00:07muhootomoj: it's bitcoinj under clj on the server side
00:07muhooit'll be a store for music. soon, i hope
03:06amalloyambrosebs: my understanding was he wanted something more like an enum: "This function returns either :foo or :bar"
03:07ambrosebsamalloy: sounds like a union?
03:08amalloyi dunno. i haven't done much more than skim typedclojure, myself. but isn't a union a union of existing types? whereas :foo is a value, not a type
03:08ambrosebsTyped Clojure has value types (singletons)
03:09ambrosebs(U ':foo ':bar)
03:09amalloyexcellent. then it sounds exactly like...uh...what i think he wanted
03:09ambrosebs:)
04:19dbushenkohow to learn in clojurescript how many parameters the function expects?
04:49dbushenkohow to get current namespace name in clojurescript?
05:05tomojthere is no current namespace
05:06tomojexcept in macro land, in which case it should be, what, (:ns &env) ?
05:06amalloy*ns*?
05:08tomojoh yeah
05:08SgeoI'd need to understand them first though
06:40Netfeedwith clojure.java.jdbc, what's the best way to run a string with 1 or more different sql-commands?
06:41Netfeedmost likely to be inserts and/or create table and such
06:42Netfeedso i'm not sure if i can use with-query-result for it
06:45thorwilNetfeed: what's the sql you have in mind?
06:48Netfeedit could be something like "CREATE TABLE foo (name TEXT); INSERT INTO foo ('bar');"
06:48Netfeedthe problem is that i read it from a file and i don't know what it is ahead of execution
06:49thorwilit should be obvious that with-query-result is solely for queries
06:50Netfeedyes
06:51Netfeedit seems like there's a way to do it in 0.2.4-SNAPSHOT
06:52thorwilso you would have to use one of with-query-results, insert-records, create-table ... conditionally
06:53thorwilNetfeed: is taking the different commands from a text file an absolute must, or can you change the architecture?
06:54Netfeedi can't change that, but it seems like db-do-commands will do the trick in 0.2.4-SNAPSHOT so i will take a look at that
06:55thorwilah, do-commands
07:01samratin nrepl.el, how can I find out which port the REPL is running on?
07:06AimHereYou could always use 'netstat -p' (on Linux) or with some other command line switches on other OSes
07:16Sgeo,'??!lambda
07:16clojurebot??!lambda
07:16Sgeoawesome
07:20hyPiRion,'it's-dangerous-though.
07:20clojurebotit's-dangerous-though.
07:21hyPiRionAt least for function names.
07:21SgeoI'm reading some Oleg stuff
07:21SgeoHe defines a ??!apply macro and a ??!lambda form that ??!apply interprets
07:22SgeoRight now I'm reading him write a macroexpansion-level factorial using them
07:23Sgeousing syntax-rules of course which is the only R5RS macro mechanism
07:50RaynesSgeo: There is a certain level of nerd that even we should be careful treading near.
07:50RaynesYou're prancing all over it.
07:50Sgeo:D
07:51SgeoI'm trying to figure out if any of this stuff could be useful in Racket or Clojure
07:51SgeoRather than just pure R5RS
07:51Sgeo(which only has syntax-rules, not syntax-case)
07:58acuziofolks - how do you invoke the local bot ?
07:59acuzio~ ping
07:59clojurebotPONG!
07:59acuzioah there it is -
07:59hyPiRion~botsnack
07:59clojurebotThanks! Can I have chocolate next time
08:00Raynesacuzio: , is for code eval in clojurebot, & is for code eval in lazybot, and ##(println "is for code evaluation in the middle of a message")
08:00lazybot⇒ is for code evaluation in the middle of a message nil
08:02acuzioRaynes: ta
08:02hyPiRionAnd &| (println "is for inline eval") |& for lazybot.
08:02lazybot⇒ is for inline eval nil
08:03Rayneswat
08:03RayneshyPiRion: I swear to God I had no clue it could do that, and I wrote the bloody bot.
08:04acuzioRaynes: btw - thanks for tryclj
08:04SgeoAnd also, there's a difference between clojurebot and lazybot when it comes to ...
08:04hyPiRionRaynes: hahah, grats
08:05hyPiRionI wish I could program subconsciously too.
08:05Netfeedanother java.jdbc question: stupid question but, how do you know if a transaction succeded?
08:06hyPiRionmutt sgeo@rip.com
08:06lazybotWoof!
08:22Netfeednevermind
08:48dspphow can i read in a file with slurp and then walk it as though it was code
08:48dsppi can load-string, but i dont want it exectued
08:48dspptrying to do some static analysis
08:51terom(doc read-string)
08:51clojurebot"([s]); Reads one object from the string s"
08:52dspphow can i quote the result and not the read-string form?
08:52dsppi dont want it evaluated
08:53dsppoh wait
08:53dsppsorry, read load-string instead of read-string
08:53dsppthanks terom
09:22dsppwhen i (read-string (slurp "file.clj")) it only returns the first form it finds
09:23dsppim running it on clojure.core so it returns (ns clojure.core)
09:23dsppwhat about all other expressions?
09:23dsppwhy does it stop reading?
09:24dspphttps://raw.github.com/clojure/clojure/master/src/clj/clojure/core.clj
09:24abp(doc read-string)
09:24clojurebot"([s]); Reads one object from the string s"
09:25dsppactually, abp, im using read-from-file-safely http://clojuredocs.org/clojure_core/clojure.core/read but result it the same
09:25dsppthis uses read which should read in objects from a stream
09:26dsppi guess i need to modify that function to call read multiple times
09:26abpdspp found that http://stackoverflow.com/questions/6840425/with-clojure-read-read-string-function-how-do-i-read-in-a-clj-file-to-a-list-o
09:27dsppgreat, perfect, wonderful
09:27dsppthank you abp
09:28dsppi can just add the take-while to my function
09:43ziltiIs &env an implementation detail, or is it "future-proof"?
10:42MrMiracle..
10:44RaynesMrMiracle: .....................
10:44MrMiracleHello all
10:45MrMiracleI have a question regarding an issue I'm having with the lein repl
10:45MrMiracleand a compatriot lead me here, am I in the right place?
10:45RaynesYup.
10:45MrMiraclesweet
10:45AimHereThe guy who wrote lein is somewhere around, so you can shout at him directly
10:46RaynesI wrote most of the repl task.
10:46RaynesOh no, I just incriminated myself.
10:46MrMiracleok I'm definitely in the right place then, I'm hella new at this, never lisped before
10:46AimHereI'll get the pitchforks, you bring the torches
10:46RaynesI think it has been changed enough since then to render me sufficiently stupid.
10:46MrMiraclemost of the development I've done is .NET with tools, etc
10:46MrMiraclebut i wanted to dive in deep with this, and I'm having issues :)
10:47MrMiraclei can get a repl started, but I get a mess of errors before it kicks out a prompt
10:48MrMiracleand when I try to require clojure.contrib libraries, etc, I get cannot find file in the classpath
10:48MrMiracleor can't find it, something like that
10:48RaynesPlease post the output of lein repl to https://www.refheap.com/paste
10:48Raynes(I wrote that too, teehee)
10:48MrMiraclesure
10:49RaynesYou don't actually have to paste their. I like to pretend I can force people to use my pastebin.
10:49Raynesthere*
10:49MrMiraclelol
10:49AimHereYou mean you're starting to become an actual software ecosystem
10:50callenAimHere: "I am large and contain multitudes"
10:50MrMiraclehttps://www.refheap.com/paste/8129
10:50RaynesDoes this happen every time?
10:50MrMiraclealmost
10:50RaynesIt looks like some sort of permission issue.
10:51RaynesI think the repl-port file is in the target/ directory.
10:51RaynesMight be worth while to check permissions on that.
10:52MrMiraclecool, thanks for the tip
10:52MrMiracleI've got some experimenting to do, i'll be back
10:52RaynesAs for clojure.contrib libraries, you shouldn't be using them. The old monolithic contrib (the one with one jar and a buttload of nses in it) is deprecated. Most of it was split into several other libraries that you can scan on https://github.com/clojure
10:52jeremyheilerIf you're not in a project, then the repl-port is created in the cwd
10:52RaynesI assumed this was in a project.
10:52MrMiraclei'm glad i found the right place, much obliged
10:53MrMiracleit's not
10:53MrMiraclethat could be an issue
10:53RaynesStill probably a permissions issue.
10:53MrMiraclei'm just experimenting, like an irb, etc
10:53RaynesMrMiracle: What are you reading that is telling you about clojure.contrib namespaces?
10:53RaynesChances are it is way too old.
10:53MrMiracleprogramming clojure
10:53MrMiracleby....
10:53RaynesYou have the first edition of that book.
10:53RaynesThe second edition is much more up-to-date.
10:54MrMiracleStuart Hallaway
10:54MrMiracleyeah i think this one is a bit old
10:54RaynesI also recommend Clojure Programming by Chas Emerick et al.
10:54RaynesIt is extremely old.
10:54RaynesLike, probably not very useful at all old. :p
10:54MrMiraclei see
10:54RaynesClojure was a lot more fast moving when it came out and quite a bit has changed since then.
10:55RaynesBut the second edition should be fine.
10:55RaynesOf course, I know it's probably annoying for me to tell you to go spend money.
10:55MrMiraclei'll see if i can track that down, I'm hungry for whatever i can get
10:55MrMiraclei can maybe find it at a library, we have a branch that's pretty hip with programming material
10:56RaynesIf you can find Clojure Programming, grab it.
10:56RaynesIt's very thorough and up-to-date
10:56MrMiraclei'll keep an eye out for it
10:56MrMiraclethanks guys,
10:56MrMiraclei'll be back on later, is there usually someone on here?
10:56RaynesYou're also welcome to learn by reading code and asking questions in here.
10:57RaynesThere is currently 519 people in here. Someone is bound to be around. ;)
10:57Rayness/is currently/are currently/
10:57MrMiracleexcellent, thanks again
10:57RaynesNo problem.
10:57Raynesyogthos: Mornin' pardner
10:57yogthosRaynes: howdy :)
10:58Raynesyogthos: I'm going to set you up a ZNC account now. Have like 10 minutes in a few minutes?
10:58yogthosRaynes: yeah sure thing :)
10:58RaynesAwesome. I'll ping you in a few.
10:59yogthosRaynes: cool stuff
11:04ziltiHow weird. It seems to make a difference if I do (declare macroname) <form-which-uses-macro> (defmacro macro1) (defmacro macroname <uses macro1>) or if I do (defmacro macro1) (defmacro macroname <uses macro 1>) <form-which-uses-macro>.
11:10ziltihttps://gist.github.com/4462196 <- If someone's interested. I'm not sure if that's a bug?
11:11zilti*Clojure bug
11:15tpopezilti: I'm not sure why it says and, but you're most definitely tring to take the value of clojure.core/or
11:15jonasenkovas: ping
11:16ziltitpope: Whoops. The error is supposed to say "clojure.core/or", not "and". But the first one does not work, but the second does. (as in, compiles).
11:17ziltiAll three functions and macros are identical in both cases, just the order is different.
11:17tpopezilti: first one you've just declared it, second one you've made a macro
11:18abpzilti, I can reproduce that.
11:18ziltitpope: Yes, I know, and the compiler stumbles over that. In a in my opinion very weird way.
11:18tpopemacro expansion happens at compile time, so you can't define a macro after you use it
11:18abpyes
11:18abpnow I know why :x
11:18ziltiSo declare intentionally doesn't work in the case of macros?
11:19tpopethat's a very weird way to say it's impossible
11:19tpopeit's not like someone went in and added special case code to blow up if you tried to use a macro that doesn't exist
11:21Bronsa try (declare ^:macro foo)
11:21Bronsano wait, it's still no use
11:26abpBronsa, at least it works. I still have no knowledge of the internals of Clojure..
11:43brainproxyrecommendation for blog post, tutorial etc. for using java's watch service w/ clojure?
11:45tpopehey what do you call those -*- foo -*- lines that emacs recognizes in files? and does anyone ever use them anymore?
11:50gkofile variables?
11:51tpopegko: that's it
11:51Raynestpope: God I hope not.
11:51Raynestpope: I compulsively beat the shit out of people who use those things in any editor.
11:52gkotpope: yes, still used.
11:53tpopeRaynes: I don't use them in source code. but I've occasionally found the vim equivalent handy for setting the file type of say, some weird file in /etc
11:55RaynesI'M SORRY, I CAN'T HELP IT, I CAN'T STOP
11:55abpof mud?
12:16TimMctpope: I thought they were called modelines.
12:16tpopeTimMc: that's we call them over in vi land
12:16tpopebut googling emacs modeline gets me stuff about the bottom line of the screen
12:16TimMcha
12:16technomancyyeah the modeline is the place it tells you which modes are active
12:17tmciverTimMc: got my macro working based on your advice: wrote a function to return syntax then wrote the macro that apply's its args to it. Thanks bud.
12:18TimMc\o/
12:44RaynesI would hope so.
12:44RaynesIf not, you'd be an excellent troll though.
12:44RaynesRivaling lajla.
12:44gfredericksahahaha I take it all back python FTW
12:44gfredericksyou suckers fell for it
12:45RaynesI was just glancing in #python.
12:45gfredericksclojure was a good try but it is not named after a snake
12:45RaynesI saw a money wearing a beach ball around his private parts and dancing to Die Young by Ke$ha.
12:46gfredericksa monkey?
12:46Raynesmonkey
12:46gfredericksphew
12:46RaynesI sometimes forget letters.
12:55djwonkIs `contains-duplicates?` an idiomatic name for a predicate?
12:55antoineBhello, is it possible to do computation on compile time with macro, in clojurescript?
12:55Raynesdjwonk: Sure.
12:56gfredericksdjwonk: the only other idea I would have is `duplicates?` if that makes enough sense
12:56gfredericksantoineB: the macros are run in clojure; but otherwise yes
12:56gfredericks(i.e., on the jvm)
12:56RaynesYeah, or that. Either one is perfectly fine. Whichever you feel is more descriptive.
12:56gfredericksdjwonk: also `does-first-arg-to-this-function-have-duplicate-things?!!?`
12:56gfredericksthat one is slightly more ruby-style
12:57djwonkgfredericks yes! `is-this-function-name-too-long?`
12:57gfredericks(def is-this-function-name-too-long? (constantly true))
12:58djwonkor (def ^:const is-this-function-name-long-enough-yet? false)
12:59gfrederickshmmm. How can a clojurescript lib ensure that some clojure code has been run? The hacky thing I can think of is to require-macros on a file just for its load-time side-effects
12:59gfredericks(purpose is to modify the cljs compiler)
13:01antoineBgfredericks: i would like (my-macro obj [-prop 12]) be transform to (set! (.. obj -prop) 12) instead of (set! (.. obj (first [-prop 12])) (second [-prop 12]))
13:02gfredericksantoineB: what's your macro definition currently?
13:03antoineB(defmacro help-deserialize [obj data] `(set! (.. ~obj (first ~data)) (second ~data)))
13:04antoineBthe size of data is know at compile time
13:04gfredericks(defmacro my-macro [obj [prop-name data]] `(set! (.. ~obj ~prop-name) ~data))
13:04gfrederickswould that work?
13:04gfredericksmaybe s/data/value/
13:06antoineBgfredericks: yes that works, tahnks
13:06gfredericksantoineB: also would have worked to do (defmacro my-macro [obj data] `(set! (.. ~obj ~(first data)) ~(second data)))
13:07gfredericksantoineB: you want to unquote around the first and second, else they're quoted and emitted instead of run at compile-time
13:08antoineBthat works too
13:10antoineBi was thinking i should do ~(first ~data), but that does'nt work
13:14thorwilsuddenly midje is of a different opinion then the repl. that is, it somehow got stuck on an older version of the function tested.
13:14RaynesIs there an easy way to copy a var in one namespace to another? Like defalias used to do before it got thrown out of contrib because it was 'broken' (had a misleading name, Stuart Sierra's OCD strikes again, I guess).
13:16gfredericksthorwil: `lein clean`?
13:16jeremyheilerRaynes: mayber refer with :rename?
13:17jeremyheilerI guess, what do you mean by 'copy'?
13:17thorwilgfredericks: didn't help. have no idea how that related to the active "lein immutant run", anyway
13:17RaynesI have a couple of functions in an internal namespace that I'd like to make public in another.
13:18jeremyheilerahihi2, hmm...
13:18jeremyheilerah hmm...
13:20jeremyheilerWhy not (def bar foo/bar) ?
13:20RaynesBecause I need metadata.
13:20jeremyheilerarg
13:21Raynes(intern *ns* (with-meta 'zipper? (meta #'lzip/zipper?)) lzip/zipper?)
13:21RaynesWorks, but I'd rather cut my left off at the thigh with a dull blade.
13:21RaynesI only have two fns to do that for, so it is forgivable, but still bleh.
13:22jeremyheiler&(doc intern)
13:22lazybotjava.lang.SecurityException: You tripped the alarm! intern is bad!
13:23jeremyheiler,(doc intern)
13:23clojurebot"([ns name] [ns name val]); Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var."
13:23gfrederickslazybot: turn off the alarm
13:23jeremyheilerThat second to last sentence. Do you stil need with-meta then?
13:23Raynesjeremyheiler: Yes.
13:23jeremyheilercool
13:24RaynesIt adopts meta from the name symbol, not the thing you pass as the value. If it did the latter it'd do precisely what I want.
13:29Raynesjeremyheiler: (defmacro defcopy [name oldname] `(intern *ns* (with-meta '~name (meta #'~oldname)) #'~oldname))
13:32jeremyheilernice. perhaps update the :name key in the metadata in the case the new name is different.
13:32jeremyheilerand :ns
13:32jeremyheilermaybe not, depends on those are used i guess
13:32RaynesWell, technically that stuff is still correct.
13:33jeremyheilerright
13:33RaynesSo it's a little confusing what should and shouldn't be changed.
13:33RaynesI'm probably just going to not do this at all, because I'm entering potemkin territory.
13:34jeremyheilerhaha, i suppose it's good practice to not expose another public api as your own *shrug*
13:35RaynesIt is my own API, I just had to move it to avoid circular dependencies.
13:35jeremyheilerah
13:48Anniepoofoo - apt-get leiningen installs freaking openjdk
13:50p_lAnniepoo: ... let me guess, ubuntu? ;P
13:52FoxboronWhat is the 'best' way for autocompletion? Example: (defn <tab> or defn <tab>?
13:53FoxboronWHen i read it over now i managed to explain it in the worst possible way...hmm
13:54Rayneshttps://www.refheap.com/paste Working for everyone? Just renewed my SSL cert.
13:54uvtcCan anyone suggest a general rule for when to use a map, vs. when to use a record?
13:54gfredericksRaynes: werks for me and chrome is green
13:54Raynesgfredericks: o/
13:54gfredericksuvtc: don't use a record
13:54FoxboronImma go eat some dinner and come back explaining the 'problem' a bit better.
13:54uvtcgfredericks: ! Why?
13:54Raynesuvtc: Do you need something a record gives you?
13:54gfredericksuvtc: not true universally, but a good rule of thumb :)
13:55RaynesIf you don't need any features of a record that a map does not have, use a map.
13:55uvtcRaynes: Personally, right now, I do not. I was writing up some notes, and want to write, "Use a map unless $x, $y, or $z".
13:56tetzcoHi - a question regarding java interop:
13:56RaynesUse a map unless you need to implement a protocol or interface for it, I guess?
13:56RaynesOr for some other reason need it to be a specific class.
13:56uvtcRaynes: what does a record give you (other than performance), besides a name for the things you're creating?
13:56tetzcocan i somehow store a java member function in a map and call it later?
13:56gfrederickstetzco: would memfn work?
13:56Raynesuvtc: See above.
13:56uvtcRaynes: Yes. Sounds good.
13:57gfredericksthe lamest reason to use a record is to enforce a minimum keyset for a map
13:57tetzcogfredericks: i'll have a look (i'm really new to clojure so i don't even know what memfn does)
13:57gfrederickstetzco: or just #(.method someObj)
14:00Anniepooyes, freaking ubuntu
14:00gfredericks,(let [m {:thunk #(.substring "foo" 1 3)}] ((:thunk m)))
14:00clojurebot"oo"
14:01gfrederickstetzco: ^ like that
14:01Anniepoolol - why I quit using Clojure.
14:01gfredericksNo results found for "why I quit using clojure".
14:02Anniepoo'windows is too lame, don't run Clojure on it' , now Its' 'Ubuntu's too lame, don't run Clojure on it'
14:02bjaobviously you should only run clojure on an operating system you bootstrapped yourself
14:02gfrederickswithin a half hour the only google hit for that phrase will be an IRC log of you using it and me reporting on its google hits
14:03Anniepooyup, apparently
14:03Anniepoowell, if yer a wimp, you can run it on a hacked version of Haiku
14:04Anniepoosad, sad
14:04gfrederickswhat's up with ubuntu? I've never needed anything to run clojure besides a jdk; install lein and there it goes
14:04uvtcIs the main purpose of hierarchies for use with multimethods (to implement inheritance)?
14:05Anniepootrying to manually run the lein script
14:05tetzcogfredericks: Thanks - it'll take a while for me to try this out (i need this in a macro definition and i'm still having a lot to learn …)
14:05gfredericksuvtc: afaik
14:06uvtcAnniepoo: just create (if you don't already have) a ~/bin dir, plop the lein script in there, `chmod +x lein`, then `./lein`
14:06uvtcgfredericks: thanks.
14:06Anniepooyah, apt-get was offering to install it, I did just that
14:06uvtcAnniepoo: I'd suggest that you don't install Clojure or lein via apt.
14:06freakazoidyo peeps, LTNS
14:07Anniepoobunch of missing dependencies
14:07Anniepoo8cP
14:07freakazoidI've got some java source files in my project. Is leiningen supposed to be including the source files themselves into the .jar (with lein uberjar) instead of just the .class files?
14:07freakazoidit is incorporating both at the moment, which seems unnecessary
14:12Anniepoook, off to windows
14:12uvtcI wish I could remember where, but I've heard a couple of times that you can often use higher-order functions in place of resorting to polymorphism... can anyone give an example where that's the case?
14:15uvtcPerhaps it's a question better asked on the ML.
14:25uvtcAh. Sorry. After some searching, found a thread or two on the ML regarding polymorphism and HOFs.
14:40Raynesgfredericks: Thank you for that pr* tweet to Alex Redington.
14:40RaynesYou made my day, sir.
14:41RaynesSometimes flags can be very helpful. I don't much appreciate the implication that I am a bad programmer because I do not write code precisely as he would.
14:42gfredericksRaynes: anytime :)
14:42Raynesgfredericks: For example, https://github.com/Raynes/conch is entirely based around flags to change behavior. The concept would simply not work otherwise.
14:42gfredericksthere are a few other print functions I think but not the full set of 16
14:43gfredericksI forget what they're for
14:44RaynesOn second thought, conch might be slightly out of his range.
14:44RaynesI don't think anything there is actually a 'flag', but merely optional information.
14:45oskarthdoes anyone code clojure from FreeBSD? just curious
14:45RaynesFor example :seq could also have a value of :err, not just true or false.
14:45gfredericksyeah it's an interesting argument for the simple case
14:45gfredericksI'd bet tempted to have three functions
14:46RaynesSure, but there are a million other options as well.
14:46RaynesIt'd be more like in the area of 10-20 or more functions.
14:46RaynesSeems like, anyways.
14:46RaynesI might be overestimating how much a process function in conch can do.
14:47gfredericks&(apropos "pr")
14:47lazybotjava.lang.RuntimeException: Unable to resolve symbol: apropos in this context
14:47gfredericksoh it's the formatter versions
14:47RaynesNo, I'm not. The problem is combinations of informations. I can't be of sound mind and still define functions for every possible combination of conch options.
14:48RaynesAnd yes, I'm having an argument with myself.
14:48RaynesI haven't slept in quite a while.
14:48RaynesI think I'll go do that now.
14:48gfredericksI guess there's only printf
14:48gfredericksRaynes: goodnight.
14:48RaynesIt's more like a nap.
14:49RaynesI can only sleep until 5PM-6PM.
14:49RaynesI suck at sleep.
14:51ppppaulshould i use hiccup for writing xml?
14:52gfredericksI've done it but I don't know that that's a supported use case
14:53ppppaulthe xml i'm making is simple and isn't using namespaces or anything fancy
14:54gfredericksyou're probably fine
14:59Anniepoofor the record, leiningen installed on my windows 7 only griping about a bunch of missing templates
15:03ejacksonpppaul: I've done that and it works. Enlive is also an option.
15:05ppppauli'm looking into clojure.data.xml
15:06ejacksonppppaul: another good xml lib is cheshire
15:06ejacksonoops... wrong
15:06ejacksonthat's json....
15:07gfredericksjson is the best kind of xml
15:08AnniepooGod created json to taunt sinners writing xml
15:10ejacksonaaah yes... in the garden of edn or something...
15:10gfrederickswhat're the details on the / reader bug? it looks like it's not fixed in 1.5-RC1?
15:17Anniepooaww, for the love of Pete....
15:18technomancyAnniepoo: don't install leiningen from apt. it's very easy to install by hand on ubuntu.
15:18technomancythe apt version is very outdated
15:18Anniepoothanks tech- your github page advises otherwise, as I read it
15:19Anniepooinstalling on ubuntu constantly conflicted with apt-get offering to install it, so I said to heck with it and went to windows
15:20gfredericksjust make sure that ~/bin/lein appears at the front of the PATH
15:20gfrederickscan't imagine how that would conflict with anything
15:20Anniepoohmm... I added ~/bin that's probably it
15:20Anniepookk, will try ubuntu again, brb, gonna reboot
15:21gfrederickswell ~/bin is fine, just make sure it's before anything else
15:21Anniepooit is - dunno why it's not working. I did indeed start a new shell
15:22technomancyI'll put a note to make sure to get 2.x before installing from a package manager
15:22technomancyoh, there's already a note saying that
15:22Anniepoook, my bad
15:24Anniepoowell, I'm having issues with datomic on win 7, back to ubuntu
15:35uvtctechnomancy: I don't think it's wise to advise (on leiningen.org) using your OS's package manager at all.
15:35tpopeI think it would be fine if we weren't in a "use the preview version" state
15:36uvtctechnomancy: I'd just remove the paragraph at the top of the "Install" section.
15:36uvtctpope: My guess is, the people who want to install 1.x already know how to go about it.
15:37tpopeI mean once 2.0 is out (lol) and has had time to propograte, that would be fine advice again
15:37tpopebut you're right, in the meantime, nix it
15:41AnniepooIn early Clojure days I gave a hands on clojure thing for java programmers. I passed out the jars and a .clj and everybody was up -
15:41ppppaulejackson, data.xml is being good to me... very hiccup like
15:41gfredericksAnniepoo: that still works
15:42technomancyuvtc: yeah, hopefully I can reinstate it once the package managers catch up
15:42tpopeare you sure these package managers aren't waiting for 2.0 final?
15:42Anniepoowell, and my constant griping about the struggles with clojure ecosystem actually are becoming less pertinent of late
15:42ppppauli have a tree walking problem guys... it's been a while since my tree walking days (2 years) and now i'm stuck on something that seems like a simple problem. i have a tree with nodes that have {:tag :value} littered in it. i want to extract all the :values for a type :tag. i want a flattened list as a result... how do i go about this (i'm trying clojure.walk, but i'm super rusty)
15:43technomancytpope: fedora is but debian isn't
15:43ravsterhello everyone
15:43Anniepoofrom zero I've got leiningen and clooj running
15:43technomancyI told the fedora guys it was silly to package 1.x, but whatever
15:44technomancythose are the only ones who have contacted me
15:44ravstercan someone help me with getting nrepl working? I'm trying to set it up and it just gets stuck at "connecting to nrepl on host:port"
15:44Anniepoowhats the deal with packages that they're always out of date?
15:44technomancyoh, except nix. it's on 1.x because I haven't gotten around to submitting a pull request
15:44tpopewell I think it's silly to call it a "preview" when it's the preferred installation, but that's just me :)
15:44AnniepooSWI-Prolog has the same problem
15:44technomancyAnniepoo: because in most cases stability is much more valuable than newness
15:44technomancyclojure is an edge case
15:45technomancytpope: in retrospect it wasn't the best choice, but there was no way to know that clojars would take soooooo long
15:45Anniepooand I get that, but SWI-Prolog does reasonable 'stable' releases
15:45technomancyit's downright amazing how bad the sqlite jdbc drivers are
15:45tpopetechnomancy: is there a reason you can't change course? punt the signed jars requirement to 2.1?
15:45ejacksonppppaul: I recommend looking at enlive selectors for that, or zippers (there is a specific XML zipper) if enlive can't do ti
15:45technomancytpope: can't introduce a breaking change in 2.1
15:46tpope3?
15:46tpopeI assume you're squeamish about 2 back to back major releases
15:46technomancytpope: if I knew up front it would take this long, I would have called preview1 2.0.0
15:46technomancybut at this point it seems like it's just around the corner
15:46xeqipreview4
15:46technomancyxeqi: yeah, maybe not quite preview1 =)
15:46uvtctechnomancy: I'm not familiar with "nix". First time I saw the name (can't recall where) I just assumed it meant "*nix" (that is, "some value of Unix").
15:47ibdknoxit always seems just around the corner ;)
15:47technomancyuvtc: yeah, it's a crappy name
15:47technomancyibdknox: lein's own codebase has been ready since september
15:47ppppaulejackson, i'm using xml zippers right now, are you suggesting that i use enlive for general tree stuff?
15:47technomancyfor the past 3 weeks I've learned new and amazing things about how bad sqlite is every week
15:48technomancyuvtc: amazing software though
15:48ibdknoxtechnomancy: yeah, I know - I go and check if there's a new preview every once in a while :)
15:48uvtctechnomancy: what is clojars switching to? Postgres? Or one of the embedded Java db's (Derby, H2)?
15:48gfredericksholy cow guys it's snowing at like 60 degrees from the vertical
15:48ibdknoxtechnomancy: and yeah, the sqlite drivers are astoundingly bad
15:48technomancyI'm literally adding locks to the sqlite calls in order to avoid segfaults
15:48technomancywhich are like the two things you use clojure because you never want to think about them again
15:49technomancyuvtc: probably derby; haven't decided yet
15:50technomancymigrating to even another embedded DB for a service like that isn't something you undertake lightly
15:50uvtctechnomancy: thanks. At some point I was going to read through the docs on both Derby and H2 and see which made more sense to me. :)
15:50technomancyluckily no matter how bad the DB is it won't screw up downloads
15:50ppppaulgithub is down :(
15:50ppppauli feel souless
15:51technomancyuvtc: if you do any research please do let me know. all I've heard is that H2 has better full-text indexing, but IMO using the DB for that is silly when we have lucene indices already generated
15:51ibdknoxppppaul: not for me
15:51ppppauli can't see the enlive repo
15:51Anniepoothe world would be a better place if they turned the internet off on even numbered days
15:51ppppauloh it's up now
15:52ibdknoxppppaul: is the cljs pprint stuff up somewhere? :)
15:52ppppauli don't do cljs
15:52xeqitechnomancy: the prebuilt lucene index aren't great for searching either :/
15:52ppppaulbut, why wouldn't it be?
15:52uvtctechnomancy: ok
15:52technomancyxeqi: even the legacy ones?
15:52ibdknoxyou must not be the paul I think you are lol
15:53ppppauli have more 'p's than the paul you know
15:53abpibdknox, do you know already when LT 0.3.0 will be released?
15:53technomancyxeqi: I know the segmented ones are annoying but IIRC we should still have access to the monolithic ones
15:53ibdknoxabp: shooting for end of Jan
15:53xeqitechnomancy: the prebuilt ones include every artifact (group-id, artifact-id, version), so they return results containing lots of different versions of say, hiccup
15:54xeqiI worked around it with some lucence filters, but they are ..... slooooooow
15:54technomancyxeqi: ah, gotcha. in lein search that's appropriate, but in the web UI not so much
15:54technomancyif there's no query syntax to collapse that then I could see the draw of doing it in the DB
15:55xeqiI'm thinking it'll just be better to have a different index, that gets updated on artifact save to only include the latest one
15:55technomancystill with lucene?
15:56xeqiyeah
15:56technomancysure
15:56technomancyI was musing the other day... how crazy it would be to just store artifact data on the filesystem?
15:56technomancyyou could walk the file-seq of the repo to build indices
15:57xeqihaha, I had a similiar thought the other day
15:57technomancyI mean, does the jars table contain anything that's not on the filesystem?
15:57ibdknoxtechnomancy: It makes me sad people don't reach for that as a solution more often
15:57xeqiusername
15:57technomancyxeqi: yeah, you have the group name, but that's not enough
15:58xeqiI'm thinking the username isn't really useful though
15:58technomancycould be useful for auditing
15:58technomancybut an append-only log would be better
15:59technomancyHMMMMMMMMMMMM
15:59technomancybbiab
15:59xeqitechnomancy: ooh, promoted_at isn't in the fs
16:00gfredericksman; you complain about a cljsbuild bug, don't do anything to fix it, wait 3 months, and suddenly nobody has fixed it.
16:00gfrederickswhat is the world coming to
16:02ppppauli would like to flatten a tree, any pointers?
16:02arrdemppppaul: (flatten)
16:02ppppaulhmmmm
16:02gfredericksclojure.walk/postwalk if you need more control than that
16:02ppppauli will try this
16:03ppppauli'm using prewalk/postwalk but it's tricky
16:04ppppaulflatten isn't doing anything to my tree
16:04gfrederickswhat does your tree look like?
16:04gfredericksflatten probably doesn't touch maps
16:05pandeiro6 months later i still haven't figured out how to find where nrepl.el shows (println)s in my code
16:05gfredericks,(clojure.walk/postwalk #(if (= :foo %) :bar %) {:foo 7 :bam [:foo]})
16:05clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.walk>
16:05arrdemis there some way that I can prevent the macro expander from qualfying symbols without using gensyms?
16:05gfredericks&(clojure.walk/postwalk #(if (= :foo %) :bar %) {:foo 7 :bam [:foo]})
16:05lazybot⇒ {:bar 7, :bam [:bar]}
16:05ppppaul(:tags #{{tag-data}} :page {:number 4})
16:06gfredericks,`[here are ~'my ~'symbols] ;; arrdem
16:06clojurebot[sandbox/here sandbox/are my symbols]
16:07arrdemthanks gfredericks
16:07gfredericksarrdem: backtick works indepently of macros
16:07gfredericksindependently
16:07gfredericksindependentendentdeply
16:07arrdemhehe. spelling is for those who can't speak engleesh
16:08arrdem,`['symbol]
16:08clojurebot[(quote clojure.core/symbol)]
16:08arrdem,`[~'symbol]
16:08clojurebot[symbol]
16:08arrdemAH. so the quote prevents it from being (eval)d, and the ~ expands at macro time.
16:09gfredericks~ unquotes
16:09clojurebotHuh?
16:09arrdemcute! thanks.
16:26djwonkIf Java interop is not important to me, do exceptions make less sense? Do functional programs tend to need exception handling?
16:26gfredericksunless you want to pull out the Either monad...
16:27gfredericksthen you'll probably still find them useful
16:27djwonkok, thanks, looking for the big picture in case I was dragging along old habits
16:28gfredericksthey should be exceptional of course :)
16:28djwonkright. but I get to define what exceptional is for my API, so it is sort of arbitrary
16:29arrdemgfredericks: can you force clojure to use clisp style signals and restarts?
16:29gfredericksarrdem: I'm not familiar with those; or maybe I was for an hour or two in which case I suspect it's unlikely
16:30gfredericksbut maybe there'd be a haxy way
16:30gfredericksyou could return functions in the ex-data...
16:30arrdemthat could be interesting...
16:31gfredericks(throw (ex-info {:restarts {:who-cares (fn [] ...), :loggit (fn [] ...)}}))
16:31gfredericksthat's probably kill your stack info?
16:31gfredericksthat's probably the main limitation
16:32gfredericksthat's probably the third sentence I start with those two words
16:34TimMcAnniepoo: I forgot you did Clojure stuff. (This is phyzome from foonetic.)
16:35djwonkwhat are some reasonable choices for a basic runtime error exception? Throwable? Exception? RuntimeException?
16:35Anniepoohey Phyzome!
16:35technomancyxeqi: would it be crazy to disallow overwriting existing deployments even in the classic repo?
16:35gfredericksThrowable isn't a class I don't think
16:35technomancyit would sure make things simpler
16:35AnniepooI forgot it too - switched to Prolog a while back
16:35technomancydjwonk: ex-info is the only thing worth using
16:36technomancyunless your code is going to be consumed by a java application
16:37djwonktechnomancy: thanks. I was looking for something like that
16:37djwonk,(doc ex-info)
16:37clojurebot"([msg map] [msg map cause]); Alpha - subject to change. Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data."
16:37gfrederickstechnomancy: that is some violent imagery
16:37technomancygfredericks: the gaping maw of tomcat
16:37gfredericksand we never saw that code again
16:38technomancyI think it was Black Francis who said something about violent imagery being more likely to be memorable; throwing a brick leaves more of a mark than blowing smoke or something?
16:38technomancyanyway, slamhound
16:38Anniepoothanks for the help all - tip o the lid to technomancy
16:38technomancyAnniepoo: open to suggestions for things that could clarify the docs too
16:38technomancyoops
16:39gfredericksah ha technomancy accidentally opened himself to suggestions
16:40xeqitechnomancy: .. I've never pushed the same artifact twice, so I don't think so
16:40xeqibut others might disagree
16:40xeqiits definitly a change
16:40technomancyit can be a bit embarrassing to have your mistakes stay around forever, but it sure simplifies things
16:40technomancyI'll bring it up on the mailing list
16:42technomancyanyone strongly opposed to disallowing re-deploys over the same artifact in classic clojars?
16:42djwonkso you require a version bump?
16:42technomancydjwonk: yeah
16:43djwonkimmutability FTW. i like it
16:43gfredericksI think I assumed it was already that way
16:43gfredericksespecially since I locked myself out of my account that one time by pushing something
16:44gfredericksdjwonkv2: fixed some personal bugs?
16:44djwonkv2actually, I was just giving myself permission to have new opinions
16:45technomancyhaha
16:57ppppaulanyone have good resources for clojure.walk?
16:57TimMctechnomancy: Isn't classic Clojars for SNAPSHOTs? Those often involve overwriting.
16:57technomancyTimMc: technically SNAPSHOTs are a new version every time
16:58TimMchrm
16:58TimMcIf you define it that way, then fine.
16:58technomancythe SNAPSHOT version is resolved to the latest timestamped version
16:58technomancyso nothing is overwritten
16:59TimMcArchitecture question: I want to write an email autoresponder that crunches inbound requests and sends back the answer.
17:00technomancyTimMc: answer: implement ring for SMTP
17:00TimMchaha
17:00TimMchmm
17:00technomancyif you don't, someone else will
17:00TimMcThat's... actually a kind of interesting idea.
17:01TimMcI was thinking of how the autoresponder portion should be broken down.
17:01technomancyif it doesn't have middleware I'mma call the ~gourds on you
17:02TimMcThere's some complexity that I don't know where to put: I want rate-limiting on email responses.
17:05TimMcI can see writing this as an email autoresponder library, as you say. Perhaps it should be more generic, like a message queue, an email retriever, and an email sender all hooked together by the main app.
17:07abpppppaul: Are you still trying to 'flatten' some datastructure?
17:07ppppaulyeah, i'm currently using some maps and groupby
17:08abpSo your asking about walk isn't related?
17:08ppppaulit is
17:08ppppauli want a more general solution
17:09ppppauli want to be able to pluck values from anywhere in my tree and matches a key
17:09ppppaul*that matches a key
17:11abpHm ok, I used an atom to collect things of interest while walking.
17:11ppppauli was thinking about that
17:11ppppauli thought there may be a functional approach
17:12ppppauli did something like this in JS without mutations
17:12ppppaula year ago :(
17:13abpYeah, it doesn't feel quite right.. I thought that too until I was told I should just do it.
17:14djwonkTimMc : maybe this can give you inspiration for SMTP middleware? https://github.com/amccloud/django-firstclass/
17:15ppppauladp it's probably much faster to use an atom, at least
17:15ppppaulthere would be tons of transformations for flattening a tree
17:21ferdhelp: I cannot find a clean way to structure my code to support multiple DB implementations
17:21technomancyferd: is your code a library or an application?
17:21ferdmultimethods and protocols give me runtime polimorphism... but in this case that's not really what I need. What I'm thinking of is a may to have a single db namespace that the app uses, and then backend namespaces (db.postgres, db.mem, etc)... and at init time somehow populate the former with the vars of one of the latter. Am I clear?
17:21ferdan app
17:22technomancyapplication portability across database implementations is a myth
17:22technomancyfor nontrivial applications
17:22technomancyit looks easy, but it's impossible to do well.
17:22ferdtechnomancy: I mostly agree... but my question is more general
17:23ferdI mean, the same question goes for DBs, queuing transports, etc
17:23technomancyoh I see. yeah, you sort of want a circular dependency
17:23technomancythat's one of my least favourite things about multimethods =\
17:23ferdmmm no, why do you say circular?
17:24technomancywell, you have the namespace that contains the defmulti and you have the defmethod implementations in namespaces that require the defmulti namespace
17:24technomancybut you want application code to be able to just require the defmulti and have the defmethods available automatically
17:25ferdright... but besides that, multimethods don't feel right. What's the dispatch function? a constant ?
17:25technomancyone way to do it is to have the defmulti namespace search the classpath for all namespaces under a given pattern (myapp.db.*) and require them all at the end of the namespace.
17:25technomancynothing wrong with using config-based constantly in your dispatch fn
17:26ferdI don't really need runtime dispatch... I was hoping for something simple, like ... I wish I could load a namespace (say db.postgresql) under the name of another (db)
17:27ferd...well, if you say that there's nothing wrong with using config-based constantly as dispatch fn, then I don't feel that bad :-)
17:28technomancyit's been a while since I've worked on a large application in Clojure. there are probably others here with differing opinions, but I didn't find it bad.
17:28ferdI do find it a bit weird
17:29ferdanother thought was: define a dbprotocol, then have each db.xyz implement it, and then somehow create "wrapper" functions in namespace db, which just call the protocol functions on the db "impl" instance (am I clear?)
17:30technomancyyou could also use alter-var-root to change the interface defn to whatever the current config happens to point at
17:30technomancyIMO protocols are a terrible fit for this because they impose themselves on your arglist
17:30technomancythe alter-var-root approach would be faster if that matters
17:30ferdthat's why I'm saying to wrap them
17:32technomancyit's a bit odd but if you're using it only at application boot I'd say it's kosher
17:32abpferd: I've heard of someone that they are doing querying through middlewares to concrete datastores. So you always have a request to some storage and a response, just like ring for the web.
17:35ferd2technomancy: damn... I lost power here and lost our conversation
17:35technomancyferd2: just missed this: it's a bit odd but if you're using it only at application boot I'd say it's kosher
17:35technomancyand <abp> ferd: I've heard of someone that they are doing querying through middlewares to concrete datastores. So you always have a request to some storage and a response, just like ring for the web.
17:36TimMctechnomancy: Oh, as for Clojars overwriting... is this going to be problematic for the snapshots/releases distinction? I don't want to bump the version just to sign a jar.
17:36technomancyTimMc: hm... good point; I hadn't thought of that
17:36technomancywhat if we used the presence of the signature to block redeploys?
17:39TimMctechnomancy: How about only blocking overwrites when a jar has been promoted?
17:40technomancyTimMc: that's what we currently do. I'd like to be able to make the call based on the state of the repository alone rather than bringing a DB into it though.
17:40TimMcI see.
17:40technomancybrainstorming: http://p.hagelb.org/clojars-events.html
17:42abpferd2: http://clojure-log.n01se.net/
17:43technomancywhat's the possessive of Clojars?
17:44technomancyClojars's?
17:44clojurebotnext-gen clojars is http://groups.google.com/group/clojars-maintainers/browse_thread/thread/77c1cd77e478bb0f
17:44technomancythanks clojurebot you're a pal
17:44abptechnomancy, why are you using sqlite for Clojars? Have seen some of your struggle with the drivers etc.
17:44technomancyabp: it wasn't my choice
17:44technomancyif I had known about these issues I would have rewritten the DB layer much sooner
17:44abpTo much work to use something else now?
17:45technomancyabp: I thought we could work around the flaws, but I no longer think that's a good idea.
17:45technomancyabp: http://p.hagelb.org/clojars-events.html <- my current plan
17:45ferdabp: thanks
17:47abptechnomancy, so why aren't you guys considering datomic? Lucene indexing is a property of attributes for instance.
17:47technomancyI would really hate for Clojars not to be fully OSS
17:47technomancyLucene is really fantastic technology
17:49abpHaven't done anything with Lucene, the same goes for datomic besides tampering. But in the light of it's advancements insisting on being 100% OS is probably not the best choice. Pro licenses are also available for free to OS-projects, I think.
17:49mak3rhey guys, anyone know the best way to explore the friend test mock app, in a jetty instance ?
17:51ferdabp: do you know of any app in production using datomic?
17:54abpferd: Actually nothing despite OS-projects. But we'll probably use it for an upcoming project at work over the next months.
17:54mak3rferd: we've got a product in pilot with datomic, and two to go live beginning of Feb
17:56mak3rferd: one with a well known multinational (not able to divulge just yet)
17:56mpanmak3r: how has the experience been? compared vs a more traditional database?
17:56ferdI'm very tempted to use datomic on a new project... but I see little case stories.
17:56mpanany particular big ideas you guys ran into?
17:57mpanand if you don't mind me asking, what was your motivation for choosing it?
17:57mak3rferd: I'll put something together once it is official
17:57mak3rmpan: a great experience, does as it says on the tin for us so far
17:58abpmak3r: regarding your friend question: I just built a app with form-auth myself to try it. The examples didn't exist then but it was easy.
17:58mak3rmpan: I'd say we feel liberated now we are not constrained by more traditional features of RDBMS
17:58ferdmak3r: which backend are you using? dynamo? I was wondering of the option of using the embedded h2 is solid for production
17:58mpanmak3r: any specific examples of constraints you no longer have?
17:59mpanI'm curious because, personally, I'm happy with traditional RDBMSes, but I'm not sure how much of that is just due to not having seen much of what else is out there
17:59mak3rferd: atm just in memory, have tested on dynamo and will switch to it soon as we exit pilot, for the bespoke projects I mentioned will be Riak
17:59mak3rabp: awesome... got any pointers on the process with friend ?
18:00abpmpan: That sounds like you've never seen a schema getting over-complicated just by relational constraints.
18:00mak3rmpan: tying attributes and reusing across entities is awesome
18:00mpanabp: I've mostly seen constraints-enforced-at-application-level, so sorry but I'm not sure what you're referring to
18:00abpabp: It wasn't more than a simple test. Auth, eat your cookie and you are in. Nothing in production.
18:01abpmpan: ^
18:01mak3rmpan: its very fluid, the only anchor being datatype on a given attribute (at least the only one that really can cause problems)
18:01abpmak3r: ^
18:01abpautocompletion and mistyping is hitting me hard. :D
18:01mak3rhaha, no worries
18:02mpanthe other thing I'm wondering is: are there other database systems with similar properties?
18:02mpansomething for a frame of reference?
18:02abpmpan: I was referring to more abstract or complex models being laid out in a relational fashion. It just doesn't work, produces SQL-bandworms and isn't generally healthy for developers minds..
18:03mak3rmpan: its half way between relational and key/value
18:03mak3rmpan: I think there _will_ be clones, but right now it is new territory
18:04mpanthanks guys
18:04mak3rno problem
18:05TimMcdjwonk: I'm not taking technomancy's bait. Someone else can do the ring-for-email thing.
18:05technomancyabp: you're free to your opinion, but clojars will always be 100% oss as long as I can help it
18:05TimMcI already shaved one yak for this project.
18:07abptechnomancy, weren't trying to insult you or something. I just don't get that mindset, I think. You live of some closed source too, don't you? Along the way you and your company can produce OS. So without proprietary things and their usage there wouldn't be as much OS..
18:12technomancyactually all the projects I'm working on at work are creating OSS replacements for proprietary code
18:12AimHereYou are Stealing From America!
18:12hyPiRiontechnomancy: Oh, that reminds me, do you actually develop OSS for a living?
18:13technomancyI understand there are some codebases where that's more difficult due to work, but I sure am not going to contribute to that when it's up to me.
18:13arrdemAimHere: aiming...
18:13mak3rtechnomancy: lucky, sounds awesome... I've always had too much commercial pressure to go that route
18:13technomancyespecially not when I'm not getting paid for it =)
18:13technomancyhyPiRion: yeah
18:13technomancyhttps://github.com/technomancy/sokoban, https://github.com/nzoschke/code, https://github.com/heroku/buildkits
18:14hyPiRiontechnomancy: That explains stuff, and it also makes me envy
18:24abpOk, so we probably should try to get Rich, Stuart & co to start a hosting business so they can open source datomic. ;)
18:25TimMcheh
18:26amalloytechnomancy: yeah, clojars's
18:27technomancyamalloy: thanks =)
18:29technomancyin this case the data model is so simple that I don't think it'd be much work to implement with a log file and lucene
18:29technomancythere are literally only three events
18:30ravsterwhats the setting to have paredit autoloaded with clojure-mode in emacs? I can't seem to find the right command.
18:30technomancyevent types
18:30technomancyravster: (add-hook 'clojure-mode-hook 'paredit-hook)
18:31ravstertechnomancy: thanks
18:36technomancyhyPiRion: FWIW I spend more time maintaining the existing projects than actively replacing them, but I'm grateful that I have the chance to do so
18:37hyPiRionStill better than closed source
18:37hyPiRionAt least I find OSS more fun to work with, maybe that changes if it's your job.
18:38technomancyheh; well the clojure is more fun than the ruby either way
18:38SgeoI guess I'd have more of a chance of finding a job that uses Clojure than one that uses Racket?
18:39TimMcYeah.
18:40technomancymaybe unless you work for MIT or something =)
18:40TimMcI've *seen* job postings for Clojure developers.
18:40TimMctechnomancy: NEU is more likely for Racket.
18:40technomancywhat's that?
18:41TimMcNortheastern University
18:41TimMcAt least 2 of the Racket devs teach there.
18:41TimMcAt MIT I would expect MIT Scheme. :-)
18:41ziltiWhen I start studying I have to go back to the Java nightmare...
18:41Sgeozilti, my condolences
18:41technomancydoesn't MIT have like three schemes?
18:43ziltiSgeo: There was a time I really really liked Java. Because it was the only language I knew.
18:44TimMczilti: It was pretty fantastic coming from TI-89 Basic. :-P
18:44Sgeozilti, I think you could say something like that about me and Python. Python wasn't the only language I knew, but it was the only language that seemed to be free for me to use
18:44SgeoAlthough hmm, I know I've read about Java before then
18:45ziltiI hated Python after the first time I had to re-indent a 200-line source file by hand.
18:45SgeoI never had to do that
18:45SgeoHowever, now I can't really stand the broken lambda synta
18:45Sgeosyntax
18:45amalloyzilti: i think you mean you hated your editor? surely doing it by hand is never necessary
18:46technomancydon't you have to do it by hand when there are merge conflicts?
18:46amalloyi dunno. i don't actually write any python, i'm just a busybody
18:46arrdemamalloy: no.. I had an argument about this a while back. If indentation is syntactically significant then loss thereof constitutes a loss of information and therefore cannot be reconstructed by a computer.
18:47arrdemwith a gurantee of correctness at least.
18:47ziltiamalloy: It's problematic enough that such a thing depends on your editor.
18:49ziltiHmm I forgot the name of the editor and can't find it. It was a pretty popular one (I think), basically just an Editor with syntax highlighting and a REPL.
18:49arrdemwas it Idle? that's the standard packged python editor/repl...
18:50ziltiOh, yes. That was it. Well, python.org seems to be down.
18:58arrdem,(doc rename)
18:58clojurebotHuh?
19:01arrdemis there an idiomatic way to update several functional objects at once? right now I'm trying to build a map, then update-in on each step and it isn't behaving nicely.
19:04AimHerenested update-ins should work, though it's not pretty, for sure
19:05AimHereI'd guess that building something out of reduce would be the neatest answer
19:06AimHereSomething along the lines of (reduce #(apply update-in %1 %2) initial-map [keyvec1 keyvec2 keyvec3 ...])
19:07AimHereminus the 'apply
19:07hyPiRionnot minus the apply.
19:07AimHereIsn't it (update-in map vec) ?
19:07arrdemthis is what I've cooked up... https://www.refheap.com/paste/8133
19:07arrdemAimHere: it's (update-in map path fn & args)
19:08hyPiRion,(reduce (partial apply update-in) {:a 1, :b 2} [[[:a] inc] [[:b] + 3]])
19:08clojurebot{:a 2, :b 5}
19:08AimHereOops yes. I'm confused with get-in
19:21TimMctechnomancy: Have you made signed jars for any of your projects yet? If so, have you self-signed or used a CA?
19:24technomancyTimMc: PGP doesn't really have CAs afaik
19:24technomancyit operates under a web of trust model
19:24TimMcOh, hmmm... right.
19:24technomancyTimMc: `lein deploy clojars` should automatically try to sign artifacts before deploying them
19:25TimMcDoes it prompt for key choice? I don't want it to use my regular key.
19:25technomancyhmm... I don't think we've added that yet. definitely an oversight.
19:25hyPiRionyeah
19:26hyPiRionI think I had to specify key last time I used it
19:26technomancythere are definitely edge cases that haven't been thought through
19:27TimMchyPiRion: Oh, that's fine then.
19:27TimMcAs long as it doesn't grab .ssh/id_rsa and run with it.
19:28hyPiRionoh right, I thought you meant GPG.
19:28TimMcDerp, those are RSA keys.
19:29technomancyclojars only uses ssh for scp deploy, I've been recommending lein deploy over scp.
19:31bbloomapparently *print-meta* doesn't work for vectors?
19:32bbloomor maybe it sometimes doesn't work? or maybe i have a bug....
19:32bbloomlol
19:32bbloom,(let [v ^:v [] m ^:m {}] (binding [*print-meta* true] (prn v m)))
19:32clojurebot^{:v true} [] ^{:m true} {}
19:33hyPiRionWell, that seems to work.
19:33ravsterI'm using data.zip.xml and its turning a <Number> into a character. How do I force it to be a string?
19:33bbloomit seems to be something special with the :type value
19:34bbloomer key
19:35bbloomor maybe i'm just going crazy...
19:35arrdem(assoc-in [0] [0] 1)
19:35arrdem,(assoc-in [0] [0] 1)
19:35clojurebot[1]
19:36bbloomhttps://www.refheap.com/paste/8134
19:36bbloomhyPiRion: see that ^^ wtf?
19:36bbloomlol
19:39TimMcHey, why does lein2 want my clojars password?
19:39hyPiRionbbloom: Reproduceable
19:39TimMcdeploy doesn't use SSH?
19:40bbloomhyPiRion: ok, so i'm not crazy? :-)
19:40hyPiRionbbloom: It omits :type for some reason
19:41bbloomhyPiRion: hmm, seems to be intentional behavior
19:41bbloomconfusing as hell
19:41TimMc(def x (with-meta [1 2 3 4] {:type :foo :bar :baz}))
19:41TimMc(binding [*print-meta* true] (pr-str x)) ;;= "^{:bar :baz} [1 2 3 4]"
19:41hyPiRionbbloom: whut, why?
19:42bbloomhyPiRion: why is it intentional? or why is it confusing?
19:42hyPiRionintentional
19:42bbloomi have no idea....
19:42bbloommaybe because that's what print-dup is about?
19:43hyPiRion*shrug*
19:43bbloomkinda sucks though b/c it's baked into print-method :default
19:43bbloomsoo if you write your own print-method, you need to know about that subtle behavior and replicate it
19:44TimMcI'm not going to mess with all this gpg-agent and credentials.clj stuff. Too complicated.
19:46TimMc(I'm not trying to be bitchy; it's just more than I feel I should have to deal with to release stuff.)
19:46cjfriszevening, folks
19:47bbloomTimMc: i agree with you to some extent. it was surprisingly complicated to set up on my previous mac, so i just didn't bother on my new machine
19:49hyPiRionTimMc: I agree with that
19:51bbloomi can't tell how i feel about metadata in general
19:51bbloomsometimes, it's fantastic
19:51bbloomsometimes, it's annoying as hell
19:51bbloomparticulary things like :tag and :type
19:51eipi10,(first '("foo"))
19:51clojurebot"foo"
19:52bbloomsome operations preserve metadata, others don't
19:52bbloomyou need to really *think* about it or just try it before you know whether or not you'll get metadata preserved
19:52bbloomand then sometimes you want the opposite of whatever the operation does
19:55tomoj1.5 reportedly improves metadata preservation
19:55tomojprobably still some problems left
19:55ravsterHow do I make sure that all the values of a map are strings, and if not, turn them into strings? I'm wondering if there is already a function that does something like that.
19:56bbloomtomoj: glad to hear, i found CLJ-916
19:56tomojthere is no such function
19:56tomojin 1.5, (reduce-kv #(assoc %1 %2 (str %3)) {} a-map) could work
19:57tomojhopefully someday (but not today): (into-kv {} (r/map str a-map))
19:57ravsterhmm, I just found map-values in clojure.contrib.datalog.util
19:57bbloomravster: (into {} (for [[k v] a-map] [k (str v]))
19:57bbloomor, in light of the metadata discussion:
19:58bbloom(into a-map (for [[k v] a-map] [k (str v]))
19:58bbloomto preserve the metadata lol
19:58ravsternice
19:58bbloomi'm missing a ) in there
19:58bbloomi should avoid coding in my IRC window...
20:00ravsterhehe
20:02ravsterthanks bbloom, the into works great.
20:02seangroveIs there an (or this that) that will return 'this' if 'this' is false and not nil?
20:02seangrove(if (nil? this) that this)
20:02gfredericksnope
20:03seangroveOk, no problem
20:35gfredericksI don't imagine cljsbuild provides any mechanism for extending the compiler at runtime?
20:36bbloomgfredericks: extending it in what way?
20:38gfredericksbbloom: e.g., extending some of the multimethods
20:38bbloomanalyze and emit ?
20:38gfrederickswhich kind of implies "running arbitrary code before the compiler gets called"
20:38gfredericksyeah those sort
20:38bbloomi doubt cljsbuild offers that... but i'm not entirely sure how it would be useful. what's your use case?
20:39gfredericksnumbers!
20:39bbloomnumbers?
20:39clojurebot(pl reverse $ (↕reduce range $ 10 () λxy (↕conj inc $ y x)))
20:39gfredericksbigints and ratios specifically
20:39bbloomare you adding support for bigints and ratios to cljs ?
20:40bbloomif so, why not just run a patched version of the compiler?
20:40bbloomit's pretty easy to use a local checkout
20:40bbloomand then contribute those :-)
20:40gfredericksI thought I'd start off with a lib
20:40gfredericksevery time I talked to dnolen about it it sounded rather difficult to get it in
20:41bbloomgfredericks: did he specify why? perf?
20:41gfredericksperf and design questions I think
20:41gfredericksI started up a design page about it
20:41bbloomyeah, i'm reasoning about the design now....
20:41bbloomi suspect that perf would suck unless you *opted in* to it
20:41dnolenbbloom: gfredericks: fwiw even Dart has punted on this
20:41bbloomheh
20:41dnolenand think about how much money they're spending on that
20:42gfredericksopt-in would be fine with me, as long as it's opt-in for the whole program
20:42gfredericksso you can use all the regular functions
20:42bbloomgfredericks: well, that's sorta the problem
20:42bbloomif it's opt in to the whole program, it makes all non ratios slower too
20:42bbloomb/c you suddenly need generic + and friends
20:43gfredericksyep
20:43dnolengfredericks: opt-in for the whole programs doesn't make much sense. Since you would tank the performance of the core library as well.
20:43bbloomgfredericks: i think you're better off starting with a lib that doesn't impact the reader in any way
20:43gfrederickswas there an idea about having primitive versions, like +' *', etc?
20:43bbloomie just provide a factory function (ratio 5 10)
20:43gfredericksbbloom: well I can even write a macro that enables the literals
20:43gfredericksbbloom: I already have this lib
20:43dnolengfredericks: no because that would be backwards from Clojure JVM
20:44gfredericksdnolen: okay +''' and *''' then :P
20:44bbloomgfredericks: so then go with the macro, don't bother with patching the cljs env
20:44dnolengfredericks: I don't see why you don't just do you're own generic math lib. what's the problem?
20:44gfredericksI am doing it; I started with a question about how to make it nicer to use
20:44dnolengfredericks: ok sorry missed that.
20:44gfredericksi.e., not requiring a top-level macro to use literals
20:45tomojcan't you just put the defmethods in the macro ns and :require-macros it?
20:46bbloomseems like a bad idea to mutate the compiler.... you'd have to disable your changes as well to prevent breaking libraries that don't expect it
20:46bbloomat which point you'd have (enable-literals!) and (disable-literals!)
20:46bbloomand might as well have (with-literals-macro ...)
20:46bbloommaybe turning it on for a namespace? *shrug*
20:46tomojif the library is a staging ground for a compiler patch, why not mutate the compiler?
20:48bbloomtomoj: because the library is useful without the literals, etc, is it not?
20:48bbloomtomoj: might as well publish that
20:48bbloomand then we have a basis from which to discuss the complexities of fast numerics
20:48bbloomare you modifying all of the core functions too? :-/
20:49arrdem,(doc reduce)
20:49clojurebot"([f coll] [f val coll]); f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items in coll, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val i...
20:49gfredericksbbloom: what libraries would rely on numeric literals not compiling?
20:50bbloomgfredericks: i don't think anyone would break unless you had a bug or they depended on undefined behavior
20:50bbloomgfredericks: but their perf would surely suck unexpectedly :-P
20:50gfredericksnot modifying core functions, just making 7/5 compile to (ratio 7 5)
20:50gfredericksso shouldn't effect exterior perf either
20:51gfredericksexternal*
20:51bbloom,(+ 2 5/7)
20:51clojurebot19/7
20:51bbloomthat wouldn't work even with your patch right?
20:51gfredericksdepends what + refers to
20:51gfredericksI have my own +
20:51bbloomdoes your compiler "plugin" sub in your + or do you have to manually :refer that ?
20:52gfredericksthe latter
20:52gfredericksso it's lib-style
20:52bbloomyeah, so then there isn't much benefit and a bunch of confusion in having literals
20:52gfredericksisn't much benefit?
20:52gfrederickswhy do we have them in clojure?
20:52bbloomthe literals don't compile to (cljs.core/ratio 5 7) they compile to (your.lib/ratio 5 7)
20:53bbloomthe literals are in clojure b/c they are well integrated
20:53gfredericks:/ okay
20:53bbloomi'm not trying to shit on your work... i would love to see ratios in cljs
20:53bbloombut dnolen is right: it's a haaaard problem to do well
20:54bbloomthe JVM happened to already have solved this to some extent with good perf on the Number type, etc.. .and even then i believe JVM clojure had some numerics struggles & still does
20:54gfredericksI wasn't trying to integrate them into cljs, I was trying to have my lib extend the compiler for convenience. But I see why that my be sneaky.
20:54gfredericksmay*
20:54bbloomgfredericks: yeah, i'd avoid extending the compiler in any transparent way
20:55bbloomit's potentially possible that clojure could have some kind of namespace level flags thing for compiler plugins
20:55bbloomlike a :plugins key in the ns form
20:55gfredericksthat sounds interesting
20:56bbloombut that would likely be shunned in the same was as :use
20:56bbloomas too much magic :-P
20:56bbloomin the meantime, you can just do (my-wrapping-macro-thinggie ...)
20:56gfredericksyep
20:56bbloomor maybe the equivilent of *warn-on-reflection*
20:57gfrederickshow does that work with cljs?
20:57bbloomsome macro that expands (enable-ratios!) to (defmethod emit ...) and (set! *ratios-enabled* true)
20:57bbloomgfredericks: it doesn't
20:57bbloombut you can have macros that just expand to nil and then have side effects in the compiler
20:57bbloomif you really insisted on getting the syntax support
20:57gfredericksah right
20:57bbloombut really, it seems sketchy as hell to me :-)
20:58gfredericksyou can't undefmethod though
20:58gfrederickscan you?
20:58bbloom(doc remove-method)
20:58clojurebot"([multifn dispatch-val]); Removes the method of multimethod associated with dispatch-value."
20:58gfredericksnow if only you could defmethod in a thread-local way
20:58bbloombut you wouldn't want to do that, you'd want to install the method only once and then have a flag to enable/disable it
20:58arrdem,(let [{odd false even true} (group-by odd? (range 5))] (println odd even))
20:58clojurebot[0 2 4] [1 3]
20:58bbloomhence the flag
20:58bbloomyou (def ^:dynamic *enable-ratios* false)
20:59bbloomand then use binding on that
20:59gfredericksbbloom: that still changes the behavior while the flag is off, technically :P
20:59tomojexcept it needs to be a, uh, special var?
20:59bbloomgfredericks: yeah, but at least it won't fuck anyone up
20:59gfredericksseems unlikely to fuck anybody up more in either case
20:59tomojlike *unchecked-if* ?
20:59bbloomyeah, this is basically how unchecked-if works... i believe
21:00tomojwell I guess you can just have a macro that sets the var clj-side
21:00bbloomtomoj: yeah that's what i'm suggesting
21:00bbloomtomoj: this is my complaint about the top level again...
21:00bbloomdnolen: (when false (def x 1)) :-(
21:00tomojseems like that would be a better way to do *unchecked-if* too
21:01bbloomthe right way to do it would be to define the top level at compile time and require a main function :-)
21:01bbloombut that's a pretty dramatic change to clojure semantics
21:10gfrederickshmmm. how do I get the /src-cljs into the jar again? add it to :source-paths?
21:11bbloomi just symlink my clojurescript checkout into my project directory
21:11gfredericksI mean for jarring up my lib
21:11gfredericksI just got the /src and not the /src-cljs
21:11bbloomoh, havent done that yet, no idea :-P
21:11bbloomask technomancy
21:12tomojsrc-cljs or src/cljs?
21:12tomojI have :source-paths ["src/clj" "src/cljs" "clojurescript/src/clj" "clojurescript/src/cljs"]
21:12tomojoh the src-cljs is yours, huh
21:13gfredericksthe :source-paths made it work
21:22arrdem,(doc source)
21:22clojurebot"([n]); Prints the source code for the given symbol, if it can find it. This requires that the symbol resolve to a Var defined in a namespace for which the .clj is in the classpath. Example: (source filter)"
21:22gfredericks,(source doc)
21:22clojurebotSource not found
21:22xeqi,(source source)
21:22clojurebotSource not found
21:23gfredericks,(doc doc)
21:23clojurebot"([name]); Prints documentation for a var or special form given its name"
21:23gfredericks,(partial partial)
21:23clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$partial>
21:23gfredericksdangit
21:23xeqi,(identity identity)
21:23clojurebot#<core$identity clojure.core$identity@4349f1b6>
21:23dnolenbbloom: what happens w/ that?
21:23dnolenbbloom: (when false ...)
21:23gfrederickslet's figure out how many functions/macros can meaningfully be passed to themselves
21:23gfredericksdnolen: it emits the def unconditionally
21:23arrdemdamnit guys I was being serious
21:24gfredericksarrdem: that doesn't mean it isn't fun
21:24arrdemoh I'm laughing.
21:24arrdem,(println println)
21:24clojurebot#<core$println clojure.core$println@33666bf5>
21:24gfredericksdnolen: or so I've heard
21:24bbloomdnolen: yup, what gfredericks said
21:25gfredericks,(delay delay)
21:25clojurebot#<CompilerException java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/delay, compiling:(NO_SOURCE_PATH:0)>
21:25tomoj&((((partial partial partial) map) inc) [1 2 3])
21:25lazybot⇒ (2 3 4)
21:25bbloomon the JVM, top levels are executed on module load
21:25arrdem(inc tomoj)
21:25lazybot⇒ 5
21:25gfrederickstomoj: that's awful
21:25bbloomsame thing for clojure script, but since there is no def at runtime, that's a problem
21:25bbloomwhat you really want is for top levels to be executed on module compilation
21:25bbloomin the compilation enviornment
21:26tomojgfredericks: it's kind of useful, since clojure.core/map etc are not curried
21:26bbloomdnolen: hence the :-( face
21:26xeqigfredericks: not a fan of point-free style?
21:26bbloomxeqi: not in clojure :-P
21:26bbloomor at least, not like that
21:26gfredericksxeqi: oh now I have to dig through my gists
21:26tomoj(def curry-seq-fn (partial partial partial))
21:27cjfriszI always feel guilty when I work through unhelpful Clojure error messages and only realize afterward that I should have documented what I did
21:27tomojalso WHY aren't they curried? :(
21:27cjfriszCuz I certainly don't remember all the steps now
21:27gfredericksxeqi: https://gist.github.com/967464
21:28xeqigfredericks: heh
21:30tomojwait, what?
21:30tomoj&(partial partial)
21:30lazybotclojure.lang.ArityException: Wrong number of args (1) passed to: core$partial
21:30tomoj..since when?
21:30gfredericksit used to not?
21:31tomojhttps://github.com/clojure/clojure/commit/c85617be
21:32gfrederickshaha partial is identity
21:33gfredericksthat could make for some nice obfuscated code
21:33gfredericks&*clojure-version*
21:33lazybot⇒ {:major 1, :minor 4, :incremental 0, :qualifier nil}
21:33gfredericks,*clojure-version*
21:33clojurebot{:interim true, :major 1, :minor 4, :incremental 0, :qualifier "master"}
21:33amalloytomoj: committed five months ago? that's after 1.4 for sure, right?
21:34gfrederickshaha yept (partial 42) returns 42
21:34amalloygfredericks: my dream come true! i can now (map (juxt partial :name) coll)
21:34gfredericksSWEET
21:35gfrederickspartial now preferred over identity for shorter spelling
21:39amalloyindeed, partial now joins deliver in the ranks of "easily misleading functions"
21:39arrdem,(doc deliver)
21:39clojurebot"([promise val]); Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception."
21:40amalloyif you have a 1.5 repl handy, try to mix-n-match with (deliver partial :x)
21:41gfredericksso you're saying that we could replace identity with (partial deliver partial)?
21:42gfredericksas well as (partial deliver (partial deliver partial))
21:42gfredericksthe fun never stops
21:45amalloyyou're a monster
21:46gfrederickscore.logic would be a good way to implement an obfuscation lib
21:47gfredericks(defn identityo [x expr] (conde [(== x expr)] [(== x ['partial 'deliver x])] ...))
21:51gfredericks"I don't care much for proper error handling; I'm a Clojure programmer at heart."
21:52TimMctechnomancy: If we're going to be using a web-of-trust signing architecture, we should be exchanging PGP keys at Clojure meetups. :-)
21:53arrdem,(dec (Float. "Infinity"))
21:53clojurebotInfinity
21:54arrdemOkay.. which is less evil: having a refcount of Infinity, or adding control logic so that you can't refdec some refs?
21:56tomojrefdec?
21:58gfrederickstomoj: opposite of refinc
21:59gfrederickswhich is like finc but for if you have already called finc
22:02tomojfor a second I thought that was the actual answer :)
22:02gfredericks(defn finc [f x] (f (inc x)))
22:02gfredericks(def refinc finc)
22:03arrdem,(>= 0 (dec (Long. "Infinity")))
22:03clojurebot#<NumberFormatException java.lang.NumberFormatException: For input string: "Infinity">
22:03arrdem,(>= 0 (dec (Float. "Infinity")))
22:03clojurebotfalse
22:04arrdemgfredericks: https://github.com/arrdem/OoOP/blob/ea5e33e9b924c2ee1e45b5df364eef90b56527d3/src/final/gc_map.clj
22:05arrdembecause I'm a party pooper.
22:08gfredericksarrdem: so you have certain refs that shouldn't be dec'able?
22:09arrdemgfredericks: yeah... I got that solved but basically I have a map that represents the register state of the simulator and I refcount the temporary registers but not the architectural ones.
22:48nodenameWhy does seq? return false on a vector?
22:49bbloom(doc sequential?)
22:49gfredericksthere's a distinction between something being a seq and something being seqable
22:49clojurebot"([coll]); Returns true if coll implements Sequential"
22:49bbloom(doc seq?)
22:49clojurebot"([x]); Return true if x implements ISeq"
22:49bbloom(doc seq)
22:49clojurebot"([coll]); Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable."
22:50bbloom(map (juxt seq? sequential?) [(list 1 2 3) (vector 1 2 3)])
22:50bbloom,(map (juxt seq? sequential?) [(list 1 2 3) (vector 1 2 3)])
22:50clojurebot([true true] [false true])
22:50gfredericksSequential is an empty interface?
22:50bbloom,(map (juxt seq? sequential?) [(list 1 2 3) (vector 1 2 3) {:x 1} (seq {:x 1})])
22:50clojurebot([true true] [false true] [false false] [true true])
22:50amalloyyes
22:51amalloygfredericks: otherwise how would you tell vectors and maps apart?
22:51gfredericksI think halloway once said that the best API is one with zero functions
22:51gfredericksamalloy: by staring
22:51amalloyah, the (str x) approach to type dispatch
22:51gfredericksamalloy: or better yet, by (comp first pr-str)
22:52gfrederickser. like you thought I said.
22:54gfredericks(defmulti sequential? (comp first pr-str)) (defmethod sequential? \( [_] true) (defmethod sequential? \[ [_] true) (defmethod sequential? \{ [_] false)
22:55gfrederickssomebody's gotta write this code.
23:09arrdem,(doc update-in)
23:09clojurebot"([m [k & ks] f & args]); 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created."
23:28technomancyTimMc: I was key-signing like crazy at the Conj =)
23:28TimMcCool.
23:28technomancywell, as much as my illness allowed
23:29amalloyyou should have set up a key-signing robot to sign anyone's keys
23:29TimMcDammit, I should have exchanged keys with cemerick when I met him at a recent meetup.
23:29RaynesYou were a zombie at the conj, technomancy.
23:29technomancyamalloy: don't make me sic the gourds on you
23:29Raynestechnomancy: I knew you were going to be doing key signing, so I purposely found a seat away from everyone so I wouldn't have to tell them to bug off.
23:35TimMcI just heard that song a few days ago... where's it from?
23:35technomancyjonathan coultron
23:38technomancyhttp://www.jonathancoulton.com/wiki/Re:_Your_Brains
23:39technomancyactually https://www.youtube.com/watch?v=S6vnM9I7HIo
23:41bbloomtpope: is there a flag to disable evaluating expressions without a persistent repl? i dislike the wait when i open a clj file just to look at it but don't have a repl running