#clojure logs

2013-11-06

00:00jared314hfaafb: vec works the same as apply vector, but the source looks very different. What is it doing?
00:03hfaafbis there a reason you can't do (vector ...) instead of concat? concat returns a lazy seq
00:03hfaafbjared314: i'm not an expert but my first guess is its dropping to java for performance
00:12devnlogic_prog: (apply vector 1 2 3 '(4 5 6)) won't work.
00:13logic_prog,(apply vector 1 2 3 '(4 5 6))
00:13clojurebot[1 2 3 4 5 ...]
00:13logic_prog,(apply vector 1 2 '(3 4))
00:13clojurebot[1 2 3 4]
00:13logic_progdevn: ^ :-)
00:13devnweird
00:13devnmy repl was out of order for a second. i was having a mini clojure crisis.
00:14devnlogic_prog: anyway, yes, vec only takes one argument -- a collection
00:18devnlogic_prog: could you explain what you mean by: "is a list still constructed in between"?
00:19logic_prog(apply vector 1 2 3 (concat .... ))
00:20logic_progI think (concat ... )) constructs a _list_, then we make it a vector
00:20logic_progI'd prefer to just create a vector without the intermediate list
00:20jared314i thought concat was lazy
00:20timsgit is
00:23devnYou could follow the pattern in mapv, filterv, etc. I think
00:23abaranoskyhey dudes, anyone got a good setup in their Emacs to nicely M-. (or equivalent) into Java code?
00:24devnhola -- i have never really set that up
00:24devni had it once, for like a day
00:24technomancylogic_prog: into maybe
00:24abaranoskydevn: I know, noone does, be it is handicapping me I decided
00:24abaranoskyI love `into`
00:24devntechnomancy: yeah that's basically the mapv/filterv abstraction
00:24devnwell not really, but it's close
00:25devnthe use of transient and persistent!
00:25abaranosky(into [1 2 3] more-stuff)
00:27devncuriously -- (vector 1 2 3 '(4 5 6)) looks to be faster than (into)
00:29devn(vector 1 2 3 (concat 4 5 6)) looks fine performance-wise, maybe even better
00:29devn(class (concat 4 5 6))
00:29devnlogic_prog: i think what you're doing is fine and nothing to get worked up over
00:30devnuse the lazy-seq intermediate with confidence
00:31devni guess my personal answer is: if you're asking whether there's something faster -- you could build one or tinker a lot to find the best one for the inputs you're handling, but i think what you're doing is just fine and nothing to get worried about
00:32mercwithamouthi'm trying to include monger in a project. i ran lein repl after including the dependency but i'm not sure how you would go about using it? https://www.refheap.com/20510
00:33mercwithamouth:use should be ':require' by the way..sorry
00:33devnmercwithamouth: did you run `lein deps`
00:33mercwithamouthdevn: yup
00:33mercwithamouthit pulled the dependencies but i'm obviously not importing them right =(
00:34devnWhat you're doing looks reasonable to me, but I don't often work from lein repl.
00:34mercwithamouthdevn: nprel???
00:34lazybotmercwithamouth: How could that be wrong?
00:35devnmercwithamouth: yeah
00:36mercwithamouthswitching over from light table...one sec.
00:38devnmercwithamouth: oh, found your problem maybe
00:39devnmercwithamouth: defproject jackals -- ns jackal.db
00:39devnmercwithamouth: is your file in src/jackals/db.clj maybe?
00:40mercwithamouthdevn: yeah
00:44mercwithamouthdevn: were you saying i need to add that namespace to defproject?
00:49devnmercwithamouth: if you were in light table im not sure how it all works
00:49technomancyyour project name doesn't have to match your namespace names
00:49devnbut it looked weird to me that you're project's name...
00:49devnwhat technomancy said
00:50technomancyunrelated, but are you stuck with mongodb?
00:50mercwithamouthahh oops...sorry the projectname is lyingassjackals as the rest of it is. i think i accidentally cut that off when pasting.
00:50mercwithamouthtechnomancy: not at all....datomic?
00:50mercwithamouthi was just going to play with it since i was somewhat familiar with mongo
00:50technomancymercwithamouth: no, I can't say I'd recommend single-vendor lock-in, but you can do better than mongo
00:51mercwithamouthdo tell...throw something at me.
00:51mercwithamouthi'm making a very small app that lets you like or dislike images.
00:51technomancypostgres is always a reasonable default
00:51technomancyriak if you need HA above all else
00:52mercwithamouthi almost chose redis since it's going to be a simply key/value type deal.
00:52mercwithamouth..and my redis book is sitting here unused, lol
00:52technomancythe new json column type in postgres 9.3 lets you do all kinds of schemaless stuff with it
00:52mercwithamouthhmm i'll take a look see
00:52technomancywell, if you don't need durability at all redis is nice
00:53mercwithamouthyeah this is a toy app for friends to mess around
00:53mercwithamouthno serious data
00:53mercwithamouthcarmine?
00:57devnmercwithamouth: if this is just a hobby app I recommend redis or riak.
00:58devnmercwithamouth: the simplest thing is probably redis
00:58mercwithamouthdevn: redis it is
01:10mercwithamouthweird..can't get emacs to open to save my life even after a reboot. this is a sign...back to light table.
01:11technomancycan't get it to even open?
01:11mercwithamouthnot until i talked trash about it just now =)
01:11bitemyappdevn: howdy!
01:12bitemyappdevn: nice seeing you :)
01:12technomancythat's a new one
01:13mercwithamouthyeah i used emacs for months...with no problems. like even now...nrepl doesn't seem to want to kick in.
01:13mercwithamouthi'm sure it's something i did personally without thinking.
01:14devnbitemyapp: hola
01:17bitemyappdevn: cbp finished the RethinkDB driver for Clojure
01:17bitemyappdevn: released it last weekend! http://github.com/bitemyapp/revise/
01:17bitemyappI'm working on open sourcing a migration toolkit for Datomic. Also thinking about a lock-free resource-pool library for Clojure
01:17bitemyappdevn: how are you?
01:23devnwell, thanks
01:23devnbitemyapp: cool
01:24devnbitemyapp: datomic is pretty great
01:30mercwithamouthwell now it's working with light table.
01:30mercwithamouthyou guys still don't like mongodb though do you? =P
01:32jared314mercwithamouth: restarted lighttable?
01:33mercwithamouthjared314: rebooted. emacs is still acting funny but to be honest my shell is acting crazy in general tonight. i'll go back and pull a previous version later on. i must have broken something earlier
01:34yeoj___is there anyway to eval a symbol to it's value? I was thinking unquote would do that.
01:36jared314yeoj___: well, eval would do it. :)
01:36jebberjebyeoj___ : eval
01:37devnyeoj___: do you have some example code with expected input & output?
01:39yeoj___well, i guess this https://www.refheap.com/20512
01:40jared314why are you using keywords like that?
01:40yeoj___i'm trying to have a sort of configuration file, and i wanted to make it so the user could just type in the base-name, and then i would eval that into other things
01:40yeoj___but i'm pretty sure it's not the right way.
01:41devnyeoj___: what do you want to come out of this on the other side?
01:42devn(my-function-thingy (read-string (slurp "file.clj")))
01:42devn=> ...
01:42yeoj___devn: ok, i'll try that.
01:43devnyeoj___: nono, im asking you what you hope to accomplish here
01:43devnYou want a configuration file that's read as a clojure datastructure, right?
01:43yeoj___devn: i want to have a configuration file, and based on "base-name" other things get "defaulted" in the config file. but give the user an option to type in things to override/etc.
01:44yeoj___devn: i was thinking a clojure data structure would be good.
01:44devnyeoj___: you can do a lot of other things
01:44devnyeoj___: try (read-string (slurp config.clj)) -- have the user write a plain clojure map with keywords in it
01:45yeoj___i want a param file, that can reference params already in itself... (i.e. base-name)
01:45devnso the file looks something like {:foo "bar" :baz "qux"}
01:45yeoj___and that got me thinking of string templating, but i'm sure lisp-ish stuff has a better way
01:45devnyeoj___: if you want templates there are lots of options
01:45devnbut frankly, you can just use a map for this kind of thing
01:46devnidk, experiment with it and see where you and up
01:46yeoj___devn: ok. thanks.
01:48yeoj___devn: this is a better example: https://www.refheap.com/20512
01:48yeoj___i think i might need templating.
01:49jared314leiningen does something like that with project files
01:50yeoj___ah right. with a defproject.
01:50jared314but i think they do something with macros
01:50yeoj___so i think i could do it with a let binding, but i'm not sure if i could do it with a straight map.
01:50jared314to make it work
01:55devnyeoj___: im still a little confused. You have :db-spec {... :subname (str "//localhost:5432/test") ...}
01:55devnwhy do you call str there?
01:56devnit looks like in the other cases you're wanting to use :base-name like it's a passed in value
01:56devnto which I say: why don't you just use a function to return the configuration map?
01:56jared314devn: in project.clj files you can use ~ to eval code in the project configuration
01:56jared314devn: he wants that
01:57devnjared314: im not sure that's it
01:57yeoj___devn: i guess i don't want to have str in there... thats here i was trying to quote/unquote to get :base-name to resolve later on.
01:57yeoj___devn: i'm thinking i'm just going to have one let binding in a seperate file called config.clj, and slurp/eval that
01:58devnyeoj___: up to you, but I personally recommend just keeping it simple unless you actually need to do this for some reason
01:59yeoj___devn: ok. I had convention over configuration stuck in my head.
01:59yeoj___i.e. you give me the "base-name" of the program-run and i'll suggest the output file, the log file, the temp file, etc...
01:59devnyeoj___: i understand the desire, but frankly, think about a database.yml
01:59devntest, production, development
01:59devnsometimes a staging
02:00devnthere's a shorthand for inheriting from a base template
02:00devnbut that template is just a map under the covers
02:00devnso just make a function that does that for a base config map you specify
02:00devnand read in the user's map and merge it
02:00devnor something like that
02:00yeoj___devn: ok, that makes sense i think.
02:01devnyeoj___: im just saying i really don't think you need to get into a whole templating dependency to support user config in a nice approachable way
02:01devnyeoj___: you could always have a default config file: default.clj: {:default-option-1 "abc" ...}
02:02devnand then just merge it with the user's map read from custom.clj: {:default-option-1 "not abc"}
02:02yeoj___devn: ahh, ok. I think maybe my idea is it's a bit more than a config... or will be at somepoint.
02:02yeoj___devn: i'll try a simple map for now, leave out the merging, and look into templating.
02:03yeoj___devn: i guess i'm curious about when templating overlaps with a proper dsl also...
02:03devnyeoj___: im not trying to tell you it's a bad idea -- i just am raising an eyebrow because it seems like a lot of trouble for not a lot of value
02:04devnyeoj___: the merging seems like a nice way to achieve what it sounded to me like you were looking for
02:05yeoj___devn: ok, i'll give that a shot.
02:05devnwhich is the ability to have some defaults which the user can override
02:05devnbut to not make them override or configure /all/ of it
02:05devnto just let them pick and choose what they want to edit
02:05devnwhich could itself be a simple set of defaults
02:06devnthe user can change them or not
02:06yeoj___devn: i guess the merge is straight forward as well...
02:07myguidingstarhi all, what's the best practices to see source of a multimethod in REPL
02:12muhoowow i've gotten into a habit of using reduce intead of loop. not sure if that's a good habit tho
02:12mercwithamouthhah so fish is what broke everything
02:13Apage43muhoo: mayhaps its a stepping stone to clojure.core.reducers/fold
02:13muhoowell yeah if i needed that kind of parallelism
02:14bitemyappmuhoo: that's proper dude.
02:14bitemyappmuhoo: learning you don't need loop/recur and can get by with plain old folds is the golden path to FP.
02:14muhoothis just looks so ugly https://www.refheap.com/20513
02:15muhooi mean, yecch
02:15muhooloop would probably be clearer, since i'm abusing the accumulator there
02:15bitemyappmuhoo: haha, no, that's fine.
02:16bitemyappmuhoo: man...you should see some of the code I wrote recently at work...that's nothing :)
02:16bitemyapp8-deep nested reductions, multiple-layers-deep accumulators...
02:16Apage43partition might be handy here
02:16bitemyappmuhoo: http://i.imgur.com/WwterpW.gif you're fine.
02:17Apage43,(partition 2 1 [1 2 3 4])
02:17clojurebot((1 2) (2 3) (3 4))
02:17bitemyappApage43: nice!
02:17bitemyappmuhoo: ^^ :)
02:18bitemyappgoing to have to keep that in mind the next time I encounter overlap.
02:19muhoocool, but i don't like hairy code
02:19Jardahmm
02:19muhooalways feels to me like i haven't simplified it enough. when i was young i was proud of incomprehensible bullshit. now it makes me deeply uncomfortable
02:20bitemyappmuhoo: well Apage43 just showed you how to simplify it.
02:20Jardaanyone aware of a way to make a testing library (cucubmer in this case) output string diffs in assertion output
02:21muhoobitemyapp: Apage43: ah i see, nice. make 'em into pairs. will try that
02:21mercwithamouthhmm can anyone explain this error to me? http://d.pr/i/EGEM
02:22Apage43,{:a 1 :b 2}
02:22clojurebot{:a 1, :b 2}
02:22bitemyappmuhoo: if your data makes your code ugly, then unfuck da data! :)
02:22Apage43,{:a 1 :b 2 :c}
02:22clojurebot#<RuntimeException java.lang.RuntimeException: Map literal must contain an even number of forms>
02:23amalloymercwithamouth: {<pool>} is rubbish
02:23amalloyer, {<opts>}
02:23muhooApage43: huge improvement, thanks.
02:23Apage43cool :)
02:23mercwithamouthamalloy: do tell? i'm toying with the example and admittingly i had no clue what that portion did.
02:23amalloyit's...pseudocode you included in your actual code
02:23amalloywhich reasonably enough does not parse
02:24bitemyappmercwithamouth: what...is with the pseudocode...
02:24bitemyappmercwithamouth: where's your book?
02:24mercwithamoutho_O;
02:25mercwithamouthfine fine! =)
02:25bitemyappmercwithamouth: http://www.clojurebook.com/
02:26Apage43man
02:26Apage43that thing's readme is telling folks to write macros? :(
02:26mercwithamouthApage43: yes carmines docs are beginning to scare me
02:26mercwithamouthbut it's supposedly a great library
02:27mercwithamouthbitemyapp: i have that as well...doesn't cure my redis fogginess
02:27bitemyappApage43: I stopped recommending pt-too-many-fucking-vowels-nis' libraries.
02:27bitemyappI still use timbre but I've got a jaundiced and blood-thirsty eye pointed at it.
02:27ddellacostabitemyapp: why?
02:28bitemyappddellacosta: global singleton resources for no good reason, crazy fucking macros for no reason, documentation recommends bad practices.
02:28bitemyappDon't get me wrong, you can "get things done" with his stuff. His is the best redis library for Clojure
02:28bitemyappbut my god the code is disconcerting to me at times.
02:29ddellacostabitemyapp: okay, thanks for the feedback. Will review. I've felt like timbre was pretty easy to use, and I like the appenders, but I haven't dug too deeply into the codebase.
02:30bitemyappddellacosta: yeah...if you take a look at timbre's codebase....
02:30bitemyappddellacosta: I like the appenders too...but the underlying code...
02:30ddellacostait is pretty macro-tastic, scanning it now.
02:30bitemyappmacro-tastic is a good word for it.
02:30bitemyappddellacosta: did you see that revise got released?
02:31bitemyappddellacosta: cbp picked it up and wrote 90% of the library, there's a RethinkDB client for Clojure now.
02:31ddellacostabitemyapp: nope, but not really in the market for a RethinkDB client
02:31ddellacostabitemyapp: don't get me wrong, that's pretty cool though. :-)
02:31bitemyappddellacosta: oh I know you're not likely to become a user, but look at the API! github.com/bitemyapp/revise/
02:31ddellacostawoah, what is this dealy: https://clojars.org/revise/latest-version.svg
02:32bitemyappddellacosta: magic that prevents me having to change the READMEs ever again.
02:32ddellacostabitemyapp: pretty neat
02:32bitemyappddellacosta: my primary contribution was the connection lifecycle. I made it async, lock-free, and more efficient than most database connection implementations.
02:33bitemyappddellacosta: I'm really happy with it. It's also inspired me to think about possibly writing a generic resource pooling library for clojure.
02:33bitemyappa lock-free one. possibly based on ring buffers.
02:33bitemyappddellacosta: running a query just returns a promise that you deref.
02:33ddellacostabitemyapp: would be interested to see that. We use pgpool w/postgres so wouldn't have much use for it...but it would be good to separate it out in any case
02:34ddellacostabitemyapp: that is neato
02:34ddellacostaI like the query api
02:34bitemyappand the connection can perform work while waiting on an arbitrary number of query results, it doesn't block the whole connection like most implementations.
02:34bitemyappddellacosta: the brilliant query API is all cbp. :)
02:34mercwithamouthahhh how reading the code you use works wonders o_O
02:34ddellacostabitemyapp: congrats. :-)
02:34bitemyappmercwithamouth: think. read. design. Don't play bumper cars with your code :)
02:34bitemyappddellacosta: thanks :D
02:35bitemyapp"Uhm backtraces" very confidence building commit message cesar.
02:41muhoowhat are you talking about? half my commit messages are "doh!"
02:42muhooalright fine, that's on private branches, and i merge --squash those before anyone sees 'em, but still
02:43bitemyappmuhoo: that was pushed straight to master. I'm equally guilty, I just found it amusing :)
02:47muhoohuh, that trick for overlapping partition was in my notes, from 4/10/12. had totally forgotten about it.
02:48muhooyear and a half ago :-/
02:48bitemyappmuhoo: at least you keep notes. I feel like I just had a pseudo-religious epiphany that I should start doing that.
02:48bitemyapp...now.
02:53glosoliA bit of a dumb question, but how do I correctly use map in such situation (map #({:phone %}) [444444 11111]) I want to make some function to every value of vector, but I am not sure why does ArityException get thrown
02:53glosolis/make/map
02:53Apage43glosoli: what output do you want, exactly?
02:54Apage43at any rate, you're calling a map as a function with no args here, and maps require one or two
02:54pepijndevos&(map #(vector :phone %) [1111 4444])
02:54lazybot⇒ ([:phone 1111] [:phone 4444])
02:55glosoli({:id "f250b7c8-5b2f-4191-98bb-38e267af8821", :phone 37062681701, :mask "***"} {:id "02ba1da9-4689-44ff-a82b-f409ae2645b0", :phone 37061564497, :mask "***"})
02:55glosoliI want something like this as a result
02:55glosoliid will be generated too though, stupid of me of not including it in the example
02:56Apage43,(for [phone [123 456 789]] {:phone phone :id "pretendthisisanid"})
02:56clojurebot({:phone 123, :id "pretendthisisanid"} {:phone 456, :id "pretendthisisanid"} {:phone 789, :id "pretendthisisanid"})
02:56pepijndevosglosoli, try using proper fn syntax instead of the lambda reader macro
02:56jared314you can use the hash-map function
02:57jared314(map #(hash-map :id (something) :phone %) [...])
02:57glosolipepijndevos: yeah it works that way, the lambda reader macro is what got me curious, but proper fn syntax might be better suit for such situation I guess
02:58pepijndevosthe first argument in the lambda macro gets called as a function
02:58Apage43#(foo %) is equivalent to (fn [x] (foo x)), often confused for (fn [x] foo x)
02:58glosoliok thanks folks
02:59pepijndevos&(#())
02:59lazybot⇒ ()
02:59pepijndevosthat's just weird...
03:00Apage43,()
03:00clojurebot()
03:00jared314,(#())
03:00clojurebot()
03:00Apage43an empty list is just an empty list =P
03:00Apage43following that i said above, that's equivalent to (fn [] ())
03:00pepijndevosApage43, yes but according to your logic that would be equivalent to... oh wait (fn [] ()) so it kinda makes sense.
03:00Apage43,((fn [] ()))
03:00clojurebot()
03:13Apage43,(let [v [5 4 3 2 1 0]] (mapv v v))
03:14clojurebot[0 1 2 3 4 ...]
03:16Apage43so, for that transform (swapping values with indices), I wonder what is the longest cycle I can get iterating that for a vector of some size
03:16Apage43with 5 I found a 4-cycle
03:16Apage43&(take 5 (let [v [5 0 2 4 1 3]] (iterate #(mapv % %) v)))
03:16lazybot⇒ ([5 0 2 4 1 3] [3 5 2 1 0 4] [1 4 2 5 3 0] [4 3 2 0 5 1] [5 0 2 4 1 3])
03:36devnApage43: come off of it
03:37devnerr in reply to your thing earlier about a book telling people to write macros ":("
03:37Apage43not a book
03:37devnthat assertion in this community is annoying as hell
03:37Apage43a README for a library
03:37devn"don't write macros! the sky is falling!"
03:37Apage43a database client library
03:37Apage43i'm not against macros
03:37devneven still, gigantic shrug
03:37Apage43but "how to connect to a database" shouldn't have defmacro in it
03:38devnwho cares what other people do with their clojure?
03:40jkjwell. macros are sometimes nice layer on top if you can do everything also without them
03:40devnugh -- there it is again
03:40jkjmacro-only libs are HARD to drive programmatically and generally useless if you want to do anything other than the designer intended
03:41devnyes, yes, everyone knows -- but I wish people would quit playing 5th grade teacher reminding everyone to "be careful with macros!" all the time
03:41devnyou always hear the people cautioning about the use of macros
03:41devnand no one talking about the things they can give you
03:42jkjoh. well. people just broadcast their personal opinions
03:43devnclojure is a consenting adults language
03:43jkji don't think it is really intended that macros are bad, but there is a common antipattern that people want to warn about
03:43devnpeople need to chill out about THE HORROR OF MACROS
03:43Apage43I wasn't concerned about the use of macros so much as
03:44jkjso when you know better, you can just stop listening to the warnings :)
03:44Apage43the idea of introducing macros while trying to show someone how to connect to their db
03:45bitemyappApage43: I agree.
03:45devnApage43: I get it. I just wish there wasn't all of this glasses-adjusting, pocket protector wearing, overprotective parenting
03:45bitemyappApage43: btw, have you read the code to timbre?
03:45Apage43i have
03:45Apage43i wrote my own appender once
03:45devn<mom voice>don't forget to wear a helmet!</mom voice>
03:46devn^---the clojure community on macros
03:46bitemyappdevn: macro-madness and weird galapagos-island micro-lisp DSL macro-fueled what-the-fuck-is-going-on crippled Common Lisp. We're trying to balance empowering the programmer with common sense.
03:46devnbitemyapp: you're doing it too?
03:46bitemyappdevn: I write Lisp like a fucking madman, I'm just trying to temper my own enthusiasm.
03:47devnbitemyapp: yes, but i wish people would quit tempering OTHER PEOPLE'S enthusiasm
03:47bitemyappsome of us have been waiting for the "Rise of Lisp" for most of our natural lives. Not wanting to repeat the mistakes of the lsat major Lisp isn't a sentiment that should be disregarded out of hand
03:47bitemyappalso believing that documentaton could be improved to reflect a better style doesn't seem unreasonable to me.
03:47bitemyappalso holy god I type so much faster on this thinkpad. Like night and fucking day.
03:48devnprogramming languages ought to be prescriptive up to a point. if people want to warn about macros so much, take them out of the language.
03:48devnor better yet, we'll have people sign agreements that they understand how to properly use macros
03:48Apage43devn do you have a highlight for "macro" if you do it is okay, I have one for "crypto"
03:48devnthe whole thing is asinine
03:48bitemyappit's really not
03:49bitemyappnoobies have a habit of over-using them if not corrected.
03:49bitemyappthey'll use them where functions would've sufficed and returned errors that made sense.
03:49devnlet them make mistakes. that is how people fucking learn.
03:49bitemyappthe macros *need* to be in there, though.
03:49bitemyappdevn: well, maybe. I return to what I said about bizarro-world galapagos island Common Lisp libraries.
03:49bitemyappsome common lispers managed to entirely avoid learning how "map" worked.
03:49devni would like to present a challenge to the community: don't remind everyone about macros the next time they come up
03:49H4nsdevn: you don't teach people how to drive by showing them the innards of the engine first.
03:50bitemyappI'm...not exaggerating.
03:50devnbitemyapp: dude. i get it. history. yes. understood.
03:51devnit's just creativity stifling, mob mentality, "wear a helmet!" crap though
03:51bitemyappdevn: well I don't know what you want me to say. There are well-substantiated reasons for a "golden path" to learning FP in Clojure before going hog-wild with the Lispy bits.
03:51devnwhy don't people constantly remind people about alter-var-root, using mutable arrays, etc.
03:51bitemyappdevn: you're talking to an "ally". Idiomatic Clojure for me means using nutty AOP shit.
03:51bitemyappand macros to sugar up said AOP.
03:52bitemyappwhy? because why the fuck not.
03:52Apage43if the README for a library asked folks to configure it using alter-var-root i'd be a bit concerned then too.
03:52bitemyappbut I wouldn't teach a new person that way, it's not worth the complexity budget when learning.
03:52bitemyappthe way I teach Clojure to newbies is like an immutable FP Python.
03:52bitemyappApage43: alter-var-root...kekekekekeke
03:53Apage43incidentally i'm really enjoying synthread when i have an excuse to use it
03:53bitemyappApage43: <3
03:53devnyes, i just think all of this enthusiasm for what other people ought to do with their clojure code is a bunch of crap. clojure is a consenting adults language.
03:53Apage43i get to keep saying "man.. this would have been some *ugly* ass code without that."
03:54bitemyappApage43: I'm pretty certain Raynes has a standing death warrant for people that use synthread in production code.
03:54bitemyappthis tickles me to no end, since he was originally a Haskell coder.
03:54bitemyappdevn: well, you're welcome to nominate yourself the Johnny Appleseed of macros.
03:55devnit's not like that
03:55bitemyappdevn: I look forward to the "smashing your conses for fun and profit" posts >:)
03:55bitemyapp(i'm srs, I want to see a tutorial with that title.)
03:55devnit's not so much that i think we need a heavy duty advocate for macros
03:55devnit's that i wish people would just shut up and let nature take its course
03:56Apage43leave macros alone?
03:56bitemyappdevn: I'm down with that :)
03:56bitemyappI need to start taking extracts of my ugly code and shove it in devn's face, so he can get a whiff of nature taking its course :D
03:56devnpeople who learn clojure are not stupid, y'know?
03:57devnthese people will figure it out. you can't use them all of the time.
03:57Apage43sure
03:57Apage43i just https://github.com/ptaoussanis/carmine#connections
03:57devnbut you learn how far to take something by doing it to an extreme
03:57devnso i think it is actually more harmful to discourage macros
03:57Apage43would rather not help someone debug a macro (at least if they've never written one before) when they're trying to connect to redis
03:58bitemyappdevn: I think I would be less concerned if clojure had a type system to whack people on the nose.
03:58devnbecause there might be really good places where they fit that people don't commonly use them, and when they hear "oh, be careful! look out! you might poke your eye out!"
03:58devnit makes them skip them altogether
03:58devnand they're a wonderful intentional feature of the language
03:58amalloyApage43: you may be interested to know that for n=4, the longest cycle is also 4 (4 3 1 0 2); for 6 and 7 it is 5; for 8 it is 6. after that it gets a bit hard to brute-force
03:58devnso just quit telling people and let them learn like everyone else did
03:58bitemyappApage43: dat fuckin' pseudocode.
03:58Apage43amalloy: ! nice
03:58mercwithamouthhrmm how would i go about fixing my casting issue? https://www.refheap.com/20514
03:58devn</rant>
03:59devnsweat*
03:59Apage43i'm glad i wasted someone else's time with that =P
03:59bitemyappbeing back on Linux has put me in a really good mood
03:59amalloyit looks kinda like cycle-len might be (floor (/ input-len 2)), Apage43
03:59bitemyappI chuckled when I upgraded Ubuntu and saw the fuckin' couchbase user in the login screen though
04:00mercwithamouthplaying is fun and fundamental.
04:00amalloymercwithamouth: "x cannot be cast to IFn" means "you have too many parens around a value of type x"
04:00ucbbitemyapp: thanks for the link; 'tis gooood
04:00amalloyin this case, all the keys in your map
04:01devnSpeaking of "goooood": http://skillsmatter.com/podcast/scala/the-refined-clojurist
04:01devnI missed that one.
04:02devnill be here all week ladies and gentlemen
04:02bitemyappLOL
04:02mercwithamouthamalloy: ahh gotcha! now i know wha to look for =P
04:02devntry the veal
04:02amalloyinline logical operators are the mark of the devil, devn
04:02devnlol
04:02devnoh god
04:03devnHow dare you talk about my logical operators like that! This is outrageous!
04:04devnAnd on that note, I must be off. Bed time.
04:04bitemyappI probably abuse "or" and "and" short-circuiting too much.
04:04bitemyappdevn: ta
04:04devnbitemyapp: are you going to the conj?
04:05mercwithamouththank you =P
04:05mercwithamouthproblem solved
04:05mercwithamouthnow..to refactor
04:06bitemyappdevn: exhaustion and lack of time/funds make it extremely unlikely. :(
04:06amalloybitemyapp: how is it possible to abuse that?
04:06devnbitemyapp: bummer
04:06bitemyappamalloy: triply nested forms and the like. Makes me feel like I should be splitting out constituent functions more aggressively. Nothing major.
04:07amalloybitemyapp: https://github.com/flatland/schematic/blob/master/src/flatland/schematic/core.clj#L41
04:08amalloyi remember that having more ors and ands, and less fors, than it actually does, but it still sounds like what you describe :P
04:08bitemyappamalloy: yeah I write code like that, but worse.
04:08amalloy<3 and/or
04:08bitemyappamalloy: I'm actually considering making caaar cdar cadr style macros for the and/or stuff I do.
04:08amalloyhaha
04:08bitemyapp(aoaoaor ...)
04:09Apage43(Rawr)
04:09amalloydoes that actually make sense, bitemyapp? it doesn't sound that way to me, but my brain may not be working
04:09bitemyappApage43: ALWP
04:09bitemyappamalloy: does what make sense? car/cdr and/or macros?
04:10amalloyyeah
04:10bitemyappamalloy: yes, but I don't have the spare sanity to prove my point off-hand.
04:10amalloyit works for caadr, but those are unary
04:10amalloyand/or are n-ary
04:11bitemyappspecifically what I was thinking of was using nested vectors and sequential application to produce what I had in mind
04:11bitemyappmaybe use numbers for arity?
04:12bitemyappa2o3a4or(rest)
04:12bitemyapp...I need sleep.
04:12amalloy*chuckle* you might also need medical attention
04:12bitemyappalmost certainly.
04:12amalloybut who knows, maybe it works out fine
04:13bitemyappwell, it could be made to work, it's just a terrible idea.
04:13amalloyi support terrible ideas
04:13bitemyappucb: https://soundcloud.com/maribel/sets/asthetics
04:14bitemyappamalloy: my fantasies involve having a greater crop of questionable libraries than ztellman.
04:14bitemyappI might (inc bma-evil-libraries) this week.
04:14bitemyappucb: listen to it loud!
04:15bitemyappit's shoegaze, WALL OF SOUND TIME
04:15ucbI need to set up my speakers
04:15ucbthis is a great excuse to do so
04:15amalloyi think it won't be long before he has a library that accepts as input a library and produces something equally questionable. the ztellman grey-goo scenario
04:15Apage43well equally questionable is not so bad
04:16Apage43but if it produces something minutely more questionable than its input, you can feed it to itself
04:16bitemyapp(reduce increase-questionableness [] ztellmans-libraries)
04:16Apage43and you now have a questionability pump
04:16bitemyapp(constantly AFOREMENTIONED) ;; OH GAD
04:19bitemyappI wonder if Baranosky always catches up on his tweets at 0115.
04:21smilerIs there a document somewhere about idiomatic style for Clojure?
04:24bitemyappsmiler: none that are accurate that I'm aware of, but flatland has libraries with decent examples.
04:25bitemyappdon't look at my code.
04:25smiler:P
04:25mpenetsmiler: there are http://dev.clojure.org/display/community/Library+Coding+Standards and https://github.com/bbatsov/clojure-style-guide , but both are somewhat opinionated.
04:26smilerThat's almost unavoidable
04:26bitemyappbatsov's guide is bad
04:26bitemyappplease do not link :(
04:27amalloynot so unavoidable as you might think - lisp-family languages don't really have the "style holy wars" that c-family languages do; everyone just uses the same style
04:27glosoli,(clojure.string/join (repeat 5 "*") (subs "59as5d465as4d564asd" 1 5))
04:27clojurebot"9clojure.lang.LazySeq@4186e49aclojure.lang.LazySeq@4186e49sclojure.lang.LazySeq@4186e495"
04:27glosoliAny ideas why does this return lazy seq ?
04:28amalloy&((juxt str pr-str) (range 5))
04:28lazybot⇒ ["clojure.lang.LazySeq@1b554e1" "(0 1 2 3 4)"]
04:28bitemyappamalloy: incisive. nice work.
04:29amalloyand probably cryptic enough to him that i resemble the oracle at delphi
04:29mpenetbitemyapp: it's not that bad, some parts are questionable, but overall it's ok for a newcomer
04:36amalloyby the way, Apage43, the code i used to find those numbers is at https://www.refheap.com/de564455dd37659d8418ebedf if you are interested. i'm going to bed, so i'm just throwing it away now that i've pasted it for you
04:36Apage43thanks
04:43noncomwhen using core.async pub/sub mechanism, can several subscribers be subscribed for the same topic?
04:44Uatecisn't that the definition of a Topic as opposed to a Queue?
04:45Uatecthat you get multiple subscribers?
04:51mpenetnoncom: I think there's a pub fn for that
04:51mpenetnoncom: and sub of course, never used them tho
04:52mpenetnoncom: best thing to do is just try on the repl
04:52noncomguys, just wanted to be sure.. i think i better do a simple repl try
04:52noncommpenet you were faster mentioning the repl ))
05:21ziltiIs there a way to dynamically create a function without using macros?
05:22magnarsWhat's dynamic about it?
05:22jonasenzilti: like (fn [x] (+ x x))?
05:22ziltijonasen: Yes, but... I don't know the argument list yet at code-writing-time
05:23ziltiNeither the function body
05:24noncom(eval ('fn your-arg-list your-body)) ?
05:24ziltijonasen: The argument list is in (first (val listener)) and I need to get that into that fn form
05:24noncom,((eval ('fn '[x] '(+ 1 x))) 3)
05:24clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
05:25noncomùð êøïðå
05:25noncomoh right
05:25ziltiThat won't work because the body expression has objects in it, which results in an error when using with eval
05:26noncomoh thats too bad, maybe you could proxy them or turn them into a function call, say on an atom?
05:26noncombtw, the above version with eval wont work, here is a working version: ((eval `(fn [~'x] (+ 1 ~'x))) 3)
05:27magnarsSounds like you're looking for an embedded language.
05:27ziltiBasically I'd want this: (fn (first (val listener#)) (postwalk varwalker (rest (val listener#))))
05:28noncomzilti: the simplest approach i can think of is to first put the objects in a atom or a ref and then call your function with accessors to it
05:28noncommagnars: what you mean by "embedded language" ?
05:28ziltinoncom: This looks like it would be an ugly, huge pile of code to achieve that
05:29noncomzilti: not really a huge pile, just one more atom and atom-calls instead of direct object access. but i hear you.. yes, sometimes it is like that with clojure... at least i can't think of something else right now..
05:30ziltinoncom: It works like this now (eval `(fn ~(first (val listener#)) (postwalk varwalker (rest (val ~listener#))))) hmm... I'm not sure how robust this is?
05:30magnarsnoncom: Like embedding a lua. If you're executing code that you don't know the form or contents of, it better live in a sandbox.
05:31noncomafaik only java class constructor calls in code are treadted specially and can't be passed like normal IFns, i.e. they are not IFns.. but what you say does not seem like a secial java case
05:31noncommagnars: oh that's right
05:32noncomzilti: well, cool! you can always ask here later again, when greater gurus of the language come in here
05:33ziltinoncom: The only problem I still have now is that my varwalker fails? It does (if (var? x) (deref x) x) but it seems in that code configuration that doesn't work
05:34noncomwhat does it say?
05:34noncombrb
05:36ziltinoncom: It just doesn't seem to deref the var (or deref'ing doesn't un-var it)
05:38ziltinoncom: Before that line of code, I have code that resolves all symbols in listener# that are resolvable, so they get "replaced" with a var. Then I want to deref them so I get the objects.
05:40ziltinoncom: The weird thing is, that varwalker actually works. Except when it's inside this eval like this: (eval `(fn ~(first (val listener#)) (postwalk ~varwalker ~(rest (val listener#)))))
05:48jonasenzilti: this seems overly complicated. Is the problem that you don't know the argument count? Or what exactly are you trying to do?
05:50ziltijonasen: Basically turning something like this {:on-action [[x] (blah blah)]} into (set-listener!* obj :on-action (fn [x] (blah blah)))
05:50ziltijonasen, noncom: But I found the solution, I had to quote the args: (eval `(fn ~(first (val listener#)) (postwalk ~varwalker '~(rest (val listener#))))) Like this, it works.
05:51zilti...or, compiles.
05:51jonasenzilti: Why not {:on-action (fn [x] (blah blah))}?
05:52ziltijonasen: ... no idea.
05:58noncomzilti: so you made it work in the end?
05:58ziltinoncom: Not yet.
05:58jonasenzilti: If I understand your use-case correctly you're tring to register a bunch of events from a map? Something like https://www.refheap.com/20520 ?
06:00ziltijonasen yes, something like this... But the events are part of a quoted map which is quoted for other reasons, and I can't properly "unquote" that stuff
06:02ziltijonasen Basically I need a way to reliably turn something like '(fn [a] (do-something a)) into (fn [a] (do-something a)) without going over (#'fn [x] (#'do-something #'a))
06:07jonasenzilti: I think you should take a look at why the map have to be quoted. Is it really necessary? Is it out of your control (i.e., it's not your code)?
06:09jonasenother than that, if you have '(fn [a] ...) and want to turn it into a function you'll have to evaluate it
06:09ziltijonasen: Well it is my code
06:10jonasenbut the need to use `eval` is very rare
06:13ziltijonasen: Hmm yes I was able to eliminate the need for quoting it
06:13jonasenzilti: problem solved! :)
06:31noncomzilti: could you post the form of your solution please? i was researching this kind of problems for some time too..
06:32ziltinoncom: In the end it now looks like this: https://github.com/zilti/clojurefx/blob/master/src/clojurefx/core.clj#L368 (Line 385)
06:35noncomwow cool, javafx wrapper!
06:40zilti:)
06:42clgvzilti: do you plan to integrate features like in seesaw? selection, config, ...
06:43noncomis there a way to recognize arity of a passed IFn?
06:44clgvnoncom: only via reflection
06:44clgvnoncom: for a given variable you can access its metadata
06:45noncomi think there'd be no metadata - i want to know arity of a function passed in the options map, the function is declared in-place.. so i think i better restrict the user than to invent something reflection-based here..
06:45noncomspeed matters too
06:47clgvnoncom: yeah the variable approach does not include anonymous functions..
06:58clgvnoncom: but you could force your user to attach metadata containing the arity information
06:59clgvnoncom: or for better usability expose a custom fn-macro that records the metadata
07:01noncom|2clgv: i think that in this case i will simply force user to always write full-arity fn. this will also make the code more transperant..
07:02clgvnoncom|2: yeah the optimal solution depends heavily on your concrete scenario
07:08sverihi, on my journey through clojure i wanted to try to implement something like reduce in a parallel manner myself, now i read the book Clojure Programming/Programming Clojure and they have examples with futures there, but i wonder, they always define them like this: (def (future ...)) without an argument list, is there an example where i can call a future with an argument? or am i thinking in the wrong direction?
07:10noncom|2sveri (future) is a simple java Thread dispatch
07:11noncom|2sveri: it takes only the body to execute in the run() method
07:11sverinoncom|2: so i could place it anywhere theoretically?
07:11clojurebotNo entiendo
07:11noncom|2sure
07:12sverinoncom|2: ok, thank you so far, i'll try this
07:12noncom|2it returns something after it finishes, it is called "dereferencing future", so if you (def a (future. ..)) then when the future finishes, @a will return the result. or hang forever :)
07:15noncom|2i use (binding) to bind my-var to some value, and later, when I am printing it to the console, it says #<Unbound Unbound: #'my-ns/my-var>, then if I #' it, it says #'my-ns/my-var ... but how do i get to print the value that has been bound to it?
07:17andrewmcveigh|wononcom|2: not 100% sure of what you mean, but the `binding` is only bound for code called from inside (binding ....)
07:18noncom|2yes, i ment i try printing it from inside the binding form.. that "later" in my original sentence was obscure..
07:19andrewmcveigh|wopaste? sounds like it should work.
07:20clgvnoncom|2: put a gist up ;)
07:20noncom|2ok, i'll try
07:21clgvnoncom|2: everyone's crystal spheres are currently in repair ;)
07:22noncom|2))) but the code is quite complex here.. it is a function passed to a macro that generates a map of functions and stuff.. . ill see if i can boil it down to a gist
07:23clgvnoncom|2: maybe that is part of the problem ;)
07:23noncom|2i'm almost sure :)
07:23noncom|2but it works fine! it's just that i get that wrong thing on printing
07:23noncom|2"wrong"
07:24clgv"but it works fine" is the argument I hear for spaghetti c++ code all the time ;)
07:41noncom|2clgv: i think i figured the reason. despite that the (println) is inside the binding, it is inside a (fn) created inside the binding, and the fn is stored to an atom and executed later, so when it is executed, it is not inside the binding anymore
07:42noncom|2and i did not use the bound value inside that fn, only outside so that is why it worked fine
07:47clgvnoncom|2: if I remember correctly there is something like `bound-fn` which preserves bindings
07:48clgvnoncom|2: checked, it is called `bound-fn
07:48noncom|2thanks, i gotta check it out since what if i'll have to use the bound variable inside the fn
07:49clgvnoncom|2: `future` uses (let [f (binding-conveyor-fn f)] ...) https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6335
07:51noncom|2wow seems like quite a machinery is involved
07:52clgvnoncom|2: I think. I'd use `binding-conveyor-fn` like `future` does
08:44glosoliIs there some way to use let in Enlive clone-for macro ?
09:16rollinhi
09:21rollinhi all
09:26noncom|2rollin: hello!
09:41noncom|2with core.async, i have (alts!) inside a (go), called from a java cycle, and after some time it comes up with java.lang.AssertionError: Assert failed: No more than 1024 pending takes are allowed on a single channel.
09:42noncom|2how do I make it not to make a pending take if there is nothing to take at the moment?
09:44BobSchackThe go block is called inside a java loop?
09:44noncom|2BobSchack: right.
09:45noncom|2i guess this is a wrong desing?
09:45tbaldridgenoncom|2: perhaps use alts!! with :default ?
09:45tbaldridgenoncom|2: although I'd need a gist to get a better idea of what you are trying to do
09:47noncom|2tbaldridge: i'm just playing with core.async to learn the things and I'm trying to apply it in a scenario where I put it inside a proxied java class which has this update() method called over and over again from the main app cycle
09:48tbaldridgenoncom|2: and the update() needs to take from a channel?
09:48noncom|2yes, i would like to make decisions inside of update(), based on what is there on the channel, or just skip the block if no message comes
09:48noncom|2i guess that the alts!! with :default sounds good here
09:49tbaldridgenoncom|2: yeah, :default with alts!! (or alt!!) should do the trick. Perhaps even do alts!! a few times per update() that way you can get whole batches of updates for every update(). Otherwise you'll only get one item per update().
09:50tbaldridgesomething like "take until the channel is empty"
09:51noncom|2tbaldridge: this sounds as if this is what it should be, right! so i just deplete the channel on each update() cycle!
09:51tbaldridgenoncom|2: right. Although if your producer can outproduce the taker, you may never exit the update(), but that's not hard to fix.
09:52noncom|2tbaldridge: yeah.. i'll have to think about that... but i think that in the current scenario there won't be such a problem! thank you for the advice!
09:53tbaldridgenoncom|2: anytime
10:56seangroveIs there a way to get compojure to parse query vars as integers that's cleaner than this? https://www.refheap.com/3ad182b22af25034cb19d4a32
10:57winkthat's a good question.
10:58winkusually not asked by the people who ridicule PHP et al for the type system. surprise, HTTP integers are strings :P
10:59winkseangrove: I usually encapsulate it in a function that returns -1 as fallback (depending on use case, ofc)
10:59clgvseangrove: isnt there some ring middle ware that just applies clojure.edn/read to the params?
11:00seangroveclgv: I was more looking for something like the url route binding, don't necessarily want all params to be edn
11:00bitemyappseangrove: cleanest way I know is to use a schema or validator that attempts coercion based on defined type and returns failure with a sensible error message if any choke.
11:00seangrovewink: Ah, thought there might be something inline.
11:02seangrovebitemyapp: I should probably bring in prismatic's schema at this point
11:02seangroveAlright, well, another ecosystem question then - is there a way to find unused dependencies, both in a project and a namespace?
11:02bitemyappseangrove: I use ag (grep) for that.
11:02bbloomthat seems like killing a fly with a bazooka
11:03bitemyappbbloom: more trying to capture multiple benefits in one go.
11:03seangrovebbloom: Just meant I have some simple-ish data dependencies happening, probably better to do it now and think things through than to retroactively try to bolt it on. The latter has been pretty painful for some of our systems.
11:04bbloomwhat about some function like (coerce-map {:weeks coerce-int :limit coerce-int} {:weeks weeks :limit limit})
11:04bbloomyou write those 3 helper functions
11:04bbloomthen you write a nice macro to give you plesant sytnax for that wrapped up with a let
11:04bbloomthen you go back to work :-)
11:05seangrovebitemyapp: looking more for something language aware, that can be integrated into an emacs mode or linter
11:05clgvseangrove: slamhound?
11:06bitemyappseangrove: slamhound or add to kibit/eastwood.
11:07seangroveSlamhound is close, but it doesn't provide any intermediate data (from looking at the readme), it only returns the reconstructed ns
11:07seangroveLet me see if I'm wrong...
11:08jcromartie_I like how Pandora still calls themselves "a new kind of radio" even though they're 13 years old
11:14bbloomjcromartie_: i (dis)like how their air app still randomly stops playing songs in the middle & sucks down a ton of memory & requires i relaunch it each morning
11:14bbloomother than that, great service :-P
11:15jcromartie_I'm still paying them while I patiently await their demise. I just don't know how they are still around.
11:16bbloomlol, this just happened: https://www.evernote.com/shard/s57/sh/7623196a-dd69-4997-bc62-b50c091b3644/4f4ca346f5823cdac26250ebf41e64e7
11:16bbloomi forgot to reboot it this morning
11:17bbloomwhoops
11:20seangroveToo bad the music industry is so bad, it'd be cool if others could easily build players on top of music API's
11:23seangroveHrm, it looks like clojure.java.jdbc/with-connection is deprecated... https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc.clj#L775 any insight as to why bitemyapp?
11:25bbloomseangrove: anything that uses *db* is deprecated
11:25bbloomseangrove: using a single dynamic var w/ thread local behavior for such configuration is a (common) bad idea
11:25bbloomit means you have to change every damn callsite when you later decide you need to talk to a second database
11:26rkneufeldbbloom: Is the alternative to use db-do-commands?
11:26bbloomrkneufeld: i haven't used this particular library, so i'm not familiar with it's API
11:26seangrovebbloom: Yeah, fair enough.
11:27bitemyappseangrove: yeah don't use *db*
11:27bitemyappPass around your db/conn explicitly.
11:27bblooma lot of people use dynamic variables when what they *really want* is implicit *static* variables
11:27bblooma dynamic variable is inherently mutable
11:27bitemyappoh not this again.
11:27bbloombitemyapp: that was the end of my rant :-P
11:28bitemyappbbloom: I think what people would really like is the implicit parameters from Scala and Haskell.
11:28bitemyappwalk the call stack to find the first instance of the matching type, bring it into local scope of the executing function.
11:29bbloombitemyapp: interestingly, that's NOT how haskell's implicit params work
11:29bbloomscala uses type, but haskell matches names (and errors if types don't match)
11:29bbloomthe name approach is *far superior* in my opinion... for the same reasons i dislike return type polymorphism :-)
11:29bitemyappbbloom: I prefer the name-based approach too.
11:29bbloomwhich haskell has, and scala doesn't :-P go figure
11:29bitemyappyou get the type enforcement anyway.
11:30bitemyappsigh, my kingdom for a type system ;_;
11:30bbloomiirc the reason they went w/ the name approach was b/c it was like some grad student who imlemented it and it was too complex to wire it in to the type system
11:30bbloomhappy accident
11:30bitemyappyeah that was nice anyway.
11:31bitemyappI don't really like guessing what Scala will do.
11:31bbloomthis is where i mention ambroseb_ since i like him to hear my rantings about how it's obviously a better idea to have your type systems not influence semantics :-)
11:32bitemyappbbloom: I once eliminated a thread-local global variable in Python by replacing access to it with a "getter" that walked the entire VM call stack to find an instance of the expected name and type.
11:32bitemyappat runtime, in case that wasn't obvious.
11:32bbloombitemyapp: that's interesting... let me think about how i feel about that :-P
11:32tbaldridgebitemyapp: also known as "screw you JIT"
11:32bbloomtbaldridge: lol
11:33tbaldridgeat least for PyPy not sure how the JVM handles call frames
11:33bbloombitemyapp: my issue w/ that is that i think that implicit parameters should only ever get passed ONE call frame at a time
11:33bbloomit's implicit passing, not implicit usage
11:33bbloomif a stack frame doesn't mention the parameter, it shouldn't get passed to children
11:33bbloomotherwise, it's really dynamic scope
11:33bbloomeven if the variable isn't itself dynamic
11:33bitemyappbbloom: well, the global variable was breaking shit, my stack-walker fixed the bugs.
11:34bitemyappso my "Give-a-fuck-o-meter" wasn't very sensitive to the demerits of my approach.
11:34tbaldridgedoesn't C++ do implicit parameters that way? Inlines the value into call site? I forget what language does that.
11:34seangrovebitemyapp: But the poor bastard who comes after you...
11:34bitemyappseangrove: I made the author of the original global variable version aware of what I'd done.
11:34seangrovebitemyapp: Fair enough, as long as it's communicated an understood. Cool trick either way.
11:35bitemyappI actually pasted the stack-walking code to the developer mailing list out of immense pride.
11:35bbloomtbaldridge: C++ has implicit parameters!?
11:35bitemyappbbloom: he's talking about static value inlining though
11:35tbaldridgeto be honest, that's what I love about Python everything can be queried at runtime, even the stack
11:35bitemyapp^^ yep lol.
11:36bbloomi can't do C++. my brain hurts. makes me wish for C + embedded useful language
11:36bitemyapptbaldridge: still prefer Clojure, but Python gives me the right knives, guns, and clubs when I need them.
11:36tbaldridgeI'm thinking of C++ default parameters, which I guess are static values. I assume Scala has something different?
11:36tbaldridgebitemyapp: what we need is Clojure on the Python VM ;-)
11:37bbloomtbaldridge: i like maximally reflective environments, but python (and ruby, etc) there are no limits on those APIs. if you only provided those APIs as effect handlers that must be installed in to the stack, then your JIT could prove lack of access to them & optimize away the reflective scaffolding
11:37bbloomtbaldridge: but i'm only in favor of that idea if you also provide deoptimization for debugging :-)
11:38tbaldridgebbloom: PyPy does that just fine. It optimizes away all that stuff, but if you try to access the callstack it bombs out of the jitted code and generates a callstack on the fly via black magic.
11:38bbloomtbaldridge: yup. that's the future
11:38bbloomchallenge is that python doesn't make that easy :-P
11:39tbaldridgethe code that does this has the most awesome name in compiler tech ever: http://morepypy.blogspot.com/2010/06/blackhole-interpreter.html
11:39bbloomthe approach in javascript engines (and pypy, etc) is to assume nobody does fancy crazy reflective things & then add a trap
11:39llasramtbaldridge: What did happen with clojure-py? Did you lose interest, or other?
11:40bbloomi'm saying you can actually *prove* the lack of that stuff trivially if you must have the effect in the callstack. then deoptimization doesn't happen when somebody breaks the rules, instead you get an exception. so deoptimization comes from the *outside* when you attach a debugger, not from the *inside* when you do something slow
11:40tbaldridgellasram: I hit some bugs with code generation. And yeah, also lack of interest.
11:40bbloomobviously requires a new language design tho
11:41tbaldridgellasram: but it's been almost a year since I worked on it, and I'm starting to get the itch to work on it again.
11:42tbaldridgellasram: there's even some interest outside of the Clojure community. The Blender devs contacted me awhile back and asked for a Python 3 version so they could write Blender plugins in clojure.
11:42stuartsierraAnything that depends on the call stack, whether it's dynamically-scoped Vars or some clever trick, totally breaks when you start doing async stuff.
11:43llasramtbaldridge: Oh, cool. I never had a chance to dig into, but was interested. Clojure access to numpy would be pretty nice
11:43tbaldridgellasram: yeah, and some of the new stuff in Python is just amazing: http://numba.pydata.org/
11:44llasramOoh. Fancy.
11:50justin_smithwe were playing with CDT (the ritz predecessor) the other day, we were able to get access to, and walk through, the stack trace, and look at locals, and move up and down the stack etc - from a totally separate codebase, not even having the other project being debugged in the class path
11:51justin_smithwe are going to bundle it up into a webapp, so you pick a dt-socket to open and if you have a clojure target it gives a point and click debugger into that process
11:51justin_smith(regarding that talk of debuggers and stacks above)
11:55justin_smithsome coworkers have fond memories of http://werkzeug.pocoo.org/docs/debug/ werkzeug, so they are trying to make a clone in clojure
11:55justin_smith(in and for)
11:59TimMcbitemyapp: Oh, are we doing confessions again?
12:13muhoospeaking of debugging, has this shown up in anyone's utility library yet? http://www.learningclojure.com/2010/09/astonishing-macro-of-narayan-singhal.html
12:14muhooi've found it pretty useful for debugging in the repl. functions with big nasty let statements can be kind of opaque
12:15justin_smithmuhoo: with cdt you can print out local bindings if you break inside the let
12:16justin_smithI assume ritz can do similar
12:16justin_smithand you don't need to change the code, there is just a command that prints out or returns local bindings
12:17mdrogalisAlso a no-edit debugger https://github.com/MichaelDrogalis/night-vision
12:18justin_smithmdrogalis: cool
12:19muhooalts!! makes me laugh. still waiting for someone to (defn first!!1!!1! [] ...)
12:20muhoojustin_smith: yeah, but ritz.
12:20muhooi have had zero success trying to get ritz to run. figured i'd keep it simple and stick with my plain old nrepl and clojure.tools.trace when needed
12:20justin_smiththat is why we switched to cdt
12:20noncom|2if i want to pass a function created with #() in plsace where a function, requiring two arguments is assed, but my function does not need these arguments, what is the idiomatic way to ignore them with respect to #(%) syntax? if I just omit any %, it errors about arity. if I write (fn) fully, then i can simply ignore the passed args in the body. but what is the #() way of this?
12:20justin_smithmuch less complex
12:21justin_smithonce we get a decent UI on top, it can be standalone
12:21muhoo~cdt
12:21justin_smith(is our plan)
12:21clojurebotNo entiendo
12:22justin_smithnoncom|2: a (do %2 %) will eval to % but use both
12:22justin_smithbut it would be ugly
12:22justin_smithreally the only clean way is to use fn
12:22muhoo~cdt is http://georgejahad.com/clojure/cdt.html
12:22clojurebotAck. Ack.
12:22technomancyis needing mid-function locals inspection anything other than a pointer to the fact that your functions aren't small enough?
12:23justin_smithtechnomancy: it is a pointer to the fact that my webapp just shit the bed and I want to see all the values right now rather than trying to recreat the error a second time
12:23technomancyI mean it's one thing to be able to do something with a stateful object that depends on dynamic scope if you're dealing with certain kinds of libs
12:23justin_smiththis way I don't need to put tooling in beforehand, it allows me to inspect in context from the outside
12:23technomancybut I don't see the point of inspecting locals
12:24technomancymdrogalis: night-vision.goggles <- thank you for not calling it night.vision.core =D
12:24justin_smithif I can store the values in scope, I can test my fixed version of the function
12:25technomancyjustin_smith: yeah, but you can do that much more simply with args than you can with locals
12:25technomancyyou can alter-var-root something without going in and adding a break line to its source
12:25technomancyI prefer the non-invasive approach
12:26justin_smithtechnomancy: with cdt it is just a function called locals, and I don't have to try to recreate the error, because it stops wherever the error happens, when it happens, and lets me get the args
12:26justin_smithand I am not modifying the source at all
12:26technomancyjustin_smith: oh gotcha; I thought this was an &env thing
12:26justin_smithcdt is run in a separate jvm
12:26justin_smithconnecting to the dt-thread
12:27justin_smithno, it is using the same functionality jvisualvm or jdb use
12:27justin_smithto directly investigate the stack and byte code that is running in each thread at the time of the error
12:27technomancyI should know this; I actually used this to debug a clojure bug that was breaking leiningen
12:27technomancybut it was like three years ago
12:28justin_smithheh, I had to use jdb to figure out what was breaking a ring app ages ago, and after that cdt is a real breath of fresh air
12:29justin_smithI think ritz tries to do a bunch of the same stuff, but it is very editor-centric it seems, and we are not going to sell the whole team on using emacs
12:29muhoothat's the dirty little secret i've found with FP, it's so nice to have very little global state, but state is inevitable in the real world, and if something breaks deep inside a chain of pure functions, it's not so easy to figure out what or why without the actual data that broke it
12:29justin_smithalso it is big and I just don't get it
12:30muhooso, clojure.tools.trace is nice, and it looks like cdt might save my ass someday too
12:30technomancyyeah, you hope that you never need anything more than tracing, but the world is an ugly place
12:31tbaldridgemuhoo: if something breaks deep inside clear functions, then a debugger gives you nothing over tracing
12:31tbaldridge*pure functions
12:31justin_smithmy big problem is that ring controllers get a lot of input that is not serializable
12:31justin_smithso I can't just save and recreate these stateful things like the request body
12:32technomancyyou could with a middleware
12:32justin_smithwell, for example, the body can be a stream, which is stateful
12:32technomancysure, just c.j.io/copy it to a file for later repro
12:32justin_smithyeah
12:33justin_smithit's just not as simple as reset! to put the args in an atom for experimentation is all
12:33justin_smithunlike a normal function where that is usually all you need
12:33technomancyyep, because that middleware doesn't exist yet =)
12:33justin_smithgood point
12:33muhootechnomancy: what would it do, exactly?
12:34technomancyI wonder if the weaving jester would like it added to ring-devel
12:34justin_smithI would imagine it would create a function that outputs a duplicate of the request
12:34muhoosave state somewhere for future replay/debugging?
12:34justin_smithstate and all
12:34technomancyyeah
12:34technomancythe middleware fn could take a directory to store replay state in
12:35TimMcMy kingdom for a reversible debugger.
12:35muhooa directory with lots of disk space
12:35technomancymuhoo: well I don't think it'd be appropriate for production
12:35muhoothat's usually where bugs show up :-)
12:35justin_smithI think each request should generate a new function, each of those functions would make a duplicate of the request, include state of each object in the request map
12:36technomancyjustin_smith: nice
12:36muhooseems like a good idea, and might be pretty simple unless i'm missing something obvious.
12:36technomancymuhoo: yeah, maybe so. save it with logrotate-style expiry or something?
12:36justin_smithmuhoo: depends what kinds of stateful objects we need to duplicate
12:37muhoothe devil will be in the serialization/deserialization details i bet
12:37justin_smithin practice, we are probably just talking cookies, and request bodies - io streams
12:37justin_smithor am I missing something?
12:38muhooyeah, there's this nagging sense that it can't possibly be as simple as it sounds.
12:38justin_smithignoring app-specific state, of course - that is provably not generally solvable
12:39dobry-denHas anyone happened to bind slamhound's reconstruct to hotkey that'll run it in nrepl?
12:39technomancyjustin_smith: bonus points for getting it to emit clojure.test/deftest forms =D
12:39muhoodobry-den: i have (compile "lein do slamhound, check")
12:39technomancydobry-den: that's basically what nrepl-discover is for
12:39muhoothere's also (local-set-key (kbd "C-c C-c g") 'slamhound)
12:39technomancydobry-den: haven't hooked it up to slamhound yet, but it shouldn't be too difficult
12:40technomancyyeah, it does ship with slamhound.el
12:40technomancynrepl-discover is a better solution, but still immature
12:40TimMctechnomancy: Did you see that legacy-PHP-testing lib?
12:40technomancyTimMc: can't say I did
12:41TimMchttps://github.com/zavg/Asis
12:41dobry-denmuhoo technomancy: thanks. doing things like setting a new hotkey usually sends me off an a 3-hour yakshaving adventure.
12:42technomancyTimMc: heh; neat hack
12:42justin_smithdobry-den: I always just go to the part of my .emacs where shortcuts are defined and copy what I did last time
12:42TimMcIt watches you use a legacy app and generates tests to prevent regressions.
12:42dobry-denjustin_smith: haha right, but i have no precedent for running a custom thing in nrepl yet
12:43technomancydobry-den: that's what https://github.com/technomancy/nrepl-discover is all about
12:43dobry-denright, i'm looking at that
12:43technomancygeneralized clojure-side descriptors for in-editor commands
12:44technomancyit's a fun idea but possibly not fully baked yet
12:44mdrogalistechnomancy: Hah, I've been put off by too many cores. I feel it.
12:45muhooTimMc: is that yours?
12:45technomancydobry-den: if you do try it I'm interested in hearing what you think
12:46TimMcmuhoo: I wish.
12:47TimMc(Actually, I would probably not write a tool that enables PHP to continue to function.)
12:48muhooi'm happy that i haven't touched php in almost 2 years. don't want to jinx it tho.
12:50indigomuhoo: Lucky you
12:54dnolenibdknox: ping
13:11bitemyapp`cbp: hullo hullo
13:17seangroveTrying to get clojurescript.test working on a new clojure project, and it doesn't seem like my :test build profile is picking up on tests in test-cljs
13:18seangroveLooking at a similar, working project, all of the settings are the same... any suggestions on what to look for? The path is certainly there: {:cljsbuild {:builds [{:id "test" :source-paths ["src/cljs" "test-cljs"]}]}}
13:20sritchieseangrove I was having the same thing,
13:20sritchielots of "cemerick not found" errors
13:20seangrovesritchie: Same here
13:20bitemyapp"cemerick not found" <--- lol?
13:21sritchiehaha, he adds that shit into his libraries!
13:21justin_smithwell cemerick usually shows up here, so that should be fixable shortly
13:21sritchiehaha, those errors do plague me even outside of a cljs repl
13:21seangrovejustin_smith: Yeah, and he just updated clojurescript.test to 0.2.0 about an hour or two ago as well
13:21rasmusto_whoa
13:22sritchieseangrove: is the error persisting on that version>
13:22seangrovesritchie: Yeah
13:22seangroveI'll wait to ask cemerick about it, must be something straightforward
13:23justin_smithwell you need to find him first
13:23justin_smith /rimshot
13:26logic_progis there a way to have clojurescript build auto's error messages to be piped into a clojurescript repl?
13:26logic_progor even an emacs buffer?
13:27seangrovelogic_prog: There's a :notify-command option if you want desktop notifications
13:27seangroveOtherwise you could run cljsbuild auto inside of a M-x shell
13:27logic_progalso found https://github.com/kototama/cljsbuild-mode
13:27logic_proghow does M-x term and M-x shell compare?
13:27mdrogalisAh D:
13:28bitemyappmdrogalis: well we can tell who just had downtime.
13:28bitemyapplol cloud.
13:29S11001001logic_prog: shell is extremely unlike a terminal; its raison d'etre is to let you treat the shell backlog like a normal text buffer. Which is extremely convenient and awesome, so I rarely use term unless I need the specific features of an honest terminal.
13:29mdrogalisbitemyapp: Hah
13:34bitemyapparrdem: http://i.imgur.com/mtt8e3D.gif
13:36arrdembitemyapp: good morning to you too <yawn>
13:37mdrogalisThis isn't another one of your gross snapchats, is it?
13:39arrdemmdrogalis: it was safe. if you're thinking about what he sent me
13:39arrdemmdrogalis: otherwise no idea
13:39mdrogalisI heard talk of a windmilling man. D:
13:40arrdemurhg. yeah that was two days ago
13:43bitemyappmdrogalis: that was gf3, not arrdem.
13:43mdrogalisYou're all the problem children in my mind. D:
13:43arrdemhey now... I've behaved since that night we were playing with chord
13:44bitemyappthis is true.
13:47mdrogalisFair enough. I'm watching, though.
13:47bitemyapptbaldridge: under what circumstances does one need to close channels anyway?
13:47bitemyapptbaldridge: I didn't even know he was complaining about resource lifecycles WRT core.async, it didn't even occur to me that that would be a big deal.
13:49bitemyapptbaldridge: yeah, see? wasn't even about (chan)
13:49tbaldridgebitemyapp: GOs attached to GC'd channels will be GC'd as well.
13:50tbaldridgebitemyapp: yeah, I've just seen this guy complaining that "hopes that core.async would be the solution to my woes are out the window" that makes me want to help
13:50bitemyappthat makes sense from what I know of Java's GC, but I still don't see how close! affects it.
13:50mdrogalisWho's this?
13:51bitemyapptbaldridge: that rankled me a bit. I don't mind constructive criticism but wide-open stuff with no real substance bothers me.
13:52tbaldridgebitemyapp: my point is that some people assume that if you don't close a channel, GOs trying to read from it will block forever and somehow end up sitting around. The reality is that channels that never close are not really an anti-pattern.
13:52tbaldridgeI wonder of golang has that problem. Anyone know if go routines are GC'd in golang?
13:53tbaldridgeguess not https://groups.google.com/forum/#!topic/golang-nuts/uiySuH8_3Y4
13:54tbaldridgealthough core.async's thread macro suffers from this same problem.
13:55tbaldridgebitemyapp: I also wonder if with-open inside a go block would solve some of this guy's problems.
13:55technomancystuartsierra: having some chatter in #leiningen about your CLI post if you want to discuss further
13:55stuartsierratechnomancy: OK.
13:58bitemyapptbaldridge: to me it sounds like he need a "control" channel sending a single "go ahead and close this resource" go block.
13:58bitemyapptbaldridge: at the most.
13:58bitemyappwith-open alone would probably work anyway.
13:58tbaldridgebitemyapp: yeah, there's like 20 ways of solving issues like this in core.async. It really depends on what he's trying to do.
13:58bitemyapptbaldridge: this all goes back to why I don't understand what he's complaining about :(
13:59bitemyappI think some of the patterns/use-cases in core.async can be a little subtle and could use a cookbook.
13:59bitemyappI love being Dan Dan the Answer Man on Twitter.
14:00seangroveOh god, I have to work with google's OpenID. I expect this to be horribly painful.
14:05seangroveHrm, maybe today is the day I make use of friend
14:06arrdemseangrov: let us know how that goes
14:11mdrogalisThe downside of being the one who introduced generative testing to company: You become 'that guy' who reports all the bugs
14:11bitemyappucb: https://www.youtube.com/watch?v=Yf_xl99pGNY
14:12bitemyappseangrove: what arrdem said. I want to know how that goes.
14:15`cbpbitemyapp: hi
14:17bitemyapp`cbp: RethinkDB people have jumped on getting revise added to their drivers page.
14:19`cbpbitemyapp: oh cool
14:20dnolenBronsa: I don't suppose preserving the string of the original source is in tools.reader yet?
14:23`cbpbitemyapp: what is this rethinkdb docs fork? :-)
14:32bitemyapp`cbp: they initially wanted me to PR the docs.
14:32bitemyapp`cbp: they changed their minds when they realized I couldn't upload static assets.
14:32dnolenunless somebody has something they really want to get into the next release of CLJS I'm going to cut a release now.
14:33`cbpbitemyapp: was taht just to add the little button or do we get a nice page like the official api docs too? :-)
14:34bitemyapp`cbp: twas for this page: http://www.rethinkdb.com/docs/install-drivers/ dunno what else you mean.
14:34`cbpbitemyapp: http://www.rethinkdb.com/api/javascript/
14:34bitemyapp`cbp: we're not an official driver and you know that :P
14:35`cbpan index would be nice though :p
14:35bitemyapp`cbp: you can add one to MD yo.
14:36bitemyapp`cbp: do you want me to demonstrate in the README.md? Could also make a wiki.
14:36`cbpbitemyapp: on another note i was trying to add backtraces but ended up confused and not knowing what to look for so i just left it
14:37`cbpbitemyapp: a demo would be nice, i hope its not the same as selmer's "index"
14:37bitemyapp`cbp: ...? @ backtraces - should I take a look or be worried? :P
14:37bitemyapp`cbp: yes it's Selmer's index, but you can create separate pages and link around.
14:37bitemyappwith a separate docs/ dir.
14:38`cbpbitemyapp: no when you make a mistake rdb gives you a backtrace or so i thought so you can debug
14:38bitemyappyeah the errors.
14:38`cbpbitemyapp: right now it just gives you {} And I have no clue if it should be giving you more
14:38bitemyappI'm not totally sold we should reify that to Clojure exceptions.
14:38`cbp:backtrace {} i mean
14:38`cbpbitemyapp: i think its just a pprint of a stack trace
14:39`cbpI guess ill just wait till someone makes an issue "where the f are my backtraces"
14:39bitemyappI'm down with that.
14:39bitemyappYAGNIIIIIIIIIII
14:42`cbpbitemyapp: the FIXMEs are order-by and set-intersection if you're interested in that
14:42`cbporder-by needs some weird syntax and set-intersection gives you weird stuff
14:43bitemyapp`cbp: I could look into that. I'm mostly concerned with error handling atm though.
14:43bitemyappright now if you stray off the happy path, you end up on the very-unhappy path.
14:43`cbpbitemyapp: ok
14:43bitemyappbja expressed an interest in that work, but it needs to happen sooner than later so I'll need to ping them for a status update.
14:44`cbpis bja from this channel?
14:44bitemyapp`cbp: da
14:49dnolenCLJS 0.0-2014 going out
14:49mdrogalisHuh, Presto was open sourced. Neat.
14:51gtrakis that like better hive?
14:53mdrogalisFrom what I gather, yes.
14:54Jardaguys do you use something for freezing time for tests?
14:54mdrogalisJarda: Usually you want to push time out of whatever you're doing. But if you can't, you can use with-redefs
14:55Jardamdrogalis: I need to assert XML output (and I want to do it using strings) so I can't really rule out dates
14:56mdrogalisJarda: I'm not really sure what you mean.
14:57Jardamdrogalis: I have a library that outputs xml with timestamps
14:57`cbpmdrogalis: I think he wants to test a (now)
14:57Jardaand the timestamps are the current timestamp
14:57mdrogalisRight.
15:05sverihi, i read about parallelism and concurrency in the programming clojure book, now i try to rebuild a parallel reduce function and wonder what is best used for this, agents, atoms or futures?
15:05sverii tried futures, but somehow i cannot get them to work parallel
15:06tbaldridgesveri: futures are the way to go, paste your code?
15:06TimMcsveri: refheap.com for pastes
15:07TimMc(Or gist or whatever.)
15:09dnolencemerick: hey I cut 2014, it would be nice to get a version of cljsbuild out that does the right thing for incremental builds
15:09sveritbaldridge: TimMc https://www.refheap.com/20532 there it goes
15:10justin_smithtechnomancy: regarding the debug middleware for replaying ring conversation earlier, I just did a postwalk on a bunch of requests, conjing the class of each object in the request map:
15:10justin_smith#{nil org.eclipse.jetty.server.HttpInput clojure.lang.PersistentVector java.lang.Integer clojure.lang.PersistentArrayMap clojure.lang.Keyword java.lang.String clojure.lang.PersistentHashMap}
15:10justin_smithso HttpInput is the only stateful thing to look out for, it seems
15:11bitemyappdnolen: we're living in the future now?
15:11bitemyappit's 2014 already?!
15:11TimMcbitemyapp: Only in Australia, I think.
15:11tbaldridgesveri: I think your issue is that you're de-reffing it right after you create it. Create all the futures first, then do @
15:12sveritbaldridge: ah, i see, i hope, so because i deref it in the recursion it executes in every recursion step and then waits until its finished?
15:12cemerickdnolen: will do. I already have the commit on the develop/1.0.0 branch, mostly just waiting for 2014 to show up on central
15:12bitemyappsveri: also, addIt -> add-it
15:12noncomi am trying to implement an algorithm with loop-recur, but i get "can recur only from tail position" on line 9 https://www.refheap.com/20533 anyone has idea why?
15:12dnolencemerick: cool
15:12tbaldridgesveri: right
15:12sveritbaldridge: thank you, i try that
15:13sveribitemyapp: are there any "official" coding style guidelines for clojure?
15:13S11001001noncom: line 14 is the only thing in tail position in that loop; the if on line 5 is not in tail position
15:13bitemyappsveri: http://dev.clojure.org/display/community/Library+Coding+Standards
15:13S11001001noncom: reindent your code and you'll see it
15:13justin_smithnoncom: recur has to be the very last thing a function does, you need to make it so there is no more work to be done in that function once recur is called
15:13sveribitemyapp: thank you
15:14TimMcsveri: Although the bit in that page about keyword args is a very bad idea.
15:14noncomso i have to remove the last recur on line 14 then
15:14TimMcs/very/pretty/ I guess
15:15noncomweehee, worked!
15:15TimMcnoncom: With that indentation it looks like a three-body if.
15:15noncomyes, sorry for that, i corrected it in the refheap. for some reason did not notice initially
15:15TimMcAh, I see.
15:15TimMcYeah, that whole last line means that the if on line 4 is not itself in tail position.
15:16TimMcsveri: http://mumble.net/~campbell/scheme/style.txt also mostly applies.
15:17TimMcNot official, but widely followed -- and if you use clojure-mode in Emacs, the indentation is nicely standardized.
15:17sveriTimMc: well, thats extensive :D
15:17sverithank you
15:17TimMcYeah...
15:18TimMcThe spacing and indentation stuff at the top is most relevant.
15:25dnolencemerick: the new compiler environment things is great. For making compiler.clj and closure.clj thread safe were you thinking about having a worker queue over the disk? Would be sweet to have real parallel builds.
15:26justin_smithI am working on a ring middleware that will replicate requests for replay
15:26justin_smithshould I bother trying to create an actual org.eclipse.jetty.server.HttpInput object for the body, or just make something that implements the same methods properly?
15:26dnolensource map support in CLJS is now rocking
15:26sritchieawesome!
15:27cemerickdnolen: honestly, nothing is *safe* until we stop using the disk like a global scratchpad
15:27justin_smithlooks like I could maybe get away with the methods of java.io.InputStream plus a readLine method
15:28gtrakdnolen,cemerick: clojurescript gets more fun every day :-)
15:28gtrakjustin_smith: I think it just needs to be an inputstream, I've replayed requests by storing the data as strings and creating a bytearrayinputstream over them at runtime.
15:28dnolencemerick: but what's the alternative you have in mind? just always recompile everything from a cold JVM?
15:29seangrovednolen cemerick: Thanks for the ClojureScript release, looks good. Looking forward to getting a new cljsbuild too.
15:29justin_smithgtrak: we allow image upload, so instead of string I will do a base64 step then string, but sounds good :)
15:30justin_smithor maybe that is already base64 - but I don't want to take for granted that body is 8 bit clean
15:30cemerickdnolen: gosh, no. But, writing to disk should be the last thing the compiler does, optionally.
15:31cemerickThis is all aside from maybe using the disk for caching compilation results, but in that case, it should be keyed on a hash of the input or something, not filenames or namespace names.
15:32dnolencemerick: I don't see the problem with namespace names - they must be unique
15:35bitemyappjustin_smith: not everybody uses Jetty :(
15:35cemerickdnolen: for a single build, yes, but they're absolutely not if you have e.g. multiple cljsbuild :builds. Things get mighty strange if you have e.g. the same namespace defined in different files, with different impls (for different JS env targets, using different test frameworks, whatever).
15:36cemerickRight now, nuking out/.repl/target from orbit is the only reliable way of getting proper output in certain cases.
15:36justin_smithbitemyapp: what would be my best bet for adapting this so other people could use the middleware and replay - just assume that body is somthing I can io/copy?
15:37dnolencemerick: well I don't see how this is a problem currently, you're not supposed to share :output-dir across builds, cljsbuild doesn't even allow it
15:37jcromartie_why is Clojure *so much faster* on my i7 laptop running Linux than it is on my i7 laptop running Mac OS X?
15:37jcromartie_is it attributable to the JDK?
15:37bitemyappyou can't pass a vanilla Ring request object to the damn app?
15:37jcromartie_err, JVM
15:37bitemyappjustin_smith: I mean, that's how you mock requests for app testing in Ring.
15:37bitemyappjust a mpa.
15:37bitemyappmap*
15:38justin_smithbitemyapp: I want something I can serialize, what I get from ring has a stream as its :body
15:38llasramI wish the JVM supported coroutines
15:38llasramThat'd be so nice
15:38justin_smithie. I want to be able to replay post requests, and get the same thing when reading from the post body
15:38justin_smithI realize the outer container is a map, that's great, I want to replicate all the contents too
15:38bitemyappjustin_smith: a vanilla BSI might work.
15:39justin_smithBSI?
15:39hiredmanjcromartie_: depends what you mean by faster, and how you are starting the jvm
15:39cemerickdnolen: fair point on that. I think I was projecting from having stale .repl around across sessions.
15:39hiredmanjcromartie_: and what jvm you are using on each
15:40jcromartie_hiredman: on OS X, Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
15:40gtrakjustin_smith: for reference: https://github.com/mmcgrana/ring/blob/master/ring-servlet/src/ring/util/servlet.clj#L34
15:41gtrakthat's all there is o a ring request-map
15:41gtrakto*
15:41cemerickdnolen: anyway, my point is, if you're looking to doing something like build parallelization, then the first thing I'd do is eliminate the elephants in the room, if only to eliminate the potential for large classes of errors. Life's too short to be worried about whether intermediate compiler state is correct/live on disk.
15:41justin_smithgtrak: OK, so I want to replicate the inputstream and serialize, and have a deserialization (probably using base64 so it can be a literal in a file for a unit test)
15:41bitemyappdestroy all state!
15:41hiredmanjcromartie_: I am not saying if you tell me all those things I'll have answer, I am just listing all possible things
15:41bitemyapprobashton: welcome to the club.
15:42jcrom_linuxon Linux: OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
15:42`cbpanarchist!
15:42jcrom_linuxstarting with "lein repl"
15:42bitemyapp`cbp: <3
15:42justin_smithgtrak: yeah I figured that out by calling conj on a set atom with a post walk checking the class of everything that came in
15:42robashtonnot promising I'll hang around, I'm awful at remembering to start irssi and it doesn't look like I backed up my scripts on my last laptop that got stolen so...
15:42justin_smiththe :body was the one stateful thing I found :)
15:42robashtonbut I WILL GIVE IT A GO
15:42bitemyapprobashton: just run a persistent irssi session like I do.
15:42gtrakjustin_smith: yea, that oughta be enough.
15:43bitemyappsits on a $5 VPS in GNU Screen, connect to said server via mosh.
15:43robashtonI have a server to do that with
15:43bitemyappwelp.
15:43robashtonbut the only private key was on my stolen laptop :D
15:43robashtonso I need to rebuild that
15:43gtrakjustin_smith: only a few middlewares slurp the body, it can be a pain to deal with :-).
15:43justin_smithgtrak: yeah, tell me about it
15:43stuartsierraWhat's the Typed Clojure channel?
15:43gtrakwrap-format-params will do it
15:43clojurebotExcuse me?
15:43dnolencemerick: I'm not tied to the current strategy of course, just happy to have to somebody else work on it - and whatever they come up with needs to deal w/ all the different build settings that need information about what's on disk (importantly source maps)
15:43justin_smithbbl lunch, thanks guys
15:44bitemyappstuartsierra: #typed-clojure
15:44jcromartie_running this: (dotimes [_ 10] (time (last (map str (range 10e6)))))
15:44jcromartie_average is about 1.8X longer on OS X
15:44jcromartie_it would be good to run the same JVM I guess :P
15:45Uateco/
15:45stuartsierrathansk
15:46hiredmanjcromartie_: use criterium for benchmarks
15:50Jardajava.lang.UnsupportedOperationException: nth not supported on this type: Character
15:50hiredmanjcromartie_: others would know better, but I think lein may pass different flags to the jvm on osx and on linux to try and improve startup time
15:50Jardaoh that was a helpful error message, thank you clojure
15:51Jardaand the stacktrace isn't helping either..
15:51Jardait comes somewhere inside xml/emit-str
15:51bitemyappJarda: you're iterating over a string and then trying to iterate over a character.
15:51bitemyappJarda: not that hard to understand.
15:51llasramJarda: Usually happens when you passed a string instead of a sequence of strings somewhere
15:51cemerickdnolen: Sure. I don't think it's a *huge* priority compared to other things, though? I mean, what is your primary objective w.r.t. state management, parallel builds, or other/more?
15:52bitemyapp,(doseq [c (str "blah")] (println c))
15:52clojurebotb\nl\na\nh\n
15:52Jardallasram, bitemyapp yeah. But _I_ don't iterate over anything. clojure.data.xml/emit-str does
15:52bitemyapp,(doseq [c (str "blah")] (doseq [x c] (println x)))
15:52clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Character>
15:52dnolencemerick: yes, not a priority at all at the moment :)
15:52hiredmanJarda: but you pass it data, and the data is in the wrong format
15:52Jardahiredman: yeah, and it's a very complex data structure. I'm just cursing that I have to now reduce it element by element..
15:53hiredmane.g. {:tag :span :content "foo"} vs. {:tag :span :content ["foo"]}
15:53dnolencemerick: the :libs stuff and :main support way more important
15:53cemerickyeah
15:53hiredmanJarda: writing a little function to walk the structure and verify it is not hard
15:53cemerick:libs [""] is getting very tedious :-)
15:54hiredmanJarda: even less hard if you use something from clojure.walk to do the walking for you
15:55dnolencemerick: :main would mean people have to be more disciplined then they are about how they use a namespace (especially macros that assume a the lib will get included anyway)
15:56ucbbitemyapp: good stuff
15:56hiredman(fn [x] (assert (or (not (map? x)) (and (contains? m :tag) (contains? m :attrs) (contians? m :content) (keyword? (:tag m)) (or (empty? (:content m)) (coll? (:content m))))) m))
15:59jared314Is there something already built that merges two ns forms?
15:59cemerickdnolen: I need to understand the specifics of the compilation process more before I touch :main. :libs I can do straight away.
16:00dnolencemerick: yeah :main is going to be tricky
16:13bitemyapprobashton: http://dev.clojure.org/display/design/Resource+Scopes
16:14Bronsadnolen: I'm sorry I was away
16:14dnolencemerick: oh, I was thinking about about renaming the default-warning-handler* multimethod to error-string so that tools get the standard error string for an error/warning?
16:14Bronsadnolen: btw no -- I'm waiting for a patch from aredington
16:15dnolenBronsa: got it, we could definitely use it for REPLs especially browser REPL
16:15dnolenBronsa: xeqi has shown that it's possible to do dynamic source maps today
16:16bitemyappI don't know how I feel about dynamic/nearest-enclosing scopes.
16:17sritchieseangrove: any luck from before?
16:17sritchiewith that test issue?
16:17seangrovesritchie: No, trying to deploy a new blog post and suddenly heroku's config has changed out from under us
16:17sritchiehuh, weird
16:17sritchienew buildpack or something?
16:17seangroveWill circle back to the clojurescript.test stuff in a bit
16:17sritchiecool
16:18seangrovecemerick's right there though, could ask him
16:19meliponehello! how can I spit out to file a lazy sequence so that it can be read back by slurp?
16:19cemerickdnolen: so they *can* get the standard error string? Yeah, +1.
16:20dnolencemerick: ok cool
16:20cemerickdnolen: error-message?
16:20dnolencemerick: sure
16:20TimMcmelipone: Bind *out* to a writer (use with-open) and pr it.
16:20TimMcit = the lazy seq
16:20meliponetimMc: okay, no spit then?
16:21gtrakwould this not also work? #(spit *out* '(1 2 3 4 5))
16:21meliponegtrack: the problem is that it's a lazy sequence
16:22gtrakmelipone: ah, gotcha, spit doesn't use print-dup
16:24TimMcYeah, I don't know why it just uses str.
16:26gtrakturns out there's a private pr-on method.. silly
16:28Bronsadnolen: cool. FYI I just pushed a patch to add end line/column info, once I get the source info patch I'll release a 0.8.0
16:39yeoj____should i be concerned if I have a tendancy to have massive let bindings.
16:39yeoj____i guess i'm wondering on whats the rule for when i should break things out into functions...
16:40bitemyappyeoj____: they can be made into constituent fns. Not uncommon though.
16:41yeoj____bitemyapp: thanks.
16:41bitemyappyeoj____: I have a 40 something LOC long let body in bulwark. meh.
16:41bitemyapphasn't merited refuctoring yet.
16:43gtrakuseful for splitting those up, pass a map around: https://github.com/flatland/useful/blob/develop/src/flatland/useful/map.clj#L8
16:43cemerickoh, I just realized what :declared metadata does, sweet
16:49akurilin2What do you do when something funky happens such as not being able to find a certain function under ring.util.response even though it worked just fine up until a second ago
16:49akurilin2Last time I had accidentally edited a library .jar contents
16:49akurilin2and nuking them was probably helpful
16:49bitemyappakurilin2: lein clean && rm -rf ~/.m2 && lein deps && lein test
16:49akurilin2can I forge lein to clean and re-download deps to be on the safe side?
16:49bitemyappyou can elide the call to deps.
16:50gtrakakurilin2: you can be more specific about deleting stuff out of ~/.m2 as well
16:50gtrakotherwise you're downloading the internet
16:50bitemyappgtrak: don't be weak.
16:50gtrakbitemyapp: I'm not weak, I'm lazy and easily frustrated :-)
16:51akurilin2Let me try that
16:51bitemyappgtrak: Downloading the internet means I have time to read about monads or pull pranks on my coworkers.
16:52arrdemgtrak: those seem to be a common personality traits among programmers...
16:54gtrakwe have 'lein test' for that, takes like 10 minutes a pop.
16:54gtrakgotta make sure it all still works!
16:57akurilin2Where are the contents of a library such as ring? I just unzipped ring-1.2.1.jar from my .m2 and only got a META-INF folder in there
16:58akurilin2App can't seem to find "get-header" function which should be there, so I'm trying to see by hand
17:01akurilin2Oooh it's defaulting to ring-core 1.1.7 for some reason :|
17:01akurilin2Odd, project.clj uses 1.2.1
17:01joegallorun `lein deps :tree` to see what's pulling in that version
17:04akurilin2joegallo, indeed, just done that. Compojure 1.1.5 kept using 1.1.7, so I had both versions of ring i nthere
17:04akurilin2Updating to 1.1.6 fixed it, HOWEVER I'm still not sure how the version is decided
17:04akurilin2when I reload a namespace
17:06arrdemanyone know a good writeup on core.typed HMaps?
17:12muhoofor some reason, whenever i read "compojure", i find myself wanting to sing it like http://www.youtube.com/watch?v=hzFsDQeTUT4
17:12nDuffmuhoo: Who here is?
17:19seangrovebitemyapp: Like blackwater, but wouldn't mind seeing output for the ddl stuff as well
17:20bitemyappseangrove: I just need a repro/example and it can be added.
17:21bitemyappseangrove: would you be willing to file a github issue please?
17:22gtrakakurilin2: the easiest way to inspect lib code is M-. in emacs
17:22gtrakafter that, I look at github.
17:22akurilin2gtrak, that's what I do right now with fireplace, that's how I discovered that I was using 1.7.1
17:23akurilin2gtrak, the point I'm trying to make is that I'd love to know how it decides which version to load
17:23akurilin2*require
17:23gtrakakurilin2: well, what you probably want is to force a specific version
17:23seangrovebitemyapp: Sure, will do after a quick nap
18:34logic_progI'm looking for something better than pprint. I want (print-this-sexp-as-it-appears-in-main.clj ... ) -- the point being, I have a chunk of code. I want to output a HTML file saying, "here is the chunk of code / here is the output" -- and I'd prefer the "here is the chunk of code" preserve the newlines I have in main.clj (when I wrote the iringial chunk of code) rather than wahtever alogirhtm pprint uses to format my code
18:44bitemyapparrdem: http://i.imgur.com/tqkhfz7.jpg
18:44bitemyapparrdem: DINNA TIME
18:45Apage43logic_prog: look at what (source) does
18:46logic_prog(source source) teehee
18:46Apage43(What it does is this: it looks up the :line metadata for a var and then reads the first form on said line, wrapping the PushbackReader the reader is reading through and capturing what it reads)
18:47Apage43thereby capturing whitespace, comments and such
18:48logic_progactually
18:48logic_prog(source source-fn) returns for me:
18:48logic_progSource not found
18:48logic_progis my clojure installation screwed up?
18:48logic_progI'd really like to be able to use (source) from the repl
18:48logic_progor, --- is source-fn a java primitive?
18:48Apage43have you (use 'clojure.repl) 'd
18:49Apage43source is in clojure.repl
18:49Apage43https://github.com/clojure/clojure/blob/master/src/clj/clojure/repl.clj#L134-L154
18:49logic_progah, it worksnow :-)
18:49logic_progApage43: thanks!
18:50justin_smithI am working on a ring middleware that duplicates the request in order to replay for testing / debugging
18:50justin_smiththe only stateful part of the request is the :body
18:51justin_smithI can duplicate the :body of the request to a bufferedinputstream but this seems to break my middleware - I guess I need to create some other kind of readable stream
18:51justin_smithdoes anyone know what may be going wrong here?
18:51justin_smiththere is no error, its just that the webapp acts like the request had no body (it is a post that should update the db)
18:53arrdembitemyapp: go away... core.typed is calling me names. don need u helpin
19:03bitemyapparrdem: lawl
19:04bitemyapparrdem: DOMAIN "YA MOTHER IS A PLANETOID" ;; RANGE "NOT VERY FAR" ;; NAMELY -> YOU AN IDIOT
19:04bitemyappcore.typed insults <3
19:06arrdembitemyapp: core.typed is fun... you get to facepalm at all the key not found cases you forgot to account for
19:06arrdembitemyapp: the upside is that you feel smart as shit when the error count goes down
19:07bitemyapparrdem: I ride the GIGO-LEL LEL LEL LEL train too much in Clojure.
19:07bitemyappI think my code would upset technomancy.
19:09arrdembitemyapp: that's where I stand normally, but this is an experiment in c.c.t comma damnit and I'm gonna make this shitty single cycle processor typesafe if it's the last thing I do
19:12bitemyappdevn: I'd be jazzed as all get-out if you just stopped using Heroku so getclojure didn't break every 24 hours :(
19:13arrdemdevn: can we get a "top 100 least understood symbols" list? :D
19:14jared314devn: what data sources do you use for getclojure?
19:22bitemyappdevn: datalog yo.
20:17jtoyanyone here made lein templates before?
20:17seangrovejtoy: Yeah, but I just took another one and hacked on it until I liked it
20:41devnjared314: I use the clojure irc logs from the last 5-6 years
20:41devnparse sexps, eval in sandbox, capture, repeat
20:42jared314(str "including this one?")
20:42jared314or do you have criteria?
20:42sritchielynaghk, do you have any naming convention advice for cljx code?
20:42sritchiespecifically,
20:42sritchieI'm thinking about namespaces that are mostly cljx, but need some extra cljs or clj specific additions
20:43sritchieoh, now that I say it, I bet there's some reader macro that lets you demarcate sections
21:26sritchiereiddraper: hey dude
21:26sritchiearound?
21:26sritchiereiddraper: qq about simple-hceck
21:27sritchieis it possible to combine properties?
21:28reiddrapersritchie: there's no explicit functions for it now
21:28sritchieI'm writing the monoid laws
21:28sritchieand need to say "associative", plus "zero is identity"
21:31reiddrapersritchie: sort of like this? https://github.com/reiddraper/simple-check/blob/v0.5.3/test/simple_check/core_test.clj#L12-L26
21:31reiddraperso the short answer is right now, you'll just need to encode all of those things into a single expression/function that returns a boolean
21:32reiddraperright now there's no helper to say, these two passed, but this one failed, if that makes sense
21:34sritchiereiddraper: boom
21:35sritchiehttps://gist.github.com/sritchie/7348015
21:35sritchielike that, sort of
21:35sritchiethanks dude
21:36minikomihello from tokyo, fellow clojurians
21:36reiddrapersritchie: yeah looks solid to me
21:38minikomihi
21:40devnjared314: including the one you just pasted. anything that looks valid and is unique gets run in the sandbox.
21:40jared314devn: very cool
21:41arrdembitemyapp: a couple hours and coffee later, c.c.t points out that my program is fundimentally type unsafe. facepalm.
22:10sritchiereiddraper: any plans to make simple-check work for cljs?
22:10sritchievia cemerick's clojurescript.test?
22:11sritchielooks like random is the only thing that doesn't work
22:34bitemyapparrdem: hey
22:35arrdembitemyapp: yarrr
22:35bitemyapparrdem: do you have the bro-dude's computer handy?
22:35arrdembitemyapp: probably
22:35arrdembitemyapp: writing patch for c.c.t then totally down for w/e
22:36bitemyappyisssssss
22:36bitemyapparrdem: oooh, patch! you'll have to tell me about in mumburrrr
22:47`cbpbitemyapp: I fixed the group-by, set-intersection stuff
22:48`cbpgroup-by now works properly, i deployed a new version with it
22:48`cbpWe now support pretty much every rdb query :-P
22:49bitemyapp`cbp: awesome.
22:49bitemyapp`cbp: if bja doesn't pop up I will proceed with error handling
22:49`cbpok
22:50bitemyapp`cbp: I take it 0.0.3 has your changes?
22:50`cbpbitemyapp: yeah
22:50bitemyapp`cbp: also, start keeping a changelog.md
22:50bitemyapp`cbp: it'll save yours and users' sanity.
22:50bitemyappseangrove: thanks for the github issue btw
22:51`cbpbitemyapp: group-by now doesnt give you "cannot divide by 0" now :P
22:51bitemyapplol.
22:51`cbpbitemyapp: good idea
22:51seangrovebitemyapp: Easy enough to open a ticket, you can thank me if I send a pr (which I don't see happening) ;)
22:51bitemyapp`cbp: just start by adding 0.0.3 and explaining what you added/changed/fixed/removed
22:51bitemyappseangrove: not that blackwater is hard to understand, that's fine.
22:53bitemyappseangrove: not that I disagree with adding it, I'm a little surprised anybody cared about logging migrations.
22:53bitemyappI guess it makes sense if they're generated rather than hand-written.
22:53seangrovebitemyapp: Tried to give a rationale of why it would be nice for us
22:53bitemyappyup, makes sense to me.
22:54bitemyappseangrove: mostly I'm just happy somebody is using it.
22:54seangrovebitemyapp: I like that it's a separate library, something very simple that anyone else can come along and use. Makes me happy to see.
22:56bitemyappseangrove: I'm an advocate of interchangeable tools, micro-libraries, etc. Especially when the build/dependency tooling is as good as Leiningen.
22:57`cbpbitemyapp: er the commit message should be group-by not order-by.. oh well..
22:57bitemyapp`cbp: you can amend commits yo.
22:57bitemyapp`cbp: it's your baby, amend the commit and -f push that.
22:57bitemyappseangrove: of course, it's easier to write micro-libs like this when you abuse AOP :)
22:58bitemyappI should try to make a round-trip of PR'ing API changes to every library Corfield works on.
22:58bitemyappjust to see if I can
22:59gvickersxg
22:59bitemyappgcmalloc: indeed!
23:08muhoo(comp face palm)
23:12bitemyappmuhoo: ?
23:23bitemyappmy sanity and clojure.java.jdbc are like oil and water.
23:23bitemyappwhen one arrives on the scene, the other vanishes, not to be seen for another week.
23:28satshabadis there a way to peek at the next value in a reduce?
23:28satshabador is that Bad?
23:32bitemyappsatshabad: bad.
23:32bitemyappsatshabad: explicitly make an overlapping series of partitions if you must.
23:32bitemyapp,(partition 2 1 (range 10))
23:32clojurebot((0 1) (1 2) (2 3) (3 4) (4 5) ...)
23:36Raynesdevn: I only care if I have to work with their code. :p
23:43bitemyappHAHAHAHAHAHA REPEATABLE TESTS
23:43bitemyappTHAT'S RIGHT YOU CANTANKEROUS PIECE OF CRAP DATABASE
23:44muhoosettle down, cowboy
23:45bitemyappmuhoo: jdbc and databases make me unhappy.
23:45muhookeep calm and use datomic. in-memory database + fixtures = repeatable tests
23:46uvtcWhat are the naming conventions around leading and trailing dashes in function names? The first one that comes to mind is `defn` and `defn-`, but my Clojure apps have a `-main` in them...
23:46xuserbitemyapp: that's because jdbc is the only way to go
23:46xuser+sad
23:46marco1uvtc: defn- is private while defn is public
23:46marco1pretty sure -main is just by convention
23:46muhoodefn- isn't convention, it's code
23:47muhoo,(doc defn-)
23:47clojurebot"([name & decls]); same as defn, yielding non-public def"
23:47uvtcYes. I see that one. I was wondering about reconciling all the places where I see a leading or trailing dash.
23:47uvtcBut those are the only places I've seen them so far. :)
23:48uvtc,(apropos #"^-[^>]")
23:48clojurebot(-' -reset-methods -cache-protocol-fn)
23:49uvtc,(apropos #"-$")
23:49clojurebot(- defn-)
23:49uvtcMm.
23:50uvtcOk. Not many of them, it would seem. And I think I need to learn
23:50uvtcmore about genclass to learn the significance of the `-main` naming.
23:52bitemyappmuhoo: I'd be using Datomic right now if I could, sadly Blackwater is written to ameliorate the damage SQL databases do to peoples' sanity.
23:53xuserbitemyapp: is Datomic production ready?
23:53bitemyappxuser: I'm using it in production at work right now.
23:54bitemyappxuser: It's best suited for the scrappy soul at the moment, but it's already quite nice and gets the job done.
23:54xuserbitemyapp: how's the performance?
23:54bitemyappxuser: I'm working on releasing a migration toolkit for it.
23:54bitemyappxuser: better than you'd expect @ perf.
23:54technomancyuvtc: leading dash signifies gen-class methods
23:54technomancythat's why -main has it
23:55xuserbitemyapp: a migration toolkit to migrate from where? SQL?
23:55marcopolo2technomancy: huh, cool
23:55marcopolo2Is that necessary, or just convention?
23:55bitemyappxuser: a migration toolkit to migrate datomic databases.
23:55xuserah}
23:56technomancymarcopolo2: you can override it in the :gen-class clause, but IMO that's silly
23:56uvtctechnomancy, thanks. Need to read up on that.
23:56technomancyuvtc: if you're lucky you won't =)
23:57uvtc:)
23:57bitemyappseangrove: it's done.
23:57uvtcWhat, in general, does the trailing asterisk signify? (For example, `list` vs. `list*`.)
23:57xusership it!
23:58uvtcNaming-convention-wise, I mean.
23:58seangrovebitemyapp: Cut a new release?
23:58bitemyappuvtc: stuff with an asterisk is typically "primitive"
23:58bitemyappseangrove: doing so right now as soon as maven stops giving me a noogie and calling me names.
23:59uvtcbitemyapp, "primitive"?
23:59bitemyappseangrove: pushed