#clojure logs

2011-03-22

00:07devntechnomancy: awesome.
00:07devntechnomancy: not sure if it's possible, but it would be nice to not have lein-search reformat the project.clj on an add
00:08technomancydevn: if lein-search gets merged, it will only be for searching
00:08technomancyI'm not to keen on automated changes to project.clj
00:09devntechnomancy: any reason in particular? ive never been burned by it. if it's only an add that seems reasonable...
00:09technomancydevn: you can embed arbitrary code into defproject
00:09technomancy:repositories [[org.clojure ~clojure-version]]
00:10technomancypretty-printing aside it's just something you have to be very careful with
00:11devnfair enough -- ive just been noticing some of the pain associated with finding the version, saving, deps, swank, slime-connect, test
00:11devnwish i could cut that down even by a step or two
00:12scottjIf I want to keep the last n items added to a collection what collection type should I use?
00:12devnhaving something like `gem` would be nice, which granted doesn't give you the ability to automatically add per se -- i mean a gem install foo will get the gem installed i suppose
00:12technomancydevn: you can do user-level plugins; you could have a lein-add plugin that just assumes you aren't doing anything fancy in project.clj
00:14devntechnomancy: yeah i think im noticing some deficiencies in my setup
00:14devnnot so much in lein, but regardless a lein deps + swank default task might be nice
00:15devnscottj: vector
00:17devnscottj: frankly it depends
00:17technomancydevn: so you add dependencies pretty frequently?
00:18technomancyyou know you can chain tasks, right?
00:18technomancylein clean, deps, swank
00:18Derandergod I wish you could add deps w/o restarting swank
00:18technomancydoesn't compose with durendal, but hey
00:19devntechnomancy: i didn't know that actually, and frankly it's not so bad -- it's just the waiting for the JVM coupled with the download time, with a slice of reconnecting in emacs
00:19scottjyou could create an alias that runs lein deps, lein swank, and emacsclient slime -connect
00:20devnit would be awfully nice to type lein madison-square-clabango, have it grab deps, start the swank server, and connect my emacs
00:20devnscottj: yeah, i guess i don't because technomancy is right -- you don't add deps like a madman for the life of an entire project
00:21devnso once that setup time is over i think: hm, that sort of was a pain, i should think about automating that, and then dont think the same thing until the next time
00:21devnit's like a fly hitting a window -- after ~3 times it learns there's a window there
00:22devnbut that doesn't mean it won't hit another window 3 more times
00:22scottjyour alias wouldn't be project specific
00:24devn*nod* -- i understand what you're suggesting and agree i should absolutely do that, but either way it strikes me as kind of a wonky usability issue for most
00:24devneither way, im outta here -- have a good night
00:40dsantiagoWhat the hell could Virtualbox even be doing to cause a kernel panic?
00:41LuminousMonkeyThe host is panicing?
00:41dsantiagoScuse me, wrong window.
00:41dsantiagoBut yes.
00:42LuminousMonkeyNo worries, next time I will correctly spell panicking.
00:44LuminousMonkeyError in the VirtualBox kernel modules maybe?
00:45dsantiagoYeah, must be it.
01:19technomancydevn: you could write durendal-jack-in alternates that do more than just start a swank server
01:19technomancyanyway
01:19technomancyfood for thought
02:11fmwanyone awake that is using filters in Lucene? I can't get them to work at all, for some reason. Queries with a filter simply don't return any results. I've written a small demonstration project (including dummy data to run the test) here: https://github.com/fmw/clojure-lucene-demo/blob/master/test/clojure_lucene_demo/test/core.clj#L286
02:12fmwincidentally, I'm also planning on keeping this online as example code for using Lucene from Clojure once its fixed, so feel free to yell at me in case I'm not being idiomatic somewhere as I'm very new to clj still ;)
04:23TobiasRaederMorning
05:16ejacksonGood morning noble coders
05:21cemericknobility is a rare thing, I'm afraid
05:21angermangood morning sir ejackson...
05:22angermancemerick: :)
05:22Raynescemerick: Morning.
05:23cemerickOnce Mick Jagger got knighted, I think the key certification body for nobility lost its caché. :-P
05:23cemerickRaynes: hi :-)
05:24ejacksonyou raise a valid point.
05:24ejacksonsteve yegge's piece is pretty cool. not surprising, I guess, but cool nevertheless.
05:24cemerickEven the Klingon high command lost its cred with that scandal in TNG.
05:24ejacksonp'tak !
05:25cemerickI've forgotten all my Klingon lore at this point.
05:25cemerick*sadface*
05:26ejacksonyou have forgotten even Kahless ? He's supposed to be the Unforgettable.... tsk tsk.
05:26cemerickooo, ooo, Duras!
05:26cemerick:-D
05:27hircuscemerick: remember, even Shakespeare is better in the original Klingon :)
05:27ejacksonLOL !
05:27cemerickhircus: that, I did not forget!
05:27cemerickThis channel's nerd quotient has never been higher. My apologies. ;-)
05:28hircusthe recent Java refugees must be confused :p
05:28raektlhIngan Hol bojatlhlaH'a'?
05:28hircusdamn, I wish Google Translate supports Klingon
05:28raek}}:-)
05:29brehautit doesnt?!
05:30hircusI remember the days when Red Hat Linux's Rawhide could be installed in Pig Latin and Swedish Bork
05:30ejacksonFederation Flunkies.
05:31ejacksonWell, this has been a great start to the day ! Much obliged, fellow nerds :)
05:32cemerickToo bad it had to go with the stereotypical sci-fi direction. Maybe next time, I'll open up with some obscure Truman references for the history nerds.
05:35ejacksonthe trouble with history is that its all local.
05:36cemerickOne of its most appealing characteristics, IMO.
05:37hircuscemerick: as a history nerd myself, I look forward to tomorrow, then
05:37cemerickBut that's what separates a good historian from the rest -- they can peel the onion back enough so that just about any history is universally relatable.
05:39ejacksonhircus: a historian looking forward to tomorrow.... ?
05:40ejacksons/a /an /
05:40sexpbot<ejackson> hircus: an historian looking forward to tomorrow.... ?
05:42cemerickejackson: "There is no present or future, only the past, happening over and over again, now." – Eugene O'Neill
05:44ejacksoncemerick: that's tremendous !
05:44Fossiis it?
05:45Fossii'd rather say there is no past and future, only present, but who am i to argue... :]
05:45cemerickI doubt O'Neill had it all figured out in any case.
05:46ejacksonwel.... he does sound a little too irish to be trusted
05:47ejackson(just kidding)
05:47cemericksmashing, I managed to stir up a centuries-old blood feud in just a few msgs! ;-)
05:47RaynesI wish there was a pill one could take that could force them to get work done.
05:49ejacksonRaynes: i know that pill. Its called quitting a perfectly good job do try do something insane :)
05:49ejacksoncemerick: hehe, I have the feud in my own blood, both sides, annoyingly.
05:50Raynesejackson: Not work in context of employment. Just stuff I need to do.
05:50RaynesEverything I do is insane, but I have to do it in order for it to be insane.
05:50hircusthose who don't understand history are doomed to repeat it -- my bad paraphrasing of Santayana
05:51ejacksonRaynes: this _is_ what I mean. the only way to be motivated is to have consequences for inaction. Arrange that if you don't do this work, horrendous things happen to you.
05:52hircusejackson, Raynes: stickK.com does something like that. you can set up punishments for yourself
05:52hircuslike donating to your least favorite cause :p
05:52Raynesejackson: So, essentially, I need to rig up blowguns to air compressors around my chair with trip wires that I'll trigger if I am to move? That sounds like it could work.
05:53Fossinice variation of procrastination
05:53hircusNPR has a recent show on it, I believe -- or one of the other podcasts I listen to. one author actually threatened himself with suicide if he did not finished a long-delayed book in 10 days
05:53ejacksonRaynes: yes... you've seen Saw ? Selfapply that.... :P
05:54RaynesThat's just sadistic enough to work.
05:54RaynesLet's patent it!
05:55ejacksonits certainly worth a jokey self help (or is that self harm ?) book :)
05:59angerman,(defn shift [n coll] (let [l (count coll)] (take l (drop (mod n l) (cycle coll)))))
05:59clojurebotDENIED
05:59angerman:/
06:00angermanthat is a really useful fn.
06:02raekhrm, (defn roll [queue] (conj (pop queue) (peek queue)))
06:03angermanreak, that's just one and only in one direction
06:03angermanshift takes n \in N
06:03angermanerr Z
06:04Fossiangerman: feeling stacky?
06:04raekfair enough :)
06:04angermanFossi: more ringy.
06:07angermanon a more fundamental level, at least for the datastructure (which is not a mathematical ring), one would probably used a cyclic double linked list with a "current-position" pointer...
06:07Fossiyeah
06:07Fossihaven't seen one of those in java so far
06:14RaynesAnybody feel like proof-reading a relatively short blog post for me?
06:15raekRaynes: o/
06:15Raynesraek: \o, is that an offer? :D
06:16Raynesangerman: That's what it is.
06:16angermanwhile \o/ obviously looks like "help"
06:16RaynesIt's a high five gesture.
06:16Fossior a rounded lol
06:16Fossilol looks more like help imho
06:16RaynesFossi: Good observation.
06:16angermanNever felt that "high five" thing to have reached Germany...
06:16angermanFossi: no, that looks like egyptian ancient dance stuff.
06:17angerman(depending on font… i guess)
06:17Fossilol always makes me see a bank robbery
06:17Fossiand now you cannot unsee it either mwahahah
06:18angerman /o/ \o\ /o/ \ \
06:18Fossiups, that guy lost his head somewhere
06:19Fossior he's a lot smaller with freakishly long arms
06:19angermaninteresting. those pictograms seem to be understandable.
06:20angermanI will though probably never really feel like seeing eyes in ^^
06:23Fossithat's only because you aren't used to them
06:24Fossimost people really didn't see a face in :) for a while
06:24angermanNo. I'm used to ^^
06:24Fossinow you can even do stuff like ;§ and people will get the point
06:24angermanFriends and family use them so often.
06:24Fossii think (^^) makes it clearer
06:25Fossi(^_^) rather
06:25angermanEven though I know where they come from. I have a hard time admiring them and really seeing their correlation to eyes.
06:25angerman(-_-) is ok, so is (O_O) or (O_o) or without parens.
06:53fmwanyone interested in some Apache Lucene example code in Clojure? I just wrote some: https://github.com/fmw/clojure-lucene-demo
06:54fmwkeep in mind that I'm quite new to Clojure, so there is probably some non-idiomatic code lurking around in there (feel free to point it out and I'll gladly fix it and learn something)
08:52carkhhello
08:54TimMcfmw: (. Version LUECENE_30) can be rewritten Version/LUCENE_30 if that's a static field reference.
08:56TimMcfmw: Similarily, (. IndexReader open directory) can be (IndexReader/open directory)
09:04fmwTimMc: cheers, I updated that
09:04fmwlooks better indeed
09:19gfrlognot finding too much by googling -- anybody know if there are any tools for using clojure with Jena?
09:21angermanJena?
09:22gfrlogis a semantic web framework
09:23gfrlogguess I'll have to make one then :)
09:23angermanI guess you have to live with interop layer
09:24clgvgfrlog: it is java, so you just need to know java interop ;)
09:24gfrlogyep.
09:34gfrlog,(def person-uri "http://somewhere/JohnSmith&quot;)
09:34angermanOh Noes!...
09:34clojurebotDENIED
09:35gfrlogI get a strange exception from that line at the repl
09:35angermanwhat's the exception?
09:35gfrlogwell it cleared up after I restarted the repl -- but it was printing out the following and then the def succeeded anyhow:
09:35gfrlogjava.lang.Exception: Unable to resolve symbol: in this context (NO_SOURCE_FILE:0)
09:36gfrlogmust have been some rodents gnawing on the bits or something
09:40angermanOk, now I officially fail at proving.
09:40gfrloglike math?
09:40angermanyes
09:40gfrlogwhat are you trying to prove?
09:41angermanI tried to show that the product of two matrices with only real valued eigenvalues can only have real valued eigenvalues as well.
09:42gfrlogI did not take well to matrices...
09:42angermangfrlog: well, I should be able to prove stuff correctly, it's my major after all.
09:43ejacksonangerman: when do complex valued eigenvalues arise ?
09:45angermanejackson: well. I have 8 skew-symmetric matrices.
09:46angermanskew-symmetric matrices have complex eigenvalues. In 3-space they have 1 vanishing (0) and two complex complementary eigenvalues.
09:46ejacksonfunkiness
09:47gfrlogangerman: I thought the only thing mathematicians did was come up with new equations
09:48angermangfrlog: hmm no.
09:48gfrlog:)
09:48ejacksonhehe, maths is meta. the mapping between its mappings and 'reality' are the key.
09:48angermanejackson: no, that's physics
09:48gfrlogejackson: please map transfinite induction to reality
09:48angermanejackson: math does not need reality.
09:49ejacksoneep. I retreat.
09:49clgv:D
09:49gfrlognow I need to go read the wikipedia article on transfinite induction
09:50gfrlogholy crap epsilon-induction
09:52gfrlogyou learn something new every time you try to learn something new
09:53clgvbut only if you learn something new ;)
09:53gfrlogoh right
09:58TimMcIf I want to do animated rotations, I think I'll have to learn how to use them, though.
09:58gfrlogTimMc: angerman has 8 skew-symmetric matrices. Maybe they could help you rotate something?
09:58TimMcNah, I need like 15 of them.
09:59gfrlogdag
09:59TimMc:-P
09:59angerman15 for rotation?
09:59angermanin what space do you want to do rotations?
09:59angerman_and_ do animations.
09:59TimMcWas kidding.
10:00TimMcI'm just going to use Euler angles. (rot Z, rot X, rot Y)
10:06TimMcangerman: Does matrix stuff count as Algebra or Analysis? I once heard that all of math can be divided into those categories.
10:06clgvTimMc: algebra most of the time ;)
10:06TimMcOr are they simply a tool that is used in both?
10:06clgvthough matrices are also used in higher dimensional analysis
10:07angermanTimMc: I wouldn't say that you can differentiate them so clearly, but matrices are "just a tool" of linear algebra… which then again is just a subset of algebra.
10:07angermanTimMc: Tensors are just the natrual extension of matrices.
10:08clgvI dont think they are just a tool of linear algebra - in fact they are one of its big subjects/topics ;)
10:08angermanclgv: matrices are _just_ a tool. That become pretty obvious if you read material from the 18th centrury.
10:09angermanmatrices are just a way to arrange numbers in a rectangular format.
10:09angermannothing more. nothing less.
10:09angermanthese days though people seemingly equate matrices with linear algebra.
10:09clgvhm but they also form monoids and groups and there are results on them. seems more than just tools to me ;)
10:09gfrlogmatrices == linear algebra
10:10Fossihmm. quaternions. so yummy
10:10angermangfrlog: someone had to follow suit on that statement.
10:11angermanclgv: groups?
10:11TimMc(= matrices linear-algebra) ##true or false?
10:11gfrlogI think this is a dispute about the meaning of "tool"
10:11TimMcbah, sexpbot wants parens
10:12gfrlog,(= matrices linear-algebra)
10:12clojurebotjava.lang.Exception: Unable to resolve symbol: matrices in this context
10:12angermangfrlog: matrices are a way to write linear-algebra nicely.
10:12TimMcgfrlog: You forgot to require incanter. :-P
10:12angermanthey are just a shorthand for writing multiple sums.
10:12gfrlogangerman: and heck, it's all just sets anyhow
10:13clgvangerman: invertible matrices form a group with multiplication afaik
10:13gfrlogif a math thing A can be formulated as a particular kind of math thing B, does that mean A doesn't really exist?
10:14gfrlogif I can construct set theory using matrices as a primitive, does that mean everything in math is really a matrix?
10:14angermanOh, now this is becoming a flamewar.
10:14gfrlogwhoops mybad
10:14TimMcThis strikes me as a Formalism argument.
10:14clgvgfrlog: probably most of math doesnt really exists - did you ever spot a real number in the real world? ;)
10:14gfrlogclgv: agreed
10:15TimMc(What's the opposite of formalism?)
10:15clgvchaos
10:15ejacksoncomment threads
10:15clgvejackson: good one :D
10:15gfrlogclgv: I once spotted a real number of real numbers
10:15ChousukeI think mathematical things are real, just not concrete.
10:15TimMcgfrlog: 0?
10:15angermanMy point is: matrices eshew much of the underlying mathematics by being easily accessible.
10:16Chousukeeven non-real numbers are real :P
10:16gfrlogTimMc: yeah, I thought of that
10:16ejacksoni agree with Chousuke abstract is still real
10:16TimMcgfrlog: I'm not sure we have real numbers in this universe, actually.
10:16clgv"real" was never the question - "existence" was asked for
10:17gfrlogTimMc: you argue for physics being discrete?
10:17TimMcgfrlog: I'm not sure.
10:17Chousukeclgv: how do you define the existence of something abstract?
10:17TimMcI know a string theory professor, I should ask his opinion.
10:17gfrlogTimMc: I don't disagree
10:17TimMcBut yes, that's what I'm referring to.
10:18gfrlogTimMc: if it is discrete, I believe that means that it is possible to encode every detail of the universe over all of history into a single real number
10:18TimMcIn the realm of computers we *certainly* don't have the natural numbers even.
10:18TimMcgfrlog: Not just that, an integer.
10:18gfrlogTimMc: I disagree
10:18gfrlogTimMc: every integer only contains a finite amount of information
10:19TimMcyes?
10:19gfrlogTimMc: perhaps time is infinite
10:19gfrlogTimMc: perhaps space is infinite
10:19TimMcAh, perhaps.
10:19gfrlogTimMc: if neither, I imagine that means you're right
10:19clgvChousuke: why do I have to?
10:20TimMcgfrlog: Here's a fun one: A *deterministic*, finite, discrete universe will eventually start looping.
10:20Chousukeclgv: because without such a definition it's pretty hard to make a case either way :/
10:21clgvChousuke: I didn't draw "abstract" into the discussion ;)
10:21gfrlogTimMc: that is a fun one. Probably in practice it'd be a trivial loop
10:21TimMcHeat death, *then* loop. Fun times.
10:22ChousukeWould that mean that this conversation has already occurred uncountable times? :P
10:23tomojat that point "occur" looks rather suspicious
10:23gfrlogChousuke: either finite or countable I think
10:23clgvTimMc: well I read an article that explained that from a thermodynamic argument one can calculate the maximum distance where a parallel universe just like ours exists
10:23clgvthe pity is we might never be able to travel there since we are too slow...
10:24gfrlogclgv: we could stay in this universe and have an equivalent experience
10:24TimMcclgv: Why would you want to go there?
10:24ejacksonif you take Kant's perspective then anything which the mind perceives exists. We perceive numbers. They exist, even though we cant put them in our pipes and smoke them.
10:24tomojif the universe is a looping record, why have the phonograph in our ontology at all?
10:24Fossiejackson: damn
10:24gfrlogejackson: what is that definition useful for?
10:24ejacksonwho said anything about useful ?
10:24TimMctomoj: I... what.
10:25clgv"useful philosophy" - oxymoron or not? ;)
10:25TimMc:-)
10:25gfrlogejackson: I just did; unfortunately I'll have to follow that up with leaving the conversation. academics call.
10:26ejacksongood luck.
10:26gfrlogejackson: thx
10:26tomojTimMc: what's the difference between a universe that keeps repeating and one that just "plays" once?
10:27clgvhmm on a second thought: a parallel universe that is exactly like ours - couldnt be exactly like ours if you could just go there ^^
10:27TimMctomoj: It wouldn't loop back from the start.
10:27tufflaxtomoj: You just said it?
10:28TimMcIt would just eventually hit a loop, like the hailstone numbers.
10:30tomojtufflax: I meant to suggest that the distinction is meaningless
10:31tufflaxI thought meaningless subjects was what we were going for :)
10:32TimMcproofs -> matrices -> tools vs. objects -> philosophy of math -> all downhill from there
10:38tomojfor a bit I thought maybe I was attacking a straw man, but gfrlog's "either finite or countable" suggests otherwise - "how many times has the universe looped?" sounds like "how many times has god heard the record play?"
10:39TimMcheh
10:39TimMcOK, change of topic:
10:40TimMcUsing α, β, & γ as variable names in a barycentric coordinate computation: Awesome or awesome?
10:41TimMc(Or will this screw someone over who tries to use my code?)
10:41angermanTimMc: unless he screws with the file-encoding, no I don't think so
10:42tomojmy slime can't handle it :(
10:42ejacksonTimMc: although it might drive you nuts rather quickly.
10:42TimMcIf someone on a CP-1252 encoding system (Windows) uses my source jar file, they might get a surprise?
10:43TimMcThey're just local bindings, not exposed in the API.
10:43raekno, Clojure source files are always UTF-8
10:43tomojwhich as it turns out is quite annoying - when exploring production data, non-slime-compatible characters are hidden landmines
10:43raekbut slime uses ISO 8859-1 for the socket
10:43TimMcHaha, that's terrible.
10:43raek(you can configure that)
10:44tomojglad to hear it, dunno why I haven't tried to fix it yet...
10:44raekfortunately, slime and swank are coding-aware, and does the translation correctly (as long as you configure swank and slime for the same coding)
10:44TimMcslime-net-coding-system ?
10:44raekyes
10:45foxupahi
10:45chouserTimMc: the other problem is people trying to edit your code having difficulty typing those chars
10:45chouserTimMc: That's the one that has bugged me the most with my non-ascii variable names
10:45raekand then something like lein swank localhost 4001 :encoding '"UTF-8"'
10:48foxupaso i was wondering if there is a way to do basic continuation passing style lazy seqs?
10:51tomojhmm, β at least seems to work after just changing slime-net-coding-system, no encoding opt passed to lein swank
10:52raektomoj: if you do (seq "β"), what do you get?
10:52raek\β ?
10:52tomoj(\β)
10:52raekgreat!
10:53tomojI'm in your debt
10:53clgv,(seq "β")
10:53clojurebot(\β)
10:54raekMy work here (as the encoding nazi) is done.
10:54TimMcThank you, encoding nazi!
10:54Fossi,(seq "þ")
10:54clojurebot(\þ)
10:54Fossihmmm
10:54TimMc:-þ
10:54clgvpolitical incorrect vocabular here... tsk tsk :P
10:55raek:-ƿ
10:55tomojI'd never before considered the literal meaning of "politically incorrect" which seems to apply :)
11:01chouserfoxupa: like a sequence monad? or something else?
11:02foxupachouser, the problem i'm trying to solve is as follows: I have a graph and want to compute the set of automorphisms of that graph
11:02foxupathis involves essentially recursively descending down a tree of possible permutations and at the bottom of the tree checking if the permutation is a valid automorphism
11:03foxupabut the problem is that for big graphs
11:03foxupathere could be a very large number of automorphisms
11:03foxupaso what i want is a lazy seq
11:03foxupaso that the first element of the seq is the first leaf of the tree
11:03foxupathe second element is the second leaf of the tree
11:03foxupaetc
11:04foxupain scheme i know how to do this with continuations
11:04foxupahowever i don't know anything about monads, and i want to learn how they work, but at this time i'd rather just find hte most straightforward solution to get the job done
11:04chousermanually building a lazy seq using lazy-seq is structurally very similar to CPS
11:04raekfoxupa: are you familiar with writing functions that produce lazy-seqs?
11:05foxupawell i'm browsing through the book Programming Clojure
11:05foxupabut I just wanted to know that it is possible with lazy seq's right?
11:05foxupais there some kind of "yield" function or something I can just call in my tree walk?
11:06raekfoxupa: you return a (lazy-seq ...) expression. the contained body will not be evaluated until when it is needed
11:07chouserfoxupa: take a look at the replace-symbol example in that book, chapter 5
11:07raekwhen the body is evaluated, it most often returns something like (cons some-element (recursive-call))
11:07raekso you get something like (cons some-element (lazy-seq ...))
11:07tomojyou already have a tree of permutations sitting there?
11:07chouserI personally think there is another book with a better example of lazy-seq, but Halloway's replace-symbol will do. :-)
11:07foxupano the tree is being generated recursively (depth first search at this time)
11:08foxuparaek, that method makes sense for the typical linear recursion pattern, but my difficulty is in walking back up the tree
11:08foxupa(I'm looking up the replace symbol example now)
11:08raekhrm.
11:08chouserfoxupa: ah, I see what you're saying.
11:09chouserperhaps some clever combination with the trampoline function would do it.
11:09raek(general lazy-seq example https://gist.github.com/480608)
11:09chouseror tree-seq with filter
11:09chouseractually, that sounds better.
11:10foxupachouser, yes, I was looking into using trampoline, but that's why I was just wondering if this type of problem has been solved... in scheme continuations solved this perfectly but clojure doesn't have first class continuations as far as i can tell
11:10chouserfoxupa: tree-seq will walk a tree depth-first, returning *all* nodes. filter that for your leaves and you'll be done
11:10foxupaactually chouser, the tree-seq seems the correct approach
11:11chouserfoxupa: clojure does not have continuations because it maintains method-call compatibility with Java, which does not support continuations.
11:13foxupachouser, wait, the problem is that many of the leaves are not valid (and you won't know which ones till you get to the leaf), so i'd like to have the lazy-seq only return the valid ones, but actually on secontd thought combining tree-seq with filter seems correct
11:13foxupaactually maybe not
11:13foxupai'll play with some simple examples and get back to you guys on whether it works
11:19foxupaalso another general clojure-software-engineering question: sometimes I define a utility function within another function itself, but I'm not sure how to test this utility function from a separate test file that has my other tests... what is the best practice regarding this?
11:26jkkramerfoxupa: if you want to test it, you'll have to def it at the top level. you could make it private with defn- (note trailing dash). there are tricks to access private vars from other namespaces, but not lexically-scoped locals
11:29foxupajkkramer, I figured that would be the case... so is it generally better to hoist the util-function to top level and test or just do intensive testing of the entire function that it is in or is this always a case-by-case type of decision? (I'm trying to build better software-eng habits)
11:30jkkramerfoxupa: case-by-case is how i decide. if the utility function is used in more than one place, probably good to test it on its own. if it's just one aspect of a larger, black-box-like function, maybe it's not needed
11:31fliebelgoody morny :)
11:43__name__GOod morning fliebel
11:44fliebelI suppose no-one has written a kick-ass GUI lib while I was sleeping?
11:48semperosI have a collection of maps
11:49semperosI want to filter that collection
11:50semperoskeeping only those maps that have key-value pairs that I pass in
11:51semperosso something like ({:a "foo", :b "bar", :z "hello"} {:c "baz" :d "etc" :z "hello"})
11:51semperosand filter to find the map that contains at least {:a "foo" :z "hello"}
11:52semperoshow do I tackle this (cleanly)?
11:54carkh,(select-keys {:a "foo", :b "bar", :z "hello"} (keys {:c "baz" :d "etc" :z "hello"}))
11:54clojurebot{:z "hello"}
11:54carkh?
11:55carkhif the value needs to be the same, that's only one function calla way
11:55semperosok
11:55semperosI'm actually dealing with records, so I know the keys are there
11:56carkhso your example is not quite good enough !
11:56carkh=)
11:56semperos:)
11:56semperosit's a bit confusing, but the function allows an arbitrary number of key-value pairs to check against
11:56semperosand returns the first for which all match
11:57semperosthat's the intent, anyway
11:58raeksemperos: one way could be to use clojure.set/index
11:59raek(that approach is not lazy, though)
11:59semperosdue to the nature of my domain, lazy isn't required (nor really possible)
11:59raekwait.
11:59tomojdocs on index utterly confuse me
11:59semperosme too :)
11:59raekclojure.set/superset?
11:59clojurebotclojure is like life: you make trade-offs
12:00semperoshehe
12:00semperosfewer than elsewhere, clojurebot
12:00jkkramer,(filter #(every? (fn [[k v]] (= (% k) v)) {:a "foo" :z "hello"}) [{:a "foo", :b "bar", :z "hello"} {:c "baz" :d "etc" :z "hello"}])
12:00clojurebot({:a "foo", :b "bar", :z "hello"})
12:00raekindex partitions a set of maps. you give it the key you want to index on, and it will return a map from values of those keys to sets of the maps those values for the keys
12:01raekeh, not very easy to explain
12:01semperosjkkramer: lookin good
12:01jkkramersemperos: add a 'first' to that if you just want the first match, of course
12:01semperosright
12:01raek,(filter (clojure.set/superset? % {:a "foo" :z "hello"}) [{:a "foo", :b "bar", :z "hello"} {:c "baz" :d "etc" :z "hello"}])
12:01clojurebotjava.lang.Exception: Unable to resolve symbol: % in this context
12:01raek,(filter #(clojure.set/superset? % {:a "foo" :z "hello"}) [{:a "foo", :b "bar", :z "hello"} {:c "baz" :d "etc" :z "hello"}])
12:01clojurebot()
12:01semperosI was using a for to go through all the key-vals in the map and then filtering
12:02semperoswhich gave me a seq of seqs
12:02semperosso I had to do a nasty flatten-distinct-first combo
12:02semperosjkkramer: that's quite nice, thank you
12:02raekah, no. superset is for sets... *duh*
12:03fliebelraek: A set is to a map as a keyword is to a symbol :P
12:04amalloy*brain melts trying to puzzle that one out*
12:04raek(defn contains-mapping? [m k expected] (if-let [[_ actual] (find m k)] (= actual expected) false))
12:05fliebelamalloy: Well, they are both hashes, but the keys of a set refer to themselves, while the keys in a map refer to their values.
12:05amalloyah
12:06raek(defn contains-mappings? [m & key-vals] (every? #(apply contains-mapping? m %) (partition 2 key-vals)))
12:06semperossince I'm dealing with records, only change to jkkramer's code is (= (k %) v)) inside the second anon fn
12:06semperosthanks again, everyone
12:07amalloysemperos: fwiw that's equivalent to (comp #{v} k)
12:08amalloyer, except mine's a function and yours is a result
12:08semperos:)
12:08semperosconcept understood
12:09devnamalloy: i really like your utils repo -- i hadn't considered doing that
12:09jkkramersemperos: another caveat is that nil vals always match
12:09amalloyjkkramer: and for me, nils and falses never do
12:09amalloyyours can be fixed with (= (k % (Object.)) v), mine can't :P
12:09amalloydevn: i'm glad!
12:10amalloyhow'd you find it?
12:11devnsomeone posted it on twitter or disclojure i think?
12:11semperosjkkramer: understood; as I'm filtering against required record fields, that's ok
12:12amalloyyeah, i think it hit disclojure as well as planet-clojure
12:12amalloyfeel free to use mine, of course, though the intent was that you go out and make your own as well
12:13devnand suggested it was a cool idea -- it's like dotfiles
12:13devnsorry some lag here
12:13amalloyheh
12:13amalloyno worries
12:13devnbut yeah, the idea of dotfiles is great because it's kind of a condensory
12:14fliebeldevn: Doesn't clojure actually support something like it? user.clj or something like that. no dot though :(
12:14devnit forces you to generalize and abstract to the fullest extent possible
12:14devnfliebel: yes, but I don't know how common it is to use
12:14devneither way i like the idea of having something on github to distribute
12:14amalloyfliebel: and it's not portable
12:14devn^^
12:14amalloyif your program depends on something in user.clj nobody else can use it
12:15devnamalloy: condensory is good when dealing with literature, language and stuff
12:15devnor at least that's where i use it
12:15fliebelamalloy: Yea, I figure that to. I thought a git hook could help here :D
12:15devntake a big paragraph and boil it down to its smallest parts inside your condensory
12:15devnthat sort of thing :)
12:15amalloyfliebel: augh i just had breakfast, don't make me throw up
12:16fliebelcondesnory is not even in any dictionary I know of :(
12:16fliebel(with that spelling, yeh)
12:16amalloyfliebel: what about condensory?
12:16fliebelnope
12:16jkkramercondensery
12:17fliebelI'm pretty sure my right click does not make such mistakes.
12:17amalloyhaha
12:17amalloy$dict condensery
12:17sexpbotamalloy: noun: A place in which condensed milk is manufactured
12:17amalloy$dict condensory
12:17sexpbotamalloy: Word not found.
12:19amalloyfliebel: it's easy to make up a meaning from the roots, though. "having the effect of condensing"
12:19amalloywhich i like rather better than the thing about milk
12:33Raynesdevn: I see you forked cake-search. Don't know if you know this, but I already added clojars stuff to cake proper.
12:44devnRaynes: yeah i was confused :D
12:44devnRaynes: i was looking for the cake search functionality last night and didn't find it
12:45devnwow i didn't know condensory was such a fancy word
12:46devni heard it w/r/t a minimalist poet a long time ago, she called her workspace a condensory because she would take big ideas and slowly boil them down to their smallest parts
12:46devn^ fliebel amalloy
12:56Raynesdevn: src/tasks/clojars.clj iirc
12:59devnRaynes: gotcha, thanks
12:59fliebeldevn: cool
13:00fliebelRaynes: What did you mean the other day by "fun in a want-to-kill-yourself way"?
13:05devnfliebel: also: http://www.lorineniedecker.org/ is the poet -- can't believe i found that, but some of it is quite good
13:05choffsteinhey all! I have a quick question -- I basically want to serve a zip file I create dynamically from my web host. Ideally I would pass into it a map with keys as file names and values as the file data. Returned would be the data for a zip file. Ruby has a library called Zippy that does this. Any idea what java library or clojure library might do this?
13:07fliebelchoffstein: Probably a subclass of OutputStream. I know there is GZIPOutPutStream or something like that, but that does not do folders.
13:08choffsteinYeah. I found that as well... Was hoping there was just a plug-and-play solution :)
13:08choffsteinRuby has spoiled me :D
13:09choffsteinAnyone know how to use the mail or mymail commands if i "Have a message"?
13:09amalloychoffstein: /msg sexpbot mail
13:09cemerickchoffstein: sorry, is the zip file prepared when you deploy the app?
13:09clojurebotunzip-with is http://paste.lisp.org/display/76458,1/raw
13:10choffsteincemerick: no. Basically, I have a map with file names and the data. So let's say my app takes a bunch of images, works on them in memory, and wants to send them back.
13:11choffsteinNothing is written to disk. Everything is in memory.
13:11amalloycemerick: it sounds to me like no; his user picks N files from some list and says "zip em up for me", and he wants to serve a single zip file in reponse
13:11cemerickaaaah
13:11choffsteinyeah, exactly.
13:11choffsteinBut most of the Java examples have you reading from a file on disk. I just have the raw bits in memory.
13:12fliebelchoffstein: You could use a stringWriter to get around that.
13:12amalloychoffstein: ByteArrayInputStream maybe?
13:12cemerickchoffstein: simple with ZipOutputStream
13:12choffsteinHaha. Hurrah! Answers!
13:12cemerickand the options fly :-P
13:13cemerickNot sure how a StringWriter would help tho…
13:13amalloynow let's all try to be offline when, in a few hours, he finds none of the solutions are satisfactory
13:13choffsteinZipOutputStream with ZipEntrys, perhaps?
13:14choffsteinor at least pretend to idle ;)
13:14cemerickchoffstein: only way to do it AFAIK
13:14fliebelcemerick: Oh, well, I don't know what they're called, but you know, stuff that takes a string and torns it into something that looks like it could be fron a disk.
13:14cemerick(with-open [zout (ZipOutputStream. (ByteArrayOutputStream.))]
13:15fliebelI was not able to quickly see how to fill a zipentry with content.
13:15cemerick(doseq [e entries](..putNextEntry ...make new zip entry...)
13:15amalloyfliebel: stringreader
13:15cemerick(.write zout ...entry data...)
13:15cemerickanyway
13:15amalloybut i don't think he has a string either
13:15cemerickfliebel: it's just a marker that the ZOS lays down in the file it's building. You write the entry's content to the ZOS itself.
13:16cemerickit's a bit of a screwy interface.
13:16fliebelah… so you just add a zipentry and use write.
13:16cemerickyup
13:16choffsteinthat is a horrible interface
13:16choffsteinjesus.
13:17cemerickIf you have a bunch of data that won't fit in memory, that's the sort of API you end up with.
13:17amalloyit's much more convenient than hadoop
13:17cemerick*everything* is more convenient than hadoop
13:18fliebelCould be fun, having one thread write data to the stream, and have another add entries to it :)
13:36devnhmm...sandbar is nice
13:37choffsteini'm going to smash my head against this keyboard
13:39choffsteinsometimes java feels like a sick joke
13:40technomancychoffstein: that's why they call it "wrap the crap"
13:41choffsteinwhat does with-open return?
13:41cemerickthe value of the last expression in its body
13:42choffsteinhmmm...yep, definitely not what I want then :D
13:42pdkdoesn't with-open have an implicit do
13:42pdkor the try form at least
13:42choffsteinimplicit try with finally
13:43choffsteincemerick: in the code you posted above, how would I go about ripping out the bytes of the zip data I wrote?
13:43pdkthat's one thing that always bugs me
13:44pdkfor some reason special forms are too special to have builtin docstrings
13:44pdkthey're all just "please see [clojure special forms article]"
13:44cemerickchoffstein: that stuff was totally off the top of my head :-)
13:44choffsteincemerick: well, it is close to working ;)
13:44pdkcause they are the unique snowflakes of forms
13:44cemerickbut, what do you mean by "rip out the bytes of zip data"?
13:45cemerickpdk: 'course, forms like let would dump 1500 words in your lap.
13:45pdkwell MAYBE
13:46pdkthough if you think about it you could just say something like "let takes a vector with pairs of symbol names and their bindings then a body wrapped in an implicit do with the symbol names bound"
13:46pdkthe other docs are already extremely terse so they'd fit in!
13:47jkkramer,(clojure-version)
13:47clojurebot"1.2.0"
13:48jkkramerpdk: 1.3 has better docs for let and friends
13:50pdki like the "and friends"
13:50pdki'm picturing an edutainment cartoon series
13:50jkkramer:)
13:56choffsteincan't ... figure out ... gzip library. too .... dense. ack...
14:01choffsteinor maybe i'm too dense?
14:02choffsteinANyone mind taking a peek at https://gist.github.com/881685
14:02choffsteinI am confused as to why my zip file work work. To be used like (multiple-file-return {"ABC" "File data" "XYZ" "Other file data"})
14:05amalloychoffstein: fwiw (.toString b) == (str b)
14:05choffstein...word
14:06choffsteinmuch appreciated :D
14:06amalloycode looks reasonable to me, probably because i've never had to use ZOS
14:07choffsteinwell, any other things you would change?
14:07choffsteini'm just trying to get better with clojure code in general. anything "ugly" about it?
14:07amalloyi prefer (Foo.) to (new Foo), but it's a matter of taste
14:09amalloymore importantly you might look into map destructuring: ##(let [m {1 2 3 4}] (doseq [[k v] m] (println (+ k v))))
14:09sexpbot⟹ 3 7 nil
14:09choffsteinYeah. I've noticed other people like that too
14:09choffsteinoh, very cool. thanks!
14:09amalloyother than that i'd say it's pretty idiomatic
14:09choffsteindestructuring ... yes, I remember that from my SML days 5 years ago :D
14:11midsmaybe put the entire let in a separate function, right now you are doing 2 different things in one; building an http response and zipping files
14:13choffsteinah, right.
14:13amalloyoh, didn't even notice that let at the top :P. (apply str (interpose " " foo)) is (clojure.string/join " " foo)
14:14choffsteinah, thanks.
14:15gfrlogI can't pass a java.util.Iterator to (seq)?
14:15choffsteinslowly getting there...
14:16amalloygfrlog: iterators aren't seqs
14:16choffsteingist now re-written :D
14:16amalloybecause to use them you have to mutate them
14:16amalloybut ##(doc iterator-seq), if for some reason you can't just call seq on the original Iterable
14:16sexpbot⟹ "([iter]); Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly."
14:18gfrlogamalloy: thanks
14:19gfrlogamalloy: I didn't think that iterators WERE seqs, but it seemed natural that calling (seq it) would return a seq
14:19amalloygfrlog: i don't exactly disagree, but i also don't mind that it's made "hard" to get a seq from an iterator, since that causes side effects
14:20amalloywhereas seq on most anything else doesn't
14:20gfrlogamalloy: agreed
14:25choffsteinarrrggghhhhh!
14:25choffsteincan't even type correctly. *the window
14:25gfrlogmaking corrections after jumping out a window
14:31fdaoudchouser fogus congrats on completing The Joy of Clojure!
14:33Lulu58e4fdaoud:seconded; will have to re-read full version
14:36leedaHi, can I ask questions about leiningen here?
14:36gfrlogleeda: yes
14:37leedaI just installed both Clojure and lein yesterday on my Mac (OS 10.7) and for some reason, lein is really slow. Even `lein help` takes a couple seconds. What am I doing wrong?
14:38gfrloghuh. I've always just put up with that.
14:38leedaOh... so it's normal?
14:38leeda0m7.511s
14:39gfrlogI can't imagine anybody else putting up with that, so I wouldn't be surprised if somebody is about to swoop in and suggest something like nailgun or something to do with emacs.
14:39gfrlogbut it's definitely normal for me
14:39amalloycake uses something vaguely like nailgun already
14:39hiredmanthe jvm takes time to boot
14:40gfrlognobody has written a clojure-to-bash compiler yet?
14:40leedaHm ok.
14:40amalloy$ time cake help &>/dev/null ## real 0m0.129s
14:40sexpbotamalloy: The time is now 2011-03-22T18:38:12Z
14:40amalloyhaha whoops. didn't mean to ask sexpbot for the time, there :P
14:40leedaamalloy: Yeah, cake is fast.
14:40pdkit's basically just attributable to jvm start time
14:40pdkcake has something to let it run with a persistent jvm to negate that
14:40leedaamalloy: I wanted to use the "ring" task for lein, can I use it with cake too?
14:41leedaThis is what I'm talking about: https://github.com/weavejester/lein-ring
14:41hiredmanlein has interactive mode, which starts up and you give it commands and you don't need to wait to boot the jvm everytime
14:42Raynesleeda: Leiningen plugins aren't compatible with cake plugins.
14:42leedaRaynes: ok, thanks.
14:43leedaI guess I'll just live with it for now. I'm too excited by Clojure to let that stop me...
14:51technomancyleeda: it's faster if you use a client JVM, but that can be hard to do on macosecks. try the interactive task and the swank task.
14:56leedatechnomancy: could you explain briefly what swank is and how I would use it? I don't use SLIME...
15:00technomancyleeda: oh sorry; if you don't use slime then swank isn't useful.
15:01leedatechnomancy: ah, ok, thanks anyway though.
15:18tsdhIs there a numerical equality function that doesn't care about type, so that I can compare a Double with a ratio?
15:18TimMc,(== 5/2 2.5)
15:18clojurebottrue
15:18tsdhAh, great.
15:19TimMctsdh: ##(= 5/2 2.5) works too, though
15:19sexpbot⟹ true
15:19tsdhTimMc: What's ##?
15:19TimMctsdh: sexpbot command flag
15:20tsdhOk.
15:20RaynesEmbedded evaluation trigger, to be specific. :>
15:20TimMcYeah, that.
15:20Raynesamalloy and I use very long technical names whenever possible.
15:21amalloyembedded evaluation trigger? don't blame that shit on *me*: i implemented it but i refuse to call it something that long
15:21TimMcamalloy: Bat signal?
15:21gfrlog"crunch crunch"
15:21TimMctsdh: You'll usually want to use a rounding function for comparing doubles. Here's what I do: https://github.com/timmc/CS4300-HW4/blob/master/test/timmcHW4/test/utils.clj
15:21Raynesamalloy: Is abbreviating it to EET a good compromise?
15:22RaynesAlso, don't undermine me in front of company.
15:23tsdhTimMc: Thanks. But in my case, I just found out that the "rounding error" is about 10000. :-)
15:23TimMchaha
15:23TimMcclose enough for theoretical physics work
15:30tsdhHaha, yeah. The problem was that I stuffed my numbers accidentially into a set, and thus duplicates vanished.
15:31gfrlog,{[#{:tom}] #{['tim]}}
15:31clojurebot{[#{:tom}] #{[tim]}}
15:35amalloygfrlog: testing that you can have complex objects as map keys?
15:36gfrlogamalloy: I have no defense for my utterances
15:36gfrlogat least not that one
15:36gfrlogsometimes I get a simple pleasure from ridiculous things
15:37amalloygfrlog: (comp #{'tom} :name) is a simple pleasure of mine
15:41gfrlogamalloy: I find that delightfully difficult to untangle
15:42amalloygfrlog: "return something truthy iff :name is 'tom"
15:42amalloythat is, it's equivalent to #(= (:name %) 'tom)
15:42gfrlogvery good
15:43gfrlogI like (apply partial (repeat partial))
15:43gfrlogbut I doubt there's any practical application for it
15:43fliebel&(let [  2]  )
15:43sexpbotjava.lang.IllegalArgumentException: let requires an even number of forms in binding vector
15:43gfrlogfliebel: trying to let some whitespace?
15:43fliebelgfrlog: yea :D
15:43fliebelworks locally :)
15:44tsdhIsn't there a standard `abs' function?
15:44fliebel,(let [  2]  )
15:44clojurebotjava.lang.IllegalArgumentException: let requires an even number of forms in binding vector
15:44amalloyclojure.math/abs, probably
15:45gfrlog,(map clojure.math/abs (range -5 5))
15:45clojurebotjava.lang.ClassNotFoundException: clojure.math
15:45amalloy&(require '[clojure.math :as math])
15:45sexpbotjava.io.FileNotFoundException: Could not locate clojure/math__init.class or clojure/math.clj on classpath:
15:45amalloyfeh
15:45fliebel&' 
15:45sexpbotjava.lang.Exception: EOF while reading
15:45gfrlogmy repl doesn't know about it ethire
15:46pjstadig,java.lang.Math
15:46clojurebotjava.lang.Math
15:46pjstadig,(java.lang.Math/abs -3)
15:46clojurebot3
15:46tsdhamalloy: Is that contrib? Or why is clojure.math not listed on the API page?
15:46fliebelhaha, ever tried a zero-width space in a monospaced font?
15:46gfrlog(map java.lang.Math/abs (range -5 5))
15:46amalloyoh, i thought Math only worked with doubles
15:46gfrlog,(map java.lang.Math/abs (range -5 5))
15:46clojurebotjava.lang.Exception: Unable to find static field: abs in class java.lang.Math
15:47fliebelgfrlog: You can;t use a method like that
15:47pjstadig,(map (memfn java.lang.Math/abs) (range -5 5))
15:47clojurebotjava.lang.IllegalArgumentException: No matching method found: abs for class java.lang.Integer
15:47gfrlog,(map #(java.lang.Math/abs %) (range -5 5))
15:47clojurebot(5 4 3 2 1 0 1 2 3 4)
15:47pjstadigoh right it's static
15:47gfrlogI won
15:47tsdh:-)
15:47tsdhThank you.
15:48pjstadigmeh
15:48RaynesTo whom it may concern: amalloy and I have decided to call our 'team' something and created a Github organization for our shared projects. Alas, sexpbot and clojail have been moved. https://github.com/cognitivedissonance
15:48fliebelthe later
15:48fliebelRaynes: cool
15:48gfrlogRaynes: I don't think cognitive is a verb, and I've certainly never heard of the word "issonance"
15:49tsdhOk, next question. Is there something like partial, that returns a partial function where the *last* arg[s] are fixed?
15:49Raynesgfrlog: en.wikipedia.org/wiki/Cognitive_dissonance
15:50amalloyRaynes: pretty sure gfrlog is messing with you
15:50gfrlogRaynes: this makes me uncomfortable
15:50fliebeltsdh: Some evil mind constructed macroes for that kind of stuff, yes.
15:50Raynesamalloy: Subtle, but effective. I had no idea.
15:50RaynesI'm so ashamed.
15:50gfrlogI've never once said anything constructive
15:50tsdhThat's basically a cosmetic question, but I think it's more intuitive do define my floating-point-= with args [x y tolerance] instead of having tolerance first.
15:51fliebeltsdh: Noo! Do it the other way around, that way you can compare multiple ars at once
15:51amalloyfliebel: why would you use a macro for this?
15:51fliebelamalloy: I don't know… What else is this fnutils thing doing?
15:51pjstadigyou could do (def shortened #(tolerance %1 %2 x))
15:52pjstadigor similarly (def shortened (fn [x y] (tolerance x y z)))
15:52pjstadigso forth
15:52amalloy(fn [f last-arg] (fn [& args] (apply f (concat args [last-arg]))))
15:53fliebelBut isn't this much nicer? (floating-point-= tolerance x y & zs)
15:53tsdhHm, I guess, you are right.
15:55phenom_when creating a map, is it possible for one value to depending on the value of an eearlier entry at creation time?
15:55amalloyphenom_: you probably want to use reduce?
15:56fliebelMore like iterate… *lingual meltdown*
15:56phenom_{:key "key:val" :key2 (.split (get :key) ":")}
15:57phenom_^^ amalloy, something like that?
15:57gfrlogphenom_: certainly that right there is not allowed
15:57phenom_:P
15:57fliebel$doc iterate
15:57gfrlogphenom_: it's hard to say anything other than "no" without knowing why you're trying to do that
15:58amalloyphenom_: absolutely not, in a "literal" map
15:58Raynes&(doc iterate)
15:58sexpbot⟹ "([f x]); Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects"
15:58RaynesFixed that for you.
16:06tsdhOh my god, macros are evil!
16:06gfrlogheck yes
16:06gigamonkeytsdh: why?
16:07gfrlogit is never a good idea to solve a problem requiring a macro with a macro
16:07scottjsurely there's a better way to have a collection that doesn't grow beyond a limit than this http://paste.lisp.org/display/120786 right?
16:07tsdhAfter adding my fp-= function and adding that as a param to a defcomparisontest (my macro) using (partial fp-= 0.000001), I got an error at file position 1 that PersistintList cannot be cast to Named.
16:08tsdhThe reason for the error was that in the macro's expansion code, there was a (println "Comparing with" ~(name equality-fn))...
16:09amalloytsdh: macros are not evil. they're power tools, to be used with caution
16:09tsdhThat obviously works only for named functions, but the error is not really helpful.
16:10tsdhamalloy: Yes, sure. But they have a high potential to lead to obscure errors.
16:10gigamonkeytsdh: I'm not a Clojure expert but that seems like it would be true in non-macro code to. I.e. if you pass a function to something that expects a name, boom!
16:10tsdh,(name #(let [a 1] a))
16:10clojurebotjava.lang.ClassCastException: sandbox$eval5580$fn__5581 cannot be cast to clojure.lang.Named
16:10tsdhSee?
16:10tsdh;-)
16:11amalloygigamonkey: the issue is that it's harder to find an error when the macro *can't expand* as opposed to "expands into something wrong"
16:11tsdhamalloy: Yes, exactly.
16:11amalloytsdh: that seems like a pretty helpful error message to me though
16:12amalloy"you tried to treat a [list|function] as a Named, and it isn't"
16:12amalloy¿que problema es?
16:12gigamonkeyamalloy: but macro expansion code is just code, right? It can even be debugged separately from its use in the macro.
16:12tsdhamalloy: When you had it at least once. So from now on I'll remember that errors in line 1 probably result from a macro erroring during expansion.
16:12gigamonkey(I'm assuming that's the case; rather, I'm assuming Clojure macros are more like Common Lisp's than Schemes.)
16:13amalloygigamonkey: you're correct
16:13amalloybut in practice, largely due to lukewarm debugger support, it's harder
16:13amalloytsdh: that's the wrong lesson to take away
16:14amalloythe right lesson (imo) is to look at the stacktrace. is there a macroexpansion in there somewhere?
16:14amalloyif so, the problem is with a maco expansion
16:14tsdhamalloy: There was no stack trace at all.
16:14tsdhAnd because of...
16:14tsdh,(class #(let [a 1] a))
16:14clojurebotsandbox$eval5584$fn__5585
16:15tsdhI didn't think of an anonymous function being a persistent listp
16:15amalloytsdh: what, of course there's a stacktrace. i get a stacktrace when i reproduce your broken code. what are you doing that causes no stacktrace to exist?
16:15amalloytsdh: and anonymous functions *aren't* lists, but the macro isn't being passed a function; it's being passed a list! when the compiler, after expansion, evaluates that list, it will result in a function, but the macroexpansion phase doesn't know that
16:16tsdhHm, you are right. lein test produces a stack trace, but slime doesn't in this case...
16:17amalloytsdh: i'm using slime. have you done anything weird that would hide stack traces?
16:17tsdhamalloy: No, I usually get them. But not with that error and just C-c C-k to recompile the current file.
16:19amalloyah
16:19amalloygood point
16:20amalloytechnomancy: how hard would it be to fix that? you get a nice useful stacktrace if you C-c C-c the problematic form, but C-c C-k on the file just gives you the top-level message
16:23amalloydid github just go down?
16:24TimMcseems up for me
16:24amalloyhey, so it is
16:24amalloyfor ~45s i was getting 500 errors
16:24technomancyI'm not sure; the C-c C-k compiler errors are pretty useless
16:24technomancywould love to see that improved
16:25amalloytechnomancy: can you point me in the right direction? last time i tried to browse the swank-clojure repo (is that even the right one?) i crashed github :P
16:25tsdhamalloy: Oh, now I managed to handle sexpbot's mail. I swear to open new threads instead of changing subjects (which I did at least in conformance with the relevant RfC).
16:26RaynesYou had trouble retrieving messages?
16:26amalloyRaynes: i think he means google groups, not sexpbot
16:26tsdhRaynes: amalloy's message was the first message I ever got. :-)
16:26technomancyamalloy: I'm pretty clueless when it comes to swank's internals =\
16:27amalloyaw. okay
16:27RaynesI'll have to review that.
16:27tsdhRaynes: You should see my IRC log. It's full of /mail RET, /mymail RET. ;-)
16:28RaynesYeah, I couldn't include the prefix in the docstring because prefixes are user-defined. The message should be clarified a bit.
16:28tsdhRaynes: Reminds me of "a novice's first session with mighty ed" at http://www.gnu.org/fun/jokes/ed.msg.html.
16:29amalloyRaynes: instead of "the mail command", what about "/msg me the message "mail"
16:29Raynesamalloy: That'll work. Editing now.
16:31amalloytsdh: i see you were talking about both sexpbot and google groups. that'll teach me to forget whether i use $mail or google
16:32tsdhI use Gmane.
16:32jhartmanhttp://clojure.org/ says clojure35 gives 35% off Joy of Clojure (print or ebook), but the coupon doesn't seem to work for the print edition. Anyone had any luck?
16:32Raynes$reload
16:32sexpbotReloaded successfully.
16:33amalloytechnomancy: is your swank-clojure repo at least the right repo to be forking?
16:34technomancyamalloy: it is
16:34amalloythanks. i'll see if i can find something that looks relevant and kick it
16:35technomancythat'd be great
16:38hiredmanf/win 14
16:43phenom_also guys, is there a mven repo with the latest clojure 1,3 build? or atleast the alpha 6 build?
16:51fliebelphenom_: yes… You should look at the default repos of lein or cake to know what they are though.
16:52TimMcOh man my code is so slow... I need to look into type hinting, parallelism, and transients.
16:52fliebelTimMc: The alternative for doing stuff faster is doing less stuff ;)
16:53TimMcfliebel: I need to render about 30,000 triangles no matter what.
16:54TimMc*still need to
16:54fliebelTimMc: Well, why not squares? :P
16:54TimMcActually, I should *first* look at using BufferedImage instead of using Graphics directly.
16:54TimMcfliebel: When all you have is a .tri file...
16:55fliebelTimMc: Everything looks like a hammer? But, yea, using graphics that do less work internally couts as doing less work, in my opinion.
16:55leedaCan anyone figure out what `w` is supposed to be here? (defmethod print-dup ObjectId [x w] (.write w (str "#=" `(object-id ~(.toString x)))))
16:55amalloyleeda: output stream
16:56TimMcfliebel: It looks fairly nice for a first go, though: http://i.imgur.com/1o0Ix.png
16:56leedaamalloy: Thanks. How do I make an output stream?
16:56amalloyleeda: you shouldn't need to
16:56leedaamalloy: (.. System out)?
16:56leedaamalloy: oh
16:56amalloyie, you shouldn't have to call this directly
16:56fliebelTimMc: Awesome! Is that this weird thing called ray tracing?
16:56leedaamalloy: oh ok
16:56TimMcfliebel: Nope, this is directional flat shading.
16:57amalloy&(binding [*print-readably* true] (pr-str *ns*))
16:57sexpbot⟹ "#<Namespace sandbox18840>"
16:57fliebelTimMc: I'd have to google that...
16:57amalloy&(binding [*print-readably* true] (pr *ns*))
16:57sexpbot⟹ #<Namespace sandbox18840>nil
16:57amalloygr
16:57TimMcfliebel: http://www.ccs.neu.edu/course/cs4300/HW4/HW4.html
16:58amalloy&(binding [*print-dup* true] (pr-str *ns*))
16:58sexpbot⟹ "#=(find-ns sandbox18840)"
16:58amalloyleeda: ^
16:58fliebellol @ "practice re-using code without copy and paste"
16:59TimMcOr just flat shading, I guess. Parallel light source, each triangle is shaded according to how close its normal vector is to the light vector.
17:00leedaamalloy: thanks
17:01amalloyleeda: heh, thank you! i hadn't thought about using ` to write the print-dup function call
17:01TimMcYeah, that was new to me too.
17:02TimMcfliebel: Flat shading is the third part.
17:02leedaheh, it's from here: https://github.com/somnium/congomongo/blob/master/src/somnium/congomongo.clj
17:02fliebelTimMc: I'm reading it :)
17:06fliebelTimMc: So this is computer science? What year? What university?
17:11fliebelTimMc: Wait, they allow you to write Clojure?
17:13amalloyfliebel: since TimMc appears to be afk: he gets to pick a language. i don't know TimMc personally but a friend of mine who goes to his school thought TimMc had graduated already so he's probably ~senior
17:13TimMcjust came back
17:13TimMcamalloy: Correct.
17:13TimMcfliebel: Northeastern University. The prof said we can pick our implementation language.
17:14TimMcI'm using it for two different classes this year.
17:14brehautTimMc, and you didnt choose befunge?!
17:14TimMcI wanted to complete the assignment!
17:14brehauthah
17:15TimMcThe other prof has expressly forbidden LOLCODE, incidentally.
17:15fliebelTimMc: But… You have already graduated? So… huh? I mean, I would understand if you did this stuff forfun… and I admit I don;t understand this bechlor master system all to well.
17:15TimMcNo, senior.
17:15brehautTimMc: i wonder if this is from the same department as the aftermarket stickers on the coffee grinders at my uni that said 'do not put your hand in the grinder!'
17:16fliebel*google senior*
17:16amalloyfliebel: highest undergraduate year
17:16fliebelah! ( http://en.wikipedia.org/wiki/Senior_(education) )
17:16TimMcfliebel: I've transferred schools several times, so I'm old for a senior.
17:17TimMcI'll be getting my bachelor's degree in May. A master's degree is an additional couple years of education focused on one subject.
17:18fliebelTimMc: Can you write compilers and stuff without doing the master stuff?
17:18TimMcyeah
17:19amalloyfliebel: compilers are roughly senior-level stuff
17:19TimMcamalloy: Metacircular evaluators, on the other hand, were taught to the honors freshmen. :-)
17:20brehautfliebel: my university had us write a simple computer and bytecode interpreter as a second year project as part of (not the whole of) one course
17:20TimMcfliebel: The course I'm taking has a bunch of sophomores and juniors in it.
17:20amalloyfliebel: it all depends on how complicated a language you want to deal with
17:20amalloya lisp compiler can be written with little effort; a java compiler, not so much
17:20TimMcBecause of transferring, I'm taking required courses in a semi-random order.
17:20fliebelamalloy: One that can compile itself :)
17:20brehautfliebel: a basic compiler for an imperative language can be done with 1 pass and a recursive decent parser
17:21brehautfliebel: original c fits that description btw
17:21amalloybrehaut: original?
17:21fliebelTimMc: That'd be my style, minus the required and the transfering.
17:22brehautamalloy: i dont know if c + standardisations and small extensions is still one pass
17:22fliebelWell, you know, once you have macroes, everything is just layers of macroes to assemly :)
17:22TimMcamalloy: I thought I was going to be done last year, so I told people I was a senior then. -.-
17:22hiredmanalso depends what your target is, generating asm vs. generating bytecode vs. some other language
17:23amalloybrehaut: i'm uncertain that a single "original" c exists. ansi and k&r both sorta fit the bill
17:23amalloyand something probably existed before that
17:23brehautamalloy: k+r then :P its pre-coffee time down here
17:23hiredmancompilers and interpreters are about bridging the grap between source and target, if there is little gap then the compiler is very simple
17:24amalloy(def lisp-compiler identity)
17:25brehautamalloy: that holds for any language
17:26fliebelbrehaut: nope, Python: SyntaxError: invalid syntax
17:26amalloywhich, that something existed first? of course, but i meant "something that was publicly available and used"
17:27brehautamalloy: i mean its obviously the identity function compile and anything from a compiled representation to that same representation
17:27amalloybrehaut: hm. no offense, but that's barely a sentence. go back to your coffee?
17:28brehautwow you are right
17:28brehautbbs
17:28fliebelIt's post bed-time here, so don;t expect anything useful out of me either.
17:38brehautfliebel: probably the simplest way you could get started writing a compiler is to write an interpreter first; you build up a tree of things (eg, expressions, different statements, functions etc) that know how to execute themselves (largely by executing their children). Once you have the that you tell the top level one (such as the main function) to execute it self
17:40hiredmanwhich you can do very simply using protocols or multimethods
17:47fliebelbrehaut(gone), hiredman: Thanks.
17:48fliebelWith explanations like this, I really wonder if I would find cs very easy, very hard, both or just interesting.
17:49brehautperhaps all of the above?
17:49hiredmanI have no idea how this stuff is taught in a cs curriculum
17:52amalloyhttp://www.cs.ucsb.edu/~chris/teaching/cs160/lectures.html is fairly complete-looking slides and project listings for a compilers class
17:52brehautfliebel: the value i got from a formal CS education is that i was made to learn about things i would have (for one reason or another) avoided if it was optional
17:53brehautfliebel: another obvious candidate is to get the lecture videos and and inline copy of SICP; theres big sections on program evaluation
17:54hiredmanthe emphasis on parsing is just a huge *bleh*
17:54opqdonutagreed
17:54opqdonutintermediate representations and optimizations are the interesting part
17:55opqdonutand it's easy to play with them, just take a parser generator and llvm
17:55brehauthiredman: i want to agree, but so many people seem to have CS degrees and think parsing is something that you need to be a rocket surgeon to do.
17:55hiredmanbrehaut: complete opposite
17:55brehauthiredman: exactly!
17:56hiredmanit is so boring and tedious
17:58hiredmanwhich is why lisp is perfect for teaching this stuff, the parser is dead simple
17:58brehaut(defmulti myparser first) ?
17:59hiredmanthe problem is the myth that since code is data lisp code "is the ast"
17:59opqdonutindeed
17:59fliebelhiredman: It's pretty close though, no?
18:00hiredmanit depends on the transforms you want to perform, and what kind of data you need to drive those
18:01fliebelbrehaut: re videos: I'd miss another major reason to do university: peers.
18:01hiredmanclojure's compiler is very simple, depends on hotspot for optimising
18:01hiredmanso clojure doesn't really have an ast step between the code and bytecode
18:02JohnShaftHi. Newbie question here. I am trying to install clojure within emacs. I have swank-clojure and slime installed. When I try to run slime it asks me if I want to download clojure and it complains that it cannot download the clojure jar files. Tried on Mac and PC same deal. Any help would be greatly appreciated
18:03hiredmanJohnShaft: generally you'll want to use the clojure from the project you are working on
18:03hiredmanand the way you start swank-clojure for a project depends on the build tool it uses
18:04fliebelWell, thanks for all the university/compiler discussion.
18:05hiredmanclojurebot: lein
18:05clojurebotlein is http://github.com/technomancy/leiningen
18:05hiredmanJohnShaft: ^-
18:06sdeobaldHey dudes. Is anyone awake who can speak to the present utility of ClojureScript?
18:06JohnShaftHiredman: Thanks. I think I am in a bit over my head. I am new to Emacs and Clojure so not really sure what a clojure project consist of ( or even how to make one ). I have been trying to follow some of the online tutorials which claim it is easy to install clojure via slime. But looks like maybe the repo the script is looking for is outdated?
18:07hiredmanJohnShaft: never do anything a blog post tells you
18:07hiredmanI have yet to see one that wasn't outdated
18:07hiredmane.g. they are all from over a year ago
18:07hiredmanJohnShaft: you may just downloaded swank clojure and run it yourself, then use slime-connect to connect to it
18:08phenom_anyone know of a pure clojure mongodb driver ?
18:08hiredmanwhatever you do I recommend against using the clojure installed by slime or whatever
18:08JohnShaftHiredman: Ok, thanks for the tips. Looks like I have some more reading up to do. I will also check out leiningen
18:09lancepantzJohnShaft: do you have ruby installed?
18:09JohnShaftlancepantz: No I do not
18:09lancepantzk, nevermind then
18:09dakronesdeobald: are you just trying to convert clojure to javascript, or trying to use ClojureScript in particular?
18:10sdeobalddakrone: the first one, if it's at all suitable to the task.
18:10sdeobald...which I can't really glean from github.
18:11dakronesdeobald: I would recommend checking out https://github.com/zkim/cljs
18:12dakrone(check out the demo, it's pretty neat)
18:12sdeobalddakrone, thanks. Have you ever used this in a production app?
18:13dakronesdeobald: no, but the author is a friend of mine, he's very responsive if you have feature requests or bug reports
18:13raekJohnShaft: the swank-clojure readme contains most of what you need to know https://github.com/technomancy/swank-clojure
18:13sdeobalddakrone: Cool. Is he doing work with it? Or is it just a toy project for now?
18:14dakronesdeobald: he does work with it
18:14sdeobaldBadass.
18:15technomancyswank's been 1.3.0-SNAPSHOT for ages... should probably cut a stable
18:18lancepantztechnomancy: +1
18:33raekhrm. I recall having problems with exceptions and that version, but now I am unable to reproduce it
18:33raek(inc technomancy)
18:34technomancyraek: there were some rough spots with a 1.3 fix breaking 1.2-compat and vice versa
18:59foxupahi, I've noticed that the clojure function contains? doesn't work with lists
18:59foxupawhich is confusing as I thought a list was a collection
18:59technomancyclojurebot: contains?
18:59clojurebotcontains? is for checking whether a collection has a value for a given key. If you want to find out whether a value exists in a Collection (in linear time!), use the java method .contains
18:59technomancyfoxupa: probably the #1 faq about clojure
19:00technomancyit's unnecessarily confusing =(
19:01foxupawell it makes sense that a map is like a function taking keys to values, and a set is a function testing membership, but how does "vector" fit in that explaination?
19:01technomancyvectors are functions of their indices
19:02technomancy,(contains? [:a :b :c] 2)
19:02clojurebottrue
19:02foxupaok... i guess it makes sense now, though I have to say the following is a very easy way for a clojure programmer to slip up:
19:02foxupa(contains? [4 5 6] 2) = true
19:03foxupai guess it just seems very counterintuitive to have labeled it contains? rather than contains-key?
19:03technomancyyes, contains? should have been called contains-key?.
19:03foxupaexactly, lol
19:03hiredmanwhy wouldn't a clojure programmer know what contains? from core.clj does?
19:03pdk,(type 9.0)
19:03clojurebotjava.lang.Double
19:03hiredmanmost likely it would be a way for a non-clojure programmer to slip up
19:03technomancyfoxupa: everyone makes mistakes, even language designers.
19:04foxupayeah, is there a webpage listing any of these other common points of confusion?
19:04technomancywell 90% of the other top questions are about slime
19:04technomancyso I guess the swank-clojure readme? =)
19:05Lulu58e2lol
19:05technomancyprobably the other most common misunderstanding is about transients; you can read about that here: http://technomancy.us/132
19:05foxupayeah I never figured out how to get slime + clojure to work together, so I just use CCW w/ eclipse and use the Emacs keybindings plugin for eclipse
19:06technomancy(or just ignore transients since you don't need them.)
19:08Lulu58e2Very alliterative
19:24TimMctechnomancy: Oh hey, I never knew about the "performance characteristics" aspect of persistent data structures.
19:28TimMctechnomancy: And Wikipedia still hasn't.
19:29technomancyI'm not entirely sure Rich didn't make it up.
19:30technomancybut it seems a bit disingenuous to have persistent data structures whose perf degrades over time.
19:37amalloytechnomancy: degrades over time? is there a link i'm missing?
19:37amalloyoh, the thing about transients above. sorry, didn't connect the dots
19:38hiredmanpossibly not in the context of persistent datastructures, but they could have been presented as "mutable datastructures that allow you to access old versions"
19:39hiredmanthen the disingenuous bit is a feature
19:39amalloyhah
19:41foxupadoes anyone have any recommendations for a clojure program or library that can render directed graphs?
19:42brehautfoxupa: have a look for loom
19:43brehautfoxupa: https://github.com/jkk/loom
20:57foxupahi all, I was wondering if there is some way to get clojure.contrib.shell-out's sh function to spin off a new process
20:57foxupaI tired passing in "&" as my last argument but that didn't work
21:01amalloyfoxupa: clojure.java.shell
21:01amalloyi mean, i think it does start a new process but may immediately join() it
21:02foxupa(clojure.java.shell/sh "gedit" "&") just starts up a gedit session for a file called &
21:03foxupait says it starts a new sub-process
21:03amalloyfoxupa: & is part of bash's syntax
21:03foxupaah
21:03amalloyc.j.sh just does an exec of the first arg and passes the rest
21:03foxupais there some standard way to do it invariant of the specific shell syntax?
21:03amalloyyou can do "bash" "-c" "gedit" "&" or similar
21:04amalloyi have an example of this somewhere in sexpbot, one sec while i find it
21:05amalloyhttps://github.com/cognitivedissonance/sexpbot/blob/master/src/sexpbot/plugins/utils.clj#L195
21:07devnI think my eyes are going
21:07devnI need like 14-16pt font to feel comfortable anymore
21:07__name__Do you have glasses?
21:07devnyes
21:08devnI'm far-sighted
21:08__name__Could it be that they do not correct your vision anymore?
21:08devnNah, just had a checkup
21:08devnI just feel like I don't have the same ability to grep the screen that I used to
21:09amalloydevn: you are probably still better off than i. uncorrectable vision problems lead me to use 1280x960 on my 27"
21:10devnim 20/200 uncorrected
21:10devnlazy eye
21:10amalloyand corrected?
21:10devn20/80 i believe
21:10devnthat's an old number so not sure how accurate it is
21:10amalloyfair enough. that's close to me, last i checked (also long ago)
21:11devnamalloy: *shrug* i wouldn't complain about my vision
21:11devnlazy eyes are kind of cool -- lots of famous artists with them, jean-paul sartre, etc. :)
21:22devnamalloy: do you ever pair with anyone?
21:25amalloydevn: there aren't a lot of people nearby who like to pair. one coworker does though, and we use my computer
21:28TimMcWe were forced to pair-program in Fundies class. :-)
21:29TimMcAt least one prof was pretty good about matching people up by skill level so that the pairs were balanced, which is pretty important.
21:35amalloysrsly
21:40TimMcIt was much less fun being paired randomly -- for both people. :-(
21:44no_mindI am looking for some use cases on clojure protocols. I cant figure out under what conditions I should go for a protocol/defrecord instead of a map ?
21:50phenom_so who's used yourkit's profiler before ?
21:52phenom_no_mind: you want a protocol went you went to define a set of methods that logically should be grouped together, ideally to work over an abstract data strcture or logical application/domain model
21:52phenom_*when you want
21:52devnamalloy: if you want to pair id like to find some people to remote with
21:52devni dont have anyone in my area to code with and i think pairing is the best way to learn more no matter your skill level
21:53devnosmosis is awfully effective
21:56devnamalloy: PM me if that's something you'd be interested in -- i need to take off now but if you feel like getting together on the internet to hack on something fun im interested
21:56devnciao
22:10amalloyno_mind: or when you would like to use multimethods but performance is a huge issue
22:10TimMctechnomancy: Have you used your collaborative editing Emacs plugin for pair programming?
22:33TimMc,whoami
22:33clojurebotjava.lang.Exception: Unable to resolve symbol: whoami in this context
22:33TimMcand ##(whichisthis)
22:33sexpbotjava.lang.Exception: Unable to resolve symbol: whichisthis in this context
22:33TimMcOK, got it.
22:33amalloy&alsothis
22:33sexpbotjava.lang.Exception: Unable to resolve symbol: alsothis in this context
22:34TimMc,(#(% %) #(% %)) ##(#(% %) #(% %)) It's a proper botrace this time!
22:34sexpbotjava.lang.StackOverflowError
22:34clojurebotjava.lang.StackOverflowError
22:34TimMcOh man, too close to call.
22:34amalloyhar har
22:37scottjif you have (def a '(1 2 3)) and then run (def a (take 2 a)) does the 3 part get GCed or is it held bc take is lazy? if I'd done(def a (doall (take 2 a))) would it have been gced?
22:39amalloyscottj: i don't think it can get GCed
22:39amalloyi think doall would make it happen
22:42scottjok, I'm wondering if there's a better way to do a collection that doesn't grow beyond a certain size than using vectors since i don't need random access. currently with vectors I have this http://paste.lisp.org/display/120786 but there must be a simpler way
22:46amalloyscottj: i'm not clear on the point. it couldn't be lazy anyway
22:47amalloyso you might as well just make it either a vector or a list
22:48amalloyapply subvec and/or take as needed
22:49amalloybut if you wanted to "do it up right" you could do a lot worse than steal from ken wesson's Bag deftype on the mailing list
22:50scottjwhat's a bag?
22:50amalloyunordered list, or a set with duplicates, depending how you think of it
22:51scottjsomething would have to be added right to track how old the items are so you could remove the oldest item in the bag when something new is added right?
22:52amalloyuhh, only if you wanted LRU behavior
22:52amalloybut my point wasn't that you should use Bag
22:52amalloyuse his code as an example to define your own typew
22:52clojurebotcode-review is <rhickey> yikes
22:55no_mindI have a requirement where user can define a record type/entity (not necessarily clojure defrecord) and add attributes to the record. Then the system should autogenerate the CRUD forms for the record. What will be the most suitable data type to represent a record type/entity ?
23:00amalloyno_mind: something wrong with a hash-map?
23:03technomancyTimMc: we've found it to be less hassle to pair over SSH with tmux
23:03technomancyno_mind: stick with regular maps as long as you can; they're least-hassle
23:12no_mindamalloy, nothing wrong or right here, just wanted to have oinion of more experienced clojure devs
23:52technomancyleiningen 1.5.0: http://j.mp/lein-news