#clojure logs

2013-04-11

00:00wliaodr_choc: yeah, I feel the same way. But everything works again after refreshing the page.
00:00dr_chocReliably?
00:00dr_chocIt's like a 1/10 right now :/
00:01wliaodr_choc: It almost always works.
00:01dr_chocwlia: okay, I must be doing something wrong. Are you using the lein-cljsbuild plugin?
00:02wliaodr_choc: You tried cljs-bootstrap?
00:03wliaoIt's a bit out-dated, but still works.
00:04dr_chocwliao: No, but I don't think the code is the problem. I just tried with firefox and it seems a lot more reliable in making the repl connection
00:05wliaodr_choc: rhino is the most reliable.:)
00:05dr_chocUpdating chormium, lets see if that changes anything
00:06dr_chocwliao: I'm making a game, so it's amazingly helpful to be able to swap out parts on the fly. I can't get the same feedback with rhino
00:08dr_chocUpdated chrome seems to work, it might as well have been simply restarting chrome since it's been open for >1week
00:08dr_chocThanks wliao
00:09wliaodr_choc: np
00:35dabdI am trying to write a seq to a file but instead it writes clojure.lang.LazySeq@dc5003c2. How can I force it to evaluate the seq?
00:37wliao,(doall (repeat 20 0))
00:37clojurebot(0 0 0 0 0 ...)
00:42wliao&(print "a")
00:42lazybot⇒ anil
00:45dabdI tried the following but it still prints clojure.Lang.LazySeq... https://gist.github.com/dabd/5360795
00:50dabdI think I found the problem. The spit function doesn't work with sequences
00:50dabdso I need to convert the sequence to a string first.
00:51dr_chocyou can convert it to vec to
00:51dr_chocjust put a (vec (doall ...
00:52dr_chocAt that point you don't need doall since you are passing it into vec which forces the fns to evaluate
00:53dr_chocHowever doseq might be more beneficial: http://clojuredocs.org/clojure_core/clojure.core/doseq
00:53dabdbut doseq returns nil
00:54nonubywhen using wrap-reload I suspect this is recursive since i.e. if i specify acme.core in reloadables if I touch acme.views.homepage that would reload?
00:55dr_chocdabd: I guess it isn't useful for your case. Whenever I see (doall (map... I automatically think of doseq instead
00:56dr_chocwait clojurebot evals clojure? that's awesome!
00:57brehautit evals some clojure
00:57brehaut,(future "lols, no")
00:57clojurebot#<SecurityException java.lang.SecurityException: no threads please>
00:57dr_choc(take 10 (iterate inc 0))
00:58dr_choc,(take 10 (iterate inc 0))
00:58clojurebot(0 1 2 3 4 ...)
00:58brehautlazybot also evals code #(range)
00:58brehauthmm ##(range)
00:58lazybotjava.lang.OutOfMemoryError: Java heap space
00:58brehautmagic
00:58brehaut&(range)
00:58lazybotjava.lang.OutOfMemoryError: Java heap space
00:58dr_choc,(pmap dec (take 10 (iterate inc 0)))
00:58clojurebot#<SecurityException java.lang.SecurityException: no threads please>
00:59dr_chocWhat's ampersand do?
00:59brehautlazybot eval
00:59Raynes&(+ 3 3)
00:59lazybot⇒ 6
00:59dr_chocWhat's the difference?
01:00dr_chocclojurebot isn't lazy?
01:00brehautthe difference is the difference between hiredman and raynes
01:01brehautthe stuff that isnt eval is different, and the sandboxing and evaluation restrictions differ too
01:01RaynesThey're completely different bots.
01:01RaynesBut both do evaluation.
01:01RaynesIt's that simple. <3
01:01dr_chocokay
01:14Rich_MorinI'd like to use re-seq on some input that contains newlines. What's the magic for doing this?
01:15brehautRich_Morin: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html check out special constructs
01:15brehautRich_Morin: i think you want m
01:16brehautthat is, if you want to use ^ and $
01:16Rich_MorinAny idea where the construct goes in the RE?
01:17brehautif you dont use the anchors you canjust match \n
01:17brehautyeah, chuck it at the front
01:17brehaut#"(?m)…"
01:17Rich_Morintnx; I'll try it
01:17amalloythat or (?s)
01:20n_bWill update-in not work on transient colls?
01:20n_bi.e, must I use bang fns on things I've marked transient?
01:21amalloyn_b: of course. (conj foo bar) guarantees that foo and bar both remain unchanged; it couldn't promise that if the args were transient
01:22n_bPerfectly sensible. Thanks amalloy - just wanted to confirm my understanding was correct
01:24wliaodoes lazybot, I pm him, <lazybot> You're going to need to tell me what you want help with.
01:25wliaodoes lazybot have some help doc, I pm him, <lazybot> You're going to need to tell me what you want help with.
01:39ivanwliao: https://github.com/flatland/lazybot/tree/develop/src/lazybot
01:40wliaoivan: Cool. tks
01:48jack_rabbitI'm having trouble building a gui for my program. I've looked at seesaw and java swing, but being as I've not built guis in java before, it's a bit confusing to me, even with the docs. Can you guys make a suggestion for anything that might help me out?
01:49tieTYTjack_rabbit: can you be more specific?
01:49tieTYThave you looked at their examples?
01:50tieTYTquestion for the rest of you: I assume that a typical workflow is to explore some code in the repl. Once you figure out what you're trying to do, you now want to persist that code in your clj file. How do you get the repl history (of forms that compiled)?
01:50jack_rabbittieTYT, I have, but when I try to implement my own, I can't seem to get it to work. Can you point me to a tutorial or something? I've googled a bit, but I'm wondering what some of you use when you build GUIs.
01:51callentieTYT: I write code in my editor and evaluate it in the repl with ^-e
01:51callenso, when it eventually works, it's just there.
01:51tieTYTcallen: I assume that's an emacs command? I'm working in CCW
01:51tieTYTalthough, I think CCW is supposed to have a way to do that
01:52callenwell do that instead.
01:52tieTYTah I can do that
01:52tieTYTcallen: ok that seems like a cool workflow. But don't you often have to use fake input to test your functions?
01:53tieTYTdo you just write that in your file too and delete it when you know your production code works?
01:53tieTYTeg: a function takes a real url as input. You don't want to type that in every time
01:55callentieTYT: I'll def test data or just write actual test-cases.
01:55callentieTYT: this methodology falls apart in web dev.
01:55tieTYTdef the test data in your file or in the repl?
01:56calleneither/or
01:56tieTYThm ok
01:57tieTYTwell that sounds like an interesting workflow
01:57tieTYTi'll try that on the next thing I build
01:57n_bDumb Question time: Writing my first macro and getting an interesting result: https://www.refheap.com/paste/13512
01:57n_bI assume I'm unquoting in the wrong place or something?
01:58jack_rabbitn_b, what do you want the result to be?
01:59n_bI want it to print "Timing: #{form}" followed by the time it took
01:59n_bas returned by the time macro
01:59jack_rabbitn_b, The "Timing" statements are running at macro expand time, before the code it expands to runs.
02:01n_bahh. I see how time is doing it, I think
02:01jack_rabbitn_b, you need to quote the entire (do
02:02tieTYTI heard that @ is a macro
02:02tieTYThow do you macroexpand it? (macroexpand-1 @) doesn't compile
02:02jack_rabbitI think it is macro syntax for (deref)
02:02jack_rabbitTry to actually deref something.
02:03tieTYThrm, I guess that something has to exist
02:03jack_rabbitRight. @ on its own isn't a valid macro call.
02:04tieTYThrm... (macroexpand @a) => []
02:04tieTYTthat's the result, how do I see the process?
02:05jack_rabbittieTYT, You forgot to quote it.
02:05tieTYTi dont' know what that means, what should I have typed?
02:05tieTYToh nm
02:05tieTYTi get it
02:05jack_rabbit(macroexpand '@a)
02:05tieTYT(macroexpand '@a)
02:06tieTYTis there a way to see how the macro is written? The real thing I'm curious about is if I can make my own macros that work by prefixing a symbol to a symbol
02:06jack_rabbit,(let [x (atom 1)] (macroexpand '@x))
02:06clojurebot(clojure.core/deref x)
02:06jack_rabbittieTYT, You could try the source function.
02:07tieTYTthat's a good idea
02:07tieTYThow would I write that?
02:08jack_rabbit(you need to 'use' clojure.repl, then call (source deref)
02:08tieTYTbut I want to see how @ is defined, not deref
02:08jack_rabbittieTYT, Oh.
02:09tieTYTbut i don't really care, I want to know if I can write a macro like @
02:09tieTYTsyntax wise, not functionality wise
02:09jack_rabbittieTYT, Yeah, i'm not sure how they implement those special symbols.
02:09tieTYTok
02:09tieTYTwell anyway re: seesaw, that's a tough one
02:10tieTYTI know how to write swing code so I get what's going on under the hood
02:11jack_rabbitMaybe I'll just use an interface builder and include the class file in my clojure project.
02:11tieTYTi think netbeans has the best one
02:11tieTYTi had bad experiences with intellijs
02:12jack_rabbitCool. I'll try that out.
02:12alandiperttieTYT: you can't write your own 'reader macros', which is what @ is
02:12tieTYTalandipert: good to know
02:12alandiperttieTYT: unofficially though, you can: http://briancarper.net/blog/449/
02:13tieTYTok thanks
02:18tieTYTjack_rabbit: one problem with a builder is the code it generates isn't very readable so it'll be hard to learn from. That may not be a factor for you though
02:19jack_rabbittieTYT, Yeah, I don't really care about the GUI code. It's fairly uninteresting to me. If I find myself building a lot of GUIs, I'll take the time to learn it.
02:21tieTYTfair enough
02:21jack_rabbitThanks for the heads up, though.
02:21tieTYTno
02:21tieTYTnp
02:33sztamas_Hi, I'm trying to learn Clojure/Lisp. I have a mainly OO background, so it is a bit of a challenge as you can imagine :)
02:34sztamas_would anyone be kind enough to have a quick look at https://github.com/sztamas/guess-my-number/blob/master/src/guess_my_number/core.clj and tell me how it looks like
02:34sztamas_?
02:35sztamas_it isn't much code, I promise :)
02:39winksztamas_: line 46 works like that?
02:40winkI'm hardly an expert myself though :)
02:40vladimuscan you make minecraft mods in clojure?
02:40winkvladimus: I faintly remember reading something like that, and why wouldn't you. it's a JAR with jvm bytecode
02:41vladimuswink: Thanks. It just seems like an interesting idea.
02:42sztamas_wink: commands is a set
02:43sztamas_which is a function
02:43sztamas_I think it does
02:43n_bjack_rabbit: Thanks for the pointer; my macro now works properly, is hygenic, etc...
02:43jack_rabbitn_b, Cool. Glad to hear it.
02:44jack_rabbitsztamas_, So does it work?
02:44sztamas_you meant the whole app or line 46
02:44sztamas_?
02:44sztamas_both seem to work fine
02:45winksztamas_: I'd used (some
02:46winksztamas_: so I probably learnt more than you by trying to give feedback ;)
02:47sztamas_I am happy with that. No problems :)
02:47sztamas_so it doesn't look like much like an OO programmer trying to write Clojure code?
02:48winksztamas_: not fully awake enough to find a better solution, but the use atoms is a bit uncommon I think
02:48winkit's not exactly what I'd call "avoiding global state"
02:48sztamas_yes, I know
02:49sztamas_smells a bit
02:49winkyou could probably construct some recursive stuff to keep track
02:49jack_rabbitsztamas_, I've not seen code like that on line 73 before. I'm sure there's an easier way to do that.
02:49jack_rabbitOr at least less verbose.
02:49winkoh, right.
02:50jack_rabbitI don't think ns-resolve is even necessary.
02:50sztamas_wink: that was like that in the original source though. The use of global state ...
02:51winksztamas_: yeah well, I'm not a purist on pureness myself (pun not intended) - but I think it's valid criticism, but not a must
02:51wink#haskell might throw stones at you sthough ;)
02:52jack_rabbitIt's a fairly "stateful" problem.
02:52jack_rabbitglobal atoms might not be the best, but since it's obviously not part of a larger application, I'd think it's fine.
02:52sztamas_jack_rabbit: I wasn't using ns-resolve initially, but the app is called from the user namespace
02:52jack_rabbitsztamas_, ahh.
02:53jack_rabbitsztamas_, a macro might be better form.
02:53winksztamas_: you can use :main NS in project.clj iirc to switch to your ns on "lein repl"
02:53sztamas_I agree it is probably not idiomatic because I came up with it myself :)
02:53winkas long as it works ;)
02:53jack_rabbitI sometimes use closures to capture state within a small subset of the functions within a project.
02:54vladimusugh
02:54winkI'd love to have some sort of idiomatic guidelines document
02:54jack_rabbitYeah, I'm still trying to get into a "functional" mindset.
02:54winklike.. do I use (:foo {}) or (get {} :foo)
02:55jack_rabbitI've been reading Volkmann's tutorial, and it addresses some of those things.
02:56metelluswink: https://github.com/bbatsov/clojure-style-guide this has been linked in here before and as far as I know it's correct
02:56winkmetellus: yay, thanks,. will have a look
02:58winkkibit also has some rules, that might count as style, lile (inc x) instead of + x 1
02:58jack_rabbitHuh.
02:58jack_rabbitI don't really like that suggestion.
02:59sztamas_wink: does that :main only switch the REPLs namespace?
02:59sztamas_wink: what happens when I create a jar and run the app?
02:59sztamas_wink: I mean with java -jar ...
02:59winksztamas_: hmm, no clue, really :)
03:00winksztamas_: I think it still applies, in one of my libs I have :main NAME.core
03:01winkand I'm using it as a jar, no problems so far
03:01sztamas_wink: I have it set
03:01sztamas_wink: it was part of the "app" template I guess
03:02winkprobably, yeah.
03:02winkbut I'm fighting namespaces myself quite often, you'd need to ask someonme else :)
03:04sztamas_when you do lein run the *ns* is set to user
03:13jack_rabbitsztamas_, I thought the namespace was whatever you set in :main.
03:14radsI have some simple clojurescript code that adds event listeners to a couple dom elements:
03:14radshttps://gist.github.com/rads/4b568fb452fd66bc199f
03:14n_bis there a way to just discard results of a for? Like (into nil)?
03:14radsI wanted to use dynamic binding to cache the DOM elements, but I realize now the dynamic vars won't be bound when the event listeners actually fire
03:14jack_rabbitn_b, just don't use them?
03:14radswhat is the simplest way around this? pass in a map of the cached dom elements to each event listener?
03:15jack_rabbitn_b, for returns a lazy sequence, so as long as you don't evaluate the elements...
03:23n_bjack_rabbit: right; but unless I change that doall on line 22 into something like (into []
03:23n_bI get this error: https://www.refheap.com/paste/13513
03:24winkmetellus: wow, it's even better at second look than at the first. thanks a lot, exactly what I needed
03:24metellusglad I could help
03:24sztamas_jack_rabbit: I've just created a new test app with lein and added a (println *ns*) to main. It displays #<Namespace user>
03:27jack_rabbitn_b, your problem is the nil at the end of the for.
03:29n_bOh, sorry. I pasted in from the wrong undo tree. It does work fine if I leave out the nil (and I realise it's at odds with tthe docstring as well); that was thrown in to stop the repl exploding when trying to print a 1E6 item large col
03:33n_bAnd it should work if you do something like (time-many nil 1), but it explodes. It seems like it's trying to call nil as a function for some reason?
03:37jack_rabbitn_b, try this: http://paste.lisp.org/display/136665
03:38jack_rabbitThe macro expanded to a list of functions to evaluate without a do around them.
03:38n_bthat does it
03:38n_bah, so you expand the result of the for into the quoted list
03:39n_band then as it's wrapped inside a do it returns the last val.
03:39n_bThanks for holding my hand through that, I (think) I have a much firmer grasp on what's going on now
03:40n_bWill play with it some more tomorrow morning.
03:40jack_rabbitn_b, sorry. This: http://paste.lisp.org/display/136665#1
03:40jack_rabbitn_b, cool, man.
03:41jack_rabbitOh, wait. They both work.
03:41jack_rabbitn_b, I didn't know if there was a reason you used doall.
03:42n_bjack_rabbit: nope, just troubleshooting by way of guesswork
03:53mullrIs there a trick to getting your jvm-opts to work with nrepl-ritz?
04:34mullr(the answer appears to be that jvm-opts doesn't pass through in nrepl-ritz 0.7.0, but it's fixed for the next release)
05:01jack_rabbitSo if I java a java file containing a package and class, how do I include that in my leiningen project?
05:08rodnaphjack_rabbit: https://github.com/rodnaph/gmailer/blob/master/project.clj#L7
05:09jack_rabbitsweet. Thanks. I'll have a try with that.
05:11jack_rabbitOkay. How do I import the class into a .clj, then? I'm getting ClassNotFoundException.
05:13jack_rabbitWeird. The class wasn't in a package, so I put it in one, and then used the package-qualified name, and it seems to be loading.
06:32bio-imagingis there a version of letfn that allows functions to call each other tail recursively?
06:37dnolenbio-imaging: nope
06:41noidibio-imaging, the JVM does not support TCO, so you have to use trampolines for mutual recursion
06:42noidihttp://jakemccrary.com/blog/2010/12/06/trampolining-through-mutual-recursion/
06:42bio-imagingyea i know but for a fixed set of functions you could generate a bunch of gotos
06:42noidioh, that's true
06:42bio-imagingtrampolines are quite slow :)
08:00wei_why doesn't this form: (->> [1] #(conj % 2)) give me the expected [1 2] ?
08:01bio-imagingbecause ->> is a macro, it doesn't take a function as its second argument
08:02bio-imaging(->> 1 (conj [1]))
08:03bio-imaging(->> x (a b c)) gets translated to (a x b c)
08:03rodnaph(->> x (a b c)) => (a b c x) ?
08:04bio-imagingright
08:05wei_so there's no easy way to reverse the order of parameters in a form? e.g. (->> (map :a [{:a 1} {:a 2}]) (filter #(= 1 %)) #(conj 2 %))
08:06bio-imagingi'm not sure what you want to accomplish
08:06bio-imagingcan you write it without ->> first?
08:08wei_sure
08:08bio-imagingyou could do (#(conj 2 %)) i guess
08:09bio-imagingbut conj actually takes the opposite order
08:09wei_oh right, I meant #(conj % 2)
08:09bio-imaging(->> (map :a [{:a 1} {:a 2}]) (filter #(= 1 %)) (#(conj % 2)))
08:09bio-imagingtry that
08:10wei_that doesn't seem to compile:ClassCastException java.lang.Long cannot be cast to clojure.lang.IPersistentCollection
08:10bio-imagingthat's strange
08:10wei_my rewrite is (conj (->> (map :a [{:a 1} {:a 2}]) (filter #(= 1 %))) 2)
08:10bio-imagingit works for me
08:10wei_but that's not as nice, especially if there's more functions after the conj
08:11bio-imagingprobably you have the arguments for conj in the wrong order?
08:11wei_oh, that does work for me! thanks.
08:11bio-imaging:)
08:12wei_I might have redefined accidentally. worked after restarting the repl
08:12wei_learned a new trick :)
08:12bio-imagingprobably your rewrite is cleaner though
08:13wei_but there are more functions afterward, like (->> .. shuffle (take 3))
08:13bio-imagingah, yes
08:35rodnaphdoes anyone know if leiningen RPMs are available for CentOS6 anywhere?
08:38winkno clue, you could try #leiningen though
08:38winkthe question is if you really need it as an rpm?
08:39joegallothe answer is you don't, you really really don't
08:43rodnaphwink: i'll try thanks. joegallo - actually the answer is "you do when your automation team will only use stuff that's packaged as an RPM" :P
08:44winkrodnaph: then use fpm and package those 2 files :P
08:44rodnaphfpm? *new thing* will google.
08:44winkjordansissel/fpm
08:45winkor something on github
08:45borhrodnaph: there is a slighly outdated leiningen rpm in the puppetlabs_dependencies repo (0.2preview10.el6)
08:45rodnaphwink: ah yeah i've seen that. i'm still going to need leiningen to build my war though, right?
08:46winkrodnaph: no, I meant.. package the lein shell script and lein jar and you got a RPM
08:46winkfpm has the nice thing that you don't need a specfile or something
08:47winkit's literally a oneline for leiningen
08:51rodnaphwink: ah right ok - i'll try that if all else fails then. cheers
10:46gfredericksso if I have a deployment box that does not have a readline executable, is my best bet for getting a usable repl packaging jline with my project?
10:48hyPiRiongfredericks: hm, wouldn't it be possible to jack-in to an nREPL session at that server?
10:48hyPiRion/s/jack-in/connect/
10:50gfredericksoh from a local machine with better stuff?
10:50gfredericksthis would require bundling nrepl instead of jline?
10:52hyPiRionyeah
10:53danneui come from a heroku-everything world and bought a linode box to cut my teeth. what's the straightforward way to deploy? lein uberjar and then have a git hook that rsyncs it to the server?
10:54hyPiRiongfredericks: nrepl is a server-like thing, and lein repl sets up an REPL-y (+ jline) interface which then connects to an nREPL server
10:55danneu(i meant conventional, not straightforward)
11:00danneualso i wrote a simple middleware that mimics rails output https://gist.github.com/danneu/9cbed0c0743fe8011014
11:02ppppaulwhat is the reader macro '@' symbol?
11:03yogthosppppaul: it's shorthand for deref
11:03ppppaulthank you
11:09gfredericksppppaul: easy way to examine reader macros:
11:09gfredericks,'@foo
11:09clojurebot(clojure.core/deref foo)
11:26ravsteris there any way to print out the source of a clojure function in the repl?
11:27ravsternot for core functions, but user-defined functions?
11:27trptcolinonly if it's on the filesystem, or if you're doing something fancy
11:28Pupnik-you can write your own doc in metadata when you declare a function can't you?
11:28Pupnik-or am i imagining things
11:28trptcolinPupnik-: sure, but that's different than source
11:28Pupnik-ah, true
11:28Pupnik-but you could put the source in it :p
11:29trptcolinlein repl/reply's current release has some evil called (sourcery) that works by replacing user/defn and storing source in metadata
11:29trptcolinbut i ripped it out in master; too evil
11:30trptcoliniirc correctly hugod has an nrepl middleware that's way more well-considered and either gets all of the way there or most of the way
11:31trptcolinheh, s/correctly// (redundancy department)
11:32trptcolinyeah, here's what i was thinking of: https://github.com/pallet/ritz/blob/develop/nrepl-middleware/src/ritz/nrepl/middleware/tracking_eval.clj
11:32ravstercool, thanks
11:44ppppaulthanks gfredericks
12:02berdarioHi, I'm trying to use parsley... but I keep getting shift reduce conflicts... I think that what I'm doing could be easier with LR(1) support
12:02berdarioI found this discussion: https://groups.google.com/forum/?fromgroups=#!topic/clojure/6DBRgcQHJF8
12:02berdarioand cgrand said "Parsley is closer to LR(0) (but I'd like to make it LR(1) using Pager's lane tracing algorithm or IELR) however some ambiguities of LR(0) can be lifted in parsley thanks to the contextual tokenizer"
12:03berdariobut in the parsley readme I don't see anything mentioning the contextual tokenizer
12:03berdario(aside from the paper that describes the technique)
12:04berdarioso, I don't know how to use the contextual tokenizer... if it's available
12:05berdarioI might be better off switching to another parser generator (I was about to look at clparsec)
12:09hyPiRionberdario: checked out instaparse?
12:09hyPiRionor do you have to do rule handling at reductions?
12:09berdariohyPiRion: never heard of it, I'll look at it now
12:10berdariohyperboreean: I think that with a lookahead of 1 I should be fine... I'm not sure what do you mean with "rule handling"
12:10dsapalaDoes anyone know how to destructure using an already defined keyword such as "name"?
12:11hyPiRionberdario: It came out for some days ago, and it's in my opinion very good if you don't mind working on a raw AST
12:11rbxbxberdario can't believe you haven't heard of it, it's been around for _days_ now :p
12:12dsapalaWhat I meant was var, now keyword. Still learning.
12:12berdariolol
12:12trptcolindsapala: locals can shadow vars
12:12hyPiRioninstaparse, so hip you've probably never heard of it
12:13dsapalatrptcolin: that was my understanding, but I'm having something weird going on using "name"
12:13trptcolinref heap us?
12:14trptcolinhttps://www.refheap.com/paste
12:14dsapalasure
12:17dsapalatrptcolin: I'm using the excellent enlive to transform some html
12:17dsapalahttps://www.refheap.com/paste/13526
12:18trptcolin,((fn [{:keys [name]}] name) {:name "ohai"})
12:18clojurebot"ohai"
12:19trptcolinso it's not a problem w/ destructuring, unless enlive has its own custom destructuring
12:20dsapalaHmm… I'll have to look into that. I doubt it though.
12:31dsapalatrptcolin: Thanks for the help. I'll try some more things and see what I can get to work.
12:31trptcolindsapala: sure
12:36berdariohyPiRion: ok, thank you... I rewrote the grammar, and it almost works!
12:37mabesI'm finally moving over to nrepl (in emacs).. does anyone know if something like durendal-enable-auto-compile exists for nrepl & emacs?
12:38technomancy_mabes: I suspect it could be added to nrepl.el
12:38technomancy_mabes: the only reason durendal existed as a separate package was because we couldn't really add features to slime.el itself
12:38hyPiRionberdario: oh, sweet!
13:11CookedGryphonDoes anyone know how the telnet nrepl transport works? I can't seem to get any responses back
13:12CookedGryphonalternatively, how to get the HTTP transport in cemerick.drawbridge working via curl
13:12CookedGryphonI only ever seem to get empty responses
13:13CookedGryphon(my aim is to send nrepl commands from a bash script)
13:36cemerickCookedGryphon: should be able to suss out curl usage with drawbridge via the docstring: https://github.com/cemerick/drawbridge/blob/master/src/cemerick/drawbridge.clj#L49
13:36cemerickthough, drawbridge has a couple of pretty killer bugs at the moment
13:36cemerickpatches welcome, etc
13:37CookedGryphoncemerick: yeah, that's what I was working through, but I just kept getting back [ ] no matter what I sent
13:37cemerickCookedGryphon: be certain you have the right ring middleware applied upstream
13:38CookedGryphoncemerick: should the standard compojure site middleware contain it?
13:38cemerickyup
13:38CookedGryphonthen yep
13:38cemerickok
13:39cmajor7anybody has an idea why BigInt may not be read (from file) by Datomic: https://www.refheap.com/paste/13531 ?
13:39CookedGryphonshould i be able to send through a {"op":"eval","code":"(+ 2 3)"} and get something back?
13:40dsapalatrptcolin: I figured out what was up with that. It had nothing to do with the snippet. It was the template. I typed ":#application", but the id was "applications" which was correct in the snippet.
13:40cemerickCookedGryphon: mmm, probably not, since the http response isn't going to wait around
13:40dsapalatrptcolin: Thanks again for the help!
13:40cemerickCookedGryphon: you need to set up a session, send the eval, then GET to drain the nrepl responses produced up to that point
13:41CookedGryphonaha, how do i set up a session
13:41CookedGryphonthat's probably what I'm missing
13:41juhu_chapaquit
13:42cemerickCookedGryphon: https://github.com/clojure/tools.nrepl/blob/master/doc/ops.md
13:43CookedGryphoncemerick: great, thanks, I'll have another go this evening
13:43cemerickCookedGryphon: oh, actually, the nREPL session will be generated automatically. I bet you're not tracking the *HTTP* session. Make sure you're using curl's cookie jar support, etc.
13:44CookedGryphonaha, okay
13:44cemerickOtherwise, every single curl request will get its own ring/http session, and you'll never ever get anything back.
13:49CookedGryphoncemerick: Ooh, eval-error! Now we're getting somewhere!
13:50CookedGryphoncemerick: Ooh, eval-error! Now we're getting somewhere!
13:50CookedGryphonoops, sorry
13:50Raynesgfredericks: ping
13:52CookedGryphonyeah, that gives me something to work with, I think I might end up tweaking the telnet transport in the end though, as parsing the output from this is going to be tricky in bash.
13:55danneuAssuming this middleware: (def app (C (B (A handler)))), if you wanted middleware C to output time spent in the wrapped B,C,&handler fns, would the implementation of middlewareC like this work as intended? (let [start (Sys/nanoTime) res (handler req) end (Sys/nanoTime] ...)
13:57danneuI actually am doing that in my middleware. my elapsed time numbers just feel too low
13:58amalloydanneu: clojure is just fast
13:59cmajor7made it work throwing "eval" after "read-string". but it is not quite obvious, probably has to do with how Datomic reads BigInts, because a plain "123N" does not work.
13:59jjidodanneu: if C is a sleep action?
14:02danneuhaha
14:02nightflySo I'm trying to profile some clojure code with VisualVM. But at this point with all the reduces, maps, and memoizations the call stack is full of almost entirely meaningless names. Any advice to improve the situation?
14:03S11001001nightfly: you can tell visualvm to profile only classes with some name prefix; this was usually good enough when I used it on clojure
14:03danneuyeah, duh. i don't know why i thought <1ms was weird
14:04danneumonolithic rails app isn't so far off from that either
14:05trptcolindsapala: sure thing
14:07nightflyS11001001: I'll definitely try that. It just also occured to me that rather then passing the named functions directly I should build lambdas that call them, that might preserve their names in the call stack.
14:08ppppauldatomic questions anyone?
14:10S11001001nightfly: pass #'function-name
14:10S11001001nightfly: but, er, doing either won't do what you just said at all
14:11S11001001nightfly: the function object's name is exactly as good as it gets
14:12S11001001,into
14:12clojurebot#<core$into clojure.core$into@101c211>
14:12S11001001,(class into)
14:12clojurebotclojure.core$into
14:13S11001001,(class (fn [& xs] (apply into xs)))
14:13clojurebotsandbox$eval101$fn__102
14:13S11001001,(class #'into)
14:13clojurebotclojure.lang.Var
14:21berdarioHi, which version of core.logic should I use? by looking here https://groups.google.com/forum/?fromgroups=#!topic/clojure/Vcm3FA2Nmiw
14:21berdarioit suggests 0.6.7 ...but when opening the repl it fails with CompilerException java.lang.RuntimeException: Unable to resolve symbol: defmacro in this context, compiling:(NO_SOURCE_PATH:1:5)
14:22berdariowhoops, no it doesnt... it fails with CompilerException java.lang.ClassNotFoundException: clojure.core.logic, compiling:(NO_SOURCE_PATH:1:1)
14:24berdariouhm, the latest version is 0.8.3 I installed that, bu when doing
14:24berdario (use clojure.core.logic) I still get the classnotfoundexception
14:29winkwrong syntax highlighting is worse than using notepad.exe
14:32AimHereI'm okay with mistakes in keyword colouring and the like. But indentation bugs make me weep for the state of humanity.
14:35winkok, so I give up. anyone can tell me the korma syntax for "Select * from foo limit 10"?
14:44berdariouhm, it seems I'm affected by this bug
14:44berdariohttps://github.com/trptcolin/reply/issues/106
14:45trptcolinberdario: short-term, fix the ns to not be a compile failure. longer-term, wait for the next lein release
14:48berdariotrptcolin: uhm, what do you mean with "fix the ns"? fix some ns inside reply or the ns in which I'm trying to execute code?
14:48trptcolinthat bug is about what happens when the ns you have set up as the :init-ns has a compile failure in it
14:48berdariook, how can I know the actual compile failure?
14:49trptcolinremove it from :main or :init-ns in the project.clj; open a repl, execute form-by-form
14:49trptcolinsee what blows up
14:50berdariook, found it
14:50berdariothanks
14:50trptcolinsure thing
15:07kschraderis there a way to call '.class' on a class using Java interop?
15:08kschrader(String/class) and (.class String) both fail
15:08kschraderwondering if there's some special way to do this
15:09trptcolinString.class in java is the same as String in clojure
15:09trptcolin,(class String)
15:09clojurebotjava.lang.Class
15:09amalloy&(identical? String (class "hello"))
15:09lazybot⇒ true
15:09clojurebotGabh mo leithscéal?
15:10callenwhy is the bot psychotic?
15:11kschraderhmmm, ok
15:11kschraderthanks
15:11TimMccallen: How can you tell?
15:11kschraderbeen trying to get some Annotations off of a class and nothing seems to be working
15:13callenTimMc: I know my own kind!
15:14trptcolin,(seq (.getAnnotations javax.xml.ws.WebServiceRef))
15:14clojurebot#<ExceptionInInitializerError java.lang.ExceptionInInitializerError>
15:14trptcolin&(seq (.getAnnotations javax.xml.ws.WebServiceRef))
15:14lazybot⇒ (#<$Proxy2 @java.lang.annotation.Target(value=[TYPE, METHOD, FIELD])> #<$Proxy1 @java.lang.annotation.Retention(value=RUNTIME)> #<$Proxy0 @java.lang.annotation.Documented()>)
15:15pl6306Does anybody know how to add local jar to Leiningen 2?
15:15kschradertrptcolin: Thanks, must be something wrong with my Java class, because that works fine here
15:15amalloy~repeatability
15:15clojurebotrepeatability is crucial for builds, see https://github.com/technomancy/leiningen/wiki/Repeatability
15:16kschraderretention policy looks correct though
15:16kschraderanyway, I'll figure it out, thanks
15:17bobbrahmshey so tivo has this thing where
15:17bobbrahmssorry misfire
15:22TimMcMan, who needs macros anyhow? https://gist.github.com/timmc/5366403 (highlights: hyPiRion, gfredericks)
15:23gfredericksTimMc: holy crap
15:24Raynesgfredericks: I said things to you.
15:24gfredericksRaynes: pong?
15:24RaynesYou did not respond.
15:24gfredericksI just saw the ping
15:24RaynesHah
15:24RaynesNice.
15:24gfredericksshould I go find them?
15:24RaynesNo.
15:24gfrederickswell here I am!
15:24Raynesgfredericks: You mentioned recently that you wish Clojure had a way to define both a function and a macro by the same name. definline does something like that.
15:25RaynesMay not be precisely what you were after, but it exists nonetheless.
15:25GlenjaminTimMc: what's #= ?
15:25gfredericksRaynes: in what sense is it a macro?
15:25gfredericksGlenjamin: reader-eval
15:25Raynesgfredericks: In the sense that it is a macro.
15:25gfredericksRaynes: it defines a macro?
15:25RaynesIt defines a macro and a function.
15:25gfredericksRaynes: the main use case I'm interested in is compile-time optimization like hiccup
15:26gfredericksso you optimize when the user lets you but the thing can still be used as a function
15:26amalloygfredericks: definline isn't as flexible as defining separate macro and function versions, but you can use the underlying mechanism it uses
15:26gfredericksdefinline is defined in clojure?
15:26amalloy&(doc definline)
15:27lazybot⇒ "Macro ([name & decl]); Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expanded inline as if it were a macro. Cannot be used with variadic (&) args."
15:27gfredericksit adds :inline meta
15:27gfrederickswhich means the compiler will inline it at its discretion?
15:28gfredericksI don't understand where you might do compile-time computation here
15:29amalloygfredericks: the :inline meta is just a macro. you can put whatever you want there
15:29TimMcGlenjamin: It's an escape valve of sorts, and the reason why you always want *read-eval* bound to false when reading Clojure forms someone else provides. (Or use read-edn.)
15:30gfredericksamalloy: the metadata is a macro? this makes even less sense
15:30gfredericksoh wait
15:30gfredericksyou mean the value of the :inline key is a function that the compiler calls the same way it calls a macro?
15:30amalloyyes
15:30pjstadig:inline is a fn that receives unevaluated args at compile time and produces a form that the compiler then compile-
15:31gfredericksthe compiler is guaranteed to call it?
15:31pjstadigif the arity matches
15:31pjstadig~source +
15:32pjstadigin the case of calling (+ a b) it gets inlined
15:32pjstadigother arities do not
15:32gfredericksand it doesn't preclude referencing it as a function
15:32amalloyright. :inline is very much like a compiler macro in some other lisps
15:32gfredericksis this an explicit feature?
15:33gfredericksbecause it sounds like it might be awesome.
15:35amalloyit's not a secret. and nobody's ever tried to censor it from public radio waves
15:37gfredericksshould all compile-time-optimization macros switch to this tactic?
15:37tomoj&((juxt #(.c %) #(.methodName %)) (clojure.lang.Compiler/analyze clojure.lang.Compiler$C/EXPRESSION '(+ 1 2 3 4 5 6 7 8)))
15:37lazybotjava.lang.SecurityException: You tripped the alarm! class clojure.lang.Compiler is bad!
15:37tomoj(looks like all arities >1 are inlined)
15:38tomoj..which makes sense given the >1?
15:39llll(comment) doesn't seem to work on cljs
15:40winkanyone used korma with mysql lately? I have no clue how SELECT "clj".* FROM "clj" could ever have worked
15:42gfrederickswink: because the quoting syntax is wrong?
15:42winkgfredericks: that's the problem obviously
15:42Glenjaminbut thats what korma generates?
15:43nDuffgfredericks: Huh? Doesn't look wrong to me.
15:43Glenjaminmysql wants ` for table/field names
15:43pjstadigtomoj: yeah the link from clojurebot is for an old version of clojure
15:44pjstadigi guess in newer versions if you use inline-arities >1? you can have an :inline function that is variadic
15:44winkGlenjamin: yeah. in (select. when I use sql-only I even get \"
15:45tomojseems kind of weird that (+ x) and (+) aren't inlined
15:46Glenjaminwink: https://github.com/korma/Korma/blob/master/src/korma/db.clj#L95
15:46Glenjaminwhen you defdb mysql, it sets the delimeter
15:46Glenjamindelimiter even
16:00winkGlenjamin: well it should, but it won't
16:00winkmaybe it's just a bug or two. or I'm too stupid
16:10winkseems to work now. weord
17:27TimMcgfredericks: I came up with the #=(arity n) thing while trying to generate repetitive code for just a few parts of a deftype, instead of having a macro emit the entire thing.
17:39pl6306What is wrong with this (re-pattern "\\d+")?
17:40pl6306I get a runtime exception
17:40gfredericks,(re-pattern "\\d+")
17:40pl6306Unsupported character?
17:40clojurebot#"\d+"
17:40gfredericks,(re-matches (re-patern "\\d+") "123")
17:40clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: re-patern in this context, compiling:(NO_SOURCE_PATH:0:0)>
17:40gfredericks,(re-matches (re-pattern "\\d+") "123")
17:40clojurebot"123"
17:41pl6306Doesn't work I get ")\n((re-pattern " maybe it is La Clojure on Intellij?
17:42gfredericksdo you have to do anything special with gen-class to override an abstract method in the superclass? Or just create the var with the appropriate name?
17:42gfrederickspl6306: if you use four backslashes instead of 2 does it work?
17:42pl6306same thing with 4 strange
17:43gfrederickshow bout 3?
17:46pl6306I reset the repl and works now. Thanks!
17:50ieureIs there some support in codex for more elaborate ns summary/doc stuff?
17:51ieureSome of the stuff I write benefits from docs that are longer than one line.
17:51ieureSample code, concepts overview etc.
17:51ieureBut this all shows up inline in the ns list in the generated docs.
17:51mrb_bkyo yo
17:52ieureI'd like it if the first line / paragraph was in the ns list, and the full text in the ns details.
18:19danneuwow. all this time i never noticed that clojure-doc.org and clojuredocs.org were two different things. i was wondering why clojuredocs.org didn't have a homepage "articles" link to [clojure-doc.org's] amazing tutorials.
18:39muhoothat topic is almost flamebait around here :-/
18:45bttfmuhoo: how so?
19:05danneua story brimming with scandalous controversy
19:14ieuretechnomancy, Is there any way to use a local JAR in my project without setting my hair on fire?
19:14technomancyieure: sure; lein-localrepo?
19:15ieuretechnomancy, It didn't appear to work for me.
19:15ieureLet me poke more.
19:15technomancydisclaimer: haven't used it
19:16ieuretechnomancy, So I have the artifact in my local repo, but lein doesn't see it.
19:17ieureDo I have to manually add the local repo to the :repositories key in project.clj?
19:17technomancymy understanding is it would place it in ~/.m2, where it would be visible
19:17technomancybut yeah, see disclaimer above
19:18ieureOkay. Well, I see it in ~/.m2, but it isn't
19:18ieuretechnomancy, Do you never do this or what?
19:18technomancydo what?
19:18ieureUse a local JAR.
19:19technomancypull random jars from people who don't bother to run a repository?
19:19brehauthttp://www.12factor.net
19:19ieuretechnomancy, I have a patch to a lib I use. I want to test the patched lib in my project before I send a broken PR.
19:19technomancycan you just do `lein install`?
19:20technomancyor mvn install or whatever
19:20ieuretechnomancy, Sure, and it puts it in the local repo, and then lein says it can't find it.
19:20ieureWhich is why I'm here.
19:21technomancyok, gotcha. so I've never heard of a jar installed via `lein install` not being available to other projects.
19:22ieuretechnomancy, https://gist.github.com/ieure/5368034
19:23ieureAny idea where to look?
19:23ieureOh derp
19:23ieureOkay
19:23ieureI'm just dumb, disregard.
19:24ieureWell, not strictly a typo.
19:27technomancyI must confess my defense systems go up when anyone says "local jar" because it often means sketchy things are afoot
19:27ieureHa
19:27ieureYeah, that is totally fair.
19:28tieTYT2technomancy: you made lein right?
19:28technomancytieTYT2: with some help, yeah
19:28tieTYT2nice, it's a solid product
19:29technomancyglad you like it =)
19:30bbloomDoes anyone know of a clojure project that provides something similar to http://docs.racket-lang.org/guide/units.html or OCaml's functors aka parameterized modules? protocols don't really seem to fit the bill for a library of functions i'm playing with
19:31bbloomi assume i can just hack it with some conditionals, shared state, and load-file....
19:32callentechnomancy: leiningen is seriously awesome. I really wish I could use it with other languages :P
19:32callenScala in particular needs it. -_-
19:35technomancysweet
19:35technomancycallen: feel free to take over the lein-scalac plugin =)
19:37callentechnomancy: I don't like Scala enough even if I like finagle.
19:48ieureThanks for the rubber-ducking, technomancy. Got everything sorted out.
19:48ieurehttps://github.com/weavejester/codox/pull/25
19:49technomancycool
19:49ieureHope that gets merged, it looks like that project hasn't seen a lot of active development lately.
19:49technomancypersonally I usually let the maintainer handle version number bumps
19:49technomancyunless you're bumping to a snapshot
19:49technomancybut whatever
19:49ieuretechnomancy, Yeah, I already had to change everything to test.
19:50ieureCan just rebase that commit away if necessary.
19:50ieureBut it makes it easy to merge & release.
19:50technomancyyeah, for a dormant-ish project it's less of an issue
19:53ieureAlso, writing this fn made me awfully pleased https://github.com/ieure/codox/blob/36c102669c9375d1587c5099d8a5455f97d2adbf/codox.core/src/codox/utils.clj#L73
19:57amalloyieure: why does it take N regexes, instead of just one?
19:57amalloy#"\f|\n\n" seems a lot simpler
19:58devnhm, cool: https://github.com/cammsaul/instant-clojure-cheatsheet
19:58ieureamalloy, I want to split on \f if it's present, otherwise split on \n\n.
19:59ieure#"\f|\n\n" splits on both.
19:59ieureSo, yeah, simpler, but it doesn't do what I want.
20:01amalloyi see
20:28owlsanyone use the light-table editor? I want to add a binding for closing the command bar but I'm not sure which command to use
20:56bttfhow come when I do (doto {} (assoc "a" "b")) i only get {} ?
20:57metellus,(doto {} (assoc "a" "b"))
20:57clojurebot{}
20:58eggheadhm?
20:58clojurebotbenchmarking is https://github.com/hugoduncan/criterium
20:58metellusbttf: it returns the thing you gave it, which is an immutable map
20:58egghead,(-> {} (assoc "a" "b"))
20:58clojurebot{"a" "b"}
20:58metellus(assoc {} "a" "b") returns a new map and doesn't alter the original one
20:59eggheaddoto is mostly just for java interop isn't it?
20:59metellusI think so
20:59eggheadwhen you need to say foo.bar().baz().setThing()
20:59bttfoh, i think for some reason I thought doto behaved like ->
20:59metellusin that case you actually use "..." I think
21:00metelluserr, ..
21:00eggheadhmm
21:00metellusdoto is for when you need foo.bar() and then foo.baz() and then foo.quux()
21:00eggheadah right
21:00bttfi see
21:00egghead(-> and (..
21:00metelluswhich will sometimes have the same effect as chaining
21:00metellusbut not always
21:00eggheadright
21:01eggheadfor instance if baz returns void :p
21:03amalloyegghead: i don't mostly use doto for java interop
21:03amalloyit's for anything side-effecty, and there are plenty of such clojure functions
21:03eggheadamalloy: can you show me an example
21:07amalloy(doto (read-config-settings) (apply-changes!)) to work with config files, (doto (f x) prn) to display some debug information...(doto (lamina/channel) (lamina/on-closed ...)) or (doto (atom nil) (add-watch ...)) to register callbacks on a thing
21:07ztellmanyou and your dotos
21:07amalloy(inc doto)
21:07lazybot⇒ 1
21:10gfrederickswoah
21:11eggheadhm interesting amalloy
21:11eggheadhadn't thought to use it like that
21:11gfredericks(doto prn) is an easy way to insert a debug msg in a threading form isn't it
21:11eggheadlooks like it gfredericks
21:12gfredericks,(-> 3 (+ 5) (doto prn) (+ 10))
21:12clojurebot8\n18
21:12gfredericks(inc amalloy)
21:12lazybot⇒ 50
21:12gfrederickshow do I still not know how to use clojure
21:13gfredericks,(clojure.walk/macroexpand-all '(-> 3 (+ 5) (doto prn) (+ 10)))
21:13clojurebot#<ClassNotFoundException java.lang.ClassNotFoundException: clojure.walk>
21:13eggheadsimple things w/ big implications
21:13gfredericks&(clojure.walk/macroexpand-all '(-> 3 (+ 5) (doto prn) (+ 10)))
21:13lazybot⇒ (+ (let* [G__38205 (+ 3 5)] (prn G__38205) G__38205) 10)
21:14gfredericksman that's a great example of macros working together
21:24samvithey I've got a quick question about the implementation of persistent data structures in clojurescript
21:25samvitAs I understand if i conj to a map or set right now it does a full copy
21:25samvitand there is a version of clojurescript which will be release soon that implements hash tries (the same one used on java-clojure)
21:25samvitso that conj to a map or set is near constant time
21:26jimkcarI'm having trouble with some interop. I am wrapping a Java library that has a class Foo. In clojure I would like do declare a type Foo with (deftype Foo .....). the Clojure Foo will implement some protocol functions that need to use the Java Foo objects. The problem is when I import the java Foo, i can't declare a Foo in my clojure namespace. Seems like I'm missing something....
21:26amalloysamvit: i'm not an expert on that, but i thought cljs had had persistent data structures for a while
21:27samvitI'm looking at the cljs github and it looks like they have a release coming soon which is gonna give hash trie implementation of cljs persistant data structures
21:27samvitfrom my expirimentation
21:27samvitconjing to a big map or set on the client
21:27samvitgets very expensive very fast
21:28samvit(I'm implementing an frp engine)
21:28samvitso i guess my question is
21:28samvitif i want to use the code on github
21:29samviti want to use their implementation of the data structures without requiring and referencing it all over the place manually
21:29samvitso that {} or #{} uses the one from github even though the cljs compiler does not have it integrated yet
21:30samvitand I was bit stuck on that
21:30amalloyi don't think you can do that
21:32samvithmm I'll try to use it as the actual compiler
21:34gfrederickssamvit: I'd be quite surprised if there was any copy-on-write behavior left in cljs
21:46samvitI was able to get the new persistent stuff working in cljs
22:00alandipertsamvit: https://github.com/tailrecursion/cljs-priority-map may be useful if you're FRPing in cljs
22:02samvithmm cool
22:02samvitwhat kind of thing did you have in mind that I could use this for?
22:03samviti.e. is there a common fro-specific use case?
22:03alandipertyou can use it as a priority queue, an impl. of which most FRP systems involve
22:04samvitah gotcha
22:04alandipertyeah for rank maintenance and stuff, we use it in javelin over at https://github.com/tailrecursion/javelin
22:05samvitoh nice
22:06samvitI've got a fully functional frp engine right now, very similar to webfui but faster and with more in depth dom-diffs
22:06samvitwill release sometime once its better
22:06samvitbut
22:06samvitthe one bottleneck I'm trying to get over
22:07samvitis that I have at some point a very large map
22:07samvitwhich gets merged with another map when some templates establish new dependencies
22:07samvitand when that happens the merge is slow
22:07samviteven though with the hash-trie implementation of cljs data structures it should be near instant
22:08samvitI'm thinking of using transients
22:22mullrI've got a a mixed clojure/java project, developing the clojure in emacs. If I change the java code, is there any way to recompile and load the changed version into the repl without restarting it?
22:26alandipertmullr: i don't know of a way but that could be a sweet piece of tooling
22:26alandipertmullr: use the compiler API and stuff
22:30mullrIt appears there's not a simple way, tooling is required: https://groups.google.com/forum/?fromgroups=#!topic/clojure/XFPSlB8-MUs
22:50john831hi
22:51gfredericksis there anything in core for converting a seq to an enumeration?
23:00brehautgfredericks: diving into old java?
23:01gfredericksmaking a SequenceInputStream
23:01gfredericksfor jsonp ring middleware
23:01brehautthis sounds like the sort of thing flatland has probably already done for you :P
23:02gfredericksthis is for a library though
23:02gfrederickshaving a library depend on a flatland lib would be a little yucky
23:04brehautwhat is this? a c program form 1995?
23:06gfrederickshttps://github.com/qerub/ring-middleware-jsonp/issues/2
23:09gfredericksenumerations are like lazy seqs but they also have mutability so they're more powerful
23:11technomancywhoa qerub
23:11technomancyI wrote ruby codes with him in two thousand six
23:11gfredericksman I was 13 in that year
23:12technomancythis was like, before github
23:12brehautgfredericks: are you messing ?
23:12technomancyhunter-gatherer-type OSS
23:12mthvedttoo many young people hang out in this channel
23:13gfredericksI like trolling people several years older than me by claiming to be way younger and seeing if they believe me
23:13gfredericksworks best on people ~10 years older
23:13mthvedthow old are you?
23:13gfredericks26
23:14gfredericksno clue how old I was in 2006 that information is long lost to history
23:14brehaut~math
23:14clojurebotmath is hard.
23:14technomancyheh; math. how does it work?
23:14technomancyhttp://p.hagelb.org/mystery.gif
23:14technomancygfredericks: it's funny how I read your chats in that drawl of yours after hanging out at clojurewest
23:14brehauttechnomancy: can i sell you a promise spec?
23:15gfredericksoh man I have a drawl
23:15brehauthaha
23:15mthvedtso do you age twice as fast as normal people
23:15mthvedtif you were 13 in 2006
23:15gfredericksare you talking about deadpanning or some southern thing I haven't shaken yet?
23:15technomancyI dunno; just a very particular cadence more than anything else
23:16gfredericksI need to listen to myself talk more
23:16technomancyeh; that always weirds me out
23:16gfredericksare people from far away considering lambdajam?
23:16technomancyreeeeally wish I could
23:16gfrederickstechnomancy: yeah that's why I never do it :)
23:16technomancygroup improv programming is one of my favourite things
23:17brehauttechnomancy: gfredericks thinks i sound british
23:17brehautwat
23:17technomancylol commonwealth
23:17brehautapparently we all sound the same
23:17technomancyI used to be able to fake a Singlish accent
23:17technomancy(from singapore)
23:17gfrederickstechnomancy: I was weirded out when I met british guy because he looked just like how I expected brehaut might look
23:17brehauthaha excellent
23:18TimMcgfredericks: Some folks at work are looking at different conferences we might go to this year, and lamdajam came up.
23:18gfredericksTimMc: +1
23:18brehautTimMc: right side up or upside down lambdajam?
23:18TimMc?
23:18gfredericks(inc chicago)
23:18lazybot⇒ 1
23:18brehauttheres two
23:18TimMcRight side up; the one in the northern hemisphere.
23:18TimMc(I'm guessing.)
23:18brehautright
23:18brehauttheres also one in aussie
23:19TimMcHa, was I right?
23:19brehautyeah
23:19technomancybrehaut: did you hear my joke about rhotic accents?
23:19brehauti think stuart sierra is talking at the upside down one
23:19brehauttechnomancy: always
23:19technomancyok good; just checking
23:19brehautwait, no
23:19brehautsorry missread
23:20technomancyjust that I want to make a T-shirt that says "Rhotic accents R the best"
23:20technomancyI... I'll see myself out.
23:20brehautlols
23:20TimMc>_<
23:20callentechnomancy: AND DON'T COME BACK
23:20brehautmuch better than my idea: tshirt that says 'helvetica' but is set in akzidenz
23:21TimMcgfredericks: We're also looking at ICFP/CUFP, which is in Boston this year.
23:21gfredericksoh right
23:21technomancybrehaut: not comic sans?
23:21technomancyI think that one actually exists
23:21brehauttechnomancy: been done, this is more subtle
23:21technomancynice
23:21gfredericksI might have considered submitting to one of those if I hadn't banned myself from speaking
23:21TimMcBoston == basically not having to travel at all
23:22brehauttechnomancy: akzidenz is (one of?) the font(s) that helvetica is derived from, and some people think its far superior
23:22brehauteg helvetica to akzidenz ~= arial to helvetica
23:22technomancybrehaut: sounds like a worthy shibboleth
23:22TimMcOh, I figured (on context) that it was a helvetica mimic.
23:22technomancyTimMc: https://mobile.twitter.com/al3x/status/322461785250742272?p=v
23:23brehautTimMc: given the range of such mimics, its a good guess
23:23gfrederickschicago is the middle coast?
23:23TimMcOK, bed. I've had enough internet for today.
23:23gfredericksthat's what I said 15 minutes ago
23:24brehautyeah but you are terrible at following through
23:51amalloygfredericks: c.l.SeqEnumeration?