#clojure logs

2012-03-05

00:01tmcivertylergillies: one thing I notice about your paste: you check for (count node) to be three which implies that once you get to the nth call, you don't need the 'not-found' part anymore. This implies that you no longer need to check for (= node false).
00:02tmcivertylergillies: also, you can shorten it up a bit by using (nil? ...) instead of (= node nil) and (false? ...) instead of (= node false). Doesn't matter that much though.
00:06m0smithIt looks like it is checking for a binary tree with each node being nil or a pair [a b], correct?
00:07tmcivereach node is a nil or a triple (value, left-child, right-child)
00:07tmciverhttp://www.4clojure.com/problem/95
00:09tylergilliestmciver: thanks for the input! :)
00:10amalloyin fairness, argument orders for clojure are very logical and orderly. except nth, which is horrible
00:12tmciveramalloy: nth's args are inline with get, is it not?
00:13amalloyyes. but nth is a sequence operator, and get is a collection operator
00:13amalloyall the other sequence operators (drop, map, filter) take the sequence last
00:14ideally_worldwhat's the best way to get doc to work via clojure-jack-in?
00:14ideally_worldI thought I could just use clojure.repl/doc, but that's not doing it for me :(
00:14tmciverideally_world: (use 'clojure.repl)
00:14amalloythe parallel with get hadn't occurred to me, though. neat
00:14technomancyideally_world: doc is lame compared to C-c C-d d
00:15amalloyi dunno. i usually prefer doc
00:15ideally_worldah, yeah, thanks
00:15tmcivertechnomancy: we all think you should (use 'clojure.repl) in clojure-jack-in. :)
00:15ideally_worldtechnomancy, nice! :)
00:15ideally_worldand thanks
00:16technomancytmciver: there's no way to make it work well
00:16technomancyyou can refer it into the user namespace, but that's 90%-useless
00:16tmciverYeah, I remember you told me that before. I don't know the technical reasons so I take your word for it.
00:17amalloytechnomancy: what about injecting it into clojure.core?
00:17technomancy~guards
00:17clojurebotSEIZE HIM!
00:17amalloyyeah yeah
00:17ideally_worldcan C-c C-d d be used in a .clj buffer?
00:17technomancyamalloy: srsly though, use clj-nstools for that
00:18tmcivertechnomancy: why is it 90% useless? It always WORKSFORME.
00:18technomancytmciver: maybe you spend more than 10% of your time in the user namespace?
00:19technomancytmciver: there's no way to bring it into all namespaces like it used to be
00:19technomancywithout amalloy's evil suggestion (or using clj-nstools)
00:19technomancyso bringing it into the user namespace would just trick people into thinking it works like it did before; the confusion would merely be delayed
00:20tmciverYeah, I do spend most of my time in user. But couldn't you just 'use' it in whatever ns you were in?
00:21tmciverDoes the trouble come for people who switch namespaces a lot?
00:21technomancytmciver: I guess it could be done as a hook on C-c M-p, but then it wouldn't work when using in-ns, etc
00:21technomancyI'd rather have it predictably not work than work intermittently
00:21xeqitylergillies: https://refheap.com/paste/929 - how I would refactor it
00:22technomancytmciver: yeah I don't think keeping the repl in the user namespace is very common
00:24tmcivertechnomancy: Hmm, I should change my ways. I typically 'use my code from user. I should probably be taking more advantage of slime.
00:25technomancyI'm a fan of C-c M-p
00:26tmcivertechnomancy: Ah, another slime command I must learn.
00:26tmcivertechnomancy: Are you in the Boston area this week? There's a Clojure meetup.
00:27tylergilliesxeqi: i don't understand the 'step' stuff
00:27tylergilliesooooh
00:27tylergilliesyou're showing me step by step how you got to yours
00:27tylergilliesthanks
00:27xeqiyeah
00:28technomancytmciver: no, I won't be in town
00:28ideally_worldWhat's the best way to explore Java API's from Clojure? I'm looking at an interface, and I'd much rather do it all from the REPL? :(
00:28tylergilliesbookmarking that
00:28tylergilliessome good things to be mindful of
00:28technomancyideally_world: C-c S-i to explore an interface
00:28technomancyor class or wahtever
00:29ideally_worldS?
00:29ideally_worldshfit? :)
00:30ideally_worldnice
00:30ideally_worldI should start writing these down
00:31technomancythere's also the swank-clojure readme; it covers most of them
00:31ideally_worldor bertter yet, where's the cheat sheet with these gems?
00:31ideally_worldthanks
00:33ideally_worldoh, will definitely be usting C-c M-p a bit :)
00:34ideally_worldI really need that tatooed on my inner eyelids
00:35m0smithxeqi: my solution is at https://gist.github.com/1976882
00:37m0smithxeqi: pretty close to yours but with destructuring and simplified the conditions
00:42ideally_worldOh, I've been looking for C-M-x!
00:43ideally_worldThanks technomancy, you've made my development that much simpler
00:47choffsteinHey all. Anyone have any idea why I might just be getting an "; Evaluation aborted." when running a command via swank in emacs? It's never happened to me before, and it seems to be coming from someone else's library, and without an exception or a stack-trace, I don't really know how to get to the bottom of it...
00:58ideally_worldnot sure how many times EXIT_ON_CLOSE has bitten me :/
03:12antares_if I have a lazy seq, what's the most idiomatic way to take next value from it (like Java's Iterator#next)?
03:16raekantares_: Iterator#next actually does two things: first, it fetches a value, second, it advances its state through mutation
03:16antares_raek: right, this is what I want in my case
03:16raekthe fetch value part corresponds to 'first'
03:16antares_raek: I cannot use take or take-while and similar things because I don't know how many I need upfront
03:16raekthe advance part corresonds to 'rest'
03:17antares_raek: yes but first does not advance
03:17raekyes, lazy-seqs are immutable
03:17antares_raek: rest produces an infinite sequence
03:17ibdknoxso take the first of it
03:17antares_I basically need take 1 that advanced the "pointer"
03:18raekantares_: the pointer you need to advance is the local variable you hold the seq in
03:18antares_hm, yeah, immutability is a good point
03:19raek(loop [coll ...] (if (some-predicate? (first coll)) (recur (rest coll)) ...))
03:19ibdknoxwhat're you trying to do?
03:19antares_raek: that's exactly what I cannot do
03:19raekin soviet russia, data structures mutate YOU
03:19antares_ibdknox: imagine I have an infinite sequence of dates
03:20antares_ibdknox: and every once in a while (for example, during fixture data generation) I need to take "next value" from it and advance it
03:20ibdknoxevery once in a while?
03:21antares_ibdknox: it does not happen N at a time and does not stop after specific condition
03:21raekantares_: on way could be to explicitly pass the sequence of "free dates" do whatever funtion that needs them (and let them return a sequence of the dates they didn't use)
03:21raekor you could simply use stateful constructs, such as atoms
03:21ibdknoxfrom different threads?
03:21ibdknoxit sounds like you just want an atom
03:22ibdknoxwith a little getter function that does what you describe
03:22ibdknoxcalls first and swaps it with the rest of itself
03:22antares_ibdknox: yes, I was thinking that maybe atom is closer than lazy seq to what I need. Thanks.
03:22raekin Haskell I guess you would use the state monad to pass the seq "behind the scene"
03:22ibdknoxyou want both actually
03:23raekantares_: the lazy-seq will determine the logical succession of values and the atom will be responsible for holding the state
03:26antares_raek: yeah, ibdknox just suggested something like that. Thanks for the suggestion, I will try this now!
04:13harblcathi all. I'm wondering how to do something, and a quick perusal of the clojure docs isn't directing me anywhere...
04:14harblcatI've got something like the following: (def foo (ref {:a 100 :b []})) and am wondering how I would add items to the vector underneath b?
04:15lucianharblcat: could use something like http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/alter
04:17harblcatI already understand how to alter the value under a: (alter _ conj {:a (inc (:a _))}) where _ is the ref...
04:18lucianthen pass in a different function, that does assoc on :a
04:18luciani think you could even just pass assoc
04:18harblcatI'll have to look into that, thanks :)
04:21harblcatlooks like update-in is the thing I need: (update-in @_ [:b] conj 'foo)
04:26amalloy(alter the-atom update-in [:b] conj 4), though i guess i'm too late
09:40tutysaraI am trying to setup emacs + slime on a windows machine. I had installed lein+swank, I could do lein swank from cygwin and connect from emcas24 started from cygwin using M-x slime-connect, but clojure-jack-in is not woking
09:41tutysarastart-process-shell-command: Spawning child process: invalid argument is the error message
09:42technomancychoffstein: usually that means there was a problem showing the stack trace
09:43choffsteintechnomancy: Wow, talk about a delayed answer :) Thanks! I ended up figuring it out. Late night programming lead to a "defn" instead of a "def". I just thought it was odd that the stack-trace didn't show up.
09:45RickInGAtutysara did you install clojure mode?
09:50gf3jonasen: are you the kibit Jonas?
09:50jonasengf3: yes
09:51gf3jonasen: just wanted to say: awesome project
09:51jonasengf3: Thanks!
10:16stuartsierra~archive
10:16clojurebotPardon?
10:16stuartsierra~logs
10:16clojurebotlogs is http://clojure-log.n01se.net/
10:19gtuckerkelloggwhat the hell am i doing wrong in updating lein to 2.0
10:19gtuckerkelloggi run lein self-install, and it seems to be fine
10:19gtuckerkelloggthen i run lein version, and I get "Exception in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:
10:19dakronelein 2.0 is not released yet
10:21gtuckerkelloggd'oh!
10:21gtuckerkelloggreally? I keep noticing packages that are already expecting it, and have a "if you are still using < 2.0 then do this"
10:23babilengtuckerkellogg: http://groups.google.com/group/leiningen/browse_thread/thread/4c7157ea4d7f14f0 (On which OS did you install leiningen and how did you install it? - Please paste relevant commands+output)
10:24gtuckerkelloggthis is macosx 2.7, tried with lein self-install; lein version
10:24gtuckerkelloggDownloading Leiningen now...
10:24gtuckerkellogg % Total % Received % Xferd Average Speed Time Time Time Current
10:24gtuckerkellogg Dload Upload Total Spent Left Speed
10:24gtuckerkellogg100 9837k 100 9837k 0 0 358k 0 0:00:27 0:00:27 --:--:-- 345k
10:24gtuckerkelloggException in thread "main" java.io.FileNotFoundException: Could not locate leiningen/core/main__init.class or leiningen/core/main.clj on classpath:
10:24gtuckerkelloggshould have put that in pastebin, sorry 'bout that
10:27RickInGAtutysra: you still having issues with getting set up on windows?
10:28tutysraRickInGA : Unfortunately yes, I got slime-connect + lein swank working
10:28RickInGAsee if this post helps, http://onbeyondlambda.blogspot.com/2012/01/setting-up-clojure-emacs-on-windows.html
10:28tutysraRickInGA : having issues with clojure-jack-in
10:33tutysraRickInGA : thx Rick for putting that up, it is pretty much detailed and covers almost everything. I have a slightly different setup, I use cygwin and have installed lein inside cygwin. I have the normal windows emacs but start it from inside cygwin (also have .emacs.d inside cygwin)
10:34RickInGAhave you installed the clojure-mode in your .emacs.d?
10:35tutysrayup, installed clojure-mode and it syntax highlights clj files, I also get auto-completion when I type clojure-jack-in
10:35RickInGAwell, you have gone beyond anything I can help with, sorry
10:36RickInGAI just don't know how cygwin changes things
10:38tutysraI could do slime-connect to connect to swank, only clojure-jack-in says failed to create sub-process, I guess it has to be something with cygwin's path
10:46dgrnbrgIf I have a clojure application that needs to scan directories and store a persistent DB of the info it gleaned about the files, what's the easiest backing store to use? I am thinking sqlite or redis, but I don't know if there's another better option. I also need a python program to either read from the DB or send its queries to the clojure program to get data from the db
10:47TimMcdgrnbrg: SQLite is dead easy.
10:47raeksqlite is quite easy to use with clojure.java.jdbc (but I haven't used redis myself)
10:47dgrnbrgand it has to run on NFS...
10:48dgrnbrgI forgot about that quirk...
10:48raeksqlite just uses a file
10:48dgrnbrgIs there an standardized chat format between python and clj?
10:49TimMcJSON is fine, I'm sure.
10:49dgrnbrgI suppose I could just send clj code as text from python to the clj indexing service
10:50dgrnbrg(i'm working on an improvement to vimclojure/nailgun's completion/discovery tools)
10:54stuartsierrasomebody wrote a Clojure Reader in Python
11:02dan_b" Jark is a tool to run clojure code on the JVM, interactively and remotely. It has 2 components – a client written in OCaml and a server written in Clojure/Java. The client is compiled to native code and is extremely tiny (~300KB)
11:02dan_bwhen did 300k become "tiny"?
11:03wilkes2003
11:04luciani'd say it's of reasonable size for what it does
11:05luciannow replace it with ClojureScript + node ! :)
11:05dan_bhah
11:05luciani'd really like another backend for clojure
11:05lucianeither python or C-ish
11:06dan_bllvm or something?
11:06luciani guess that might work
11:06dan_bor do you actually want idiomatic C output?
11:06TimMclucian: DId you see the Python impl?
11:06luciannot really
11:06lucianTimMc: it's an interpreter, and very primitive
11:06lucianTimMc: but I have considered contributing to the PyPy one
11:07lucianin fact, if there was a way to call python code from it, it'd be the perfect solutioj
11:07lucianalso, clojure on android still sucks
11:07dan_bmy sense of aesthetics rebels against the jvm as a backend, but half of everything I've written in my ~ 2 days of clojure so far has turned out to be bindings for java libs. so perhaps I should get over myself ;-)
11:07jkdufairtutysra, i submitted a patch for this prob
11:08jkdufairlatest version of swank-clojure should have this fix
11:08pipelinedan_b: go replicate that work with CMUCL and FFI, see if you can work it out in two days ;)
11:08luciandan_b: of course you should :)
11:09lucianclojure being on the jvm is very useful, but being *primarily* on the jvm, not so much
11:09luciani'd love to see CinC further along, and several backends with similar maturity. perhaps it's a dream
11:09TimMcWhat's the CLR project up to these days?
11:27Iceland_jackHey #clojure, quick question
11:27Iceland_jackThe function http://clojuredocs.org/clojure_contrib/clojure.contrib.seq/separate is basically implemented as:
11:27Iceland_jack> [(filter f s) (filter (complement f) s)]
11:28TimMc(def separate (juxt filter remove))
11:28Iceland_jackI'm an old Common Lisper and a relatively new Clojurer-er... but isn't that pretty wasteful?
11:29luciana little, maybe
11:29dgrnbrgHas anyone got lein to work through a https proxy? It seems to ignore my http_proxy environment vars, and it isn't working well w/ .m2/settings.xml's proxy setitng
11:29Iceland_jackMaybe there is a reason for this, legibility perhaps
11:29dgrnbrgIceland_jack: why would it be wasteful? filter is lazy, so it's just making a 2 element vector
11:29TimMcIceland_jack: I'm wondering if it allows for more laziness. Haven't convinced myself either way.
11:30Iceland_jackdgrnbrg: for a resource-intensive `f' it would do double the amount of work
11:30dgrnbrgI see what you mean
11:30TimMcPresumably a user of separate is going to consume some amount of both seqs.
11:30lucianTimMc: it'd have to be much longer to be as lazy, i guess
11:30Iceland_jackInstead of running `f' once and consing it to an appropriate list
11:31lucianIceland_jack: feel free to write your own with :)
11:32TimMcI'm having some trouble figuring out how I would write my own that only calls f once per element...
11:32lucianuh, with an explicit iteration
11:32dgrnbrg You could use an atom to store the "other side" results
11:32dgrnbrgor 2 atoms, and then check the atom before consuming from the next seq
11:32TimMc(map (juxt f identity) s) and then return lazy views on filter and remove of that
11:32Iceland_jacklucian: I might :) but I know that Python has at times taken a stance on maintaining their code base, often disregarding speed
11:33lucianIceland_jack: it's a logical choice
11:33Iceland_jackso I thought it might be something similar
11:33Iceland_jacknot that the alternative would be that more complicated
11:34lucianIceland_jack: would the alternatives have the same laziness and concurrency properties?
11:34Iceland_jackI see no reason why not
11:35calebphillipsIt could be implemented in one pass, with reduce, right?
11:35Iceland_jackcalebphillips: hey now, this isn't Haskell ;)
11:36lucianTimMc suggested the solution
11:39Iceland_jackHaskell's `partition' is defined similarily I see
11:40Iceland_jackbut Haskell's compiler is free to optimize that
11:43TimMccalebphillips: I'm not sure it could.
11:44TimMcThe result needs to be a vector (well, coll) of lazy seqs, and reduce would keep producing a new vector on each iteration.
11:44sdeobald_Is anyone else getting "Duplicate key: clojars" when attempting plugin installs on brand new lein installs lately?
11:45neotykdatomic anyone?
11:45calebphillipsTimMc: I looked back at your solution after I said that, and I imagine it would still be better even if the reduce was possible.
11:46TimMcneotyk: Any new info on what it is supposed to be?
11:46jkkramerhttp://datomic.com/
11:46TimMcoh hey
11:46neotykTimMc: just checking it out
11:46scriptorI hate to say this, but there is a lot of marketing talk on their website
11:46neotyksorta db
11:47neotykqueries look like datalog :)
11:48scriptorso I guess by "moves ... into applications" they mean it's embeddable?
11:48neotykoh wait it is datalog ...
11:48Iceland_jackI was wrong: Haskell's version actually maintains two lists and conses the value to the appropriate one
11:49TimMcIceland_jack: Is there a clojure equivalent to how it maintains "state", or does it use some built-in for multiple-list generation?
11:50Iceland_jackIt reduces a seperate function over the list
11:51Iceland_jackthat function takes a predicate, a value to be tested and a tuple of two lists
11:52TimMc"Datomic is made available free of charge for applications that are open source."
11:52Iceland_jackIn pseudocode: if (p x) then (x : true, false), else (true, x : false)
11:52gf3hey guys
11:52TimMcIceland_jack: I'll have to think on that.
11:52gf3how do I truncate a sequence and still preserve the sequence type?
11:53tmciverThis hype about this Datomic thing is the result of a mysterious tweet by Rich Hickey, yes?
11:53gf3do I have to (into) it back into the original type?
11:53TimMctmciver: yeo
11:53TimMc*yep
11:53Iceland_jackIt's a fairly common idiom in Scheme/CL where you maintain an ‘aggregate’ function within the lexical scope of the main function
11:54Iceland_jackThe auxilliary function in Haskell:
11:54Iceland_jack> select even 4 ([2], [1,3])
11:54Iceland_jack([4,2],[1,3])
11:55Iceland_jackThen they reduce `select' partially applied to the predicate over a tuple with two empty lists ([], []) and the list
11:57Iceland_jackI didn't mean any offence, I was just curious; [(filter f s), (filter (complement f) s)] is perfectly readable
11:57TimMcIceland_jack: other than the fact that fitler complement is remove. :-P
11:57TimMcso that's a bit silly
11:57Iceland_jackI know, I suppose the author has their reasons
11:58Iceland_jack‘silly’ is probably an overstatement
11:59gf3I'm sure this is common, non?
11:59TimMcgf3: empty
12:00TimMcgf3: Although you probably mean "collection", not "sequence".
12:01gf3right
12:01TimMc&(empty [1 2 3])
12:01lazybot⇒ []
12:01gf3TimMc: so something like (into (empty x) (take n x))
12:02TimMcOh, you want to just get a portion of the original, I see. Not "truncate" in the SQL sense.
12:02scriptor,(empty (cycle [1 2]))
12:02clojurebot()
12:03gf3TimMc: right, would that be idiomatic?
12:04gf3&(let [x [1 2 3 4 5]] (into (empty x) (take 3 x))))
12:04lazybot⇒ [1 2 3]
12:04TimMcIf you don't know anything about the type, I guess that has to do.
12:04gf3TimMc: sadly, I do not, I am accepting user input
12:05TimMcHmm, looks like I was partially right about datomic -- a DB system that uses persistent data structures.
12:06gf3TimMc: that sounds cool
12:06TimMcbut it looks like the main point is actually the movement of querying from the server into the client
12:07scriptorso the data is combined with the client so that the client can query itself?
12:07TimMcI haven't finished skimming the whitepaper.
12:08TimMcThe most important question I have so far is: How does one pronounce "datom"?
12:08TimMc"Datomic calls such atomic facts 'datoms'.
12:09TimMc"
12:10Fossilike atom, just with a d in front?
12:10Fossiah, might be dee-atomic
12:10scriptoryea, same with atomic
12:11redingerlong a
12:11TimMcday-tahm-ick
12:11TimMcday'-tum?
12:11redingerTimMc: Yes :)
12:11tmciverday-TimMc
12:12TimMc"My name is Rich Hickey, and I pronounce Datomic as 'Datomic'."
12:12TimMctmciver: I like it.
12:12scriptorpfft, I'm going to stick with dah-tom
12:13RickInGAdid some news come out about datomic? does anyone have a link?
12:13TimMc"In today's installment of Pronouncing Clever Tech Names 102, we'll cover Datomic, Linux, and PostgresQL."
12:13scriptorRickInGA: http://datomic.com/product/overview
12:13RickInGAthanks
12:14scriptordon't forget erlang and scala
12:14scriptorI still hold that erlang should be pronounced erlung
12:14scriptorsounds more elegant
12:16TimMcibdknox: I find myself a little troubled by the binary search example in the Inventing on Principle talk. It's programming-by-experimentation, which entirely leaves out loop invariants and preconditions and suchlike. Made me twitchy.
12:18dnolenHmm I wonder if there's any connection between Joseph M. Hellerstein's work and the ideas behind Datomic
12:19TimMcibdknox: I still love the overall point of his talk, as well as his specific crusade, but I think "playing computer" will always be an important skill in programming, no matter what fantastic tools we have.
12:20Iceland_jackTimMc: sorry, what talk?
12:21TimMcIceland_jack: http://vimeo.com/36579366 -- ibdknox implemented the live-edit side-scroller in CLJS
12:22TimMc(at least the important bits)
12:22Iceland_jackI had actually seen this one :) cheers, great work
12:27the-kennyWhat should I specify for "Project (Website)" in the Contributor Agreement? Github?
12:29redingerthe-kenny: If you don't already have a project, just leave it blank
12:30the-kennyredinger: The "Contributing to Clojure" page says I should specify my Github username. Where?
12:33TimMcthe-kenny: On mine I just wrote "Github: timmc" in one of the blanks
12:33redingerthe-kenny: Yeah, just specify it in the username box
12:34the-kennyOk, thanks :)
12:38Iceland_jackAnother quick question, why do operations on strings in Clojure return lists?
12:38Iceland_jack,(remove (partial = \a) "banana")
12:38clojurebot(\b \n \n)
12:38Iceland_jackwhile
12:38Iceland_jack> (remove #\a "banana")
12:38Iceland_jack"bnn"
12:38Iceland_jackin Common Lisp
12:44dan_baccording to the cheat sheet, remove operates on a seq (i.e. lazy) and returns a seq
12:44dan_bI guess that "seq of string" is not a clojure concept: a seq is just a seq
12:45Iceland_jack(excuse lack of Clojure knowledge) :)
12:45TimMcIceland_jack: 'remove calls 'seq on its argument, then does stuff with it
12:45dnolenIceland_jack: because those are sequence operations, the string gets converted into a sequence first. if you want to work with strings directly (and more efficiently) look at clojure.string
12:46Iceland_jackI'm not worrying about efficiency :) Haskell also manages to operate on lists (strings are lists in Haskell) but to return lists of the same type back
12:46Iceland_jackSo I'm just wondering why remove couldn't detect that it's argument was a string or something similar
12:47TimMcIt could, but then it wouldn't be a simple seq-filtering fn.
12:47Iceland_jackhm I suppose
12:47Iceland_jacknot that I mind (apply str …)
12:47technomancyhaskell controls the string type
12:47TimMcthere's that
12:47technomancyand Clojure strings are Java strings because otherwise interop would be hell
12:49Iceland_jackhm of course there's the interop, I suppose I'm just thinking out loud
12:50dan_bdoes clojure have builtin support for optional args, or is the (fn [& [arg]] ...) destructure-the-rest-arg idiomatic?
12:50dan_bor option (c) something else entirely
12:50technomancydan_b: if you need arity checking you can use multiple arglists
12:50pfedorowhi guys, how do i add a new line in the repl with paredit mode on?
12:50Iceland_jacktake 4 "banana" ⇒ "bana" is just a bit more intuitive than (apply str (take 4 "banana"))
12:50Iceland_jackthanks for the answers though :)
12:51dan_btechnomancy: er, duh, yes. why didn;t I think of that? thanks
12:52nizzeHello!
12:52technomancyIceland_jack: in general consistency is valued over intuitiveness in Clojure
12:52technomancybecause consistency is absolute and intuitiveness is relative
12:53TimMchrm
12:53Iceland_jackI suppose, but I don't view the two as mutually exclusive in this case
12:53TimMcslightly dubious
12:53nizzeI'm studying Clojure and I find loop/recur somehow ugly. It seems like it's a hack on top of the whole thing, it seems that is does not belong there. Have I misunderstood something?
12:53dnolenIceland_jack: no question. But Haskell has it's own strings.
12:54technomancynizze: if you find yourself actually using loop/recur it's usually a sign that you're missing a built-in function that would do a better job
12:55nizzetechnomancy: that's what I've been guessing. So it's not usual in real world clojure code?
12:55technomancynizze: it's basically only used for I/O
12:55ibdknoxTimMc, I agree to some extent
12:55ibdknoxThe example he gives is pretty contrived
12:55nizzetechnomancy: Okay.
12:55ibdknoxTimMc, the hard part of programming in most fields isn't algorithmic
12:56TimMcThere's that too. :-)
12:56ibdknoxone of the best parts of my time at MSFT was the end to end user study I did of VS
12:56ibdknoxI spent hundreds of hours behind a one way mirror watching people solve problems
12:57ibdknoxknow what the greatest indicator of programming ability was?
12:57TimMcbeards
12:57technomancydvorak
12:57ibdknoxhaha if only ;)
12:57nizzeTimMc: lol!
12:57ibdknoxhow accurate of a mental model they could hold in their head
12:57duck1123Beards are usually a pretty good indicator
12:57ibdknoxnothing else seemed to really matter
12:58RickInGAi have heard that code indentation correlates with fewer bugs.
12:58Iceland_jackibdknox: How to you compare accuracy of mental models? :)
12:58ibdknoxIceland_jack, ask them questions
12:58RickInGAthat people who take the time to make the code look presentable also take the time to make it work right
12:58ibdknoxit's also pretty obvious once you watch them try to use the knowledge to solve programming issues
12:59Iceland_jackNot that I'm surprised by that result mind you
12:59RickInGAI read a couple of weeks ago of a study where people could predict accurately how people would do in computer science programs by the answers they gave them on a 5 question test.
12:59ibdknoxyeah, the notion of assignment
12:59raekibdknox: that's very interesting...
12:59Iceland_jackthe term was just a bit vague, have you got an example of some of the questions?
13:00RickInGAibdknox yeah, even if their answers were wrong, the people who answered consistantly did better than the people who were inconsistant
13:01ibdknoxthey were specific to the tasks they were given. They largely had to do with where bugs might be or how you'd change something
13:01ibdknoxto prove a point I put one of our best devs in the room to do the same set of things
13:02ibdknoxhe's probably one of the better developers in the world :) It was fun to watch him
13:02Iceland_jackCan you say what the test was for ibdknox? Also how the results could be applied to teaching CS (or in general)
13:03ibdknoxIt was a thing developed in combination with CMU designed to assess programming aptitude, don't remember what it's called though. It might've been internal only
13:03TimMcibdknox: I'd love to be around when we figure out the neurobiology of high-level thought, such as holding and manipulating a mental model of some algorithm. This is not stuff we really evolved for...
13:03dan_bso *that*'s why 'unless' was being indented weirdly
13:03ibdknoxyou weren't supposed to be able to finish it. Matt (our dev) finished it with 30 minutes left.
13:03Iceland_jackGo Matt!
13:04ibdknoxto put that into perspective, of the hundreds of people who have taken it, he's the only one to have finished
13:04ibdknoxand he actually did more than was asked haha
13:04ibdknoxTimMc, I agree, I've always been fascinated by psychology
13:05Iceland_jackAny idea how that could be applied to teaching?
13:05ibdknoxI have some ideas that I'd like to put into practice at some point
13:05Iceland_jackAsking students to describe the problem set/space of a task?
13:06TimMcMy guess is that the skill is based on holding complex *social* models in our heads.
13:06ibdknoxI think the primary one is that in order to teach people you have to steep them in things they don't understand and get them to learn how to intuit
13:06Iceland_jack> […] get them to learn how to intuit
13:06nizzeWhat is filter's counter operation, like reject
13:06Iceland_jackthat's very tricky
13:06Iceland_jacknizze: remove
13:06ibdknoxyes it is
13:06nizzeThanks.
13:06ibdknoxthe first step is tinkering
13:06ibdknoxthat's how you build models
13:07ibdknoxeventually you can do the tinkering in your head
13:07TimMcI think a certain amount of that approach depends on personality (?) types.
13:07ibdknoxTimMc, it does
13:07Iceland_jackGetting people to tinker/experiment by ‘instruction’ is close to impossible in my experience
13:07ibdknoxI've had moderate success
13:07Iceland_jackA bit like telling your kid “here, learn how to program; get interested!”
13:08ibdknoxhaha, well of course you have to want to learn
13:08ibdknoxthat is definitely true
13:08TimMcFor example, when I was in elementary school, I would read Science News magazine. I didn't understand most of it, but eventually I would read enough to load a fairly accurate model of a topic into my head, and things would start clicking into place.
13:08RickInGAdid you guys see the piece over the weekend, "How not to each programming"? it was on hn
13:08nizzeIs it "normal" to find this hard to read: http://pastie.org/3527637
13:08nizze?
13:08Iceland_jackyou can also be interested in something but still have no interest in learning about it from an external influence
13:09ibdknoxTimMc, every "smart" person I've ever met did the same thing
13:09xeqiIceland_jack: I remember seeing some papers on this, search for "Dehnadi mental model" and a few will come up
13:09TimMcibdknox: But that's just one kind of "smart".
13:09Iceland_jacknizze: try mentally replacing “apply +” with “sum”
13:09Iceland_jackxeqi: (thanks I'll check it out)
13:10Iceland_jacknizze: Should the function be nullary or is that a mistake?
13:10TimMcnizze: I would put a line break before (count users)
13:10nizzeIceland_jack: The apply + is nice trick :) It's like folder + list in haskell
13:10nizzeOkay, I get confused by such a deep nesting level. Is this something that I get used to over the time?
13:10Iceland_jackfolding is very neat
13:10dan_bI would describe it as hard to read in the same way as a mathematical formula is hard to read
13:10Iceland_jackbut you've got to watch out for the edge cases :)
13:11dan_bit's more information-dense and you can't just scan it like a para of text, but with that density comes precision
13:11raeknizze: putting the (count users) part on its own line would make it easier to parse (for a human), IMHO
13:11TimMcibdknox: A really, really important skill is model abstraction -- being able to lock off parts as bloack boxes with invariants/constracts.
13:11Iceland_jackGenerally not a problem in Lisps but with Haskell…:
13:11Iceland_jack> foldl1 (+) []
13:11dan_braek: good point
13:11Iceland_jack*** Exception: Prelude.foldl1: empty list
13:11TimMcand knowing when to open them again!
13:12nizzeHmm, so would it be okay to use let to alias things?
13:12TimMcsure
13:12raek(a (b (c (d (e f))))) is okay to scan, but (a (b (c (d (e f))) x)) is much harder
13:12raek(a (b (c (d (e f)))
13:13raek x))
13:13Iceland_jackI almost added the parentheses from reflex 8)
13:13raekalignment often helps to reveal the structure
13:13nizzeIs "->" (threading?) a bad practice / non-idiomatic clojure?
13:13luciannizze: not at all
13:13technomancythreading is wunderbar
13:13dan_bI hope it's idiomatic cos I've never seen it anywhere else
13:13luciannizze: although in some cases it makes code worse, not better
13:14Iceland_jacknizze: a good practice but depends on the problem (like everything)
13:14luciandan_b: CL and scheme have similar macros
13:14nizzeOkay :)
13:14lucianand haskell achieves similar results with point-free style
13:14TimMcthreading *can* make it easy to lose track of exactly what data is being threaded through at various points.
13:14nizzeAs I'm starting to code clojure do I have to pay any attention to laziness?
13:14dan_blucian: what's it called in CL?
13:14luciandan_b: dunno, i just remember reading it has it
13:15dan_b* (-> #'oddp (lambda (x) (* 3 x)) 4)
13:15dan_bdebugger invoked on a UNDEFINED-FUNCTION in thread #<THREAD "initial thread" RUNNING {100270E011}>:
13:15raeknizze: for purely function code, you don't have to care about it very much. it's when you get to code with side-effects it gets surprising
13:15technomancygotta love all the yelling CL does
13:15nizzeOkay. Is laziness built into language or is it a macro/library feature?
13:16luciandan_b: i has some composition macros that achieve the same result, i think
13:16dan_bWHAT'S WRONG WITH UPPERCASE HUH?
13:16luciannizze: it can be both
13:16Iceland_jacknizze: check out (source lazy-seq)
13:16nizzelucian: okay, so part there, part here :)
13:16luciannizze: it generally is a language feature, or at least starts there
13:16dan_blucian: I only ask because I've spent many years doing CL and I'm surprised not to have seen it there
13:17luciandan_b: ah. i don't know much about cl, but i do remember seeing people preferring to mutate something several times instead
13:17raeknizze: some of the laziness stuff happens to be implemented in java with some macro sugar, but I don't see any theoretical reason it could't be implemented in clojure
13:17nizzedan_b: How do you think Clojure compares to CL (without the Java interop and the library goodness)?
13:18Iceland_jackraek: It can be implemented in Common Lisp :)
13:18luciannizze: you're asking that in a biased channel :)
13:18dan_bnizze: I've only been doing clojure for about a week, it's probably still too soon to say
13:18Iceland_jackthere is a library that provides laziness called CLAZY (there's that yelling again) :]
13:18nizzeI know, I'll subtract some bias points :D
13:18technomancyCL doesn't have as much emphasis on consistency of argument order; I imagine that makes -> and ->> less useful
13:19Iceland_jacknizze: (if we know you're antibiased we'll have to get even more biased!)
13:19dan_bcase-sensitivity is good, square brackets are ugly, uniform seqs rather nice, and I'm not missing pathnames
13:19nizzeIceland_jack: :D
13:19luciandan_b: i love the literals
13:19Iceland_jackBut I'm a big fan of Common Lisp, relatively new to Clojure
13:19dan_bbut we really are talking about first impressions so far. when I get something big enough thath I'd use CLOS in CL I'll have a better idea
13:19luciandan_b: especially [ ] used in syntax for things that aren't calls
13:20Iceland_jackAnd Common Lisp is starting to show its age
13:20lucianwhat i hate most about CL is Lisp-2, and i hate that a lot
13:20nizzedan_b: I find your opinion regarding [] odd. Rich said in some presentation that the problem with Scheme / CL is that () are overloaded.
13:20nizzedan_b: Don't you feel that way?
13:20dan_bthe biggest problem with CL imo is that it is a platform not a language
13:20luciannizze: people who have seen ( ) for a long time are likely to disagree
13:21nizzelucian: Okay :)
13:21dan_binterop with the host platform (see e.g. pathnames, gui, sockets) never really its strong point
13:21lucianthere's something to be said for a little more syntax
13:21AimHereIs there any real problem with [] or {} - it's just syntactic sugar for (vector ...) or whatever anyways
13:21dan_band I say that as the original author of trivial-sockets, bordeaux-threads and the cliki
13:21AimHereJust go back to () style if it upsets you
13:21Iceland_jackPersistent data structures are a great feature, Common Lisp is rather lacking RE: functional programming
13:21technomancyAimHere: it's just not what people are used to. same "problem" java fans have coming to any lisp.
13:22luciantechnomancy: there are java fans?
13:22Iceland_jacklucian: :þ
13:23luciantechnomancy: you're probably right, there is such a thing as C++ fans, or so i've heard
13:23nizzeOkay, I understood that part of Lisp's power comes from ability to access read table. Why isn't clojure providing access to it?
13:23technomancylucian: there was a guy who said he liked make on the leiningen user survey; nothing can shock me now.
13:23Iceland_jacknizze: I believe Rich didn't want people to create their custom syntax
13:23Iceland_jackI personally love the Common Lisp reader
13:24dan_bI would like the cl reader more if you could easily customize it *per-package*
13:24Iceland_jackthat would prove a bit tricky though
13:25dan_botherwise you pull in three other people's packages into your project and find you have two conflicting #u macros
13:25nizzeWhoa! I must say that level of sophistication on this (and Haskell) channel is astounding. I've rarely had as good conversations about these kind of things.
13:25dan_bmaybe per-source-file or something then. scoped in some way at least
13:25luciandan_b: really? i thought those were namespaced
13:25jsabeaudrySomehow it would seem the :hooks [leiningen.cljsbuild] seems to cause problem.
13:26dan_bin retrospect, maybe I could have added that to asdf
13:26Iceland_jackdan_b: I suppose you /could/ have conditioned imports of reader syntax... not sure how that would work in practice
13:26Iceland_jacknizze: (thanks)
13:26lucian#haskell scares me a little
13:27luciani mostly agree with not having reader macros, now
13:30Iceland_jackI love Lisp and Haskell is my mistress if anything, but I'm repeatedly surprised at Haskellers wondering “why Haskell isn't mainstream!” while it feels like they're working against it at times...
13:32TimMctechnomancy: Make is the PHP of build tools.
13:32TimMcDead easy to get started, gets tricky once you get a lot of it in a pile.
13:32Iceland_jackTimMc!!
13:33TimMc...and damn useful for one-offs.
13:33dan_bthe irony there is that make is a declarative system that probably replaced a lot of even gnarlier imperative shell scripts
13:33ibdknoxTimMc, yeah, abstraction or more generally knowing what to focus on is arguably one of the most important meta-skills
13:33TimMcibdknox: And you have thoughts on how to teach those? :-)
13:34ibdknoxI spent most of my younger years learning how to learn them :)
13:34ibdknoxit's how I got through college without reading a single thing :D
13:34ibdknoxwith 3 jobs lol
13:35Iceland_jackibdknox: 3 jobs? Props
13:35ibdknoxpaid for all of it myself :)
13:36ibdknoxTimMc, there's a decent book on some of it. Refactoring your wetware
13:36ibdknoxTimMc, http://pragprog.com/book/ahptl/pragmatic-thinking-and-learning
13:36ibdknoxit takes more of a software spin on it
13:36ibdknoxbut the ideas are universally applicable
13:38ibdknoxI've always been of the opinion that meta-skills are the key to basically everything
13:39dan_bthere is no problemin comiter science that can't be solved by another layer of meta
13:39dan_ber, pardon lousy typing
13:39Iceland_jackAnd no problem that can't be solved by removing one :)
13:42TimMcdan_b: I would say s/meta/indirection/
13:43ibdknoxyeah, those two aren't the same thing
13:43dan_bi think the original quote was "Indirection", yes
13:43Iceland_jackdan_b: (meta is an indirection on indirection)
13:43ibdknoxlol
13:44Iceland_jackTwo years ago I had accepted that Lisp had had it's moment though
13:44Iceland_jack*its
13:45dan_bIceland_jack: that's not far off my own timescale. two years ago I decided I needed to stay employable and learned Ruby
13:45Iceland_jackand I thought of FORTH or APL...
13:45Iceland_jackYeah
13:46Iceland_jackBut now Clojure is doing surprisingly well
13:46ibdknoxThe way I see it, there's money in efficiency
13:46ibdknoxand Clojure is amazingly efficient
13:47TimMcibdknox: You're speaking of both programmer and program efficiency, yes?
13:47TimMcOr perhaps more of the former?
13:47ibdknoxMore the former
13:47TimMcYou project manager, you!
13:47ibdknox;)
13:47dan_bI still have a hard time conceiving of anything that runs on the jvm as machine-efficient, but my experience of java 1.0 and 1.1 may mave prejudiced me
13:48ibdknoxthe JVM is very efficient actually
13:48jodaroit has come a long way, baby
13:48Iceland_jackTrying to determine ‘why’ a programming language did well is a difficult (downright impossible?) task
13:49SirDinosauranyone else disappointed that datomic isn't open source?
13:49ibdknoxtoo many factors, too many of which are cultural
13:49mtmyes, very
13:49dan_bwhat chance it'll be open sourced later when the early adopters have given iut a good pummeling?
13:49TimMcSirDinosaur: Not me. It's surely spinning off open-source stuff as we speak.
13:50ibdknoxthey need to work on their marketing a bit
13:50technomancySirDinosaur: more just annoyed at how much attention it's getting than anything else
13:50TimMcibdknox: Such as actually maybe explaining what it is on the front page?
13:50ibdknoxreading their site I don't understand what it is
13:50ibdknoxTimMc, yes
13:50TimMcHad to poke around. The whitepaper helped...
13:51ibdknoxyou have about 2-3 sentences on average
13:51ibdknoxthey lost most people with their current copy
13:51ibdknoxeven ones who are interested :)
13:51TimMc"Datomic moves powerful data manipulation capabilities, and the data itself, into applications, coupling them with a sound and flexible data model. OH LOOK A SQUIRREL!"
13:51ibdknoxhaha the video is 20 minutes long
13:52jodarowatching now
13:52ibdknoxit's sad, because I'm sure there's *really* cool stuff happening here
13:52SirDinosaurtechnomancy: everything rich hickey does now gets a lot of attention
13:53dan_bwhat's the current state of machine transcription, and how long before I can use it to avoid sitting through other peoples videos?
13:53ibdknoxdan_b, you're not ken wesson are you? ;)
13:53dan_bheh. no
13:53TimMcredinger: "A cloud-scaled DB system that moves query capability directly into the client"
13:53dan_bthat was the first thread I saw on the clojure lst, though
13:53ibdknoxTimMc, that still doesn't make sense
13:53ibdknoxlol
13:54TimMcibdknox: It's probably not correct, either.
13:54dan_b"My real name is Stuart Halloway, and I have the ability to remove people from this mailing list"
13:54Licenserwhat is the current best way when you want to compile clojurescript for node.js / pure web applications
13:54ibdknoxdan_b, haha welcome to the party ;)
13:54TimMcOh, and "cloud-scaled" is BS that I just made up with my marketing markov model.
13:54ibdknoxlol
13:55dan_b'No match for "CLOUDSCALED.COM" ': quick, register the domain name
13:55ibdknoxActually this is a great example of where meta-skills would've helped
13:55ivandan_b: I use VLC to watch Hickey at 1.3x-1.4x and some other people at 1.7x
13:55ibdknoxsmart people, especially engineers, have a hard time explaining what they make lol
13:55TimMcQFT
13:56ibdknoxQuantum Field Theory?
13:56TimMcEither "Quoted For Truth" (in bulletin boards) or "Quite Fucking True".
13:57TimMcGeneral indicator of complete agreement.
13:57ibdknoxah, no physics then
13:57ibdknox:)
13:57Iceland_jackibdknox: “Quantum Field Theory” sounds like the next thing for Haskell, once Category Theory and System F become too mainstream ;)
13:57TimMcSorry, no. I still need to learn tensor algebra.
13:58ibdknoxdev appliance is a terrible name
13:58ibdknoxit makes me think of a toaster
13:59jodaroand you hate toast?
13:59ibdknoxI love toast
13:59ibdknoxbut toasting my data sounds bad
13:59jodaroyou love toast, but you hate bread
14:00Iceland_jacklol, Data Toasting
14:00jodaroand
14:00jodaroits only a 447MB download
14:00Iceland_jacksounds like there should be a Wikipedia Entry on that
14:00jodarowait
14:00ibdknoxI wonder if the noir wikipedia entry is still there
14:00jodarono github repo to clone?
14:00Iceland_jackibdknox: it is
14:01ibdknoxno point in filling it out though
14:01twhumeA stylistic/philosophical question for you: I'm writing my first proper Clojure app. I've done a fair bit of non-functional programming before. It looks to me like my app will be composed of a huge number of well-specified and clear functions - many more than I would've naturally written in, say, Java. Is that the way of things with Clojure? Or is it just the way I'm doing it, do you think?
14:01jsabeaudryDoes clojure mode reload the file automatically when saving now?
14:01Iceland_jacktwhume: tricky question imo
14:01ibdknoxjodaro, not open source
14:02jodaroi know, i was being a dick about it
14:02Iceland_jacksome things you'd use looping statements for in Java you'd use (higher-order) functions in Clojure/CL
14:03dgrnbrgibdknox: I am trying to get your lein-nailgun plugin, and I have it as a dev dependency on version 1.1.1 w/ the path as org.clojars.ibdknox/lein-nailgun, but it fails w/ an artifactsnotfound exception
14:03ibdknoxI should've started my product consultancy, that would've been fun probably
14:03twhumeiceland_jack: thanks. I'm quite early into learning it, but keen to get into good habits now. I'm finding I write lots of very small functions, unit test them, and then chain them together. My general feeling is that the individual bits are thus well-testing, but I'll need to get better at looking across large chains of function calls to get an overview of what my code's doing. Does that make sense to you?
14:03ibdknoxdgrnbrg, gist of the project.clj?
14:04Iceland_jacktwhume: First of all, a lot of the functions you might write could be anonymous functions or accomplished via predefined operators
14:04dgrnbrgno can do…but the dev-dependency is [org.clojars.ibdknox/lein-nailgun "1.1.1"]
14:04dgrnbrgit's just from lein new
14:04ibdknoxwierd
14:04ibdknoxweird*
14:05ibdknoxthat should work
14:05twhumeiceland_jack: so would what I'm doing be considered poor, stylistically? Or forgivable for a beginner?
14:05Iceland_jackI can't tell! I'd have to see some code
14:05dgrnbrgibdknox: do you have other versions on clojars I could try to grab?
14:05SirDinosaurtwhume: it should be clear what your program does by looking at the "top-most" function. functions should be used as abstractions
14:05Vinzenttwhume, yeah, I think clojure forces you to writing much more little functions than in java, and it's a good thing
14:06Iceland_jackSpeaking of code, every time you use a Clojure function wonder how it's implemented and check (source <fn>) to see whether your intuition was right
14:06cacodaemonibdknox, why example code on start page of sqlkorma.com uses :username option and not :user ?
14:06Iceland_jackAlso read, read, read source code
14:06ibdknoxdgrnbrg, http://clojars.org/repo/org/clojars/ibdknox/lein-nailgun/1.1.1/
14:06ibdknoxdgrnbrg, it's there
14:06dgrnbrgI'm trying to get it from behind a proxy
14:07dgrnbrgis there a way to prime my .m2/repositories with a raw maven command, and then re-try lein deps?
14:07TimMctwhume, Iceland_jack: Don't put too much stock in the implementation details of clojure.core functions -- there's some nasty bootstrapping code in there, although mostly near the top.
14:07ibdknoxcacodaemon, ah just a typo in the example
14:07Iceland_jacktwhume: sure :) but it's still a good way to learn
14:07Iceland_jackoops, TimMc
14:07twhumeTimMc: so what's a good reference? Def. a good idea, I should do more of that.
14:07TimMcI'm not sure, actually.
14:08ibdknoxdgrnbrg, not if you just put it in the right folder structure it'll work
14:08ibdknoxdgrnbrg, -not
14:08dgrnbrgibdknox: I think I'm going to have lots of proxy issues
14:09dgrnbrgI have my http_proxy set up, and mvn can get its packages too, but lein seems to be struggling w/ the packages now
14:10technomancydgrnbrg: lein pom && mvn dependency:tree ought to do it
14:11dgrnbrg:) :) :)
14:11dgrnbrgthat worked
14:11dgrnbrgwhy doesn't lein work?
14:11twhumeThanks all :)
14:11dgrnbrgtechnomancy: I don't mean that to be accusatory--lein is the best build system I've ever used
14:11dgrnbrgso I'm trying to get it into my proxy-restricted environment
14:11technomancydgrnbrg: basically because nobody who uses proxies has submitted any patches
14:12dgrnbrgtechnomancy: does lein respect .m2/settings.xml?
14:13technomancydgrnbrg: some of the settings are picked up, but only by accident
14:13dgrnbrgI think that if the security/proxy settings got picked up, that'd solve my problem. Do you think that's any easy thing to do, or particularly hard?
14:14technomancyI don't know, but fixing it for 1.x will not fix it for 2.x
14:14technomancysince the underlying library changed
14:14dgrnbrgi see
14:14dgrnbrgi'll wait for it to stabilize
14:15dgrnbrgin the meantime, i finally have a workaround
14:15dgrnbrgthank you!
14:15technomancysure
14:15technomancyFWIW lein2 is pretty much already stabilized
14:17tylergilliesis it gonna be called lein2 or is that just the version number?
14:17technomancyyou can save the script as anything you like =)
14:17tylergilliesi also like the colour green
14:17TimMcyou can call it anything but late-for-dinner.sh
14:18technomancyI've been symlinking it as lein2 for now because I'm keeping 1.x around, but I'll probably swap it up
14:26y3diibdknox: do you know if datomic.com is built in clojure(noir)
14:26ibdknoxalmost guaranteedly not noir
14:27y3diwhyd you assume that?
14:27technomancyhe hasn't been getting pings from his secret backdoor phone-home routines
14:27ibdknoxthey don't tend to take dependencies on other people's things. They wouldn't even use lein for a long time
14:28ibdknoxplus I don't think they like me very much :)
14:28jweiss_any slime/emacs users ever get ";; Evaluation aborted." at the repl, but no sldb stacktrace frame? if I run (/1 0) i get one, but the code i'm trying to test just aborts with no info
14:28dgrnbrgis "they" reliance?
14:28ibdknoxthough as technomancy points out, my red phone hasn't been beeping
14:28ibdknoxactually.. I did just get a really weird email though lol
14:28ibdknoxthat warrants red phone beeping
14:28technomancyjweiss_: usually a problem with the stacktrace rendering
14:29ibdknoxy3di: it's most likely ClojureScript One
14:30dgrnbrgibdknox: is "they" who don't like you "reliance"?
14:30hhutchibdknox: i have to say, i discovered the fetch + lein-cljsbuild combo last week, and I am blown away...
14:30jodaroso has anyone set it up yet?
14:30jodarodatomic i mean
14:30jweiss_technomancy: in the slime-events buffer, i see (:debug-return 2 1 nil) (:return (:abort)
14:31jweiss_27)
14:31hhutchI can't really figure out the flow of cljs-one, but lein-cljsbuild + fetch + jayq is really great
14:31jweiss_looks like the exception doesn't even come back from swank
14:32`fogusibdnox: Not true. Like everyone, they are amazed by you.
14:32SirDinosaurasked if there were any plans to open source datomic in #datomic:
14:32SirDinosaur11:18 < rhickey> SirDinosaur: There are no plans to open source Datomic at this time
14:33SirDinosaurjust wanted to make sure.. but :(
14:34ibdknoxhhutch: I'm glad :) My hope was that it would be easily digestable
14:35gf3so, I guess my clojure pastebin is live, guys
14:35gf3http://cljbin.com/
14:35gf3http://news.ycombinator.com/item?id=3667954
14:36ibdknoxit's very pretty :)
14:36SirDinosauribdknox: i agree with hhutch, thanks
14:36`fogusWhat is this "fetch thing"?
14:36pipelineit's both faster and handsomer than ideone.com
14:36gf3ibdknox: thank you
14:37ibdknox`fogus: a very simple library to do rpc/xhr between noir and cljs
14:37gf3`fogus: ohai!
14:37ibdknox`fogus: part of my yet unnamed cljs suite of things: http://www.chris-granger.com/projects/cljs/
14:37`fogusSorry, I meant "fetch + lein-cljsbuild combo"
14:37`fogus?
14:37`fogusI already knew about fetch
14:37ibdknoxoh, that I'm not sure about
14:38hhutch`fogus: https://github.com/hhutch/hutch-web
14:38ibdknox`fogus: did you see noir-cljs came back? You can now do my game demo from emacs/vim :)
14:38`fogusYAY! Marg made the cut! :-)
14:39hhutch`fogus: i just have 'lein cljsbuild auto' running while I work in emacs+clojure-jack-in ... so any CLJS code writes get auto compiled
14:39hhutchit's not browser-repl like clojurescript one
14:39ibdknoxhhutch: CLJS one will do that too :)
14:39hhutchbut this workflow makes a little more sense to me
14:40dnolengf3: wow NICE
14:40gf3dnolen: thank you!
14:40hhutchibdknox: yeah, i know, it's just I haven't quite understood how one goes about building a production app in cljsone
14:41hhutchi have to spend more time in it
14:41ibdknoxyeah
14:41Vinzentgf3, looks very cool!
14:42ibdknoxunfortunately it got voting ringed I think
14:42ibdknoxnone of us can vote on stuff anymore
14:42ibdknoxI asked around
14:42ibdknoxapparently the smallest valid voting ring is only 4 people :(
14:42dgrnbrgtechnomancy: is there a way that I can tell a lein project which jvm to use?
14:42technomancy`fogus: is there anything specific blocking a lein-marg 0.7.0 release?
14:42technomancydgrnbrg: you can set the JAVA_CMD environment variable
14:43technomancydgrnbrg: there's an open ticket to allow that to be set in project.clj; if you want a leiningen sticker you should submit a patch before someone else snatches it up!
14:43gf3Vinzent: thanks!
14:43dgrnbrgtechnomancy: does lein's build functionality use the programmatic compiler APIs, so that setting the java_cmd is sufficient to make my whole project use a different version?
14:44technomancydgrnbrg: it has to launch a subprocess, but it will honor JAVA_CMD for the subprocesses
14:44dgrnbrgcool, thanks!
14:44dnolenibdknox: sux
14:44ibdknoxit's a bit ridiculous
14:44dgrnbrgtechnomancy: I'd love to contribute to lein, but my job makes it hard :(
14:44ibdknox4 people?
14:44ibdknoxthe probability that that happens is very high
14:45technomancydgrnbrg: even for four lines?
14:45dgrnbrgtechnomancy: only if I want to spend 1-2hrs in meetings discussing whether it's an IP leak
14:45technomancygross
14:46`fogustechnomancy: I think just one keyword bug. I'll 2x check
14:46dgrnbrgtechnomancy: do you require clojure contributor agreement, or can I just git pull request?
14:46technomancy`fogus: would be nice to have a lein2-compatible version once the leiningen preview comes out in a few days
14:46technomancydgrnbrg: heh; please use a pull request
14:46`fogustechnomancy: When would you like it?
14:46technomancyI will never require paperwork for people who want to help me out.
14:47dgrnbrgtechnomancy: that makes it easier, then :)
14:47technomancydgrnbrg: this change is so small that it's probably not even subject to copyright in the US
14:47ibdknoxtechnomancy: are you sure? Paperwork could be fun. "In order to submit a pull request, please do this crossword puzzle"
14:47technomancy`fogus: any time this week would be super
14:47`fogustechnomancy: It shall be
14:48technomancy`fogus: thanks
14:48technomancyibdknox: you do have to run some obfuscated code to get a sticker
14:48dgrnbrgtechnomancy: is java_cmd used by other java applications, or is that just for lein?
14:48technomancyibdknox: but that's only because I don't want my home address floating around the interwebs
14:48ibdknoxhaha
14:48technomancydgrnbrg: I've seen it used a few other places
15:20LukeI'm getting this with incanter "1: [CAUSE1] Invoke debugger on cause java.lang.String cannot be cast to java.lang.Number [Thrown class java.lang.ClassCastException]" when trying to do a simple double/string scatter plot
15:21TimMc"A cannot be cast to B" means "I expected a B but you gve me an A
15:21TimMc"
15:22Lukeright but in Incanter, I'm not talking about datatypes and I'm only sending it doubles in the dataset
15:23Lukeoh never mind, the doubles are being quoted in the CSV file
15:24Lukeis there a way to tell incanter to parse a string as a double?
15:34Raynesgf3: ping
15:37dgrnbrgWhat's the easiest way to get a class that has a single method "public static boolean start(MyObj o)" that is defined in closure?
15:37dgrnbrgI want to write a doclet in clojure, and the doclet api looks for this static method instead of being sane and using an interface
15:37dgrnbrgcan I accomplish that with reify?
15:38TimMcdgrnbrg: I think you'll need genclass.
15:38TimMcI don't think even proxy can do statics.
15:38dgrnbrgcan genclass be used at runtime?
15:38dgrnbrgor will I have to AOT my code?
15:45TimMcGood question! It at *least* depends on how your code will be called.
15:46Raynesgf3: I think you and I have similar interests. :)
15:49dgrnbrgHow can I get tools.jar onto the class path of lein?
15:49dgrnbrgTimMc: I'll have to figure that part out later :)
15:51dgrnbrgtechnomancy: how do I get the jdk tools.jar onto the class path?
15:53amalloyi don't think it depends on how your code will be called. gen-class is a no-op except when AOTing
15:53TimMcdgrnbrg: Oh man, I had to do this in Maven recently, it was annoying.
15:53dgrnbrghmm, i see
15:53dgrnbrgi found this article:
15:53dgrnbrghttp://maven.apache.org/general.html#tools-jar-dependency
15:53dgrnbrghopefully that does it
15:54dgrnbrgwait, that doesn't explain how to set the resolve path
15:55dgrnbrgIs there a way to get lein to use a system path for an artifact?
15:57dgrnbrgI just copied it to lib--is that going to work in the long term?
15:57TimMcnope
15:58TimMclib gets cleared
16:00pyninjais there a separate channel for clojurescript?
16:01RaynesNope.
16:03tmciverdgrnbrg: I just created a symlink to the system tools.jar in ~/.lein/plugins; I did that to get rid of the warning.
16:03pyninjaokay, does anyone know how to use a javascript library (e.g. moment.js) in a clojurescript project? i'm playing around with clojurescript one
16:03dgrnbrgtmciver: will that get picked up by uberjar?
16:04tmciverdgrnbrg: No idea. I didn't know what problem you were trying to solve; I just know that a lot of people (including myself) get warnings about tools.jar without the symlink.
16:05dgrnbrgI am writing a tool like vimclojure for Java development
16:05dgrnbrgand I need to call javadoc programmatically :(
16:06tmciverdgrnbrg: If the symlink doesn't work you might try copying tools.jar to the plugins directory directly (seems like a hack though).
16:12jsabeaudryIs it legal to have a /src/foo.clj and a /src/foo/bar.clj in the same project? lein run works fine but lein compile gives me a NPE on the ns clause of foo
16:13RickInGAwhat are the namespaces defined in the files?
16:14RickInGAI would think that they would need to be (ns project.foo) and (ns project.foo.bar)
16:14brehaut_RickInGA: im pretty sure it is valid
16:14jsabeaudryRickInGA, That is what they are
16:14errklewherefrom in GA?
16:14brehaut_err, sorry, jsabeaudry
16:15RickInGAFlowery Branch (about 30 miles north of Atlanta)
16:15errklesounds delightful
16:15errklei'm in ATL
16:15TimMcRickInGA: Peach flowers? I bet it's a peach tree.
16:16errklepreach tree
16:16pipelineRickInGA: I have actually been there
16:16TimMceverything is named after peaches in GA
16:16pipelineflowery branch is named after wishful thinking ;)
16:17RickInGAerrkle are there other Clojer-ers in Atlanta that you know of?
16:17jsabeaudrybrehaut_, RickInGA: If I remove the (:use [project.foo.bar]) from my (ns project.foo ...) the NPE disappears
16:18TimMcjsabeaudry: That's a standard layout, sure.
16:18TimMcjsabeaudry: Just makes sure it's not actually a single-segment namespace -- (ns foo) is a problem, (ns foo.core) is not.
16:19TimMc(don't ask me why, I've just been told that)
16:19jsabeaudryTimMc, Yes, it is x.y.foo.bar and x.y.foo
16:20jsabeaudryIf I add a :only clause it becomes an ExceptionInInitializerError
16:20TimMcMust be something else, I use that in projects sometimes.
16:20RickInGAdo you have other files in your project that can see each other? is this the only problem you are having?
16:20TimMcTry just use'ing the second ns from the REPL.
16:22jsabeaudryTimMc, use from the repl works fine
16:22jsabeaudryTimMc, lein run also works
16:23RickInGAI don't know a lot about lein but my projects all have a structure like <proj name> / src / <proj name> / foo.clj
16:23RickInGAI think it is the sub directories of src that resolve to the namespace name
16:23jsabeaudryI'll try setting up a micro project
16:23weavejesterTimMc: It's because a single-segment namespace is an unpackaged Java class
16:24weavejesterTimMc: Which I believe can cause problems… somehow :)
16:24TimMcweavejester: Ah, so no package. Got it.
16:24TimMcI'm willing to believe that, I just don't have specifics.
16:25weavejesterHas anyone looked into datatomic in detail yet?
16:26jodaroi'm still downloading it
16:26Raynesweavejester: datomic. Get it right, dude.
16:27weavejesterRaynes: Oh yep, my mind somehow thinks "datatomic" instead of "datomic"
16:27RaynesI feel your pain.
16:28zakwilsonI'm really curious as to why half the information about it is in a PDF instead of a normal web page.
16:28weavejesterzakwilson: A PDF?
16:28zakwilsonweavejester: http://datomic.com/docs/datomic-whitepaper.pdf
16:29weavejesterAh
16:29weavejesterIs there any way to destroy information in datatomic?
16:30weavejesterI'm serious :)
16:30RaynesI know, but you said 'datatomic' again.
16:30weavejesterOh!
16:30weavejesterGah!
16:30zakwilsonI suspect some non-technical reason that has something to do with how things are sold to big companies. I honestly do want to understand this sort of thing.
16:30RaynesIt's adorable.
16:30weavejesterAt some point my brain will get the right association.
16:31RaynesIt reminds me of how young children sometimes have trouble pronouncing certain names and thus come up with slightly different easier to pronounce ones.
16:31weavejesterI guess it's because datomic is clearly a play on data and atomic
16:31weavejesterI just need to remember dat-omic
16:31weavejesterOr d-atomic
16:33weavejesterAnyway… it looks like although you can retract facts, they persist in the database.
16:33weavejesterWhich is really nice from a technical point of view.
16:33weavejesterBut maybe less nice if privacy laws tell you to wipe a person's data.
16:33jsabeaudryAh by lein compile project.foo.bar I learn that the problem is there, at least the NPE is triggered
16:34TimMcweavejester: Well, I'm sure you can define custom GC.
16:37technomancyhttps://mobile.twitter.com/coda/status/176763984257630208
16:38weavejesterTimMc: I dunno, the current API is quite minimal and I don't see any custom GC options
16:38Raynestechnomancy: Bahaha
16:39jsabeaudryIt seems that this creates a NPE when compiling (defn- byte [n] (clojure.core/byte (.byteValue n)))
16:39weavejestertechnomancy: I don't think that's completely fair… :)
16:39hagnawould you use dotimes to append to a string or loop/recur?
16:40technomancyweavejester: it just reminds me of this awesome quip: https://mobile.twitter.com/coda/status/170689994904698880
16:41amalloywhy would you use either, hagna? (apply str (for ...))
16:41hagnaamalloy: ok that's similar to what I was thinking you'd do for dotimes
16:41technomancydotimes is very wrong
16:42gf3Raynes: ohai!
16:42technomancyit's about side-effects only
16:42gf3Raynes: so it would seem
16:42Raynesgf3: HAI THAR
16:42gf3Raynes: thanks for the comment on HN
16:42TimMcjsabeaudry: Interesting.
16:42amalloytechnomancy: well, that's a bit strong. dotimes makes me hella sad, but that's how StringBuilder works
16:43RaynesYeah, mentioning RefHeap seems kinda self-promoting in hindsight -- sorry if it came off that way.
16:43RaynesNot sure if you already knew about RefHeap or not.
16:43gf3Raynes: I did, actually, Refheap is awesome
16:43gf3Raynes: I love the BrowserID integration
16:43Raynes<3
16:44jsabeaudryTimMc, simply (defn map []) will also do the trick, is it illegal to shadow clojure.core ?
16:44RaynesSo, what motivated you to write cljbin?
16:44jsabeaudrythe trick being triggering a NPE
16:44RaynesI figured it was the eval, but that seemed to be added after the fact.
16:44gf3Raynes: I wanted the eval
16:44RaynesNot sure if it was an initial design goal.
16:44TimMcjsabeaudry: Have you used :refer-clojure?
16:44gf3Raynes: I didn't know you guys were adding it to Refheap
16:44RaynesYeah, I'm excited about eval in RefHeap.
16:44RaynesI've been keeping it quiet until I saw how it turned out.
16:44jsabeaudryTimMc, no
16:45hagnaamalloy: yes ok for thank you I had it mixed up
16:45RaynesStill a bit off. It'll be built around an entirely different service, which is why I can't just implement it right off the bat.
16:45TimMcjsabeaudry: Ah, you'll want a (:refer-clojure :exclude (byte)) in your ns.
16:45TimMcor something like that
16:45pyninjadoes clojurescript have a function that converts objects into JSON?
16:45gf3Raynes: sounded pretty sweet from your comment earlier
16:45RaynesBut it'll support eval for most of the popular languages refheap supports.
16:45TimMcpyninja: Grab the cheshire lib
16:45pyninjaTimMc: thanks
16:46Raynesgf3: Your textarea is sexy.
16:46TimMcRaynes: I bet you say that to all the gf3s.
16:46RaynesIt's nice how you've integrated buttons and information all into the same place.
16:46gf3Raynes: haha thanks
16:46gf3TimMc: /me blushes
16:46pyninjaTimMc: wait but this is a clojure library, not clojurescript right?
16:46TimMcpyninja: Ack, sorry.
16:47Raynesgf3: Seriously, if you ever have some time, I'd love to see what you could do with the RefHeap text area and stuff.
16:47RaynesI'm not much of a design guy.
16:47gf3Raynes: cool, I'd love to help out!
16:47pyninjareally i just need to serialize and unserialize some data in clojurescript, JSON seems most natural as long as clojurescript supports that
16:48TimMcpyninja: And you're not talking to a Clojure server?
16:48gf3Raynes: I'll toss you my email just in case you want to throw some ideas back and forth
16:48gf3Raynes: gianni@runlevel6.org
16:48Raynesgf3: We have a #refheap IRC channel and there are a gazillion issues on the issue tracker.
16:48RaynesIf you ever want to drop in.
16:48jsabeaudryTimMc, Oh wow, the refer-clojure works, thank you very much.
16:48pyninjaTimMc: well I could send the data to the server for serialization, I guess, but it seems like overkill. shouldn't cljs support that natively?
16:48tylergilliesin 'lein repl' is there a way to kill the last command without killing JVM? like (iterate inc 0) puts me in an infinite loop
16:48hyperboreeanguys, what's the easiest way to run unit tests from within emacs after I ran clojure-jack-in ?
16:48TimMcpyninja: I mean, is the serialized data consumed by the server?
16:48technomancytylergillies: only in lein2
16:49technomancyhyperboreean: clojure-test-mode
16:49pyninjaTimMc: no
16:49amalloywat. if you're just serializing and unserializing, use the clojure reader and printer
16:49LicenserMy clojurescript refuses to use prn-str for some reason :( I always get: "return server.routes.dispatch.call(null, server.core.prn_str.call(null, b)" and prn_str seems to be undefined
16:49tylergilliestechnomancy: ok, thnx
16:49pyninjaamalloy: what's that
16:49weavejesterhyperboreean: C-c , will run tests when in a Clojure test file.
16:49stuartsierraLicenser: try pr-str
16:49weavejesterhyperboreean: C-c t will take you from a source file to a test file.
16:50TimMcpyninja: If you just need to roundtrip the data through a cookie or whatever, pr-str and read-string.
16:50amalloy,(let [m {:a 1 :b 2}] (= m (read-string (pr-str m))))
16:50TimMcJSON is only needed for talking to JS services.
16:50clojurebottrue
16:50pyninjaTimMc: oh, i didn't know read-string and pr-str were inverses. that's good
16:50Licensersneaky thank you stuartsierra :) was it always pr-str and I'm making prn-str up?
16:51stuartsierraLicenser: yes
16:51weavejesterdatomic doesn't support removing data yet, so it looks like we need to be very careful not to store personal data in it in the EU!
16:51tylergilliesprn-str makes me think of porn star
16:51Licenserodd clojuredocs says there is a prn-str
16:51TimMc&(prn-str 5)
16:51lazybot⇒ "5\n"
16:51hyperboreeanweavejester: ok, thanks for the tips. I think I'll need to install first clojure-test-mode as suggested by technomancy (thanks, btw)
16:51stuartsierraLicenser: maybe there is, in Clojure/JVM
16:52Licenseroh sneaky
16:52weavejesterhyperboreean: Do you have marmalade in your package sources?
16:52Licenser&(pn-str 5)
16:52lazybotjava.lang.RuntimeException: Unable to resolve symbol: pn-str in this context
16:52stuartsierraLicenser: you could file a ClojureScript ticket with a patch, easy enough to fix
16:52Licenser&(pr-str 5)
16:52lazybot⇒ "5"
16:52hyperboreeanweavejester: no, not really
16:52Licenserhmm
16:52TimMctylergillies: That's how I pronounce it sometimes.
16:53stuartsierraBut you can't actually print anything in ClojureScript, so prn / println don't make much sense.
16:53TimMcstuartsierra: pr-str and prn-str do!
16:53Licenserat least it is confusing that they are missing and TimMc is kind of right prn-str kind of makes sense
16:54stuartsierraTimMc: prn-str is pretty pointless if you're serializing for a server, but it wouldn't hurt to have it for consistency
16:54TimMcstuartsierra: Makes sense if you're serializing for a debugging pane.
16:55weavejesterhyperboreean: If you have http://marmalade-repo.org/ getting an up-to-date clojure-test-mode (along with other packages) is a lot easier
16:55TimMcstuartsierra: Or a REPL...
16:55stuartsierraTimMc: I suppose. I used the JS Console for that right now.
16:57alexyknathanmarz: awesome talk at strata
17:03cran1988does clojure has a team for testing clojure applications every week ?
17:04weavejestercran1988: Which applications in particular?
17:04sorenmacbethwhat's the current state of the world re extending parameterized type calles via (gen-class) ?
17:04cran1988any application , i would like to take part in such a team
17:04sorenmacbeths/calles/classes/
17:05technomancysorenmacbeth: you mean generics?
17:05sorenmacbethtechnomancy: yes
17:05technomancysorenmacbeth: generics are a fiction of javac
17:05weavejestercran1988: So a team that chooses a random application or library each week and tests it?
17:05technomancythere are no generics beyond java's original compile-time
17:05TimMctechnomancy: Sort of?
17:05weavejestercran1988: To ensure correctness or for fun?
17:06sorenmacbethtechnomancy: so instead of extending AbstractWhatever<SomeClass>, I can just extend AbstractWhatever?
17:06cran1988weavejester: fun and for correctness
17:06technomancysorenmacbeth: I guess? I don't actually know Java.
17:06weavejestercran1988: Ah, then unfortunately I don't know of any group that does that in Clojure.
17:06sorenmacbethtechnomancy: me neither ;-p
17:07technomancyyou should be fine
17:07hyperboreeanweavejester: got it working (and marmalde did help); thanks!
17:07weavejesterhyperboreean: awesome :)
17:12tylergillieswhats the difference between 'mod' and 'rem'?
17:13RickInGAtylergillies try it with a negative number and see
17:13tylergilliesRickInGA: ah, thnx
17:14nathanmarzalexyk: thanks
17:14TimMc,(-> (filter #(= "get" (.getName %)) (.getMethods java.util.HashMap)) first .getGenericReturnType) ;; technomancy
17:14clojurebot#<TypeVariableImpl V>
17:14TimMcAs in "V get(Object key)"
17:14technomancyTimMc: o_O
17:15alexyknathanmarz: will your 3/29 talk at Data Mining meetup follow the same general outline? And, Clojure/West's? :) Or will you be more open about Clojure at the latter? :)
17:15alexykjust trying to prioritize my crazily shrinking time...
17:15nathanmarzalexyk: my talk at data mining meetup will be the same
17:15nathanmarzalexyk: my talk at clojure/west will use clojure for all the examples
17:16alexyknathanmarz: awesome for the latter! :)
17:21tylergillieswoah this is weird when i '(for [x (range 40)
17:21tylergillies :when (= 1 (rem x 4))]
17:21tylergilliesdoh
17:21tylergillieswrong buffer sorry
17:22tylergillieswhen i '(iterate #(* 0.5 %) 100)' the repl output goes down to zero and then repeat the cycle from 100
17:22tylergilliesover and over
17:23tylergillieshttp://cl.ly/1u1a0Z1L2W023Q0c3f2w
17:23RickInGAiterate is infinite lazy sequence, need to do take or take while if you only want some
17:24tylergilliesi understand that, i was just watching the 'infinite' output for fun and notice that
17:24tylergilliesnoticed*
17:25TimMc&(take 20 (drop 4000 (iterate #(* 0.5 %) 100)))
17:25lazybot⇒ (0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0)
17:25TimMctylergillies: Where did you see repeats?
17:26TimMcYou must have typed something more than that.
17:26tylergilliesTimMc: in that screenshot i posted, where the 0 ends and it output 100
17:26amalloytechnomancy: tylergillies's issue sounds a lot like the one i was having with lein repl on long outputs, but i can't find that issue in lein
17:26tylergilliesTimMc: i swear i didn't. that was from a fresh repl
17:26TimMctylergillies: I see "(100" after the zeroes, some other seq is starting.
17:26tylergilliesTimMc: i know. thats why i thought it was odd
17:26amalloyTimMc: no, i've seen this before
17:27TimMcy'all are going to make me wedge my computer for no reason, but here goes...
17:27amalloywhere if i print a really large sequence in lein repl (finite in my case) it gets partway through printing, hiccups, and starts over
17:27amalloyTimMc: nah, just print a large one
17:27amalloyfor me (repeat 1000 'a) is sufficient
17:28TimMclolwut
17:28tylergilliesi told you
17:28TimMc(take 1e4 (iterate #(* 0.5 %) 100)) did it
17:29amalloyso glad to hear it isn't just me
17:29technomancyabout ready to tell everyone using lein repl to jump ship onto reply
17:29technomancybecause it's so much better
17:30tylergilliesurl?
17:30clojurebotsomething
17:30technomancyhttps://github.com/trptcolin/reply
17:31tylergilliesthnx
17:31TimMcOh man, just the C-c support is enough.
17:31jsabeaudryHow can we execute code when the program gets C-c at the console?
17:32jsabeaudryThe problem is that now that I have agents the jvm wont stop appropriately i need to shutdown agents
17:33TimMctechnomancy: Is there a lein-reply plugin yet?
17:34technomancyTimMc: I think so?
17:34technomancywait, don't you use swank?
17:35technomancydon't make me call the ~guards
17:36TimMceep
17:38tylergillies~bards
17:38clojurebotHuh?
17:42romanandregdoes clojurescript uses internally the calcdeps.py script from gclosure?
17:54Raynestechnomancy: Dude. Not everybody uses Emacs.
17:54RaynesAnd sometimes having a non-Emacs repl is useful.
17:54RaynesEven if you do use Emacs.
17:55pipelinethere are non-emacs users?
17:55Iceland_jackhuh?
17:55Null-Anot likely…
17:59TimMcplenty
17:59TimMcMostly vim, some CCW (Eclipse)
17:59TimMcEmacs is of course the majority.
18:01technoma`I'm just surprised that reply would appeal to a swank user
18:03brehaut_technoma`: i use reply and swank
18:04errklerick i know no other clorians
18:04errkleclojurians in ga*
18:08TimMcmidiclojurians
18:09RaynesYeah, and I'm waiting for the moon to turn into a chocolate cupcake.
18:10TimMcRaynes: What good would that do you, without a rocket or a really long spoon?
18:10jodaroyou can't turn cheese into a chocolate cupcake
18:10technoma`two slime repls in a single emacs instance gets ugly
18:11TimMctechnoma`: Nice haircut.
18:12technoma`thanks!
18:15jcrossley3errkle: RickInGA: i'm in roswell
18:16slyrustechnoma`: I use multiple slime repls fairly regulary
18:17technoma`slyrus: don't you have to switch between them manually?
18:21slyrusI'm not sure exactly what you mean by manually, but M-x slime-cycle-connnections works for me
18:22technoma`right; it can't figure out for you which buffers belong to which slime connection
18:23TimMcI tend to have 1 Emacs open on each workspace, so I would just have a separate slime for each.
18:23slyrustechnoma`: true
18:25chris-m-ri'm getting an error '; evaluation-aborted' in a slime-repl, (emacs / slime-connect) and it provides no stack-trace, is there a reason for this? and is there a way to get the stack trace?
18:26chris-m-r(calling a multimethod)
18:31TimMcchris-m-r: What does (pst) do?
18:32chris-m-rTimMc: umm, like this? (pst) Unable to resolve symbol: pst in this context [Thrown class java.lang.RuntimeException]
18:33chris-m-rI found the error, a function taking the wrong number of arguments - however I don't understand why I didn't get a stack trace
18:34TimMcI don't use slime... but it is it possible you didn't escape back out to the top level before running pst?
18:35TimMc(If it's anything like this one REPL I used...)
18:36chris-m-r(pst)
18:38chris-m-rpst usually works fine, however after that error it wasn't - fairly certain I was top level, I think it might be something to do with log4j
18:46y3diSirDinosaur: what did they say when yu asked about opensourcing datomic? i dced
18:47RickInGAjcrossley3: Sorry for the delayed response. Glad to hear from another person near Atlanta
18:51jcrossley3RickInGA: indeed. are you the rick who posted on the lisp meetup forum?
18:51RickInGAyeah
18:52RickInGAI need to check back and see if anyone responded. I don't know if I will get an email if they do
18:53RickInGAah, excellent, I see your reply… how do you feel about Taco Mac?
18:55jcrossley3RickInGA: i don't like the one near me. :)
18:56RickInGAIf you are in Roswell, do you like Harp Irish Pub? That would be easy for people to get to in case anyone sees it on the Lisp group
18:57nenorbotHi... does anyone know what reason there could be for incanter to ignore my :title/:x-label/:y-label options I give when creating an xy-plot?
18:57jcrossley3RickInGA: is that the one over behind that sandwich shop? i haven't been there in a while, but yeah, it's cool.
18:58jcrossley3RickInGA: i thought you meant beer in SJ, not ATL. :)
18:58RickInGAhaha, ok can have one there too
19:00RickInGAwas hoping if we posted on the user group board we might get other people to stop by too, try and get some community involvement
19:00errklei like the sound of that
19:01jcrossley3RickInGA: sure, count me in. the worst that can happen is that you and me and errkle share a few beers. :)
19:02errkleovertone jam sess.
19:02errkleworst that can happen is we blow our ears out
19:02RickInGA:)
19:03RickInGAjcrossley3: errkle: when you guys want to get together? thursday night? saturday afternoon? other?
19:03errklei like thurs nights / this saturday i'm w/family
19:03errkle
19:08jcrossley3thurs should work for me
19:09RickInGAcool, what time you guys want to shoot for? 6? 7?
19:09jcrossley37's good
19:10RickInGAcool, I will post that on the Lisp group. errkle you know where Harp is?
19:13RickInGAerrkle: http://maps.google.com/maps?saddr=&amp;daddr=1425%2BMarket%2BBlvd%2C%2BRoswell%2C%2BGA%2B30076&amp;hl=en
19:19errklethankyou
19:26jcrossley3RickInGA: errkle: just found out i have a band concert to attend at 6:30 thurs, so i'll be closer to 7:30-8, sorry.
19:26RickInGAok, no problem, we'll just have the first round without you
19:26jcrossley3:)
19:27RickInGAso you guys can find me, I look like my picture on twitter @rickhall2000 (and yes I really am that ugly)
19:28jcrossley3RickInGA: followed
19:31burlappsackcheck
19:38errkle18:30 Thursday, March 8th, Roswell Ga
19:39RickInGAerrkle: 19:00, (though I will probably be early)
19:39RickInGAI'll be the fat guy with the mac book and the guinness
19:49pipelinehow do i determine which clojure is launched byuclojure-jack-in ?
19:50qbgthe one specified in project.clj
19:51gfrederickspipeline: I think there's a ##(clojure-version) function as well
19:51lazybot⇒ "1.3.0"
19:51pipelined'oh
19:51pipelineI should have thought of project.clj
19:51gfredericksfor when you're extra paranoid
19:51qbg&*clojure-version*
19:51lazybot⇒ {:major 1, :minor 3, :incremental 0, :qualifier nil}
19:51qbgThat too
19:51gfredericksyeah for when you're triple-extra paranoid
19:51TimMcRickInGA: A typo on your website made for an intriguing out-of-context snippet: "compiled verses"
19:52qbg(System/exit 0) for when you are really paranoid
19:52RickInGAoops
19:52TimMcRickInGA: I'm imagining writing a compiler for song lyrics.
19:52TimMc:-)
19:52gfredericksTimMc: start with the parser, that should keep you occupied for a while
19:53qbgTimMc: Make it work with overtone
19:53TimMcgfredericks: seq, done
19:53gfredericksboooh
19:53TimMcThe AST generator is going to be harder this way, though.
19:53RickInGAI wrote that post a week or so ago, but just had 'this doesn't apply to clojure' for the compilation, at the last minute today I decided to write more. Now I regret it :)
19:54RickInGAoh, verses as in vs. is that spelled wrong?
19:54RickInGAor just a pun
19:54TimMcoh, it's actually "complied verses" -- double typo!
19:54TimMcRickInGA: "versus"
19:54qbgOf by one error
19:54TimMcqbg: haha, nice
19:55RickInGAthat's what happens when you go from a 17 inch monitor to a 13 inch!
19:55TimMcNot trying to pick on you, just having fun with language.
19:55gfredericksfanguage
19:55RickInGAno worries, pretty funny
19:56RickInGAI am just delighted anyone reads my stuff!
20:13lynaghkIs it possible for a protocol to require implementation of another protocol?
20:13brehautno
20:13brehauti dont believe so
20:13lynaghke.g., implement these functions, plus (invoke [this x])
20:14FrozenlockIP ---> TCP would be a good example of a protocol requiring another protocol, no?
20:14ibdknoxlol
20:14ibdknoxdifferent kind of protocol ;)
20:14gfredericksshouldn't the arrow go the other way?
20:15FrozenlockDepends, I work from the ground up :P
20:28hiredmanqbg: https://github.com/hiredman/syntax-quote/blob/master/src/syntax_quote/core.clj
20:28amalloyqbg: clojure.tools.macro
20:28hiredmansort of ish
20:29qbgThis is for core.logic, so that limits what I can use
20:30gfrederickswhat is a symbol macro?
20:30qbgInstead of a call
20:30qbgit looks like a symbol
20:30gfredericksthe symbol-macrolet example is really weird
20:31qbgSo you could have foobar expand into (lots-of-crazy-stuff a b c)
20:31RickInGAjcrossley3: I am watching the lightning talks from clojure conj 2011, didn't know I would see you there!
20:31qbgI've used them in CL before to define executable pixel art
20:31hiredmandefn:let::defmacro:symbol-macrolet
20:32gfrederickshiredman: very nice, thank you.
20:32gfredericksI still don't understand why (def def foo); is it because the first def is a special form which precludes the second def being symbol-macro-replaced?
20:32hiredmanmy let-smacros is strickly substitution
20:33hiredmandef only has meaning that the beginning of a list
20:33gfrederickshiredman: right, but in (symbol-macrolet [def foo] (def def def)), only the third def got replaced
20:34amalloygfredericks: yes, that's why
20:34amalloyonly the third def is an expression. the first is a special form dictating that the second is a name
20:34gfredericksso does the symbol-macrolet macro know about def? or does the compiler somehow get to the inner form first?
20:35amalloygfredericks: whose symbol-macrolet are you talking about? tools.macro?
20:35gfredericksyeah
20:35gfredericksI'm looking at the example in the README
20:35gfredericksI guess I could go look at the code
20:35amalloytools.macro has a very complex code-walker
20:36qbgA reason why it should live in the compiler
20:36amalloyabsolutely
20:36qbg"wait for new compiler" it says on Confluence
20:36gfredericksI guess that means it's the former
20:37amalloy(macrolet [(inc [x] `(dec ~x))] (+ (inc 1) (let [inc clojure.core/inc] (inc 1)))) - tools.macro is smart enough to only replace the first instance of inc, because the second is shadowed by a let, i believe
20:37lynaghkwhoa, does reify not work with protocols that have multiarity functions?
20:37amalloylynaghk: you're either getting the syntax wrong, or using varargs
20:38gfredericksamalloy: that is pretty intense. I would not want to have written the code to do that.
20:38gfrederickswhat if you macrolet let first?
20:38TimMclynaghk: Collapse multiple arities into a single form
20:38amalloydunno
20:39lynaghkTimMc: just tried that, no luck
20:39TimMclynaghk: (foo ([] ...) ([a b c] ...))
20:39TimMchuh
20:39lynaghkamalloy: https://gist.github.com/255b708b7a6e7a1647ba
20:40amalloyyou got the protocol definition wrong
20:40amalloy&(doc defprotocol)
20:40lazybot⇒ "Macro ([name & opts+sigs]); A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string \"A doc string for AProtocol abstraction\" ;method signatures (bar [this a b] \"bar docs\") (baz [this a] [this a b] [this a ... https://refheap.com/paste/935
20:41lynaghkah, yes I did. Thanks amalloy
20:44gfredericksin the future clojure will have symbol macros?
20:45hiredmanI think so
20:46hiredmanit's in the confluence wiki as something desired whenever the compielr gets rewritten
20:46gfredericksI've only just heard of this rewriting -- I imagine rewritten in clojure?
20:47hiredmanyes
20:48hiredmanhttp://dev.clojure.org/display/design/letmacro
20:49gfrederickshiredman: thanks
20:59qbgOh boy, I almost want to use potemkin now...
20:59ztellmanqbg: what pushed you over the edge?
21:00qbgHave you see core.logic?
21:00qbgMerging gensyms would be useful in more than one occasion...
21:01PntBlnk_Hi all. Quick question: how do I call an inherited instance method on a class? I can see the inherited methods with .getMethods, but not with clojure.reflect/reflect.
21:06qbgPntBlnk_: I think you want to specify the :ancestors option to reflect
21:08jcrossley3RickInGA: yep :)
21:09PntBlnk_qbg: Thanks, I'll have a go. I presume I should be looking at :import options for something similar as well?
21:10qbgPntBlnk_: Not sure I understand. Take a look at the doc for type-reflect
21:11PntBlnk_qbg: well I want to actually use the method, not just see it when I call reflect. I'm sure I can find my way with your pointers. Heading to the docs... Cheers.
21:12qbgPntBlnk_: You don't need to import anything to call a method
21:12qbgYou only need to import class that you don't want to fully qualify
21:12TimMc&(.byteValue 5)
21:12lazybot⇒ 5
21:13TimMcLook ma, no imports.
21:13TimMc(On second thought, I have probably totally misunderstood your question.)
21:15PntBlnk_qbg: I'm not sure I understand. I've imported com.unboundid.ldap.sdk.SearchRequest, which inherits a setControls method from com.unboundid.ldap.sdk.UpdatableLDAPRequest. I get a no matching method found when I try to call it...
21:16qbgYou're probably calling it with the wrong number (or type of) arguments
21:16TimMcPntBlnk_: Ah, then you probably need to do a cast, or maybe it is a varargs problem.
21:16qbgWhat does the method sig look like?
21:16qbgIf it has varargs, you need to box those args in an array manually
21:19PntBlnk_qbg: public final void setControls(Control... controls)
21:19qbgYeah, you'll need to box those
21:20TimMcPntBlnk_: Control... is Java slang for Control[]
21:20qbgYou may find into-array useful
21:20gfredericksthat sounds like a good macro. I bet one already exists.
21:20gfredericksmaking arrays always takes me several tries :/
21:20PntBlnk_TimMc: So I'm getting the error because I'm passing an "unboxed" control to the method?
21:21qbgYou are passing some number of Controls instead of a Control[]
21:21amalloygfredericks: what macro?
21:21scriptorinto-array exists
21:21PntBlnk_qbg: Thanks! I understand now.
21:21gfredericksamalloy: a macro for calling vararg java functions
21:22amalloyit's not as easy as you think
21:22gfredericksamalloy: cuz of types?
21:22amalloythat's some of it
21:22TimMcgfredericks: Smarter reflection code would probably be enough.
21:22boodleHi, why is this false? (contains? (range (int \A) (int \Z)) (int \A))
21:22amalloythe other is that you have to be very explicit about how many fixed args there are
21:22qbg&(doc contains?)
21:22lazybot⇒ "([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or ... https://refheap.com/paste/941
21:23qbgThat is why
21:23gfredericksamalloy: yeah for that I imagined a vector literal at the end, rather than ambiguously open
21:23PntBlnk_qbg: (.setControls (SearchRequest. searchbase SearchScope/SUB account-filter (into-array ["*"])) (into-array [(SimplePagedResultsControl. 100 nil)])) works a treat. Thanks again. I'll add that one to my Gotcha's list...
21:23qbgcontains? is for map like collections
21:23gfredericksso not too much gain, but easier in my mind than remembering how the different array functions work
21:23TimMcheh
21:23amalloyin that case, it's only difficult because of types :P
21:24TimMcVarargs make me in nervous in Java, actually.
21:24TimMcI'm still not clear on where they might be ambiguous.
21:24boodleqbg: is there a function that is true if a sequence has a value?
21:24qbg&(doc some)
21:24lazybot⇒ "([pred coll]); Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pred, for example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} coll)"
21:24boodlek
21:24qbgSee that idiom :)
21:25amalloyTimMc: you should read some blog posts about the sneaky interplay between varargs, generics, and other stuff
21:25boodleqbg: ty
21:25amalloynightmares
21:25TimMcamalloy: Or maybe I shouldn't.
21:25gfredericks$google the sneaky interplay between varargs, generics, and other stuff
21:25lazybot[Wealthfront Engineering: November 2010] http://eng.wealthfront.com/2010_11_01_archive.html
21:27gfredericksclearly google has a long way to go
21:28amalloyTimMc: http://strangeloop2010.com/system/talks/presentations/000/014/450/BlochLee-JavaPuzzlers.pdf is one i remember
21:30gfredericksoh man
21:34TimMcaaagghhh Java WTF
21:36TimMcSo if you use a raw type, all the method type params are dropped?
21:36qbgA collection of unknown type
21:37gfredericksit is different from a raw type?
21:37qbgYes, but not by too much :)
21:37gfredericksawesome.
21:37qbgI keep running into javac bugs when I use generics
21:37gfredericksit must also be different from Collection<Object>?
21:37qbgEclipse doesn't have those bugs...
21:37TimMcgfredericks: And then List (raw) becomes a better match than Collection (raw).
21:38qbgYes
21:38qbgA Collection<Object> is a collection of objects
21:38gfredericksis there something you can do with a Collection<?> that you can't do with a Collection<Object> or vice versa?
21:38qbgThink about what it means to add an item to it
21:39gfredericksso in Collection<?> the runtime collection could have a more restrictive type?
21:39qbgYes
21:39gfredericksbut then I don't know that's not the case with a Collection<Object> as well...
21:39qbgYou really can't add anything to a Collection<?>
21:40qbgYou have to do an unchecked cast to view a more restrictive collection as Collection<Object>
21:40gfredericksbut you can read out of a Collection<?> and assign that to an Object I imagine
21:40qbgYou can't assign Collection<Integer> to Collection<Object>, but you can to Collection<?>
21:41gfredericksoh I misknew that then
21:41qbgCollections aren't covariant
21:41qbg* generics
21:42gfredericksnot understanding that phrase makes me want to learn haskell.
21:42TimMcand <?> is an escape valve for that
21:42qbgArrays in java are covariant though
21:42qbg(which is weird...)
21:42TimMcyep -- insta runtime bugs
21:42qbgAnd that causes issues with generic arrays
21:42TimMcgfredericks: I hand you an Object[], and you try to put an Integer in it -- what happens?
21:42qbgBecause it needs to be checked at runtime
21:43gfredericksTimMc: it works!
21:43TimMcgfredericks: NOPE. It was really a String[]!
21:43gfredericksCRAP
21:43TimMcThat's covariance for ya.
21:43qbgCovariance only makes sense for immutable collections
21:44gfredericksso likewise you could hand me a Collection<?> and I put an Integer in it and then I lose because it was really a Collection<String>
21:44qbgYou can't put an integer in it
21:44qbgBecause the types don't match
21:44gfredericksthe compiler enforces read-only?
21:44qbg(An integer isn't an ?)
21:45gfredericksbut an ? is an Object?
21:45qbgObject is a superclass of ?
21:45amalloyTimMc: i guess it's been a long time since i used arrays. i remember all the pitfalls about List<?> vs List<Object>, but i had forgotten that Object[] is a superclass of Integer[]
21:45TimMcYeah. Sucks.
21:45amalloythat's messed up, man
21:45TimMcThe whole Java type system is fucked.
21:46qbgWe can also cover ? extends Foo and ? super Foo :)
21:46gfredericksjava will never catch on
21:46TimMcI especially like the bit where "int i = j" can give you an NPE.
21:46qbgjavac has so many generics bugs
21:46TimMcThat'll give you a headache the first time you encounter it.
21:46amalloygfredericks: the compiler sees that you have a Collection<?> and knows it can't safely put anything in there, because it might be enforcing any type
21:46qbgEclipse works so much better
21:46amalloybut you can safely get an Object out, because everything is an Object
21:47TimMcor can be boxed as one
21:47gfredericksamalloy: it makes sense when I think about it carefully
21:47amalloyTimMc: any element already in the Collection must be an Object, if you prefer
21:47TimMcThat too.
21:47qbgIt is one, you can't have primitive generic collections
21:47amalloywith a Collection<Object>, the compiler knows the collection is capable of holding Objects, so you can put one in
21:48qbgDon't you appreciate Clojure now?
21:48gfredericksand haskell somehow does all this without being fucked up?
21:48qbgSubclassing causes all of the problems
21:48TimMcand mutation
21:49amalloygfredericks: yeah, i think it actually does, more or less
21:49gfredericksthis must be why people talk about it
21:49TimMcgfredericks: That, and the ASCII art.
21:50qbgOO does not play well with all of this
21:50qbg(Java style OO that is)
21:51qbgGeneric methods are my favorite
21:51qbgGot to love that syntax
21:52TimMcMy favorite is writing typed tuples in Java.
21:52qbgSum types!
21:53TimMcCons<String, Cons<Integer, Cons<Double, Nil>>> foo = ... ;
21:53qbgToo bad they don't work generic interfaces
21:53TimMcThat'll really fuck with your average bean-grinder.
21:54gfrederickswhich is all you can really hope for
21:54TimMcIt's the best possible outcome.
21:54qbgI just define a bunch of TupleN types
21:54TimMcqbg: Just like Haskell amirite
21:55qbgI've been basically porting some useful Clojure functions to Java at work
21:55TimMcOh wait, no... I'm thinking of zip2, zip3, zip4...
21:55qbgBut if I go all out with generics, javac dies :(
21:56qbgjavac isn't very good at type inference
21:56brehauttodays understatement award goes to qbg
21:57qbgIt wouldn't be so bad if eclipsec was broken also
21:57qbgBut as it stands, your code compiles fine in eclipse, but the maven build dies
21:57scriptorwhat's eclipsec?
21:57qbgThe eclipse compiler
21:57TimMca typo
21:57TimMcoh
21:58TimMc<- bad snarker, no muffin
21:58scriptorwait, eclipse has its own compiler, it doesn't use the existing jdk?
21:58scriptorthis is why I don't do java
21:58qbgIt needs it for the incremental compilation
21:58qbgand other good stuff
21:58qbgLike turning syntax errors into runtime errors
21:58scriptorah
21:59qbgThat bytecode is fun to look at
21:59qbgThis method just throws an exception...
21:59gfredericksoh it compiles syntax errors into exception-throwing methods?
21:59qbgYes
21:59brehautthats different
22:00qbgBy default, you can change that
22:00gfrederickspresumably it couldn't do that for all syntax errors
22:00qbgEclipse handles syntax errors really well
22:01amalloyeclipsec is nice, but it's a bit awful to push/commit source files that don't compile under javac
22:01qbgThey could basically add a DWIM mode and have it be correct a majority of the time
22:01amalloyi usually used it to make the compiler stricter, not looser
22:01qbgI turn on a lot of extra warnings in Eclipse
22:02qbgBut then I look at coworker code, and there are warnings everywhere...
22:03amalloyat one time i went a bit mad, turning tons of warnings into errors. "no, never let me check something for null if you already know whether it's null"
22:04qbgI keep the Javadoc warning off for the most part :)
22:05amalloyeclipse writes so much code for you. i speculate this is why java programmers don't realize they need macros
22:05qbgNo, just ignorance
22:05qbgI still want macros so bad in Java
22:06qbgI don't want to use ASM...
22:07pipelinejava is verbose enough that macros would end up like C preprocessor macros anyway
22:08scriptorI wonder if some sort of lazy evaluation would be a good start
22:08scriptorso that the arguments aren't immediately evaluated
22:08qbgThe impl doesn't matter as much as the resulting syntax
22:09qbgThe most common use of macros for me would be for defining classes
22:09amalloyhow does verbosity have anything to do with lisp vs c macros? the difference is homoiconicity
22:10gfrederickswe could make java homoiconic by replacing all the basic data structures with ASTs
22:11qbgOr we could just use Clojure instead
22:11scriptorwouldn't have to replace them
22:11scriptorjust add the AST data structure
22:11gfredericksI guess so
22:11scriptorwhat's perl 6 doing?
22:11scriptorI think it's something like that, with their macros
22:26jcromartiedoes anybody really use derby with Clojure?
22:26jcromartiethe examples I'm finding are not usable
22:31jcromartielooks like H2 is the way to go
22:31jcromartiedone!
22:32RickInGAwhat are derby and h2 for?
22:32jcromartiethey are embedded pure-Java databases
22:32jcromartieDerby is an Apache project
22:32RickInGAah, cool
22:32jcromartieH2 seems to be a bit more lively
22:33jcromartienow I know
23:00zawzeyhmm, how do i force a lazy-eval? i tried (str "some sequence: " (doall a-lazy-seq)) but it returns "some sequence: clojure.lang.LazySeq@e93c3"
23:00zawzeyonly works when i replaced doall with vec
23:01zawzeyi meant, how do i force the eval of a lazy sequence in that case, doall didn't seem to work. why?
23:03amalloydon't use str
23:03amalloypr-str
23:04hiredmanzawzey: doall does force it, but that doesn't change the resuting of calling str on it
23:04zawzey@amalloy well i wasn't trying to print it.. per se, just returning some string for unit tests
23:05TimMcamalloy: Whoa, #5 in that slideshow (EnumMap) is just terrible. That's a straight-up Java bug, nothing to it. :-(
23:05amalloyTimMc: yeah, i was horrified when i discovered IdentityHashMap does that
23:06zawzeyhiredman: so what is the proper way to do that in this case
23:06hiredmanzawzey: what amalloy said
23:10zawzeythanks guys, that works, now could i ask why prn-str works?
23:12TimMczawzey: pr (the underlying fn) means "print for reader"
23:13TimMcpr-str is a variant that returns the result as a string instead of printing to stdout
23:13TimMcprn and prn-str are further variants that tack on a newline
23:14mkwhy isn't str simply equivalent to pr-str?
23:14TimMcbecause it calls the .toString method on things
23:15mkwhat does the other do?
23:15TimMcstr makes things responsible for printing themselves. pr does the work for them, and works against various abstractions.
23:16zawzeyso str doesn't evaluate lazy sequences as a side effect?
23:17mkpr source: https://github.com/clojure/clojure/blob/f5f827ac9fbb87e770d25007472504403ed3d7a6/src/clj/clojure/core.clj#L3267
23:17zawzeybut in that case, i tried to force the lazy sequence to be evaluated with doall
23:18mkzawzey: I'm guessing, but perhaps str calls .toString on the lazy sequence object itself, while pr does something else
23:21zawzeymk: well doall does call dorun which also walks through the sequence
23:21zawzeyhttps://github.com/clojure/clojure/blob/f5f827ac9fbb87e770d25007472504403ed3d7a6/src/clj/clojure/core.clj#L2714
23:23mktotally guessing now, but perhaps: yes, it walks through the sequence, but the sequence doesn't become something new, it's still a LazySequence, so when you .toString it, that's what ya' get
23:36amalloycorrect, mk
23:38scriptorthe 2nd and last expression in doall just returns coll
23:56macSirDinosaur: what did they say when yu asked about opensourcing datomic? i dced
23:59mkmac: http://clojure-log.n01se.net/