#clojure logs

2012-02-23

00:10jaimefis there an equivalent to ruby .methods?
00:11callenjaimef: forget everything you knew about Ruby, just learn Clojure as a blank-slate. I recommend getting a book.
00:11jaimefok lets refr
00:12jaimefrephrase without the assumption ofb a common frame of reference
00:12callenjaimef: it doesn't port over conceptually
00:12callenjaimef: I'm not trying to be difficult, you need to drop the concept of object-orientation entirely.
00:12jaimefso no (class []) then?
00:12callenjaimef: you can solve some similar problems in some cases, but you need to wipe your mind clean.
00:13callenjaimef: no, that's effin' ridic man. Hickey intentionally avoided OO. Just learn it from scratch./
00:13jaimeflike recur?
00:13jaimef;)
00:14jaimefin a repl i was looking to see if there was a way to display all functions that can be applied to a specific data type
00:15emezeskejaimef: that's going to be a looooooooong list
00:15jaimefyeah figured
00:15emezeskejaimef: consider this function (fn [x] [x x])
00:15emezeskejaimef: that can be applied to any data type
00:15jaimefyeap
00:18emezeskejaimef: maybe 'ns-publics' could be helpful? generally the functions that deal with a particular piece of data will be in the same namespace
00:19emezeske,(ns-publics 'clojure.java.io)
00:19clojurebot{output-stream #'clojure.java.io/output-stream, copy #'clojure.java.io/copy, file #'clojure.java.io/file, writer #'clojure.java.io/writer, as-relative-path #'clojure.java.io/as-relative-path, ...}
00:20cemerickThere's always what's behind findfn…
00:20cemerick$findfn foo :foo
00:20lazybotjava.lang.RuntimeException: Unable to resolve symbol: foo in this context, compiling:(NO_SOURCE_PATH:0)
00:20cemericker
00:20cemerick$findfn "foo" :foo
00:20lazybot[clojure.core/keyword clojure.core/find-keyword]
00:22jaimefnice thanks.
00:24amalloyemezeske, jaimef: if we were as strongly typed as haskell we could use hoogle, but instead we have findfn
00:24emezeskeamalloy: yeah, hoogle is great!
00:25amalloybecause the type of that function would be something like (a -> (a, a)), which tells you a lot; presumably you would have something more specific in mind for "all functions that can be applied to a type"
00:26emezeskeamalloy: you just reminded me how much I miss haskell's currying :(
00:27amalloygo write some haskell, so you can miss varargs instead
00:28emezesketouche`
00:28emezeskewell that, and I will miss being able to throw in some IO wherever I damn well please
00:28emezeske"no, I'm not going to leave this here and ruin the purity. but yes, I DO WANT A PRINTLN HERE FOR THE MOMENT."
00:31amalloyyeah, i never quite understood the IO type/monad/whatever
00:31amalloy(you can tell i didn't get very far in my haskell)
00:32emezeskeit's pretty cool that your code is proved to be side-effect free, but between that and the pervasive laziness, I find debugging difficult. Maybe that's just due to my "all I need for debugging is println" mindset though...
00:43lynaghk``Is there a way to see if something is "applyable"? Basically, (applyable? :key) and (applyable? (fn [x] ...)) should both be true
00:47amalloy&(doc ifn?)
00:47lazybot⇒ "([x]); Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn"
00:47lynaghk``ah, thanks amalloy
00:48amalloy$findarg map % [#() [] {}, 1 true ()] [true true true false false false]
00:48lazybot[clojure.core/ifn?]
00:48lynaghk``whoa, that's a nice trick.
00:50amalloyyeah, i should add a version of findarg that takes a map of [in, out] so you can ignore the map % stuff, and group things together
00:57pmbauerexit
02:26_ulisesmorning all
02:26_ulisesor evening, depending on your tz
02:29emezeske_ulises: Goooooood mornin'!
02:29_ulisesmorning sire!
02:29emezeske:)
02:32_uliseswhat's the preferred way of writing tests which include resources in terms of paths?
02:33_ulisese.g. if I want to test a fn such as load-data, I'm thinking of doing (let [loaded (load-data ".....")] (is ...))
02:33_ulisesso I'm wondering about the best way of filling in the "..." gap there
02:34_ulises(ideally I'd stay away from things like "../../resources/data.foo")
02:36emezeske_ulises: if it's on the classpath (which I think /resources is), you can do (resource "data.foo") maybe?
02:36_ulisesah, cool, I was just reading about that
02:37_ulisesthank you, oh! distinguished sir!
02:37emezeske^_^
02:41ibdknox|awayI just made a noir app with a console to modify the app from within itself lol
02:42ibdknox|awayit seems a clooj-like env done as a webapp would be pretty easy to build
02:42emezeskeibdknox|away: it's noirs all the way down
02:42ibdknox|awaya black hole ;)
02:43ibdknox|away~rimshot
02:43clojurebotBadum, *tish*
02:43emezeske^_^
02:43emezeske~(def rumshot "Glug, glug, glug...")
02:43clojurebotPardon?
02:43ibdknox|awayalso, where are you guys such that it's morning?
02:44emezeskewell, for me it's 12:43 AM
02:44emezeskeeeeearly morning :)
02:44_ulisesfor me it's 7:43am :'(
02:44_ulisestrying to do some clojure before going to work
02:45ibdknox|awayyeah I'm PST, so 11:44
02:45magnarsIt's always morning when entering an IRC-channel, ref Universal Greeting Time. http://thinkmoult.com/ugt.html :-)
02:45emezeskeI'm out, catch y'all later
02:45_ulisesenjoy
02:45_ulisesI like that magnars
02:45ibdknox|awaylol
02:58hiredmanrepl running on streams backed by a message queue (hornetq) https://github.com/hiredman/vespa-crabro/blob/master/test/vespa_crabro/test/core.clj#L60
03:21ideally_worldI'm a bit confused around java.clojure.io/reader. Using the first example on http://clojuredocs.org/clojure_core/clojure.core/line-seq works, but if I remove the count, I'm getting an IOException from BufferedReader ensureOpen, but no idea why :(
03:24amalloyi haven't looked at your link, but: laziness
03:24Fossiyeah
03:24Fossii get: stream closed
03:24amalloyi'm afk, someone else clarify about with-open
03:25tsdhamalloy: Yep, I do.
03:25Fossibecause the count realises the line-seq
03:25Fossi(with-open [rdr (clojure.java.io/reader "/etc/passwd")] (doall (line-seq rdr))) works again
03:26Fossiwith-open closes the stream when the execution is leaving it's scope
03:26ideally_worldyeah, lazy
03:26tsdhSo the problem is that you leave the with-open (and thus the reader is closed) without realizing the complete seq. If an unrealized item is tried to be consumed later on which will try to read from the reader, that's already closed.
03:26ideally_worlddoall realizes the list
03:26Fossibut you have a "dangling end" still having to read from the file for the values
03:27ideally_worldyeah, getting it now, thanks :)
03:27Fossii hate those issues :/
03:27Fossiit's worse with exceptions
03:27ideally_worldOK, so have to evaluate the lazy seq in the with clause
03:30ideally_worldthat's subtle, but obvious
05:39tsdhDo I see it correctly that extending protocols will always respect the type hierarchy, i.e., I can extend a protocol to Object first as a default, and later to more specific types, and an invocation will always be performed to the most specific definition?
05:56morphlingtsdh: yes. protocols use dynamic single dispatch, just like java interfaces
05:57tsdhmorphling: Perfect.
07:46tsdhDoes clojure.core/*assert* have anything in common with the -ea JVM option?
07:53tsdhHm, seems no.
08:17bsteuberI love the extensible reader
08:17bsteubercan't wait to abuse it
08:18bsteuber#infix [3 * x + 1]
08:19bsteuber#keys [a b :or 42 c] instead of {:keys [a b c] :or {b 42}}
08:29clgvbsteuber: #infix is great from the mathematic point of view
08:31bsteuberbut I guess one of the guidelines will be "never do reader syntax when a macro just works"
08:34cemerickwell, it's not really reader syntax
08:34cemerickbut, carry on :-)
08:35bsteubersure it doesn't parse strings
08:35bsteuberbut clj data
08:35bsteuberso way better even :)
08:38bsteuberand cleanly serializable records comes for free
08:43bsteubersince records can hold additional data, we also have roundtripping between different versions
08:43bsteubertry that, java guys
08:49bsteuberoh the record stuff was already possible before, my bad
08:50bsteuberbut not with custom formats at least
09:10jsabeaudry,(print (char 2))
09:12jsabeaudryIs there there a name for all the non printable characters (such as \newline) or is (char n) the idiomatic way to represent them?
09:13jsabeaudryAll resources I say mention only newline space and tab
09:13jsabeaudrys/say/see/
09:18TimMcWhat is the point of the io! function?
09:18TimMcI mean, I know what it *does*.
09:20TimMcI'm just having trouble understanding where it would get used. println doesn't use it, for instance.
09:20hoeckjsabeaudry: only a few of them have names, I'd say (char n) is okay, or unicode notation: \u0008
09:21jsabeaudryhoeck, Thanks!
09:21TimMcjsabeaudry: I think you'd have to check the reader's documentation and source.
09:22hoeck,(filter #(< 2 (count %)) (map #(pr-str (char %))(range 32)))
09:22clojurebot("\\backspace" "\\tab" "\\newline" "\\formfeed" "\\return")
09:22hoeckjsabeaudry: ^ those are the named ones
09:22TimMchaha, nice
09:22jsabeaudryhoeck, nice trick!
09:38TimMcProbably no coincidence that they all begin with their shortform letter.
09:38TimMc\r[eturn], \f[ormfeed]...
09:39TimMcbut I suppose the connection is just that the short forms are abbreviations for the canonical long-names.
09:40raekjsabeaudry: TimMc: the long names are stored in the char-name-string map
09:40raek,char-name-string
09:40clojurebot{\space "space", \backspace "backspace", \tab "tab", \newline "newline", \formfeed "formfeed", ...}
09:42raekjsabeaudry: what do you mean by "the idiomatic way to represent then"? the ideomatic way to write them as literals in code?
09:44babilenTimMc: Sorry for getting back to you just now, but I owe you my thanks. Your code still had some problems in that it did not behave exactly as split would for strings -- I am using https://refheap.com/paste/806 now and am pretty happy with it. Thanks so much for all your pointers!
09:45babilenTimMc: In particular (split-at-subsequence [1 2] [1 2 1 2 1 2]) -> () \o/
09:52pjstadig~mascot
09:52clojurebotthe official mascot of clojure is a futuristic ninja robot
09:52clgv&char-name-string
09:52lazybot⇒ {\space "space", \backspace "backspace", \tab "tab", \newline "newline", \formfeed "formfeed", \return "return"}
10:08tfarojust wondering...where can i get steroids - I want to learn clojure
10:12mdeboardwhat.
10:12clgvtfaro: lol, that's possible without steroids :P
10:12mdeboardhe left
10:13clgvmdeboard: ah. I filtered those messages ^^
10:13mdeboardoic
10:13clgva pity my client cant filter the renaming ones as well^^
10:18ssedanoHi, how can I print (log) the actual class of a variable?
10:19clgvssedano: via (class v)
10:19clgv&(let [v 2.0] (println (class v)))
10:19lazybot⇒ java.lang.Double nil
10:35TimMcmdeboard: Bah, short-timers.
10:35mdeboardlol, indeed.
10:37Fossiyeah, this channel tends to be mainly leave and joins if you display them ;)
10:38mdeboardAt certain times of day absolutely
10:38mdeboardI'm sure there's a way for me to turn them off in RCIRC I just don't bother
10:38clgvthats why I switched those off^^
10:41TimMcA useful feature would be to only show nicks, parts, re-joins, and quits of those who have spoken recently.
10:41clgvindeed
10:42mdeboardDo you guys all use emacs for irc
10:43clgvnope.
10:43mdeboardor am I alone a god
10:43vijaykiranyup
10:43TimMcmdeboard: I recall someone here using ERC
10:44vijaykiranI use rcirc - switched from erc
10:44mdeboardya rcirc is great
10:45vijaykiranC-c C-i is Omit mode - which keeps the channel clear for me without those join/left noise .. FWIW
10:45mdeboardOh wow
10:45mdeboardYou are a god
10:45mdeboardI tremble before you
10:46vijaykiranWait .. C-c C-o (omit mode) and C-c C-i (ignore the activity) so no modeline indication
10:46vijaykirannow you can tremble .. for realz :P
10:46mdeboardamazing
10:47ssedanothank you clgv (sorry I was away)
11:10micahmartinI've been researching reader macros. Back in 2008 Rich took a hard stance in not supporting them. What's the verdict these days? Is it possible to define a new reader macro in Clojure?
11:12`fogusmicahmartin: While not technically a reader macro in the CL sense, the upcoming 1.4 tagged literals get you close
11:12TimMcmicahmartin: Not in a non-sketchy way, no.
11:12TimMcTechnically, you can bust into the reader and do horrible things to it programmatically.
11:14micahmartinWith clojure.core/print-method it's possible to print new types….
11:14micahmartin… but how can I tell clojure how to read in the new types?
11:14pjstadigyou can't except possibly with the tagged literals in 1.4 as `fogus said
11:14TimMc. o O ( precate, is that the opposite of decprecate? )
11:15TimMcs/dec/de/
11:15`fogusThey look like this: #tag-name <some-valid-clojure-form>
11:15pjstadigTimMc: i think it's actually proprecate
11:15TimMcmicahmartin: There's also the semi-undocumented #=() eval-in-reader form, but people will throw things at you if you use it.
11:16TimMcI would imagine it is going away in 1.4.
11:17TimMcHaha, it is! "You know, the opposite of deprecate."
11:17TimMc"Suggest a new project.clj that's compatible with Leiningen 2."
11:20micahmartin,(read-string (pr-str (java.util.Date.)))
11:20clojurebot#<RuntimeException java.lang.RuntimeException: Unreadable form>
11:21micahmartinIs there "accepted" way to tell the reader how to read a Date?
11:21cemerickTimMc: yup, lein precate is an auto-upgrade tool for project.clj files.
11:23`fogusmicahmartin: ATM (clj 1.3 and below) people accomplish that via #=
11:23micahmartin`focus: thanks… I'll look into that
11:24`fogus,(read-string "#=(java.util.Date.)")
11:24clojurebot#<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>
11:24`fogusOf course that will not work!
11:24jsabeaudry,(byte 0xff)
11:24clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for byte: 255>
11:24jsabeaudryReally java?
11:24TimMcjsabeaudry: No unsigned bytes.
11:24TimMcSort of.
11:25jsabeaudryCould do an automatic conversion
11:25TimMc&(.byteValue 255)
11:25lazybot⇒ -1
11:25TimMc&(.byteValue 256)
11:25lazybot⇒ 0
11:26jsabeaudrySo basically (byte (.byteValue n)) everytime, might as well shadow byte with that
11:26TimMcsure
11:29TimMc(defn ^byte ^:by-hook-or-by-crook byte [^Long x] (byte (.byteValue x)))
11:30TimMcs/lack of refer-clojure and explicit namespaces/fixed/
11:31mrevilis there a more concise way to do this: (repeatedly (fn [] (somefn server keyspace "packages")))
11:32jsabeaudryusing #()
11:32jsabeaudrythat shaves off a couple of characters if you are golfing
11:32mrevilcool, ty
11:33dnolentscheibl: hey I think we should just fix the unicode issue once and for all, just patching the keyword / symbol is case is not really addressing the issue
11:34dnolentscheibl: we should use StringBuilder to go over char of a string, replacing chars with values > 127 (I think)
11:34stuartsierraTimMc: I don't think that will work.
11:35mrevilis there a way to speed up lein uberjar? it takes forever, and I end up calling it frequently to test with hadoop.
11:35stuartsierraat least, it won't get you a primitive `byte`
11:35TimMcstuartsierra: Because you won't get the inlined RT method?
11:35stuartsierraTimMc: More that fns cannot be type-hinted to return primitive `byte`
11:36stuartsierraAt best you'll get java.lang.Byte
11:36TimMchrmph
11:36jsabeaudryhttp://clojuredocs.org/clojure_core/clojure.core/char This says a byte can be coerced to char but thats only true for half the bytes right?
11:37TimMcstuartsierra: But if :inline were used, you could get a primitive byte, since it would be a VarInvokeExpr, right?
11:37stuartsierraI don't think so.
11:38stuartsierraThere's no IFn interface that returns primitive `byte`
11:38stuartsierraOnly combinations of long, double, and Object.
11:38TimMcstuartsierra: clojure.core/byte does it somehow
11:39stuartsierraonly in loops
11:39TimMcHah, interesting.
11:39TimMcloop locals?
11:39stuartsierrayes
11:39TimMcInteresting, thanks.
11:39stuartsierranp
11:40cemerickTimMc: that's inlining at work, if I'm not mistaken.
11:40TimMcstuartsierra: It also takes effect for method calls, right? (.takesAByte (byte whatever))
11:41stuartsierraum ... yes? I think.
11:41stuartsierraThe fns like `byte` and `int` are weird. In some contexts the compiler treats them like casts.
11:42stuartsierraBut they're also ordinary functions, with all the usual function behavior, including number boxing.
11:55cemerickTimMc: Yes, again because of inlining.
12:02dnolenTimMc: 'some contexts' aka usage that is not higher order
12:05fliebelcemerick: Did you ever get around to publishing raposo?
12:07fliebelI just found your conj 2011 talk, after getting stuck with Udacity. http://blip.tv/clojure/chas-emerick-modeling-the-world-probabilistically-using-bayesian-networks-in-clojure-5961126
12:08fliebelstuck, meaning that I was fine with moving robots, but had a little trouble when it was suddenly about math.
12:25cemerickfliebel: not yet; it's in the background at the moment :-(
12:25humasect& ?
12:25lazybotjava.lang.RuntimeException: Unable to resolve symbol: ? in this context
12:25humasect& (+ 1 2)
12:25lazybot⇒ 3
12:25humasectohh =)
12:25humasecti meant, background-process ^_^
12:27fliebelcemerick: Just FYI, a whole new generation of "bayesians" is is being taught at Udacity.
12:27cemerickheh, that's good!
12:28tufflaxvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
12:28tufflaxops
12:29fliebelcemerick: http://www.udacity.com I'm doing their robotics class.
12:30fliebelATM my mental model of bayesian distributions is aparrently only suitable for moving robots :(
12:30fliebeloh, and determining of the ground is wet.
12:32tmciverfliebel: udacity looks cool. Is there a cost to enroll?
12:37technomancymdeboard: M-x rcirc-omit-mode is what you want
12:37technomancyit's the best thing about rcirc IMO
12:37mdeboardYeah that's damn cool
12:38technomancyTimMc: yes, precate is the opposite of deprecate
12:38humasectapprecate ?
12:38technomancyin my made-up logic anyway
12:38mdeboardoh wow
12:38mdeboardM-x rcirc-cmd-bright is neat too
12:38pandeirois rcirc another irc mode?
12:38mdeboardpandeiro: yeah
12:39pandeiroi still love erc, i guess one day it will wear off
12:40technomancyI went back to erc because rcirc doesn't work well with our private IRC server, but I like rcirc better overall.
12:40pandeirotechnomancy: way more features?
12:41technomancypandeiro: no, in general it's simpler
12:41pandeirowow, simpler than erc, now i'm interested
12:42technomancy2.4kloc
12:42technomancyanyway, erc silently swallows input in query buffers when the target has gone offline, and rcirc-omit-mode is great for only showing the join/part messages you're interested in
12:43technomancyholy smokes
12:43technomancyerc with all its optional modules is 14kloc
12:44technomancythe core is 5.3kloc
12:46TimMctechnomancy: "only showing the join/part messages you're interested in", such as for people who have been active recently?
12:46technomancyyup
12:46TimMcsweeeeet
12:47technomancyin erc I just rely on my tab completion, but there are race conditions
12:48TimMcActually, I'm amazed at how small Emacs' footprint is.
12:48technomancyit's like ... eight megs.
12:48technomancyand constantly swapping
12:54TimMcHmm... does using a functional language make for programs with larger state spaces?
12:55TimMc(or at least provide for more potential for that)
12:55stuartsierraSmaller state spaces, I'd hope.
12:55technomancyit makes the state space "closer to finite"?
12:56TimMcThere's probably a vocabulary mismatch here.
12:56TimMcI'll go away and think about what I really mean.
12:57TimMcFormalization is hard, let's go shopping.
12:59fliebeltmciver: No, free.
13:00TimMcIs this the Stanford breakaway?
13:00fliebelTimMc: I'm not sure. It has Youtube with maths instead of cats.
13:02fliebelTimMc: I'd be interested in hearing the question, after you finished shopping. It seems related to my experiments with functional games.
13:04mdeboardfliebel: Did you see the story on HN today about a lisp interpreter inside some game
13:04mdeboardfliebel: http://www.a1k0n.net/2005/11/04/lisp-repl-vendetta-online.html
13:04fliebelmdeboard: No! Thanks :)
13:05fliebelmdeboard: Functional language != functional style though. There is little difference between modifying the world, and threading the world trough your functions.
13:05TimMcfliebel: Skim through this paper on exploit programming as a study of the formal properties of "weird machines" and maybe you'll end up with the same question: <http://www.cs.dartmouth.edu/~sergey/langsec/papers/Bratus.pdf&gt;
13:06TimMcfliebel: ...with FP in mind.
13:10fliebelTimMc: Can you think without FP on your mind? :P
13:11TimMcNope!
13:12TimMcI've been eating, breathing, and dreaming s-expressions for the past week or so.
13:13fliebelTimMc: I still don;t get the state space. You mean like a finit state machine?
13:13mdeboard&(reduce + (take-while #(> 10 %) (range 183490834)))
13:13lazybot⇒ 45
13:13fliebelMy skimming was... brief though.
13:14tmciverTimMc: Only the past week or so?!
13:14TimMcfliebel: Isn't that what a computer is? :-P
13:15TimMctmciver: The dreaming part is new.
13:15vintehmm -- so strange lein prob -- ive linked my maven to our internal nexus repo
13:15vintebut that seems to have killed lein's ability to install clojure stuff :(
13:15vintehow do i get it to look in clojars too?
13:16technomancyit will look in clojars as long as you don't have :omit-default-repos true in your project.clj
13:16fliebelTimMc: Yea, probably. Then I agree with stuartsierra, I would think a functional program would in general go trough less states.
13:19vintetechnomancy: i swear i have no such thing in there -- but it doesnt seem to be looking (it complains it cant find it ). It does also complain that it cant find some kind of super-pom
13:19technomancyvinte: probably a typo then
13:19technomancysuper-pom is just maven-speak for "your project"
13:20fliebelTimMc: I think that is also what is causing me trouble with my Clojure game. There are so many states, and you have to be explicit about all of them.
13:22dnolenfliebel: have you been following http://oblong-code.blogspot.com/? I curious how he's dealing with these issues
13:22vintetechnomancy: weird! okay looking into it -- brb
13:22vintecan i just say im not a maven fan
13:22pandeirofliebel: you've seen this before right? http://prog21.dadgum.com/23.html
13:23fliebeldnolen: No. Looking at it now. I did see the prog21 stuff, I'm having an email conversation with that guy now.
13:23`fogus_awaytechnomancy: lein-marg070-snap is in the wild. Thanks for the patch
13:23dnolenfliebel: he's been working on games off and on in Scala, recently switched to Clojure it seems
13:23technomancy`fogus_away: excellent. yesterday I was on a plugins rampage; lots of fun. =)
13:24`fogusanyone know if lein run causes odd runtime foibles?
13:24fliebeldnolen: Interesting, thanks :)
13:24technomancy`fogus: *in* being inaccessable is the main one
13:25technomancy`fogus: "lein trampoline run" solves that as well as a few other issues
13:25`fogusE.G. I'm seeing that clojure.core macros are returning false for .isMacro. But I've not yet tracked that cause
13:25technomancyI don't think you can pin that one on lein =)
13:26TimMcfliebel: There's a distinction to be made between state-as-your-program-sees-it and programs-as-state.
13:26`fogusIt seems unlikely for sure
13:27dnolenfliebel: Nikki and the Robots devs probably have a lot of interesting stories from developing their game in Haskell
13:27fliebeldnolen: Another one that's going to be read about later.
13:28fliebelTimMc: You're saying there is more state because the code itself is also state?
13:28TimMcfliebel: Right.
13:29TimMcSort of. It's actually not clear to me at the moment.
13:29fliebelTimMc: I don't think any of that is actual state at runtime, unless you tell it to. Like, quoting it.
13:30TimMcRead the PDF I linked, or at least skim it.
13:32TimMcI should do the same, to refresh my memory.
13:33fliebelTimMc: I skimmed it, but I have to much on my mind to actually let it sink in. I got as much as "werid machine bla bla printf blabla exploit blabla"
13:33TimMcheh
13:34fliebeldnolen: Do you know if they have any dev blog? The first few obvious google result do not even mention Haskell.
13:34dnolenfliebel: I don't think they have a dev blog which is unfortunate
13:34fliebelWhich is good, marketing wise, as long as you;re not targeting geeks.
13:35fliebeldnolen: Ok, so I'll just have to nag them for information. ;)
13:36dnolenfliebel: never a bad idea
13:37fliebeldnolen: Oh, I found the source, so I should at least do my own research for a bit.
13:38vintetechnomancy: certainly not working im afraid -- seems to die on "org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:360"
13:38vinte(mvn via eclipse is fine otherwise)
13:48technomancyvinte: hm; what exactly is wrong?
13:49vintetechnomancy: something weird with our internal settings.xml it seems
13:49vinteif i remove it -- lein works perfectly
13:49vinteso something screwed up with that, ill try and figure it out. Thanks for your help :)
13:49technomancysure; hope you get it figured out
13:56lpetitI have a java interop call to make. On the java side, the expected argument is of type Map<String, Integer>.
13:56lpetitHow do I do the interop call?
13:57lpetitI mean, when I do (.interopMethod {"key" SomeJavaClass/SOME_CONSTANT_INTEGER_FIELD}) it fails miserably on the javaside
13:57cemerickvinte: maven-ant-tasks (which lein 1.x uses) does not play nice with server authentication (or is it mirror configuration?) in settings.xml
13:58cemerickright; I need to remove my usual <mirror> config to use lein 1.x
13:58lpetitwith an exception like "Expected Integer, got Long"
13:58lpetitSome method in the Eclipse framework does: java.lang.IllegalArgumentException: "The attribute value type is java.lang.Long and expected is one of java.lang.String, Boolean, Integer"
13:58cemericklpetit: (Integer. SOME_CONSTANT_INTEGER)
13:58lpetitoh yes !
13:58amalloylpetit: that should be fixed in the 1.4 betas, as well as cemerick's suggestion
13:59lpetitthx guys
14:01amalloy(just tested; it is indeed fixed in 1.4 beta1, if not sooner)
14:05lpetitok great news,
14:47duck1123didn't there used to be a way to have leiningen install shell scripts? Is that still supported, or is it best to just make everything as a lein plugin?
14:47technomancyduck1123: it's supported in lein1; hasn't been implemented in lein2 yet but is planned
14:47technomancyinterested in hearing your use case though since afaik it's hardly used at all
14:49duck1123I'm thinking of making a simple script that does little else than send a command to a remote server. I have it as a plugin now, and was considering if I wanted it as a standalone script
14:49technomancyduck1123: note that these scripts still require leiningen installed, which is probably why they are not used very widely
14:49malkomalkohi guys, I'm migrating an app to 1.3 from 1.2, and am doing research on the clojure.contrib packages. did any of the clojure.contrib.string packages get moved or are they gone?
14:49technomancymalkomalko: clojure.string mostly, but arities have changed, so beware
14:49malkomalkoI checked http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go but didn't find anything
14:49malkomalkook
14:50technomancymalkomalko: probably because that was moved in the 1.1 -> 1.2 transition
14:50duck1123the only thing I could see it gaining me is not having to type "lein " but I couldn't find any docs on that part, so I asked
14:50malkomalkogot it
14:50technomancyduck1123: swank-clojure is the only thing that uses it afaict
14:50TimMcmalkomalko: It is listed in the text at the top -- the migration happened before 1.3.
14:50technomancynot 100% sure it should be moved to lein2 to be honest
14:51duck1123I think I'll keep everything as a plugin
14:51malkomalkoahh thanks timmc
14:51duck1123I can always alias it if I'm feeling particularly lazy
14:51malkomalkoI did a search in my browser for string but it didn't pop up for some reason
14:52TimMcmalkomalko: Confluence captures "/" if you tried using quicksearch in Firefox.
14:52TimMcScumbag CRM, keeps you from searching within the page.
14:53malkomalkoyup.. oh well
14:53malkomalko:)
14:53malkomalkothanks anyway guys, I'll play around with it
14:53TimMc*CMS
14:54duck1123There's no such thing as a dev-checkouts, is there? I have a project that is a dependency of my plugin. When I update that dependency, I still have to re-build the plugin and deps the project that uses that plugin, despite all of them being in my checkouts dir.
14:54technomancyduck1123: symlink into ~/.lein/plugins works
14:55TimMcsymlink to plugin's project dir, which then has a checkouts dir?
14:56technomancyoh, no that won't work transitively unfortunately
15:01tjgilliesman 'lein dep' is so much easier than bundler
15:07duck1123but symlinking your plugin project directory inside ~/.lein/plugins should work? I've done that, but am not seeing my task.
15:08technomancyduck1123: sorry, it should be a symlink to the src/ dir of your plugin
15:47osa1_where can I find JAR of this: https://github.com/rosado/clj-processing ?
15:53duck1123osa1_, http://clojars.org/processing-core/processing.core
15:54duck1123so if you actually want the jar, http://clojars.org/repo/processing-core/processing.core/1.0.0-SNAPSHOT/ grab the latest
15:56osa1_duck1123: I think what I need is clj-processing, not processing
15:56duck1123technomancy, are you aware of the issue where if a plugin requires a project that requires ant that lein deps will fail every other time? I see several related closed issues and am not sure if I should open another one.
15:56duck1123osa1_, that's what the readme file directs you to
15:58duck1123osa1_, although it looks like the readme directs to 0.1.0, so I'm not sure which version is best
15:58cemerickweavejester: lein-ring uses clojure.contrib.prxml, but doesn't declare it in its project.clj…?
15:58Kowboytechnomancy, ymacs inside of emacs? WHY?...macs.
16:00weavejestercemerick: Yeah, it's an error I need to fix, but I've been putting it off a little because an independent prxml looked like it was just around the corner.
16:03cemerickweavejester: OK; I was going to take a whack at making it lein2-ready
16:04aaelonywhat's the best way to convert a java.sql.Date to something clj-time can use?
16:05brehautaaelony: clj-time.coerce i think has some stuff for that
16:05weavejestercemerick: Probably, but… bleh, it feels like the wrong tool for the job.
16:05cemerick*shrug*
16:05weavejesterjava.sql.Date inherits from java.util.Date I believe.
16:05aaelonybrehaut: cool, I'll check it out (absent other comments)
16:06cemerickanyway, there's about 114 libraries that produce XML.
16:07duck1123and many of them are wholly incompatible with the others
16:07cemerickweavejester: shall I leave it be, or would you be open to a patch to make it lein2-ready?
16:07cemerick(not that I know what the changes might be right now)
16:09weavejestercemerick: I'd like to avoid Hiccup, because I'd like to change some of the namespaces before version 1.0.0, and that's a little difficult if older versions are dependencies of existing libraries.
16:10cemerickthat's fine; I'm not attached to any particular approach
16:10weavejestercemerick: I guess with lein-ring most of my attention has been thus far focused on getting the new :plugins bit working.
16:10weavejesterWhich probably comes under the "lein2" compatibility umbrella.
16:10cemerickdefinitely
16:11cemerickif you're already working on it, I certainly won't get in your way :-)
16:12weavejestercemerick: If you have any good suggestions for XML generating libraries, I'm all ears :)
16:12cemerickweavejester: if not hiccup, just using the fork of prxml that lein2 is using might be reasonable?
16:13cemerickit's totally an implementation detail, so it seems a stopgap is reasonable there
16:15weavejestercemerick: Oh yeah, that's a good idea. At least until it appears in the official clojure repos.
16:20weavejestercemerick: Actually, let me sort it out now.
16:28technomancyduck1123: yeah, it's tracked in https://github.com/technomancy/leiningen/issues/420
16:30duck1123technomancy, ok. I didn't see that one. (was searching for 'ant') I won't open a dupe then
16:30technomancycemerick: implicit dependency on lein's own dependencies was actually totally kosher in lein1
16:32mdeboardWhat's the third argument to (nil?)
16:32mdeboard&(nil? {:a nil :b 1} :a 1)
16:32lazybotclojure.lang.ArityException: Wrong number of args (3) passed to: core$nil-QMARK-
16:32mdeboardwat
16:32aaelonyis there a freenode channel for Incanter? I'm in, but see no one there...
16:33weavejestertechnomancy: Nice to know it wasn't a mistake in lein1 :)
16:33mdeboard &(nil? ({:a nil :b 1} :a 1))
16:34TimMcmdeboard: nil? is only taking one arg there
16:34mdeboardYeah
16:35mdeboardmisread a solution on 4clojure
16:35TimMchah, OK
16:35cemericktechnomancy: well, weavejester can just add the same dep to lein-ring anyway, whether implicit dependencies are kosher or not now :-)
16:35weavejesterIs it my imagination, or was prxml slated for one of the clojure core repos?
16:36technomancycemerick: yep, definitely good to be explicit in this case
16:36weavejesterI thought data.xml, but that's for emitting clojure.xml-style data.
16:36TimMctechnomancy: Wouldn't implicit deps fail for lein trampoline?
16:37cemerickweavejester: not according to http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go
16:37BostXguys do you know how to use 'apply' or 'map' together with a java constructor? I wanna do something like:
16:37BostX(new #(new Double) [0.1])
16:37technomancyTimMc: implicit deps of plugins shouldn't affect trampoline
16:37BostXI meant: (map #(new Double) [0.1])
16:37TimMctechnomancy: The same classpath is used?
16:37technomancyTimMc: leiningen's classpath is totally orthogonal to the project
16:37weavejestercemerick: Huh.
16:37TimMcBostX: Your fn literal needs an arg
16:38BostXTimMc, ???
16:38lazybotBostX: Oh, absolutely.
16:38weavejesterI guess data.xml would be okay
16:38TimMcBostX: #(Double. %)
16:38BostXTimMc, Ok... and if I have a constructor with more that 1 parameter?
16:39TimMcBostX: I recommend reading clojure.org/reader
16:39BostXTimMc, neither #(MyConstructor % %) nor #(MyConstructor %1 %2)
16:39BostXTimMc, works
16:39TimMcBostX: That's because you forgot the "." after the constructor name
16:40TimMctechnomancy: Oh, duh -- you're talking about plugins.
16:41BostXTimMc, no not really, i tried both: '.' and 'new' (it was just a typo here on IRC)
16:43TimMcBostX: That's why it's important to show the exact code that failed! You should be mapping over multiple collections at a time to get multiple args into that fn.
16:44BostXTimMc, OK :)
16:44BostXTimMc, (let [foo (map #(com.jjoe64.graphview.GraphView$GraphViewData.) [1 0.4])])
16:45BostXTimMc, and the compiler gives me: Exception in thread "main" java.lang.IllegalArgumentException: No matching ctor found for class com.jjoe64.graphview.GraphView$GraphViewData (MyFile.clj:89)
16:45TimMc&`#(Double.) ;; let's look at what happens when you don't put %1 etc. into a fn literal
16:45lazybot⇒ (fn* [] (java.lang.Double.))
16:45TimMc^ nullary functions
16:45TimMcand in your example code, you're not passing that constructor any arguments
16:46TimMc&(map (fn [a b] (+ a b)) [1 2 3] [300 200 100])
16:46lazybot⇒ (301 202 103)
16:47TimMcBostX: The arity (number of params accepted) of the function you pass to map has to match the number of collections you pass to map.
16:50BostXTimMc, the constructor hast 2 parameters:
16:50BostXTimMc, this works: (let [foo (com.jjoe64.graphview.GraphView$GraphViewData. 1 0.4)])
16:51BostXTimMc, as I told you I just don't know how is the proper syntax if I want to use 'map' or 'apply'
16:52TimMcWell, look at my examples above.
16:54BostXTimMc, negative. this does not work: (let [foo (map (com.jjoe64.graphview.GraphView$GraphViewData.) [1] [0.4])])
16:54BostXTimMc, this neither: (let [foo #(map (com.jjoe64.graphview.GraphView$GraphViewData.) [1] [0.4])])
16:56tmciverBostX: You're forgetting the %1 and %2 . . .
16:56BostXTimMc, tmciver ... hmm ok, I try %1 %2
16:57TimMcBostX: There's no magic -- figure out how the examples I gave you work, then apply your newfound knowledge.
16:57BostXTimMc, tmciver aaaaaa!!! this works: (let [foo (map #(com.jjoe64.graphview.GraphView$GraphViewData. %1 %2) [1] [0.4])])
16:58BostXthx guys!
17:00Wraithanhttps://github.com/wraithan/zenircbot-clojure/blob/master/src/zenircbot_clojure/core.clj -- Could I get this code critiqued a bit?
17:00WraithanFirst app written in clojure
17:03BostXWraithan, what zenircbot does?
17:03muhoocom.jjoe64.graphview.GraphView$GraphViewData ? wow that's ugly
17:03BostXmuhoo, do u know anything nicer?
17:04muhoono, but there has to be one, i'm sure.
17:04muhoowhat's with the $?
17:04BostXmuhoo, what do u mean with $ ?
17:04WraithanBostX: It is an IRC bot that uses separate services that it communicates with over redis using pub/sub for functionality. That way the core bot can stay alive and services (similar to plugins in most IRC bots) can be stopped, started, and vice versa
17:04muhooGraphView$GraphViewData, the $ in the middle of there
17:05WraithanBostX: http://zenircbot.readthedocs.org/en/latest/services_devel.html#service-model
17:05brehautmuhoo: thats part of javasc class name munging; inner classes get a $ as a seperator (for instance)
17:06miltondsilvaHi, how does one translate this java code to clojure? http://pastebin.com/N9Msm9gX
17:07BostXmuhoo, if you have class A { ... class B { ... }} it compiles to A$B.class
17:08morphlingmiltondsilva: ##(doc proxy)
17:08lazybot⇒ "Macro ([class-and-interfaces args & fs]); class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass constructor. f => (name [params*] body) or (name ([params*] body) ([params+] body) ...) Expands to code which cre... https://refheap.com/paste/808
17:08amalloyblargh
17:08miltondsilvamorphling: thanks ;)
17:08amalloyreify rather than proxy if at all possible (and it almost certainly is)
17:09muhooBostX: ok makes sense. java stuff.
17:09miltondsilvareify it is ;)
17:10BostXmilkpost, or you could use proxy but: reify can only implement interfaces. It cannot exted classes (proxy can); reify is directly supported by the host platform
17:10morphlingoh, yes, reify, if it's an interface, proxy if it's an abstract class
17:11amalloyand that looks like apache; they usually use interfaces when it's possible
17:12miltondsilvathis library is using apache... but it's called jung and that type of ugly think is needed to interact with it
17:12miltondsilvathing*
17:14BostXmuhoo, BTW I find com.jjoe64.graphview.GraphView$GraphViewData quite Ok... for the start
17:26m0smithwhat templating language would you recommend for a web app?
17:26ibdknoxm0smith: depends on the team
17:26RaynesI'm pretty fond of mustache.
17:26ibdknoxand the scope
17:26RaynesA lot of people find Enlive to be to their liking.
17:27RaynesOthers use hiccup, which is write-html-in-clojure-instead-of-html.
17:27technomancyif you aren't working with a designer, I'd use hiccup
17:27duck1123I tried using soy templates and found it too much work and went back to hiccup
17:27ibdknox+1
17:27technomancyit's basically impossible to screw up
17:28m0smithI would rather not write html in clojure
17:28ibdknoxhiccup or stencil
17:28ibdknoxm0smith: I'd use stencil then (mustache-based)
17:28rplevyis there an alternative repo for zookeeper? the maven central one seems to have problems. I don't know exactly what. Lein (maven) downloads it and then reports it being missing.
17:29muhooRaynes: weren't you moving refheap to enlive?
17:29ibdknoxheh
17:29muhooor did that not work out so wel?
17:29muhoowell?
17:30brehautmuhoo: careful there, hes bitter about that
17:30muhoosorry
17:30ibdknox*chuckles*
17:30RaynesMustache and Enlive are both excellent for teams with designers who aren't developers.
17:30RaynesBecause you can keep the HTML separate from the code.
17:30RaynesSome people just have TimMc write their html for them.
17:30RaynesI'm favoring that solution lately.
17:30RaynesHaha
17:30Raynesmuhoo: I went with mustache.
17:31muhoothanks, good to know.
17:31RaynesI had a bug in Enlive and was in a hurry.
17:31RaynesPlus, Mustache just feels like a better solution for how RefHeap is designed.
17:31muhoobelieve me, the purpose of most of mmy life has been to serve as a warning to others
17:31RaynesI see how Enlive is so well-liked though -- it would be excellent if you built from the ground-up with it or for scraping and stuff.
17:31muhooso if you went with enlive, and found out it is... not what you wanted, that's very helpful to know.
17:32RaynesYeah, that's generally how it worked out.
17:32RaynesThere was some cursing and stuff mixed in there too.
17:32brehautsome. heh
17:32muhooif i got bitter about every blind alley i took, wasting years of my life and tens, even hundreds of thousands of dollars, i'd have kille myself decades ago
17:32ibdknoxmuhoo: http://mustache.github.com/mustache.5.html
17:33m0smiththanks for the input
17:33ibdknoxthe clojure impl to use is stenvil
17:33ibdknoxstencil*
17:33RaynesAnd the reason it is the impl to use is because dsantiago is a nut about performance and you can rest assured he has made it as fast as possible. :p
17:34muhooi've seen this before i think, maybe in ruby
17:34ibdknoxit's used in many languages
17:34technomancyproblem is moustache is also a routing lib in clojure
17:34muhoothat's why i was confused when you said moustache!
17:35muhooyes, i thought moustache was an alternative to compojure
17:35m0smithwhat about something like velocity?
17:35brehautmuhoo: it is
17:35brehautbut its a different moustache
17:35muhooname collision! call the police.
17:35ibdknoxmustache
17:35ibdknoxnot moustache
17:35muhoomust ache
17:35brehauthah yes
17:36brehautclojure is the salvidor dali of programming languages: many moustaches to choose from
17:36muhoomoustache and mustache must exchange insurance information, license, and registration.
17:36weavejesterA while ago I wrote Comb, a fast ERB-like templating language.
17:37weavejesterIt has only two followers on the GitHub repo though, so it's not well known!
17:38ibdknoxweavejester: huh.. do you use it?
17:38muhoobrehaut: http://www.youtube.com/watch?v=iXT2E9Ccc8A
17:38weavejesteribdknox: I wrote it for creating project skeletons generation
17:38ibdknoxI see
17:38weavejesteribdknox: But I haven't got around to writing the plugin that was going to use it :)
17:38ibdknoxhaha
17:39ibdknoxweavejester: lol that's so simple... well done
17:42dnolentscheibl: that patch look nice, will give it a spin soon.
17:42tscheibl tscheibl: ok :)
17:43tscheibltalking to myself again...
17:43tscheibldnolen: ok :)
17:46rplevyis there something like repository-exclusions for lein? looking for it in the source...
17:47dsantiagoFunny enough, when I was writing stencil, the placeholder name was dali.
17:47dsantiagoAlso, I love you guys *so much*.
17:50technomancyrplevy: lein help sample | grep exclusions
17:52m0smithstencil or clostache?
17:52tmcivertechnomancy: Ahh, didn't know about sample; it's not listed with 'lein help'
17:52technomancyuh oh; it should be
17:52m0smithThe mustache site refers to clostache
17:52technomancytmciver: yeah, it is in 1.7
17:52ibdknoxm0smith: stencil
17:53m0smithibdknox: porque?
17:53tmcivertechnomancy: oh yeah, under the 'see also' part.
17:53tmcivermy bad
17:53technomancytmciver: lein2 will let you do "lein sample" with partial aliases
17:54ibdknoxm0smith: it correctly implements the mustache spec, fewer bugs, and better maintained
17:54dsantiagom0smith: Not an unsore spot for me!
17:54tmcivertechnomancy: I haven't been following the lein 2 dev that closely; what's partial aliases?
17:54m0smithcompujure I assume then
17:54technomancytmciver: it's like partial application, but for aliases
17:54dsantiagohttp://librelist.com/browser//mustache/2011/5/25/mustache-in-clojure/#59e582f3c353c5b9a6eb766eb0bc028c
17:54technomancy(partial my-function "argument1")
17:54technomancyetc
17:55tmcivertechnomancy: but that works with lein plugins somehow?
17:55technomancyyeah, works for any task
17:55ibdknoxm0smith: huh?
17:56m0smithdsantiago: thanks. I will give it a look
17:56tmcivertechnomancy: so you mean if a task takes several 'args' you can do a partial with some of the args?
17:56technomancy:aliases {"launch" ["run" "-m" "myproject.main"]} ; in project.clj
17:56technomancyyup
17:56m0smithibdknox: for some reason it came out in spanish: porque == why
17:56technomancyit's the leiningen 2 feature about which I am the most unreasonably excited
17:56ibdknoxlol
17:56ibdknoxI know, and I answered you
17:57tmcivertechnomancy: ha! cool.
17:57weavejestertechnomancy: Oh, you're putting in aliases then?
17:57technomancyweavejester: aliases in defproject, yeah
17:57muhoohow would a partial alias work?
17:57weavejestertechnomancy: Ah, awesome
17:57m0smithibdknow: oh. I assume compojure is the way to go for a web application
17:57tmcivertechnomancy: are there docs for lein 2 yet?
17:58weavejesterm0smith: ibdknox would probably recommend Noir ;)
17:58technomancytmciver: the readme, plugin guide, and tutorial are upgraded
17:58ibdknoxhaha
17:58technomancytmciver: the sample project.clj isn't, and I'd like to have a general "upgrading" doc beyond just lein-precate
17:58ibdknoxweavejester: probably ;)
17:58technomancymuhoo: see above with "launch"
17:58callenis there a Clojure web framework that doesn't by default inline templates into the code/controllers and instead uses templates like Django or Rails?
17:59ibdknoxm0smith: http://webnoir.org/
17:59ibdknoxcallen: you can do that with Noir?
17:59callenthat is, the template shouldn't be a bunch of Clojure macros, it should be textual HTML getting injected.
17:59brehaut_callen: most of then ?
17:59callenmost of what I saw was Compojure-esque
17:59KowboyI haven't used Noir for anything other than to experiment, but I liked it
17:59dsantiagoYou can usually use whatever templates you want.
17:59weavejesterm0smith: Noir is probably better if you're just starting out - Compojure is a little less structured.
17:59callenthe examples seemed eager to come off as clever.
17:59ibdknoxcallen: ?
17:59simonadameithey
18:00weavejesterI don't think any Clojure web framework mandates a template framework.
18:00simonadameiti've got a question regarding the range function
18:00ibdknoxexcept maybe conjure?
18:00tmcivertechnomancy: but the stuff at https://github.com/technomancy/leiningen is for lein 1.7?
18:00ibdknoxI don't remember
18:00callenibdknox: http://webnoir.org/ Your examples are all using Compojure or returning raw text.
18:00weavejesteribdknox: Yeah, I was thinking about that too. I'm not sure.
18:00technomancytmciver: just the installation instructions
18:00dnolensimonadameit: you can always ask away
18:00simonadameithow do I specify a start, but not the end of a range (i.e. infinity)
18:00technomancytmciver: everything else on the master branch is 2.x
18:00ibdknoxcallen: I think you're confused as to what compojure is :)
18:00tmcivertechnomancy: ah, OK
18:01weavejestercallen: Do you mean Hiccup? Compojure is a routing library. Hiccup is a HTML-generating library
18:01ibdknoxcallen: that's hiccup, and I would argue hiccup is very clear, not clever
18:01ibdknoxcallen: either way though, you get to use whatever you want :)
18:01callensure, but that's besides the point.
18:01callena designer can't write clojure
18:01dnolensimonadameit: (range start)
18:01simonadameiti tried (range 1 :infinity) but that barfs :(
18:01technomancyhiccup is way obvious
18:01callenI need to be handle to hand off data to a relatively plain HTML template and have a designer wrap around that.
18:01callendesigners *cannot* code.
18:01dnolensimonadameit: many functions have multiple aritys
18:01dnolen,(doc range)
18:01technomancycallen: if you want designers writing the html, you want enlive
18:01ibdknoxcallen: sure, stencil, comb, enlive, whatever
18:01dsantiagocallen: So have your pick from enlive, tinsel, mustache… what else?
18:01simonadameitdnolen: yeah, but _end_ is the first argument according to the doc
18:02clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>
18:02brehaut_callen: to be fair to designers, a lot of so called programmers ive met couldnt either
18:02emezeskecallen: wow, that's not a sweeping generalization
18:02technomancyif you want to decide on the structure and have the designers just handle styling, hiccup is fine
18:02callentechnomancy: that's still in Clojure.
18:02callenemezeske: I'm talking about my specific circumstances.
18:02technomancyo_O
18:02simonadameitdnolen: in case you give only one argument, its the end
18:02technomancycallen: enlive templates are 100% HTML
18:02emezeskecallen: ah
18:02callentechnomancy: https://github.com/cgrand/enlive
18:02ibdknoxstill a sweeping generalization ;)
18:02dnolensimonadameit: oh yeah ... just use drop
18:02callenI don't need to make a sweeping generalization
18:02dnolen(drop n (range))
18:02lynaghk``simonadameit: (drop n (range))
18:03lynaghk``jinx david.
18:03callenI'm dealing with a specific situation and I need plain HTML templates from files like Django and Rails.
18:03technomancycallen: the transformations are in Clojure; the templates are not.
18:03weavejesterI need to start coding my hiccup/bootstrap library this weekend.
18:03callentechnomancy: I don't want any template logic in Clojure, period.
18:03ibdknoxweavejester: hiccup/bootstrap?
18:03brehaut_if you are going to complain about cleverness, enlive has far more of that than hiccup
18:03callentechnomancy: I just want to hand-off a hash-map of data to the template.
18:03simonadameityeah… fortunately in my case its not (drop *some-really-big-number* (range)) :)
18:03lynaghk``weavejester: bootstrap as in getting started kit?
18:03ibdknoxcallen: stencil
18:03technomancyrails and django both mix logic and presentation last I checked
18:03callenbrehaut_: hiccup has the document in Clojure.
18:03simonadameitstill it feels akward the range function
18:03weavejesterBootstrap as in: http://twitter.github.com/bootstrap/
18:04callenStencil looks close enough.
18:04brehaut_callen: nevertheless, hiccup is way way simpler than enlive.
18:04callenbrehaut_: does. not. matter.
18:04callenat all
18:04lynaghk``weavejester: what are you coding, exactly?
18:04brehaut_but you were just complaining about it being too clever‽
18:04callenibdknox: thank you.
18:04lancepantzso which http client are all the cool kids using today? clj-http?
18:04ibdknoxbrehaut_: not worth it
18:04brehaut_lancepantz: i think so, and dakrone has the central repo i think
18:05ibdknoxlancepantz: yeah
18:05callenbrehaut_: what is concentually simple, simple to implement, simple to understand are all three different things.
18:05lancepantzyeah, i'm looking at his fork
18:05lancepantzthanks dudes
18:05m0smithibdknox: noir and stencil are a good fit then?
18:05callenbrehaut_: I need limited exposure and simple to understand. The person editing the template shouldn't see anything more than {{variable}} and the HTML.
18:05muhooi enjoyed stuart hollaway's presentation on "simple"
18:05ibdknoxm0smith: very :)
18:05muhoofrom blip.tv
18:05weavejesterlynaghk``: Well, as a simple example, (button-to "/bar" "foo") might produce <a class="btn" href="/bar">foo</a>
18:05callenbrehaut_: the more isolated from the code, and less powerful, the better.
18:05muhooi.e. "simple just means not complex". wfm
18:05m0smithibdknox: thanks
18:06dnolensimonadameit: it may seem weird at first but range is often used for control
18:06brehaut_callen: then stop raging and go look at enlive like you were suggested. there is absolutely _no_ clojure in the templates. they are pure HTML.
18:06devnspeaking of enlive and hiccup...scraping with enlive... are there other solutions already packaged up and ready to go for scraping by xpath or selector?
18:06weavejesterlynaghk``: Or (icon :search) might produce <i class="icon-search"></i>
18:06lynaghk``weavejester: ah, so you want to wrap bootstrap's classes to make a kind of web 2.0 DSL in hiccup?
18:06rplevytechnomancy: neat, thanks
18:06callenbrehaut_: I'm not raging, I'm clearing up a lack of perspective on your part.
18:06lynaghk``er, not in hiccup. In this separate project.
18:06brehaut_goodbye callen
18:07technomancycallen: it sounds like you don't know what enlive does
18:07weavejesterlynaghk``: Exactly right.
18:07callentechnomancy: I have to go off what the README.md says.
18:07devncan't we all just...get along?
18:07ibdknoxhaha
18:07callentechnomancy: if I see transformations in Clojure, it's a no-go.
18:07ibdknoxapparently not
18:07emezeskedevn: what fun would that be?
18:07technomancy"It's not designer-friendly" is a great reason to use everything that's not enlive
18:07muhooreally? a templating flamewar?
18:07muhoocan't we just argue about emacs vs vi, bsd vs linux, mac vs windoze, etc?
18:07emezeskemuhoo: those are old hat
18:08weavejesterlynaghk``: I'd like to be able to produce nice-looking bootstrap pages in a few lines of Clojure.
18:08ibdknoxtechnomancy: remember the communism fiasco? no value in arguing
18:08lynaghk``weavejester: speaking of hiccup, do you have a timeline on switching over to that refactored rendering branch you pointed out to me earlier? I took a fair bit of that and shoved it into some CLJS stuff I'm working on and am getting into the CLJ side of things this afternoon
18:08callenmuhoo: it's not a flamewar, I don't care what other people use.
18:08technomancyibdknox: oh dang.
18:08devncallen: i do, but only because sometimes they're right and im wrong.
18:08callenmuhoo: there are some specific limitations with my use-case and getting people to stop recommending what isn't workable is proving irritating.
18:08lancepantzi wanna jump in there
18:08ibdknoxlol
18:08lynaghk``weavejester: hmm. I'm still using HAML for all of my precompiled-markup needs.
18:08muhoohttp://www.google.com/url?q=http://xkcd.com/386/&amp;sa=U&amp;ei=0cZGT6TJOYyMigLI5t3bDQ&amp;ved=0CBEQFjAA&amp;usg=AFQjCNG2-piMB_qrSuMnwb7pciErzye8eQ
18:08ibdknoxlancepantz: do it, it'll only make it better ;)
18:08lancepantzjust write a service in clojure and make all the front end dudes write a spa in javascript
18:09muhoodamn you gogle
18:09weavejesterlynaghk``: It'll be a while. I'm first putting out Hiccup 1.0.0, which factors out the compiler ready to be replaced.
18:09callenlancepantz: that's quite doable actually.
18:09devni want a spa in javascript -- a day spa
18:09callenlancepantz: I could do noir -> json -> bootstrap.
18:09muhoohttp://xkcd.com/386
18:09devn*rimshot*
18:09callenlancepantz: only problem, the designers in question can't write JavaScript either.
18:09Kowboyis anyone using sass for your css?
18:09lancepantzah
18:09lynaghk``Kowboy, I am
18:09callenlancepantz: they can't code, they can't do JS, they can really only do CSS and HTML at best.
18:09weavejesterlynaghk``: But before people can use Hiccup 1.0, they'll probably need Ring 1.1, because Ring 1.0 depends on Hiccup 0.3.8
18:09lancepantzwell, they suck
18:09lancepantz:)
18:09devnKowboy: i use me some haml and sass
18:09lancepantzhehe
18:09callenlancepantz: yeah. yeah...doing my best here.
18:10lancepantzna, i guess design is a different job than front end
18:10weavejesterlynaghk``: And before Ring 1.1, I need to release Lein-Ring 0.6.0 for Leiningen 1.7 and above.
18:10pbostromibdknox: how does crate use the crateids that it generates?
18:10callenlancepantz: basically yes, and I'm trying to bridge the gap there.
18:10technomancyweavejester: untangling your dependency graph sounds like the kind of thing you'd use core.logic for
18:10m0smiththanks all ttfn
18:10lancepantzi wonder what doing a SPA in clojurescript would be like
18:10callenlancepantz: but it requires that designers be able to edit a simple HTML template and hit refresh.
18:10lynaghk``weavejester: Ah, fair enough. I'm using hiccup outside of the standard sort of stack, so I've been just copy-paste-hackin' on code, but I'd like to keep things from diverging too much.
18:10callenlancepantz: clojurescript with the closure compiler seems like a good stack for a SPA to me.
18:11weavejestertechnomancy: Pretty much :) - I have too many projects.
18:11ibdknoxpbostrom: it allows you to use ($ some-partial) among other things
18:11Kowboyspa?
18:11lancepantzKowboy: single page application
18:11Kowboyah, thanks
18:11lancepantzKowboy: essentially a pure js client for your clojure service
18:11weavejesterDoes jQuery work in Clojurescript yet with optimization?
18:11callenKowboy: hypothetically nicer to use, but is harder to get right.
18:11lancepantzno rails django php shit in the middle
18:12devncallen: you could look at soy templates maybe?
18:12callenweavejester: not officially, but I'm sure people have futzed around with it.
18:12KowboyI don't think jQuery will work unless it is compatible with the Closure optimization standards
18:12lynaghk``weavejester: simple optimizations, yes. Advanced optimizations not really, because of how jQuery is structured.
18:12ibdknoxKowboy: http://github.com/ibdknox/jayq
18:12devncallen: https://github.com/levand/clj-soy
18:12weavejesterKowboy: Yeah, but I thought there was some talk about jQuery/Closure compatability...
18:12clj_newbHi
18:13callendevn: looking, those would work if I was doing an SPA I think.
18:13devnclj_newb: hi!
18:13weavejesterclj_newb: Hi
18:13ibdknoxweavejester: http://github.com/ibdnkox/jayq
18:13weavejesteribdknox: 404...
18:13devnibdknox: same
18:13Kowboyhmm...I just remember Rich Hickey saying that only libraries compatible with Closure could be optimized
18:13clj_newbclojure.xml, method parse is outputting this exception No matching method found: parse for class com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl
18:13ibdknoxwhoops
18:13ibdknoxhttp://github/ibdknox/jayq
18:13clj_newbAny idea? Google didn't help much
18:13ibdknoxprimarily because I can't type
18:14ibdknoxonce more with feeling: https://github.com/ibdknox/jayq
18:14weavejesteribdknox: You missed out the .com that time :)
18:14Kowboylol
18:14weavejesteribdknox: Ah, I see it now :)
18:14Kowboyibdknox, you're a freak (the good kind)
18:14ibdknoxfor fun in CLJS: http://www.chris-granger.com/projects/cljs/
18:15ibdknoxKowboy: lol, there's a good kind of freak? ;)
18:15KowboyI seriously need a Clojure job
18:15Kowboyyes, and you are it
18:15weavejesteribdknox: That looks pretty interesting
18:15devnyour Clojure job is to write libraries for free
18:15devnand then maintain them
18:15devn;)
18:16ibdknoxweavejester: that + crate (dom'd hiccup) is awesome
18:16KowboyOK, where do I start?
18:16callendevn ibdknox lancepantz thanks for the suggestions. Might say fuck it and go SPA.
18:16devnCheck out the last dozen or so github.com URLs in this channel -- that's a lot of what's buzzing in the community in general
18:16devnKowboy: ^
18:17lancepantzcallen: np
18:17devnAlso Kowboy, overtone is really fun and the limit to what you build there is really just your imagination
18:17devngotta run, ciao all
18:17lynaghk``callen: I've done a singlepage iPad application entirely in ClojureScript (+ Twitter bootstrap); feel free to drop me a line if you want
18:17devncallen: you're definitely welcome
18:17KowboyI just discovered overtone today
18:17callenlynaghk``: ooooh. Cool, I've been doing some stuff with bootstrap lately anyway. Thanks!
18:18lynaghk``callen: it's a rad stack, if you're willing to patch the ClojureScript compiler now and again =P
18:18Kowboyanyone familiar with Eve Online?
18:19ibdknoxKowboy: http://www.chris-granger.com/2012/02/20/overtone-and-clojurescript/
18:19ibdknoxovertone + cljs
18:19ibdknox= loads of fun
18:19KowboyI'm thinking about building a Clojure+CLJS site on top of the Eve API
18:19muhoo+1 for the overtone+cljs SPA demo
18:19gtrak``ibdknox: pretty awesome
18:20callenKowboy: I used to play it ages ago. I have a 40-something million SP char on ice.
18:20ibdknoxgtrak``: the little app? It was a fun thing to build
18:20Kowboywell, the API is REST-based XML payload (GET only)
18:21gtrak``yea, it's sweet
18:21gtrak``and just a good demo
18:21Kowboybut built into the response message is a cache time. The server won't send new data and sometimes will return an error if you try to hit it within that time
18:22Kowboyso one thing I was thinking about building was a caching proxy with pluggable caching strategies and expiration strategies
18:22gtrak``ibdknox: you coming to the Unjam?
18:23ibdknoxgtrak``: is that at clojure west?
18:23KowboyI would need to proxy the API anyway because of cross-site access
18:23gtrak``yea
18:23ibdknoxsure :)
18:23callenKowboy: I distinctly recall disliking their API.
18:23ibdknoxpresuming I haven't signed myself up to do something during then lol
18:23gtrak``right :-)
18:24gtrak``I've been working on an accordion synth just for the occasion
18:24gtrak``with a grid and midi-keyboard
18:24ibdknoxI know very little about overtone sadly
18:24ibdknoxjust enough to be annoying :D
18:25ibdknoxthe unjam would probably be a great way to learn though
18:25gtrak``yea, I'm going to have to learn all the sound parts to generate goodness, but so far I have just the i/o working
18:25muhooi'm really curious to hear the music that gets made with overtone
18:25ibdknoxmuhoo: it can be quite impressive
18:25muhoooggs/mp3s?
18:26pbostromibdknox: one thing about the overtone demo: the overtone piano sample is a dead link, this seems to kill the process for me: http://www.ericmhobbs.com/Blackhole/music-backup/MIS_Stereo_Piano.zip
18:26ibdknoxmuhoo: did you watch sam's talk?
18:26muhoono
18:26muhoothe one at the 2011 conj?
18:26ibdknoxyeah, watch that
18:27ibdknoxpbostrom: huh really? It was working for folks the other day :( Might want to ask on the overtone list
18:27Kowboyibdknox, you using Noir to power your website?
18:27ibdknoxKowboy: which one?
18:27Kowboyhttp://www.chris-granger.com
18:27ibdknoxmy blog is jekyll, though I'll probably write a noir static generator at some point
18:27ibdknoxhttp://webnoir.org and http://sqlkorma.com are both on Noir
18:28ibdknoxhttps://www.readyforzero.com/ is also on Noir
18:28muhooso far i have to say, in terms of webdev, i can't see any reason not to just use all of ibdknox libraries as the default stack
18:29muhoofetch, noir, jayq, etc
18:30Kowboythat's why I'm calling him a freak (the good kind)
18:30sritchiehave you guys ever seen this from clojure 1.2.1?
18:30sritchieCaused by: java.lang.NoSuchFieldException: getCopyOfContextMap
18:30Kowboyi.e., it's really great work
18:30m0smithibdknox: do you have info regarding deploying a noir app to tomcat?
18:30sritchieon any call to use or require
18:30pbostromibdknox: looks like someone has already posted to the group
18:30ibdknoxm0smith: make sure you require your views explicitly and then just use lein-ring to generate an uberwar.
18:30sritchieah, probably a pallet issue
18:31ibdknoxm0smith: then you're good to go :)
18:31ibdknoxthere are a few other production ones out there too, don't remember them off the top of my head though
18:32m0smithibdknox: What does "require your views explictly" mean?
18:32zakwilsonHmm... readyforzero.com users pay off their debt lots faster than average people. I wonder if that's because people who use a web app designed to help them pay off their debt are more serious about getting out of debt.
18:33ibdknoxm0smith: in server.clj there will be a server/load-views call. Instead of that just do (:require [my.view] ..) in your ns decl
18:33m0smithok
18:33ibdknoxzakwilson: it's controlled against people who signup and then don't use it
18:34ibdknoxbut it's true that you can't make a statement about causation there, it's merely correlated
18:34zakwilsonibdknox: I don't think that invalidates the point, which is not to say that the service isn't useful (I haven't looked)
18:34ibdknoxanecdotally it does make a difference for those who were referred to our site and would not have gone there on their own
18:35zakwilsonAnyway, no criticism intended.
18:35ibdknoxI certainly didn't take it that way. I said the same thing when they made the graph ;)
18:35zakwilsonI've just trained myself to spot suspicious marketing claims.
18:36ibdknoxI'm forever the skeptic
18:36ibdknoxlol
18:36amalloyibdknox: i don't think i believe that. can you prove it?
18:37callenzakwilson: skepjure?
18:37devnibdknox: man, i have to say I hadn't looked into Pinot. I remember when it was in its infancy but wasn't following along at home. Breaking it up into these modules is really nice. Also, I really like your website. Very classy
18:37lancepantzdakrone: you around?
18:37dakronelancepantz: yea, what's up?
18:37ibdknoxamalloy: I'm pretty sure I have transcripts of me from when I was young being skeptical. Proving future intent is hard, though based on the trend... ;)
18:38ibdknoxdevn: thanks! designed it last saturday. I'm pretty happy with the results
18:38zakwilsonI just didn't like that Clojure was on the JVM.
18:38lancepantzdakrone: Raynes was just talking to me about using cheshire over clj-json
18:38lancepantzi've been maintaing clj-json, but it looks like cheshire is more complete and a wrapper around jackson as well?
18:39dakronelancepantz: yea, cheshire was originally based off of clj-json because Mark wanted to give up maintaining it
18:39KowboyWill I get spanked for this? http://java.dzone.com/polls/which-jvm-language-top-0
18:39ibdknoxI was just interested in Clojure because it seemed so different. I'd never used a lisp and was obviously very entrenched in the C# world :)
18:39dakronelancepantz: to have faster dev cycles and more active support
18:39devnKowboy: I don't see why.
18:40Kowboydarn
18:40lancepantzdakrone: have you seen the coercions stuff i added to clj-json
18:40simonadameitcan i destructure a sequence in a function argument vector like [[x xs]] ?
18:41ibdknoxsimonadameit: yes
18:41devnthere are limits though, right ibdknox?
18:41ibdknoxthough you probably mean [x & xs]
18:41dakronelancepantz: yes, although I did some timings and it added a lot of overhead
18:41ibdknoxrather [[x & xs]]
18:41Scriptorsimonadameit: [x & xs]
18:42Scriptorspecifically, (defn first [[x & xs]] x)
18:42simonadameitibdknox: no, actually the first argument to the function is a sequence and I want to desctructure that
18:42ibdknoxyep [[x & xs] other-args]
18:42zakwilson,(let [[x &xs] [1 2 3]] [x xs])
18:42simonadameitah, ok thanks!
18:42clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: xs in this context, compiling:(NO_SOURCE_PATH:0)>
18:42zakwilson,(let [[x & xs] [1 2 3]] [x xs])
18:42clojurebot[1 (2 3)]
18:43zakwilsonAll clear now?
18:43simonadameityes, thanks! :)
18:43dakronelancepantz: although I think I did the timings with the postwalk version of the coercions, so it's probably faster now
18:44lancepantzdakrone: okay, i'll take a look at it and build out a branch if i need it different
18:44lancepantzthen i'll just mark clj-json as deprecated
18:45ibdknoxmore unification!
18:45lancepantzdakrone: i kinda like the clj-json name better than cheshire, any interest in a rename or is that silly?
18:45ibdknox /win
18:45dakronelancepantz: you could do coercions with Cheshire's custom encoding by writing your own encoding rules in the encoders
18:45lancepantzibdknox: yeah man, us geni guys roll our one, then get sick of maintaining it and give up :)
18:45ibdknoxhaha
18:46lancepantzto be fair, we built out our stack two years ago
18:46ibdknoxlancepantz: maintaining things sucks. ;)
18:47hiredmanit sure does
18:47dakronelancepantz: I'm partial to Cheshire, personally, but could be persuaded otherwise if more people desired a name change
18:47lancepantzdakrone: i don't care, just wanted to make it an option if you were interested
18:47m0smithibdknox: Does noir provide a ring handler?
18:48dakronelancepantz: feel free to ping me if you have any issues with it
18:48ibdknoxm0smith: (server/gen-handler ..) http://webnoir.org/tutorials/others
18:48m0smiththanks again
18:49lancepantzdakrone: will do, it'll be a few days probably
18:52ibdknoxtechnomancy: you are like king on github. I was curious how many total repo watchers you had - it's currently 4707
18:53technomancyibdknox: yeah, I have no idea why people follow stuff like my dotfiles
18:53technomancyit's like "congratulations, you get to hear about the fact that I'm using a new color theme"
18:53ibdknoxhaha
18:53brehaut_thats the most important news ever though
18:54ibdknoxseriously, how're we gonna code like you if we're using the wrong theme?
18:54Raynesdakrone, lancepantz: Yay for unification!
18:54callentechnomancy: my dotfiles repo is one of the only ones that has followers. :(
18:54callentechnomancy: I think people follow it because I have a really large .emacs and .emacs.d
18:55technomancyseems like that would be more interesting as reference material
18:55technomancyOTOH github doesn't really have a good way to say "I want to come back to this but not get fed every update"
18:55technomancyI guess you would use regular bookmarking services for that
18:56brehaut_would it be useful for a clojure syntax highlighter brush to support ignoring 'user=>' at the starts of lines ?
18:56ibdknoxyeah
18:58weavejesterI hate Java keystores and truststores so much.
18:58callentechnomancy: they're fortunate that my Emacs setup is very old and very stable, so they don't get bugged very often.
18:58muhoothanks, sam aaron is a very funny, animated presenter. many lulz in there, and a solid overview of overtone.
18:58callenparedit is the only thing that's changed in like half a year for the most part.
18:58callenand yasnippet.
18:58RaynesI change everything every few months.
18:59arohnerI don't suppose anyone has a library for serializing fns?
18:59RaynesI've changed my emacs setup so radically this time that it's Vim.
18:59callenRaynes: I used to, but I don't need to anymore.
18:59technomancyarohner: catch: https://github.com/technomancy/serializable-fn
19:00weavejesterarohner: I wrote one for Ruby, once… but not for Clojure :)
19:00arohnertechnomancy: how safe is this?
19:00technomancyarohner: not safe at all
19:01technomancyarohner: it was written by a swarm of 8 developers or so pairing over coffee shop wifi during a seajure meeting
19:03technomancyif that doesn't make you nervous, go for it
19:03arohnerha. does coffeeshop wifi lead to design problems?
19:03technomancydunno; I've found coffee to produce better results than beer.
19:05TimMcdakrone: I assume "Cheshire" is because of SMILE?
19:05RaynesTimMc: It's because he has a fetish for mat hatters.
19:06callentechnomancy: ditto @ coffee > beer.
19:07Scriptorwell, code quality isn't the greatest with beer
19:07Scriptoralthough I wonder if the writer's mantra of "write drunk, edit sober" works
19:08lucianthere's an xkcd that delves into the science of it
19:14ibdknoxnew ring?
19:14weavejesteribdknox: 1.1 snapshot
19:14ibdknoxah
19:15lancepantzi believe you're referring to the "Ballmer Peak"
19:15lancepantzlucian: ^
19:15lancepantz"remember window me?"
19:15ibdknoxheh
19:15lancepantz*windows
19:15ibdknoxwindows CE, ME, NT = windows cement
19:15lancepantzlol
19:16ibdknoxsays the guy who worked for MS :D
19:16muhoomy greatest fear is that wince will take over phones
19:16lancepantzdude, the new windows phones are pretty slick
19:16TimMcibdknox: I have no doubt that just about everyone at MS hates all but the current version.
19:16lucianmuhoo: don't worry, it's all .net now
19:16ibdknoxactually, as hard as people are on MSFT outside of the company, the employees are WAY hasher
19:16ibdknoxharsher*
19:16TimMcs/at MS/in any development house/
19:17ibdknoxyeah
19:17TimMcbecause you have to *maintain* that shit
19:18TimMcThe real question is how many people in the OS division personally dislike the current product. :-P
19:18ibdknoxquite a few
19:19muhoolancepantz: i guess if i wanted slick i'd get an iThing. freedom's more important to me, so i'm very happy with my CM7.1 with almost all open source apps and no google apps. :-)
19:19lancepantzmuhoo: ahh, you're one of "those" :)
19:19muhooyes, i am
19:20ibdknoxI have a WP7
19:20technomancyfreetards represent! =D
19:20ibdknoxand I had an iphone before that
19:20lancepantzthe computing equivalent of vegans
19:20lucianbut there aren't any decent <4" qwerty phones with an unlocked bootloader
19:20ibdknoxI like the WP7 UI a lot more
19:21muhoomy old G1 had an awesome keyboard
19:21muhooalas, the one on my G2 sucks, but at least it has one.
19:22lucianmuhoo: i like my motorola milestone, but it's old
19:22luciantechnomancy: i can type very fast on my phoe
19:22zakwilsonAnd accurately, I see.
19:22muhoo:-)
19:23lucianlaptop, in the dark, on my side :)
19:23zakwilsonI think a major problem with onscreen keyboards is that they take up a lot of screen real estate that could be used to display the text you're entering.
19:23ibdknoxlucian: excuses are for the weak.
19:24zakwilsonI could swear I had something to say to ibdknox about one of his libraries, but I can't remember it now.
19:24lucianzakwilson: indeed
19:24zakwilsonI don't think it was bad.
19:24TimMcAlas, poor lucian, we knew him w-
19:24TimMchm
19:24TimMcWe didn't know him well.
19:24TimMcAlas, poor lucian, we knew his hostmask.
19:25ibdknoxzakwilson: they're ok. I've heard rails is better, you might want to try it out ;)
19:25brehaut_rails?
19:25brehaut_your out of touch
19:25muhoohhe
19:25brehaut_node
19:25muhoohahaha
19:25zakwilsonibdknox: I'll get right on that. This whole "simple" thing Clojure advocates is overrated anyway.
19:25ibdknoxoh sorry, node
19:25ibdknoxI've had good experiences with node myself
19:26muhoohttp://hipstergrammers.tumblr.com
19:26ibdknoxzakwilson: yeah.. simple means less features... it must suck.
19:26luciannode is ok, twisted for js mostly done right
19:26callennode is garbage.
19:26ibdknoxlol
19:26muhoobrehaut_: http://24.media.tumblr.com/tumblr_lwxg1u1HSG1r95ui7o1_500.jpg
19:27zakwilsonAnd I keep thinking things like "why does this automagically make a method when it could just be a key in a map?".
19:27brehaut_muhoo: wow.
19:28callenNode is single-threaded callback spaghetti failure. I'll take my SMP Erlang, Clojure or straight Java/Netty, kthxbai.
19:28ibdknoxI rewrote my node app into 40% the size of the node one and it was 3 orders of magnitude faster
19:28Chousukeheh
19:28muhooibdknox: which app?
19:28ibdknoxhttp://typewire.io
19:28luciancallen: it's missing deferreds, yes
19:28callenibdknox: give me a type signature here, node => clojure | size * 0.40, speed * 10^3?
19:28ChousukeI'm trying to figure out node.js at eh moment actually
19:28callenlucian: it's missing brains and a purpose for existing.
19:29lucianno, not that. with CPS or deferreds it's ok
19:29lucianother than all the js, of course
19:29Chousukedoing a blog engine/something for a course with it and coffeescript :P
19:30callenI don't mind coffeescript on the front-end at all.
19:30muhoohttp://27.media.tumblr.com/tumblr_lwvn8xE2ye1r95ui7o1_500.jpg
19:30ibdknoxcallen: not sure I know what you're asking for? the size difference had to do with removing callbacks and ridiculous levels of nesting, the speed difference had to do with the hotspotter
19:30zakwilsonibdknox: http://www.typewire.io/event/d5893
19:30Chousukehaven't quite yet been hit by all the asynchronicity in node.js
19:30callenand I think things like backbone and ember are doing a lot for web development.
19:30muhooand with that, fun meter's pegged.
19:30callenbut node.js is garbage.
19:30brehaut_http://www.coboloncogs.org/INDEX.HTM
19:30ibdknoxzakwilson: lol
19:30callenibdknox: so, pretty much what I expected then.
19:30callenibdknox: the callback spaghetti is horrific.
19:30zakwilsonI've never seen the appeal of node.
19:31technomancyhttp://tinyurl.com/7j3k86p
19:31brehaut_its the young kids version of cobol on cogs
19:31ibdknoxcallen: yeah it was ridiculous for something as simple as it was
19:31zakwilsonI've never used it or read much about it. It just struck me as a bad idea right off the bat.
19:31Chousukeheh
19:31muhoocallen: http://25.media.tumblr.com/tumblr_lwvn4i6SBz1r95ui7o1_500.jpg
19:31callenzakwilson: it's not faster than anything, it's not more efficient/faster to make things with, it's not easier to understand, it doesn't have more libraries or support than anything, it's a failure in every category that is worth gauging.
19:31technomancyclojurebot: javascript is beautiful, you're just too conformist to appreciate its quirks: http://tinyurl.com/7j3k86p
19:31clojurebotIn Ordnung
19:32ibdknoxexcept popularity, oddly enough :)
19:32TimMcPssh, I gave up on node in 1993.
19:32TimMcI could tell it wasn't going anywhere.
19:32ibdknoxTimMc is the only forward thinker here
19:32zakwilsoncallen: that's the impression I had. The only advantage is being able to use the same language on the server and the client, and that doesn't seem very useful to me.
19:32muhooi actually understand the appeal of node.js. it's the same thign that makes cljs exciting: same language on the server and the client.
19:33muhoothe problem, of course, is that javascipt, ehm, wouldn't be my first choice for that language.
19:33callenzakwilson: it's not a useful property for many reasons. For one, the backend environment is solving a totally different problem than the DOM and will require completely different code anyway.
19:33zakwilsonPHP is popular too.
19:33gfredericksis (juxt filter remove) == separate?
19:33technomancygfredericks: it is
19:33callenzakwilson: you can't actually *share* anything meaningful just because they're the same language.
19:33gfrederickstechnomancy: I don't know why I found that so hard to reason about
19:33technomancygfredericks: because the old contrib implementation was silly and clouded your mind, perhaps
19:34ibdknoxzakwilson: php is the best language ever ;)
19:34TimMccallen: Sure you can: Compile-time consistency of API.
19:34ChousukeI actually don't hate javascript much at all
19:34Chousukeit's pretty cool, as far as languages go
19:34callenTimMc: have you...seen JavaScript?
19:34gfrederickstechnomancy: I'm actually still surprised it's not in core
19:34ibdknoxChousuke: dynamic rebinding of this might be one of the single worst ideas in programming ever
19:34zakwilsonEverybody has maps, lists and JSON. If you keep your data in simple data structures, you can just pass JSON back and forth.
19:34TimMccallen: Fairly experienced in it, yes.
19:34gfredericksI bothered to do a $findarg on lazybot and everything
19:34callenTimMc: this is not a property they're taking advantage of.
19:34ibdknoxChousuke: aside from that, the language isn't the problem, the platforms are :(
19:35callen^^ more to the point, yes.
19:35gfrederickswait maybe I should have done $findfn
19:35Chousukeibdknox: it's weird, but it seems to make some sort of sense if I think of "this" as the context
19:35technomancyibdknox: yeah, learning a new runtime is a lot harder than learning a new language
19:35ibdknoxtechnomancy: yeah, by far
19:35TimMccallen: How often have you mistyped a keyword in Clojure, or a URL path, etc.
19:35technomancyibdknox: I had an easier time picking up ocaml than clojurescript
19:35ibdknoxheh
19:36zakwilsonI must admit I also don't really get Clojurescript and the like. The language isn't usually the problem with writing JS.
19:36Chousukeibdknox: whatever benefits it may have iare not justified by the mental effort required to maintain a mental model of it, though.
19:36zakwilsonAnd you're not likely to be able to share much between the client and server code even if they're the same language.
19:36brehaut_zakwilson: depends where you draw the stdlib / language line
19:36ibdknoxzakwilson: there's a lot of value in the semantics that the default clojure structures/functions provide
19:37ibdknoxChousuke: yeah so many very hard to find bugs are the result of that one decision
19:37ibdknoxlol
19:37ibdknoxfilk-sing?
19:37ibdknox~guards
19:37clojurebotSEIZE HIM!
19:37Chousukeibdknox: javascript is like anti-clojure in that respect.
19:38Chousukein clojure, immutability makes things easy to reason about. in javascript, 'this' makes everything hard to reason about. :P
19:38ibdknoxhaha pretty much
19:38lucianChousuke: there's no defense for the clusterfuck that is 'this'
19:38lucianoh, nvm
19:38TimMc"Back when Fortran was not even Three-tran..."
19:39lucianperhaps i'm biased, but i think it should've done it like python
19:39brehaut_the lack of useful datastructures in JS is still my single biggest complaint
19:39ibdknoxTimMc: lol
19:39muhoohttp://www.shopify.com/technology/5370262-wat-a-funny-look-at-ruby-and-javascript-oddities
19:39zakwilsonibdknox: I don't disagree, but... my response to this isn't coherent enough to post.
19:39lucianbrehaut_: that's getting better with es5
19:39brehaut_it is
19:39brehaut_but its still not great
19:39TimMcibdknox: Yeah, it's filk. Got a problem with that?!
19:39ibdknoxzakwilson: that + macros provide a great deal of potential I think
19:39lucianbrehaut_: there's also the beginnings of a capability object model, which only E has. and quasiquoting too
19:39ibdknoxTimMc: no, I have a problem with our guards who seemed to have done a terrible job seizing you for it.
19:40TimMchaha
19:40zakwilsonibdknox: Yeah, I have no trouble seeing the utility of macros. Oddly, I write fairly few in Clojure.
19:40ibdknoxzakwilson: that's the ideal actually. Macros are mostly valuable at the lib level I think
19:41ibdknoxthey have plenty of utility outside of that, but they really shine there
19:41brehaut_lucian: yeah, theres lots of nice things coming (although im not sure about the quasiquoting. seems a bit weird)
19:41lucianbrehaut_: it's just like in E. namespaced, sanitised quoting (like lisp quasiquoting)
19:41TimMcWait, quasiquote in JS?
19:41zakwilsonibdknox: yeah, true. I write internal libraries though and still find fairly few things I can't write as functions instead. This seemed less true with CL, but I may just be more experienced now.
19:41brehaut_TimMc: yeah, ES5 is bringing lots of decent stuff to the language
19:42lucianTimMc: have a look, it's quite interesting. although the first examples are boring and the syntax sycks
19:42ibdknoxin 5 years we'll get to use it!
19:42TimMcWell, bravo to whoever can make *that* work.
19:42luciansucks :)
19:42ibdknox~rimshot
19:42clojurebotBadum, *tish*
19:42qbgAt least IE 6 is almost gone in the US (according to some sources) :)
19:42Chousukelucian: It's helped me to stop thinking of it as "this" and instead think of some "context" that has little relation to anything in the lexical scope :P
19:42TimMcI guess if all they're doing with macros is templating, they don't need sexprs.
19:43lucianChousuke: that's still no excuse. python has a sane self as a solution to a similar problem
19:43lucianTimMc: you can do much more, like new literals
19:43brehautlucian: i cannot remember, does ES5 have mutable iterators/generators like python or did the fix that failure?
19:44lucianbrehaut: not sure. i think they may get consumed like the python ones
19:44brehautlucian: crap.
19:44lucianjs is mutable enough already, it won't get any less mutable
19:44luciancan't fight that, really
19:44brehautwell yeah, but mutable iterators are a great sauce of pain in python
19:44lucianbrehaut: they are? i haven't noticed
19:45brehauti primarily use python too
19:45ibdknoxI primarily use VB6
19:45muhoothis is truly an awesome hack: https://github.com/technomancy/serializable-fn/blob/master/src/serializable/fn.clj
19:45luciani don't remember ever being bothered by their consumability
19:45muhooeven though awesome is deprecated
19:46muhooany chance of serializable-fn finding its way into the core language at some point, or into repl-tools?
19:46brehautextremely unlikely
19:46technomancyodds are low
19:46ibdknoxtoo much overhead?
19:46lucianmuhoo: i don't think the s-exp is kept along
19:47lucianthough it wouldn't be a big deal if it were, i'd think
19:47lucianjust put it in metadata or something
19:47technomancyit is in the metadata
19:47luciantechnomancy: the actual data structure? then what would be the impediment?
19:48technomancyI don't think they're interested
19:48lucianit sounds quite interesting to me :)
19:48technomancyah, if only your opinion or my opinion had some influence on the direction of Clojure
19:49lucian:)
19:49ibdknoxthe fact that it's a closure would make it somewhat hard to reason about I suspect
19:49ibdknoxand have potentially unintended side effects
19:49lucianibdknox: hmm
19:50qbgclass name wouldn't be preserved either
19:51TimMcSo... clojure.repl's source-fn uses :line and :file meta on Vars to extract source info from the declaring file
19:51qbgTimMc: That is why source doesn't work for fns defined on the repl
19:51TimMcaha
19:52simonadameit1hm, i stumbled upon strange behavior regarding lazy sequences
19:52brehautbets on binding?
19:52simonadameit1see https://github.com/schaf5/euler-clojure-solutions/blob/master/src/euler_clojure_solutions/core.clj
19:52technomancyibdknox: the existing implementation refuses to bind over things that aren't serializable
19:52ibdknoxah
19:52simonadameit1(nth primes 1000) returns 7927, but (nth primes 10000) returns nil
19:53simonadameit1why is that, can i not build infinite lazy sequences?
19:53ibdknoxtechnomancy: seems like that might rule out a lot of cases actually
19:53ibdknoxtechnomancy: rather, cases where I would want to use it
19:53brehautsimonadameit1: you definately can create infinite seqs
19:54brehaut,(nth 10000 (iterate 1 inc))
19:54technomancyibdknox: it's a 2-hour hack; it could be made smarter
19:54clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to java.lang.Number>
19:54technomancyit should be made to throw on serialization, not at function instantiation time
19:54TimMcbrehaut: I always get nth's arg order wrong.
19:54simonadameit1brehaut: well, could you try that example "primes" that i linked to? it stops after something like 10000 iterations and returns nil :(
19:55ibdknoxtechnomancy: yeah, I didn't mean that as a critique of the impl
19:55qbgsimonadameitl: Are you sure it isn't throw a StackOverflowException?
19:55TimMcsimonadameit1: You're stacking up an awful lot of remove calls.
19:55TimMcMaybe lazy-seq is swallowing the overflow?
19:56simonadameit1TimMc: are those stack or heap allocated?
19:56simonadameit1i thought lazy-seq would move a chunk to the heap
19:56qbgThose thunks still need to be called
19:56qbgAnd those thunks call each other
19:56simonadameit1ah ok
19:56TimMcI'm trying to think how this interacts with lazy-seq, though.
19:57brehautTimMc: the answer there is 'in a confusing way'
19:57TimMcI think it doesn't matter.
19:57brehautyeah its definately stack overflowing here
19:57brehautthe exception is not getting swallowed either
19:58qbgThe solution is to an algorithm that isn't that inefficient :)
19:58simonadameit1no no.. the algorithm isnt inefficient
19:58simonadameit1the implementation maybe
19:58qbgI'm seeing trial division
20:00simonadameit1ah, yes
20:00simonadameit1you're right
20:00simonadameit1now i have to think how to devise a more efficient algorithm which still returns a lazy-seq...
20:01qbgThe solution to that problem is beautiful
20:02qbgThere is actually a paper on it
20:02simonadameit1Hehe :)
20:04hiredmanif you ask clojurebot the right way it will tell you all about it
20:05simonadameit1clojurebot, how do i compute a lazy seq of primes efficiently?
20:05clojurebotIt's greek to me.
20:05simonadameit1haha :)
20:05simonadameit1yeah i know THAT
20:05ibdknox~prime
20:05clojurebotCool story bro.
20:05qbgLULZ!
20:05hiredman~sieve
20:05clojurebotsee the genuine sieve of eratosthenes
20:06simonadameit1yes, but now turn it into a lazy seq algorithm!
20:06emezeskeclojurebot, what does "It's greek to me" mean?
20:06clojurebotTitim gan éirí ort.
20:06qbgHow do you get clojurebot to google something again?
20:07qbgemezeske: Eratosthenes was greek for one thing.
20:07hiredman~google genuine sieve of eratosthenes
20:07clojurebotFirst, out of 430 results is:
20:07clojurebotThe Genuine Sieve of Eratosthenes
20:07clojurebothttp://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf
20:07tmciver$google
20:07lazybotNo search term!
20:10bbloomso i've been using reify on some java object, but now I realize I have two different types of java objects that I want to reify with 90% the same interfaces/implementations… what's the idiomatic way to go about that?
20:10qbgAnyways, the broken code in the gist gives me a stackoverflowerror in 1.2
20:11amalloy$google stackoverflow prime sieve dbyrne
20:11lazybot[recursion - Recursive function causing a stack overflow - Stack ...] http://stackoverflow.com/questions/2946764/recursive-function-causing-a-stack-overflow
20:12TimMcamalloy: You should link to that on the(?) 4clojure primes problem once someone gets a stack overflow.
20:12bbloom(yes, i know, concrete inheritance is bad… i didn't design the lib)
20:13qbgbbloom: is it actually concrete inheritance?
20:13qbgI though reify was interface only
20:13qbg(for the Java stuff that is)
20:13bbloomqbg: oh no, i guess it isn't
20:14qbgbbloom: If you were implementing a protocol, you could use extend
20:15bbloomso basically, i have two concrete objects A and B which implement IBase, IA, and IB — I have been reifying both of them to various interfaces
20:15qbgYou mean you created A and B using reify?
20:16bbloomsome interop code is returning an A or a B & i've been doing reify to some other set of interfaces that happens to only cover the subset of functionality common to both A and B… but now I want to have a few extra functions that operate on A and B differently… but I don't want to duplicate all the common functions
20:16bbloomdoes that make sense?
20:16hiredmanhave the objects delegate behaviour to other objects and "inject" (close over or pass to the constructor) different objects to get different behavior
20:17bbloomyeah, that's what i thought i might have to do… but does that mean I have to basically repeat the list of every method on both objects? seems kinda wordy
20:17hiredmanbbloom: write a macro to generate them
20:17qbgYou could use macros, but it seems a bit overkill for a small number of impls
20:17bbloomits 10-ish
20:18qbg10ish is enough I think :)
20:18hiredmanbbloom: I would suggest seeing if you could get the 10ish down to 1
20:18qbg(I was reading what you wrote before as only need 2 impls)
20:18bbloomit's 10ish functions
20:18bbloom2 different concrete objects coming back from the java interface
20:19hiredmaninstead of getting different behaviour by having different implementations get different behavior by constructing the same type with different values
20:19devnIs lein-noir 1.2.1 really still the plugin to install?
20:20bbloomhiredman: since the method sets seem to be disjoint, i could probably just implement everything on either type of concrete object & let it fail at runtime....
20:20ibdknoxdevn: nothing about the template has really changed? the latest stable noir is 1.2.2
20:20tmciverAnyone know how to get emacs to display a list of installed packages? package-list-packages seems to only list not-installed packages.
20:21technomancytmciver: installed packages should be at the bottom
20:21devnibdknox: sorry, just saw 1.2.1 come across the wire as a dependency when i lein install'd the plugin
20:21technomancybut you can do ls ~/.emacs.d/elpa too
20:21simonadameit1so actually its quite simple...
20:21technomancyibdknox: are you using lein-newnew yet?
20:21devnibdknox: once i built a new project i realized i'd made an error
20:21ibdknoxtechnomancy: next version is
20:21technomancygreat
20:22devnibdknox: one thing i notice is that I always end up fixing the indentation of the generated projct.clj
20:22ibdknoxdevn: blame vim
20:22ibdknoxdevn: it'll be fixed in the next one :)
20:22tmcivertechnomancy: doh! I was looking for an 'I' in the first column.
20:22devn:)
20:23devnibdknox: i remember when lein had a similar issue, so idk if that's worth looking into
20:23bobhopeis update-proxy functional
20:23bobhope?
20:24hiredmanno
20:24hiredmanproxy is slow
20:24hiredman(fyi)
20:24bobhopeI need to dynamically redefine method implementations while implementing protocols
20:24bobhopeI suppose I could reify
20:24bobhopebut I need to override equals and hashcode
20:24tmciveron a related question I installed color-theme package but doing M-x 'color-theme' does present any completions.
20:24hiredman:| don't proxy protocols
20:25dgrnbrgI have protocols and interfaces I need to define
20:25hiredmanI don't believe you need any such thing
20:26technomancytmciver: the autoloads on the color-theme packages are busted
20:26technomancyI think I filed a bug for that
20:26dgrnbrgI need to write an object which support destructuring as a vector and as a map, which provides the results according to my spec, and I need to implement a few other protocols
20:26dgrnbrgthis object must do all these things
20:27tmcivertechnomancy: really? any work-around?
20:28technomancytmciver: https://github.com/technomancy/dotfiles/blob/master/.emacs.d/phil/workarounds.el
20:28tmcivertechnomancy: how apt!
20:28lynaghkWhat's the appropriate way to call math functions in clojure? I'd like to use Sine, but it's not in clojure.math.numeric-tower. Are there any maintained libs that wrap the host math functions?
20:29technomancytmciver: that's a different package manager
20:29hiredman,(Math/sin 4)
20:29clojurebot-0.7568024953079282
20:30tmcivertechnomancy: what's a differenct package mananger? workarounds.el?
20:30lynaghkhiredman: So drop to the Java eh? I'm hoping to get something that will work on CLJS too, so maybe I will have to put together some kind of wrapper lib.
20:30technomancytmciver: apt is
20:30technomancy~ $ which apt-get # /usr/bin/apt-get
20:30clojurebotNo entiendo
20:30technomancy
20:30technomancyhar har
20:30TimMclynaghk: May I recommend https://github.com/baznex/imports
20:30tmciverfunny
20:30hiredmanclojure.math.numeric-tower is most likely too slow to be useful
20:30brehautlynaghk: JS uses the same Math object as Java
20:31hiredman(I don't have any numbers to back that up)
20:31TimMctmciver: We don't have any actual usage docs yet!
20:31lynaghkbrehaut: think I could get away with (def Math js/Math) and use the same definitions?
20:31TimMcThis is terrible!
20:31echo-areaI went offline yesterday after asking my question.
20:31brehautlynaghk: i know next to nothing about cljs sorry.
20:31lynaghkTimMc: you may, thank you.
20:32ibdknox|awaylynaghk: I don't think that will work
20:32echo-areaDoes anyone here know Clojure's STM implementation? Every committed value is computed a millisecond-based commitment time, but it's never used. What's the purpose of this time? Isn't it slowing down transactions?
20:32echo-areaCould anyone explain this?
20:32qbgdgrnbrg: Looks like your object will need to be seqable and implement ILookup, or Map
20:32dgrnbrgqbg, I know
20:32tmciverTimMc: in imports?
20:32TimMctmciver: Yeah. :-(
20:33dgrnbrgqbg: I'm pursuing an implementation based on a functional implementation of proxies using deftype
20:33hiredmanthe formatting of clojure.math.numeric-tower is pretty horrible too
20:33hiredmanhttps://github.com/clojure/math.numeric-tower/blob/master/src/main/clojure/clojure/math/numeric_tower.clj#L223 soooo bad
20:33tmciverTimMc: usage is obvious to the most casual of observers.
20:33qbgdgrnbrg: What do you need help with?
20:33dgrnbrgqbg: I wanted a better solution, if it existed :)
20:33tmciverTimMc: we don't need no stinkin' docs!
20:33TimMctmciver: There's pretty decent usage instructions in the docstrings, actually.
20:34qbgdgrnbrg: Better than using deftype?
20:34dgrnbrgsimpler, yes
20:34tmciverTimMc: well, that's probably a task I could tackle. That way I can feel useful.
20:34dgrnbrgso I don't have to provide implementations of IMeta, IObj, hashCode, and equals
20:34dgrnbrgsince those are just boilerplate
20:35qbgdgrnbrg: deftype is probably the best way. You could alternatively decide that you don't need a single object to do all of that :)
20:36dgrnbrgI do, though, since I'm writing a system that integrates w/ clojure seamlessly, but has a code generator for a different backend
20:36dgrnbrgand uses runtime clojure as its compile-time macro system
20:36qbgIIRC, deftype provides impls of hashCodes and equals unless you override it though
20:37TimMctmciver: Haha, look at all the "contributors" to baznex/imports: https://github.com/baznex/imports/contributors
20:37dgrnbrgdefrecord explicitly mentions that it offers hashCode and equals
20:37tmciverTimMc: Ha! did you add them?
20:38TimMctmciver: No, it's an artifact of having forked clojure-contrib.
20:38dgrnbrghmm, maybe not
20:38dgrnbrgoh well...
20:38tmciverTimMc: hmm
20:38qbgAh, yes right
20:38amalloyhiredman: that looks kinda like the indentation in common lisp, or maybe elisp, right?
20:39zcaudatedoes any know if there is a cli way to check for the latest version of a package on clojars?
20:39hiredmanmaybe some kind of common lisp, not elisp
20:39TimMczcaudate: There's lein search...
20:40devnso, what's the buzz around the work aaron cohen is doing?
20:40TimMcwho?
20:40clojurebotwho is your master
20:40devnhe's working on CinC
20:41TimMcOh, that guy.
20:41hiredmanis there buzz?
20:41devni dont know, im just trying to take the temperature
20:41devnim interested in what he's doing
20:41zcaudatethnx timmc
20:42TimMcWatching Rich's keynote talk, it sounds like modifying the CLJS compiler is going to be the official path forward for CinC
20:42bbloomare the built in clojure interfaces available in protocol form? i really wish I could use extend-type with Associative
20:42devnTimMc: yeah that was clear on cljs from the outset -- it's a blueprint
20:43qbgbbloom: Maybe one day soon...
20:43bbloomcljs has protocols for associative ;)
20:43TimMcdevn: The outset? It has been around for years, as far as I can tell.
20:43devnTimMc: cljs?
20:43TimMcyep
20:43qbgThere was a different, older cljs
20:43TimMcMaybe that was an older project that was scrapped.
20:43TimMcok
20:43qbgNot the same thing at all
20:44devnyeah that was chouser's
20:44bbloomqbg: is that "someday soon" related to the CinC stuff you guys are talking about now?
20:44devnwho did a lot of work on the new one as well because, well, he's chouser.
20:45qbgOnce we get CinC for the Java impl/backend...
20:45bbloomgotcha...
20:46TimMcI guess CinC will be 2.0 at least.
20:46TimMcWell, no, I take that back.
20:46bbloomyeah, i implemented Var for a clojurescript experiment i was doing & editing the cljs compiler was super easy compared to making sense of the clojure JVM java code
20:46alexbaranoskyTimMc, that is a serious amount of contributors to baznex/import
20:46TimMcalexbaranosky: Yeah, it is basically an accidental lie.
20:47devnas of (first clojure/conj) there were more than a few people of repute discussing CinC
20:47alexbaranoskyyeah, but funny - we should get all those guys to come to the next bazne gathering :)
20:47tmciveralexbaranosky: looks like everyone is there except for you! ;)
20:47TimMcBut from now on, I'm going to fork leiningen or something, delete everything (keeping the commit history), and use that for each new project.
20:48TimMcI'm gonna look like such a collaborator.
20:48qbg'This leiningen fork includes a built in Sudoku plugin!'
20:48devn(doctor)
20:48alexbaranoskytmciver, ha, I've been too busy talking about QuickCheck to actually work on any code at the last couple baznexes
20:49devnalexbaranosky: ah, quickcheck man, eh?
20:49tmciveralexbaranosky: that's OK. I probably shouldn't be listed as a contributor anyway.
20:49devnalexbaranosky: we've been kicking around ideas a lot lately, but the quickcheck thing keeps coming up
20:49qbgI wonder if we can hook together leiningen build output to Overtone
20:50devnqbg: don't steal my idea!
20:50devnqbg: i just started working on that on monday night!
20:50alexbaranoskydevn, I've been chatting with reiddraper a lot about QuickCheck... and also how it can be incorporated into Midje
20:51qbgYou got to hook up maven output to Overtone, and build a Clojure
20:51alexbaranoskydevn, https://github.com/marick/Midje/tree/formulas
20:51qbgProbably sounds like dubstep
20:51alexbaranoskydevn, https://github.com/AlexBaranosky/Shrink
20:51devnlol qbg, no, i want to do what someone did a long time ago with lazytest
20:51devnthey wrote lazytest-listen
20:51bbloomi'm finding the java interop stuff to be a pretty huge mind bender… there are so many helper macros that i feel like ONE OF THEM needs to do what i want… but i cant figure it out
20:51devni want to add a plugin for midje that gives you audio output for tests
20:52devnmary had a lit-tle lamb, lit-tle la*CRASH*
20:52alexbaranoskydevn, depending on your level of seriousness, we could talk about what it would take to enable that kind of plugin to hook up wit Midje :)
20:52qbgSuddenly a 1000 sheep cried out and were silenced
20:52bbloomthe dichotomy of protocols and interfaces is frustrating…. it seems like if only these things were protocols everything would work fine…. is there any way to turn an interface into a protocol?
20:52devnalexbaranosky: im quite serious. i'd like to do an audio output for test runs
20:53ibdknox|awayI built a vs extension that monitored the speed of your typing and faded flight of the valkyries in as you got faster lol
20:53bbloomibdknox: that is awesome.
20:53ibdknox|awayused to install that on random people's machines. The results were hilarious
20:53qbgbbloom: Do you want java code to take the result?
20:53alexbaranoskynice
20:54bbloomqbg: yeah, i need an object that i can work with in clojure and pass back to java
20:54qbgThen no :(
20:54bbloomso what would be the solution if i didnt need to pass it back?
20:54technomancyI wrote the "lein play" plugin to give a final fantasy victory fanfare on successful test runs
20:54alexbaranoskydevn, you can add an issue and we could hash out what that might entail on github
20:54devnalexbaranosky: Shrink looks really cool. Did you ANN on the list?
20:54devnalexbaranosky: will do that immediately
20:54alexbaranoskydevn, not yet, because it's not done yet
20:54bbloomcus in theory i could add an 'unwrap function and just call that before passing it back
20:54devnalexbaranosky: im excited to see it
20:55devnalexbaranosky: i would like to give a talk at our next Clojure meetup about quickcheck, test.generative, and hopefully Shrink. :)
20:56alexbaranoskydevn, shrink is really meant as a component to getting quickcheck style workign with Midje - but I made it a separate library because I noticed that test.generative doesn't shrink failures yet -- now it could be usable to other libraries
20:57devnalexbaranosky: perhaps there is room for contributing to test.generative? I don't actually know the particulars there, so don't take that as a strong suggestion by any stretch of the imagination.
20:57alexbaranoskydevn ideally the test framework takes a generated failure, and keeps shrinking it, and rerunning the test to get the smallest possible failure which it then will report to the user
20:57qbgbbloom: Well, it sort of depends on what I mean by pass it to the Java code. You could create a protocol that mirrors the interface and extend the protocol to the interface, but not much else
20:57alexbaranoskystuart halloway expressed excitement when he saw Shrink, so I think there is room for collaboration there
20:58devnalexbaranosky: smallest meaning the most common overlapping failure between inputs?
20:58alexbaranoskydevn, also, my current vision for midje's formula macro is for us to just borrow the generators from test.generative ... but we'll see how that goes, I haven't thought too hard on it yet
20:58alexbaranoskydev, smallest mean.... something like "least complex"
20:59devnalexbaranosky: *nod*, i was thinking in a different dimension there about the "root" being shared among many test inputs, so in some sense it is the "largest" possible failure
20:59alexbaranoskyso if your fact fails on a generated number of 100234 then it will try to shrink it to like 50117
20:59alexbaranoskythen run it again
20:59alexbaranoskyand see if it fails still
21:00alexbaranoskythe principle being that it is going to be hard to understand why a huge funky number or string is failing
21:00devnor incredibly obvious :)
21:00devn{:pre ...}
21:01devnanyway, i see the drive of it, and i think that's great
21:01bbloomhttp://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ — heh…
21:01bbloomi guess i'm not the only person who is confused
21:02devnbbloom: that's a great chart
21:02alexbaranoskyyeah I enjoyed that chart too.
21:02TimMcI want to rearrange it, but it apparently has to fit on a book page.
21:03devnthis community rules.
21:03cemerickTimMc: Feel free to mix it up however you like.
21:03alexbaranoskycemerick, that chart makes me wonder if the book is going to be equivalently insightful
21:04brehautalexbaranosky: yes
21:05bbloomi realize that i'm doing java interop, so it's no surprise that it feels java-y…. it's just…. I hate java-y....
21:05alexbaranoskybrehaut, guess I'm going to buy it then :)
21:05brehautalexbaranosky: i
21:05brehaut've liked what ive read so far
21:05cemerickalexbaranosky: I hope so :-)
21:06cemerickthough, I'd rather it be useful than insightful
21:06alexbaranoskycemerick, I think it can achieve high ranks in both categories
21:09bbloomok, so i think i have an idea of how to do what i want to do by using either deftype or reify plus a macro…. my last question on this: is there an easy way to reflect over an interface & define delegation methods for my type? ie, I don't want to bother defining a dozen interface methods which are all of the form foo(x,y) { return underlying.foo(x,y); }
21:10qbgbbloom: take a look at clojure.reflect
21:10qbgAnd use a macro
21:11bbloomah neat — ok… i'll give this all a try
21:11bbloom…. right after i eat something :-)
21:11bbloomthanks for the help!
21:11qbgAlternatively if you are in 1.2 for some reason, you can use the Java reflection API directly
21:11bbloomnope, 1.3
21:12bbloomseems like this would be good enough… i was just hoping that reify had some kind of :delegate [fn1 fn2 fn3] or something like that
21:20devndidn't there used to be some example floating around about taking live keyboard input and playing midi notes using a java frame or something?
21:20devnI can'
21:20devncan't find it anywhere
21:23TimMctechnomancy: DISASTER! serializable-fn has a compile bug!
21:23devnheh
21:24devnwhy do you need serializable-fn, btw?
21:24devnYou just want to print-dup (defn foo [x] (+ 1 x)) to a file?
21:24TimMcI don't!
21:24TimMcJust playing around with it.
21:25devnah, so honestly im not exactly sure what serializable-fn is good for
21:25devni guess it prints pretty on serialization?
21:25TimMcyes!
21:25devnbut who cares? :D)
21:26devni looked at the code. it's interesting, but i can't imagine where i'd be serializing a fn where i'd prefer it be perfectly readable
21:26devnserialization tends to be inherently unreadable
21:27devnit strikes me that the very idea of serialization is often that it is the lowest energy state which preserves information
21:28devnso i guess i don't get it when it comes to keeping it readable
21:28TimMcHmm, can't figure out how the tests pass.
21:28simonadameit1he, that sieve thingy is definitely faster than trial division — and no stack-overflow/nil return this time
21:28simonadameit1thank you guys!
21:29amalloyhuh? the point of serializable-fn is that functions aren't serializable without it
21:30amalloyTimMc: i was the last one to touch serializable-fn. what goes wrong?
21:30qbgsimonadameitl: Got it implemented?
21:30simonadameit1code is here: https://github.com/schaf5/euler-clojure-solutions/blob/master/src/euler_clojure_solutions/core.clj
21:30simonadameit1qbg: well … my version of it, no multi-map like in haskell
21:31qbgI did a map to a set, did you do the same thing?
21:31simonadameit1qbg: no, i push out the iterator as far i can till i find an empty slot
21:31devnamalloy: that's false though. why couldnt code just be written to a file and have read-string called on slurping it? that's not serialization?
21:32simonadameit1figured that would have the same effect with less set/map consing
21:32devn&(eval (read-string "(defn foo [x y] (+ 1 x y))"))
21:32lazybotjava.lang.SecurityException: You tripped the alarm! eval is bad!
21:32qbgProbably a bit more work than you need towards the end of the lazy seq though
21:32amalloycertainly it could. but defn doesn't save the source, and you haven't handled closures yet
21:32dgrnbrgHow do I find the first element of a sequence that satisfies a predicate? some seems to return true, not the element of interest
21:32TimMcamalloy: ^Writer, but no import
21:32devnamalloy: not trying to be snarky here: enlighten me. i don't know what you mean.
21:32amalloy(comp first filter)
21:33qbg,(first (drop-while odd? (range)))
21:33clojurebot0
21:33dgrnbrgthanks :)
21:34amalloydevn: (let [x 1] (fn [y] (+ x y))). if i pass you a pointer to that function, how do you serialize it?
21:34simonadameit1qbg: did you look at the code? — the build-primes reads well to me
21:34amalloyor even just (fn [x] x) - you can't serialize that either, because you don't have the source
21:34brehautqbg: that doesnt do what you think it does
21:35devnamalloy: so what is the pragmatic use of such a thing?
21:35amalloy*shrug*
21:35brehaut,(map #(first (drop-while odd? %)) [[1 2 3] [2 3 4]])
21:35clojurebot(2 2)
21:35devn&(def foo (eval (read-string "(fn [x] (+ x 1))")))
21:35lazybotjava.lang.SecurityException: You tripped the alarm! eval is bad!
21:35amalloythat's technomancy's problem. but for one thing it lets you send functions over the wire
21:36devncouldn't you just make functions on the other end of the wire?
21:36qbgYeah, no drop-until. The filter solution is better
21:36TimMcamalloy: What I can't figure out is how ^Writer causes a problem when I (use ...) serializable-fn, but not when it is :use'd in the tests.
21:36dgrnbrgamalloy, you can register a java agent and intercept the byte code of the function, then send that
21:37brehautrelying on the bytecode of compiled clojure is a risky proposition
21:37devni guess it's just an interesting bit, and im cool with that, but it just seems sort of contrived
21:37devnlike that's a general use case or something
21:37amalloyTimMc: clojure versions? maybe the one serializable-fn uses is more forgiving of broken typehints
21:38devnklauern: hello!
21:38amalloyyeah, i think 1.3 is stricter than 1.2 in that regard
21:38amalloyTimMc: send a pull request: definitely a bug
21:39qbgsimonadameitl: Yeah, that looks pretty good
21:39TimMcamalloy: Yup, it's a 1.2/1.3 thing.
21:40TimMcand will do
21:40devnamalloy: im not trying to ruffle feathers, i just dont see, despite how interesting it is, why anyone would make that their common practice
21:47simonadameit1qbg: im thinking about moving the lazy-seq part down, so I can use (recur..) to find the next prime
21:47simonadameit1but it seems to mean always computing one more than needed
21:48muhoohmm, how production-ready is aleph?
21:48muhoothe readme says "Aleph is meant to be a sandbox for exploring how Clojure can be used effectively in this context", but maybe he's just being modest, i dunno.
21:51simonadameit1oh, actually it works fine without computing too much.. and the speed improvement of recur is quite much :)
21:53alexbaranoskywhat is the canonical function for getting every permutation of a sequence?
21:57muhooalexbaranosky: doseq?
21:57brehautsurely for would be a better choice
21:57brehautor mapcat
22:01TimMcalexbaranosky: I doubt there's a core fn.
22:02TimMc$findarg set (% [1 2]) #{[1 2] [2 1]}
22:02lazybot[]
22:03alexbaranoskyclojure.math.combinatorics
22:03alexbaranoskyhttps://github.com/clojure/math.combinatorics/blob/master/src/main/clojure/clojure/math/combinatorics.clj#L159
22:03TimMc&(require 'clojure.match.combinatorics)
22:03lazybotjava.io.FileNotFoundException: Could not locate clojure/match/combinatorics__init.class or clojure/match/combinatorics.clj on classpath:
22:03TimMc&(require 'clojure.math.combinatorics)
22:03lazybotjava.io.FileNotFoundException: Could not locate clojure/math/combinatorics__init.class or clojure/math/combinatorics.clj on classpath:
22:06bbloomdoes this room have a preferred paste bin?
22:07brehautrefheap or gist ?
22:07bbloomthx
22:07muhoo~paste
22:07clojurebotpaste is http://gist.github.com/
22:08muhooheh
22:08muhoo~paste is also http://refheap.com
22:08clojurebotRoger.
22:08muhoo~paste
22:08clojurebotpaste is https://gist.github.com
22:08muhoo:-/
22:08brehaut~paste
22:08clojurebotpaste is http://gist.github.com/
22:08bbloomwhat's the ~ operator do for clojurebot?
22:08muhooif you insist
22:08TimMcmuhoo: Multiple factoids.
22:09TimMcmuhoo: And a broken forgetting mechanism.
22:09brehautbbloom: it just addresses the bot
22:09TimMcbbloom: It's the factoid trigger.
22:09bbloomgotcha
22:09brehautclojurebot: paste
22:09muhoo~guards
22:09clojurebotpaste is https://gist.github.com
22:09clojurebotSEIZE HIM!
22:09brehautclojurebot: guards
22:09clojurebotSEIZE HIM!
22:10brehauti dont think its specifically for factoids
22:10TimMchmm
22:10brehaut~3d6
22:10clojurebotexcusez-moi
22:10brehaut~ roll 3d6
22:10clojurebotExcuse me?
22:11brehautclojurebot: 3d6
22:11clojurebotNo entiendo
22:11bbloomqbg: This is what I came up with: https://refheap.com/paste/809 simple enough!
22:11brehaut3d6
22:11clojurebot15
22:11brehautfne
22:12brehautso i think ~ / clojurebot: works for ticket lookups, code lookups, google searches, seens, epigrams and factoids. everything else doesnt require nicks or ~
22:13brehauthaha 0.1% of the time clojurebot reacts to stuff that isnt addressed to it
22:13amalloybbloom: (. obj method) exists specifically so that you don't have to keep constructing (.method object) in macros
22:14bbloomamalloy: even better! thanks
22:14amalloybrehaut: you've never noticed? he's a pain
22:14brehautamalloy: ive noticed, but never understood why. now i do
22:14amalloyhe's cute, though, so he stays that way
22:15brehauti had assumed there was a rule i didnt understand
22:15brehautturns out it was much simplier than i realised
22:16bbloomamalloy: new and improved: https://refheap.com/paste/810
22:16bbloomi'm confident enough with clojure now to write things that work the first time…. but i still don't have the feel for how it should look right away
22:19amalloyit's rather nicer if you use ` rather than list, imo: `(~name [this# ~@args] (. this# ~name args)). but are you sure the nesting/parens are right there? it looks like it will generate (. foo put (1 2)), whereas i thought the syntax was (. foo (put 1 2))
22:19bbloomjust did that: https://refheap.com/paste/811
22:19bbloom:-)
22:20amalloy&(macroexpand '(.put foo 1 2))
22:20lazybot⇒ (. foo put 1 2)
22:20amalloythe parens are optional either way, of course, so you can just splice with ~@args and avoid the question
22:20bbloomyeah the ~@ seems nicer
22:20muhooooh cool
22:20bbloomthe ~' is a bit weird, but makes enough sense
22:20amalloy~'this is tacky IMO
22:20clojurebotIn Ordnung
22:20bbloomi figure you get used to it
22:20bbloomamalloy: so what's the right thing to do?
22:20amalloythis#, as i suggested
22:20bbloomoh dur
22:20bbloomgensym
22:20bbloomright
22:20muhoo~'this
22:20clojurebot'this is tacky IMO
22:21muhooheh
22:21amalloyyou might also destructure :name and :parameter-types instead of looking them up as keywords
22:21amalloy(defn- delegate-method [{:keys [name parameter-types]}] ...)
22:23bbloomi guess i could gensym for all the args too, huh?
22:24bbloomhttps://refheap.com/paste/812
22:25amalloyrepeatedly takes a count argument
22:25bbloom… of course it does
22:25bbloomheh
22:26bbloomhttps://refheap.com/paste/813
22:27bbloomok, that's looking pretty good in my book :-) going to go eat… which i had planned on HOURS ago…. thanks for all the help guys!
22:28muhoooptionally. i've seen repeatedly with no count before
22:28muhooit's fun, like typing "yes" at a unix command prompt
22:33devnOverwrite /, [yes/no]
22:33devnsuper fun.
22:38bbloom…. i just ran `man yes`
22:38bbloomi'm not exactly sure what i'd use that for....
22:38bbloomlol
22:38bbloom$ which no
22:38bbloomno not found
22:38bbloom*sigh*
22:39Apage43bbloom: $ yes no
22:39bbloomwell of course
22:40bbloomhttp://en.wikipedia.org/wiki/Yes_(Unix)
22:40bbloomwell that's super informative....
22:50johnmn3g'day
22:51johnmn3I bought a super low budget VPS (6 bucks a month)
22:51johnmn3unfortunately, when I attempt to do a: lein run
22:52johnmn3Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory
22:52johnmn3now, the specs on the box aren't horrible
22:52johnmn31GB ram, burstable to 1.5
22:53johnmn3and free thinks it has 1.5
22:53johnmn3and free says I'm using only 166 megs
22:53johnmn3so I'm not sure why it is doing this
22:53johnmn3So I've been looking into what the ways are to configure jvm boot options for leiningen
22:54johnmn3so I added this to the project file:
22:54johnmn3:jvm-opts ["-Xmx512m"]
22:54johnmn3is that the correct course of action, and, if so, did I execute that correctly?
22:56johnmn3by the way, running "lein help" returns the help menu, without causing a memory error... hmm, maybe only the bash file is running and no java?
22:56johnmn3going to try lein new again
22:56johnmn3k, lein new test2 works with no errors
22:56johnmn3anyone ever seen this error on a low budget box.
22:57johnmn3?
23:00emezeskejohnmn3: Maybe try "lein trampoline run"
23:00emezeskejohnmn3: I think that runs the app in-process instead of spawning another JVM
23:01amalloybbloom: it's hard to imagine what you'd use identity or constantly for in clojure, and yet they're indispensable
23:01johnmn3attempting
23:03muhoohow do i specify which symbols to use in use? (use 'foo.bar :only ['baz]) does not work
23:03bbloomamalloy: identity and constantly make perfect sense to me… the `yes` command in unix didn't so much… i guess i switched to unix long after commands grew -f and -y arguments
23:03brehaut(use '[foo.bar :only [baz]])
23:04brehautmuhoo: ^
23:04muhooah! i have to quote the whole damn list. got it, thanks
23:04johnmn3failed
23:04muhooworks, thanks
23:04emezeskejohnmn3: Doh!
23:04johnmn3different failure
23:04arohnermuhoo: it's not required to quote the whole list, but you do need a seq around "foo.bar :only [baz]")
23:05johnmn3SIGSEGV
23:05johnmn3ld-linux
23:05arohnermuhoo: (:use '[foo.bar :only ('baz)]) or (:use ['foo.bar :only ('baz)])
23:05johnmn3It probably has something to do with the fact that I'm paying 6 bucks a month for a vps
23:05arohnererm, the inner ' quote on the left one isn't necessary
23:05amalloyarohner: the first one there won't work. too many quotes
23:05emezeskejohnmn3: Yeah, segfault seems like it's probably not Java's fault
23:05arohneryeah, typo
23:06muhoojohnmn3: where can you get a vps for only $6/mo!?
23:06muhoocheapest i've seen is like $20/mo at linode, and like $60/mo at aws
23:06johnmn3I know, crazy, right?
23:07johnmn3muhoo: http://www.lowendbox.com/blog/urpad-5-99month-1024mb-openvz-vps-in-dallas-tx/
23:07amalloythe extra $14 seems to buy you a jvm that functions
23:08johnmn3but I may check these guys out if urpad doesn't work
23:08johnmn3http://buyvm.net/
23:08muhooah, openvz. not "real" virtualization, but useful
23:08johnmn3right
23:08muhooand cheap
23:09johnmn3buyvm has some kvm options
23:09clojurebotI don't understand.
23:09gfredericksclojurebot: buyvm |has| some kvm options
23:09clojurebotAlles klar
23:09johnmn3but the 1GB ram costs 20.00
23:09muhoowow, $15/YEAR? damn that's good
23:09johnmn3yea, but that's 128 ram
23:10johnmn3can you run clojure apps on that?
23:10johnmn3with leiningen?
23:10emezeskeThat's why I'm going with google app engine
23:10johnmn3geez, low budget clojure is a blog post waiting to happen
23:11emezeskeFree, and it works
23:11johnmn3yea, I guess GAE and Heroku deserve an honerable mention
23:11muhooheroku free too, up to a point
23:11emezeskeFor apps that aren't going to see much traffic
23:11johnmn3I deployed to heroku before, but there's something about having root access
23:11emezeskeYeah, GAE costs $$$ if you have any decent traffic
23:11emezeskeIf you want root access, pay for a linode :)
23:12johnmn3I did
23:12emezeskeBut...?
23:12johnmn3I just don't use it enough to warrant 20 bucks a month
23:12muhoowell, openvz gives you root access, and the abillity for them to keylog you :-)
23:12johnmn3Is KVM unrootkitable?
23:13muhooactualy kvm can probably be rootkitted too
23:13johnmn3If you don't have physical access...
23:13muhoobut it is SO easy to jump into an openvz container as root
23:13muhoovzctl enter xxx
23:13muhoobang, they've rooted you
23:14johnmn3yea, probably shouldn't host host any storefronts on a 6 dollar boxes
23:15muhooor any shared hosting, but people do it
23:15muhoosome are better than others. i love nearlyfreespeech.net
23:15muhoobut, alas, they only do PHP natively :-(
23:30gtrakanyone know how to turn off a note on an overtone definst?
23:34devn(stop)
23:34gtrakdoesn't that kill everything?
23:34devn(inc)
23:35devnYou could cheat if it has a freq and (ctl inst-name :note 0) or something
23:35gtrakah
23:35devnotherwise im afraid im not too much help
23:35devnim sure there's a cleaner way
23:36devnperhaps you could (stop inst)
23:36devnor something like that
23:37gtrak(ctl mooger :note 0) did something!
23:37devnyes but it is technically still playing
23:37gtrakyea... not quite right
23:37devnit's just outside your range of hearing it :)
23:37gtrakI really need an example
23:38devngtrak: i think the examples/* dir in the overtone project is chock full of examples
23:38gtrakhaha, I need just one, unfortunately
23:38devnit might take some hunting, but i recall stopping a specific instrument being in there
23:38gtrakthe right one :-)
23:38alexbaranoskydevn: still hoping to see the audible report failures issue :)
23:38devngtrak: inspect the args stop takes
23:38devnalexbaranosky: *sigh* I've slipped again haven't I?
23:38devnI want to do _ALL THE THINGS_
23:39gtrakthis looks right: :note-off (ctl (get @notes* (:note event)) :gate 0)
23:39devnbadda bing
23:39bbloomis there a useful syntax for macros that expand to include metadata/type-hints? or is with-meta the best bet?
23:39devnthat looks right to me as well gtrak
23:39devngtrak: erm, maybe
23:40devngtrak: why :gate 0
23:40devngtrak: :note-off ought to be enough I think
23:40gtrakhmm, not sure, it's in the midi example
23:40gtraki think note-off is the actual midi message
23:40gtrakthere's a map of currently-playing notes
23:42devngtrak: there used to be a (kill n) sort of thing
23:42devnso when you play (inst), it returns a value, like 24 or something
23:42devnyou used to type (kill 24)
23:42gtrakah
23:42devnstop may be that now, stop may take args, so you might try that
23:44gtrakkill did something, I heard a pop
23:44devnheh, im not sure that's a good thing :)
23:44gtrakhaha
23:44gtrakyea, seems like stuff is dead
23:44gtrakima try the ctl way
23:46devngtrak: id say do something nice like (ctl mooger :gate 0)
23:46devnfollowed by (kill mooger)
23:46devnbut again, i think there's still probably a more noble way to kill an inst in progress
23:47devngtrak: ask on the list
23:48muhooin docs like this, why is it map* not map ? https://github.com/ztellman/lamina
23:48muhoowhat's the * do?
23:49devnmuhoo: https://github.com/ztellman/lamina/blob/master/src/lamina/core/seq.clj#L248
23:49muhoooh thanks, it's his own variation
23:50devnmuhoo: *nod*, when you see foo* it generally means it's custom, private, or part of the building blocks that make a true "(map ...)"
23:51muhoowow, map*, filter*, reduce*, partition*, take-while*, he's got a lot
23:51devni know that's vague, but in general i just see foo* and think: "must be special in some way"
23:51muhoogood convention, thanks for explaining it
23:52devni think it's part of an older convention that a crust neckbeard would scold me for explaining in such a reductive way
23:52gtrakso, now I try it with ctl, I get SEVERE: Failed attempting to send an OSC message to SuperCollider server. Reason: incorrect arglist type in OSC message /n_set. Expected an integer or a string representing a control found class java.lang.Float. Message name: /n_set Type sig: [:node-id :ALTERNATING-ctl-handle-THEN-ctl-val*] Arg list: (31 60.0 "gate" 0.0)
23:52devnbut that's the version i go with muhoo
23:52devncrusty*
23:53muhooso, along those lines, foo! means it has side-effects, *bar* means it's a global variable, oops dynamic var, and baz- means it's private, right?
23:53devn*foo* => earmuffs, and yes, it means dynamic var as of 1.3
23:53devndefn- means it's private
23:54devni don't see people use (defn- foo- []) in practice
23:54devnit would still be (defn- foo [])
23:54muhoook, because it won't show up in ns-publics if it's defined with defn-, i guess
23:54muhoostarting to figure some of this out
23:54gtrakdevn, kill works, I just gotta keep track of the return values
23:55arohnermuhoo: earmufs and ! are conventions, not required
23:55devn^- +10
23:55devndo what you think is intention revealing and correct
23:56devnmuhoo: fwiw you might also see this: (defn foo-p [])
23:56devnmuhoo: that means foo-predicate, as in (defn foo? [])
23:56devnwhere the result is true or false
23:57muhoooh, interesting, thanks. i'd seen foo? a lot of places, i.e. in core even? odd? etc
23:57devnthat's a common lispism that has bled over, but you may see it now and then in other libs
23:57devnit was new to me when i first saw it, just passing that along
23:57arohneroh, foo-p is hideous in clojure
23:57arohnerwe have question marks for a reason
23:58devni know, i know, but CL guys come to clojure and use it now and then
23:58muhooit doesn't seem idiomatic, but thanks for the heads up in case i run into ported cl code
23:58devnif you see this sort of thing: (defn fooParser []) (defn <|> []) etc.
23:58devnthat's a haskeller turned clojurian
23:58arohnerdevn: I know you know. Just discouraging foo-p :-)
23:58devn:)
23:58muhoo<|> ??!
23:58arohnerpipe is legal in variable names, though clojure-mode seems to barf on it
23:59devnmuhoo you can write some fun fn names in clojure, it's sort of a fun little game now and again to play with ornate ascii art fn names
23:59muhoofor dsls
23:59muhooi saw the actual lambda unicode symbol in overtone, and i went, wtf?
23:59muhooi don't even know how to fucking type that