#clojure logs

2013-09-21

00:21xeqiztellman: is there a predicate that can be used with ridley to only catch function calls?
00:21xeqimight be getting into analyzer territory there
00:24ztellmanseq? plus an exclusion of any special form symbol?
00:25ztellmanwhich actually is done for you already
00:25ztellmanxeqi: so basically just seq?
00:28xeqiit looks like the handler predicate is checked before the special forms, am I miss understanding the "done for you already" part?
00:29xeqiI was trying to write something to add tracing code to any function calls, finding I have to do some special casing for 'catch, 'finally, 'quote, etc
00:30xeqihost interop in the (. object (method arg1 arg2)) form
00:57ztellmanxeqi: no, you're right, I'm only specially handling forms which require pieces to be skipped in order to avoid non-expr forms
00:58ztellmanif you come up with a decent 'invocation?' predicate, I can add it to riddley proper
01:14mercwithamouthwhat in the world is 'defmulti'? ={
01:15eggheadmercwithamouth: polymorphic fns
01:16eggheadmercwithamouth: http://clojure-doc.org/articles/language/polymorphism.html
01:17mercwithamouthegghead: thanks, taking a look
01:19rishisadhirHey guys, Im learning clojure and had a quick question for you guys. I have a list of structs, of which some elements need to be updated. Since this list is immutable, what is 'clojure' way to do something like this?
01:25jared314rishisadhir: use map and have the function return the updated version of the struct?
01:28rishisadhirWoah jared314, thank you very much. Still getting used to thinking functionally ^_^
01:35coventryxeqi: This may be useful to you. It's precisely about figuring out which forms should be wrapped because they could return something. Not fully tested, yet. <https://gist.github.com/coventry/6647367&gt;. I intended to redo it in terms of riddley (which I referred to a lot in writing it) when I got there.
01:37coventryOh, and here are the tests I have so far https://gist.github.com/coventry/6647413
03:40mmarczykas of 0.0.3, avl.clj offers sorted maps faster than the built-ins
03:40seangrov`mmarczyk: Very curious about that - is there any rationale for keeping the built-in ones around?
03:41mmarczykseangrov`: well, I've only just released avl.clj
03:41mmarczykseangrov`: so there hasn't been that much time to think about making it a replacement for anything :-)
03:41mmarczykseangrov`: I have however offered it for inclusion in Contrib, see clojure-dev
03:42seangrov`mmarczyk: Yeah, reading through it now
03:42mmarczykactually I should have said "with faster lookups" rather than "faster", although given transient support it probably is simply "faster" for most typical use cases
03:45mmarczyknext step -- significantly more tests, I guess
03:48lordQuasHey guys, something Im writing needs to read metadata of mp3 files. Do you all know how to read in bytes from a binary file a'la fread?
03:50rishisadhirI guess my question is, what is the idiomatic way to read x to y bytes of a file?
03:52mercwithamoutha pictures worth a thousand words...can someone tell me what i'm doing wrong here? http://d.pr/i/buzL
03:53mercwithamouthi'm trying to play with URLY...added to my dependencies...ran lein deps...it seems to have pulled it down as expected
03:54callenmercwithamouth: use refheap for sharing code, but you end instantations of classes with a dot.
03:54callenmercwithamouth: so instantiating java.net.URL would be (java.net.URL. "http://refheap.com/use/this/site/to/post/code/next/time/please&quot;)
03:55mercwithamouthahh!
03:56callenmercwithamouth: do you have a book? if not, you might consider getting one. It'll save you from some of these forehead slappers :)
03:56callenmercwithamouth: I heartily recommend Emerick's http://clojurebook.com/
03:56mercwithamouthcallen: ok that works for java.net.URL what about clojurewerks...i'm following their instructions
03:56mercwithamouthyea i have the oreilly book...i'm just jumping ahead and doing some mild fooling around
03:57callenmercwithamouth: also if you find yourself just wanting to snag data from a Java class instance, use bean. Kinda map-ifies it.
03:57mercwithamouthbean?
03:57callenmercwithamouth: if you know a bit of Clojure, clojurewerkz libraries should be pretty easy to follow along with, so it sounds to me like you need to book-up
03:57callenyes, bean.
03:58callen,(bean (java.lang.String. "you won't be able to read the UTF-16 bytes anyway"))
03:58clojurebot#<ExceptionInInitializerError java.lang.ExceptionInInitializerError>
03:58callensigh...what?
03:58callenmercwithamouth: well it worked in my local repl. you get the idea.
03:58mercwithamouthcallen: yeah
03:59callen{:empty false, :class java.lang.String, :bytes #<byte[] [B@7a3e72>}
04:05mercwithamouthso just going by their instructions this definitely should work... https://www.refheap.com/18864
04:06mercwithamouthnow more than likely it's not exactly as they wrote it down...so i'll have to go through a few more chapters before i can toy with this and any other libraries
04:18s4muelYou need to use require, not import
04:18s4mueloh, hello scrollback
04:18s4muelderp
04:20mercwithamouth=P got it
04:20mercwithamouth(use 'elroy.core)
04:20mercwithamouthi was having an issue geting what i wanted through nrepl
04:21mercwithamouthand require...sorry
04:21mercwithamouths4muel: yes you were right
04:23callenmercwithamouth: still think you need to get a book.
04:24s4muelall without so much as an obscure movie reference?
04:24s4muelpshh.
04:40mercwithamouthcallen: i have one, working through it...i just like to step outside of the book from time to time and play and stump my toe on things
04:40mercwithamouthit helps to make things stick
04:40callenmercwithamouth: fair enough :)
04:40callenI'm the same way, if I'm honest. I just like to make certain people at least have the right resources available to them.
04:41mercwithamouthlol no prob, i'm just tinkering
04:42mercwithamouthnow....alembic may hvae broken everything....lets go with pomegranate
04:46s4muelalembic uses pomegranate, heh. but there is also some extra magic there
04:54mercwithamouths4muel: damn...well then. i suppose i'll see what I personally broke first =P
04:56s4muelmercwithamouth: you wouldn't know it unless you looked at the source. i got curious and lo and behold it does some magic with classlojure where it requires pomegranate.
04:58mercwithamouths4muel: i see...
04:58mercwithamouthi added it and now i can no longer require my core namespace
04:58mercwithamouthnewb issues
05:02mercwithamouthok good to go now
05:17t_hashHi there
05:17t_hashI'm trying to translate this Java code into Clojure
05:17t_hashhttps://gist.github.com/memerelics/6648612
05:17t_hashanybody knows how to write instance initializer in anonymous class?
05:48amalloyi can't really think of many good reasons to use an instance initializer in java, and in clojure i don't think there's anything you couldn't implement with doto
06:08sm0keHow do i remove a prefix from string?
06:14Guest75510The refrence implementation of clojure will always be JVM, Right?
06:14scottjGuest75510: we can't tell the future
06:15Guest75510Right. But most likely?
06:16sm0ke,(clojure.string/replace "jvm" #"^j" "k");
06:16clojurebot"kvm"
06:26s4muel,(apply str (rest "somestr"))
06:26clojurebot"omestr"
06:37sm0ke,(clojure.string/replace "jvmeter" #"^jvm ""k") ;?? (rest (rest (rest ??
06:37lazybotsm0ke: Uh, no. Why would you even ask?
06:37clojurebot"jvmeter"
06:38sm0ke,(clojure.string/replace "jvmeter" #"^jvm" "k") ; :)
06:38clojurebot"keter"
06:39sm0ke,(drop 3 "jvmeter")
06:39clojurebot(\e \t \e \r)
06:39sm0keweird
06:44TEttingersm0ke: ##(apply str (drop 3 "jvmeter"))
06:44lazybot⇒ "eter"
06:45hyPiRionalso commonly known as ##(.substring "jvmeter" 3) on the jvm
06:45lazybot⇒ "eter"
06:46s4muelTIL...
06:47sm0kei dont understand how clojure swaps code into runtime so seamlessly?? i am doing some web stuff in compojure and all i have to do is cpp in fireplace and changes are reflected on browser?
06:49sm0kethat is just most wasome thing yet i found in clojure
06:49sm0keawsome*
06:49TEttingersm0ke, it's kinda the direction a lot of languages are taking. C# will soon make the compiler available at runtime too, clojure (and lisp) just had it first
06:50TEttingerclojure will probably have it be more seamless though
06:50TEttinger(than C#)
06:50sm0kei dont know..i was working with scala before this..whcih is fairly modern..but didnt have hot swap so seamless
06:50sm0kei dont know if it had at all
06:51TEttingerthe power of lisp? :D
06:51sm0keand what did you say? compiler available at runtime? wtf is that?
06:51TEttinger,(doc compile)
06:51clojurebot"([lib]); Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper classpath-relative directory. The output files will go into the directory specified by *compile-path*, and that directory too must be in the classpath."
06:51TEttingerthat's available to clojure at runtime
06:51TEttingerand in the REPL
06:52sm0kehaha i know..i used it on my gen class code..oh i see
06:52TEttingerC# is only now getting close to getting the same kind of feature
06:53TEttingerjava may at some point, who knows really. they still don't have first-class functions, waiting on java 8
06:54sm0kenice what are the other mind blowing things in clojure?
06:54TEttingersets are kinda mindblowing when you start using them in novel ways
06:55sm0kesets? ## #{1 2 2 3} ;?
06:55sm0kewhats mindblowing about sets?
06:55hyPiRionI feel it's more mindblowing that sets aren't the basic data structure we first learn about
06:55hyPiRionIt's the simplest one.
06:56TEttingernot unique though. leiningen has a lot of good productivity boosts, I still need to learn macros but there's a lot of power in there... oh, and all the stuff like juxt
06:56TEttingerjuxt you need to have your mind blown to use, then it blows everyone's minds when they try to read it
06:57hyPiRionI wish there was an opposite juxt, named aside or something.
06:57TEttingerwhat would that do?
06:58hyPiRion(map (aside - str) (range 1 10) (range)) -> ([-1 "0"] [-2 "1"] ...)
06:58hyPiRionI just feel I'm commonly iterating over multiple values with map, where the actions are completely unrelated to each other
06:58hyPiRion*update functions
06:59hyPiRion(defn map-keys [f m] (into {} (map (aside f identity) m)))
06:59hyPiRion(defn map-vals [f m] (into {} (map (aside identity f) m)))
07:00hyPiRionetc
07:01mmarczyk(defn map-vals [f m] (reduce-kv #(assoc %1 %2 (f %3)) {} m)) (possibly use transients for more speed, but this should already be faster)
07:02mmarczyknot really a comment on the utility of aside, of course
07:02hyPiRionyeah, sure thing
07:02TEttinger##(let [aside (fn [& args] (fn [& inner-args] (map #(%1 %2) args inner-args)))] (map (aside - str) (range 1 10) (range)) )
07:02lazybot⇒ ((-1 "0") (-2 "1") (-3 "2") (-4 "3") (-5 "4") (-6 "5") (-7 "6") (-8 "7") (-9 "8"))
07:03hyPiRionAlso wished that some, every?, not-any? and friends were implemented with reduce and reduced, not with recur
07:03TEttingerhyPiRion, does that do what you want?
07:03hyPiRionTEttinger: yeah, I just wished it was in core :p It's probably not as useful as I'd like to believe though
07:04TEttingerit seems useful
07:04mmarczykhyPiRion: I guess that's a possible future development; reduce is gaining in importance all the time
07:05mmarczykand short-circuiting itself is a fairly recent development
07:05hyPiRionyeah
07:15sm0keguys anyone using fireplace?
07:16sm0kehow do i see stdout ?
07:16sm0kehave started a repl before starting fireplace..but repl gets no logs..
07:18TEttingersm0ke, maybe binding?
07:19TEttingerhttp://clojuredocs.org/clojure_core/clojure.main/with-bindings
07:20TEttingerwait http://clojuredocs.org/clojure_core/clojure.core/with-bindings why are there two
07:20borkdudeI tried Gitx as a replacement visual tool for the Github app, but it has these refresh issues, I guess nothing compares with magit and I just have to learn it
08:02noncomhi! how can I use the "multiple projects" leiningen feature on windows? it is said that the "checkouts" folder should be symlinked to other projects, I assume that is Linux, but what is that for Windows?
08:08mmarczyknoncom: you could try and see if directory junctions are still supported
08:10borkdudeor use cygwin?
08:18borkdudeI like magit, why didn't I check it out before :-)
08:24sm0keTEttinger: i dont get it? what is binding?
08:33TEttingersm0ke, sorry, it could maybe be useful in binding *out* (not sure if that's the right name, it's what println prints to) to stdout. I'm not sure how to work it myself
08:35noncomoh, reading wikipedia, there is mklink command line utility that is created for windows-posix compatibility
08:36borkdudenoncom switching to a different OS eventually makes life a lot easier ;)
08:37seangrov`This damned pedestal thing sounds really interesting
08:57borkdudeno, why… https://github.com/overtone/emacs-live/blob/master/packs/dev/bindings-pack/config/default-bindings.el#L152
08:59borkdudeI wondered, is it possible to see things you copy outside emacs in the kill-ring?
09:02mschueneborkdude: Do you just want to paste it
09:02borkdudemschuene maybe, I want to browse the kill ring first, then think about pasting it or not
09:03mschueneborkdude: I am not sure, but as workaround copy it inside emacs and then kill it to get in in the kill ring
09:04borkdudemschuene I have Alfred which can show the clipboard history, but I wondered if I could just have the same option in emacs
09:13noonianI've created a leiningen plugin and published to my private s3 bucket with s3-wagon-private. I have the repo in my user profile, but when I try to use it with lein new my-plugin name it can't find the template (always looking for release also). How can I tell leiningen to look in my repositories for templates?
09:43supersymis there a non macro way of doing with-out-str? I'd like to use it in comp
09:44supersymI should really just check the source ... ><
09:44supersymgot it :P
11:28borkdudewhat is a good colortheme in emacs that highlights a difference between a docstring and any other string?
11:38`cbpnever seen anyone that does it
11:39`cbpoh god english
11:57mklappstuhlCompilerException java.lang.RuntimeException: Unable to resolve symbol: in this context,...
11:58mklappstuhlrunning into this... but the symbol name is missing - how do I cleverly debug this
11:59llasram`mklappstuhl: no stack trace?
12:00mklappstuhlllasram`: uh, no.. just "in this context, compiling:(NO_SOURCE_PATH:1)"
12:01llasramhmm
12:01llasrammklappstuhl: Is this a result of something you're doing at the REPL, or when compiling a namespace? If the latter, can you progressively delete code to trace down the problem?
12:02mklappstuhlIt's a problem when executing stuff from the repl
12:02llasramFor another tack, are you writing a macro? This looks like the kind of error you might get by accidentally generating the symbol for the empty string
12:02mklappstuhlllasram: I'm not writing a macro
12:03AimHereWhat are you doing that's generating this error?
12:04mklappstuhlAimHere, llasram: https://github.com/mklappstuhl/goldman.clj/blob/master/src/mklappstuhl/stock_utils/data.clja
12:04mklappstuhlhttps://github.com/mklappstuhl/goldman.clj/blob/master/src/mklappstuhl/stock_utils/data.clj
12:05llasrammklappstuhl: So what do you then run at the REPL which produces the error?
12:11AimHereIf the yfinance library being loaded is the one from ghoseb on github, it seems to be using clojure.contrib - might this be a symptom of a version mismatch?
12:12mklappstuhlllasram: hm, I don't really know why it's working now but suddenly it does
12:12mklappstuhlI'm having some vim + relading code on the repl workflow ... maybe I did something wrong reloading the code or whatever
12:13mklappstuhldid anyone come accross some good vim + clojure workflow ?
12:13llasrammklappstuhl: the vim people I know use fireplace
12:15mklappstuhlllasram: oh, wow, didn't know about it - always thought vimClojure is The Thing(TM) but was never able to really get it to work
12:16llasramIt can be hard to keep up sometimes. If I didn't at least idle in this channel most of the time, I don't think I'd know half of the stuff going on in the community :-)
12:18hashcatwhy did I get "REPL server launch timed out." when I enter "lein repl"
12:19hashcatshould I grant my permission?
12:19llasramhashcat: If you're running some kind of host firewall, `lein repl` does work by launching a (localhost) TCP nREPL server
12:21hashcatllasram: How to launch it?
12:21`cbpif nothing works use lein clean, that's how i roll
12:21llasram`cbp: boo
12:22llasramhashcat: I meant, when you run `lein repl`, that's how the command works -- it starts an nREPL server in the background and then attaches to it
12:22clojurebotIt's greek to me.
12:23hashcatllasram: do you know what port do it use?
12:24llasramhashcat: It picks random high ports until one works
12:24llasramhashcat: By default. You can specify the port on the command-line
12:25llasramCheck `lein help repl` to the options in your version of lein
12:36hashcatHi Leiningen, my hair is already on fire
12:38hashcatllasram: Is lein's client connect to 127.0.0.1?
12:39borkdudelol
12:39hashcatI didn't block any connection from 127.0.0.1
12:39ddellacostaso confused by hashcat
12:42llasramhashcat: What version of Leiningen are you running? For a while it would try to bind to the wildcard address, which your firewall might prevent
12:43hashcatLeiningen 2.3.2 on Java 1.7.0_60 OpenJDK 64-Bit Server VM
12:44llasramhashcat: Ok. What happens if you just run: lein repl :headless
12:45hashcatIt hang. waiting for response
12:46ddellacostahuh, really weird…never seen that behavior w/lein before.
12:46llasramhashcat: It should say something like `nREPL server started on port <port>`
12:46llasramhashcat: Does it, or just nothing?
12:46ddellacostahashcat: does it dump out anything whatsoever, or just sit there?
12:47hashcatllasram: It's still running without any message
12:47llasramhmm
12:47ddellacostahashcat: whatever it prints out before it starts hanging, it would be useful if you could put it in a gist/refheap/etc. for us to look at…if there is anything at all
12:47hashcatI get "nREPL server started on port 60356 on host 127.0.0.1" now
12:47llasramhashcat: That really sounds like a host-based firewall is preventing it form opening a listening port
12:47llasramHey!
12:47llasramCool
12:48llasramSo now from another terminal, run: lein repl :connect 60356
12:48ddellacostaalrighty then, no problems. :-)
12:48hashcatyea, It works
12:49hashcatbut why can't I just simply "lein repl"?
12:49llasramI don't know for certain, but it seems like your nREPL server might be taking so long to start that the process times out
12:52hashcatI try "lein repl" again
12:52hashcatwork fine now =.=
12:52hashcatIt's really weird
12:52llasramNew hypothesis -- you had a ton of deps to download to your local repository
12:53hashcatI didn't change any configuration
12:53llasramWell
12:53llasramNo hypothesis then :-
12:53llasram:-)
12:54hashcatwhatever,it works fine now. thanks for help
12:55borkdudelein repl isn't a pure function ;)
12:56hashcatsometimes failed, sometimes success
12:57hashcatI start playing now
13:06samflores/Users/samflores/Downloads/mame0150-64bit/mame64 ; exit;
13:15mklappstuhlllasram: thanks for the tip with fireplace - its magig.
13:15mklappstuhlmagic :P
13:15llasramGlad to be helpful!
13:16borkdudefireplace is the vim nrepl thing?
13:25soiitairehey , I get a exception when I try to start the repl.
13:26soiitaireException in thread "main" java.lang.RuntimeException: No such var: json/Write-JSON, compiling:(clojurewerkz/support/json.clj:19:1)
13:26soiitaireanybody can help me ?
13:26AimHereIf you're nrepl-jacking-in, nrepl does have to be able to make sense of the files in the project
13:27soiitairewhat's that mean? I use the lein repl, but the same exception in nrepl.
13:28llasramsoiitaire: Is this your project or some existing other project?
13:29soiitairemy project
13:29soiitairehttp://paste.kde.org/p16d6f6d3/
13:30llasramsoiitaire: Ok. So you've got whatever problem is causing the error, but you're getting the error while launching the REPL because it's AOT compiling your code first
13:30soiitaireyes
13:30llasramYou generally don't want AOT, at least not for. I'm guessing it's happening here because you specify a :main in your project.clj
13:31soiitairehere is my project.clj
13:31soiitairehttp://paste.kde.org/p86346e4f/
13:32llasramOk. So drop the `:aot` line and add ^:skip-aot between `:main` and `fittestite.main`
13:33llasramOh, and do a `lein clean` to delete any residual AOT class files
13:33llasramThat should let you launch your REPL without exceptions
13:33soiitaireyou mean ` :main :skip-aot fittesite.main`
13:33llasramYou'll probably still get the error when you actually do try to compile the namespace
13:34soiitaireyou mean ` :main ^:skip-aot fittesite.main`
13:34soiitairesure
13:34llasramYes (assuming you're using the `` just for quoting, not as being in your file)
13:34llasramAnyway, but at least w/ the REPL up, you can debug :-)
13:35soiitairesure
13:36soiitairellasram: thanks. repl is running correctly.
13:38soiitaireI just write some IO staff in the main.clj, so i add aot in project.clj
13:51BlankVerseI am using nrepl to connect to a repl server on android (remotely running on android)..when I copy a function and execute it in the nrepl , it works ,
13:51BlankVersewhereas when I send the code to repl , by using C-c C-r, it fails
13:51BlankVerseclojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Unable to resolve symbol: defactivity in this context, compiling:(NO_SOURCE_PATH:1:1)
14:06mdeboardFor ClojureScript, is it pretty standard to just have a cljs profile for new projects?
14:07mdeboardWhat I'm really asking is, I would really like to know how to make a cljs project template for lein
14:07mdeboardcan anyone point me to resources on how to do this
14:32seangrov`Where is this aurora that ibdknox showed people at strange loop?
14:33seangrov`I'm very interested in it, but haven't seen it anywhere
14:34JardaHi, a newbie question.. (defn- ..) is for defining functions that are only visible inside the namespace?
14:34gfredericksJarda: yep
14:34JardaIf so, is there a similar way of defining variables that are only visible inside the namespace?
14:34gfredericksit's sugar for (defn ^:private ...), which tends to work on more general def-like things
14:34Jarda(def- ..) didn't work out-of-box
14:34gfredericks^ looks like I anticipated your question :)
14:35Jardaso (def ^:private my-variable ...) should work for me?
14:35gfredericksyep
14:35Jardathanks
14:35gfredericksnp
14:36Jardaif I'm defining a lot of (private) variables, is that a sign of code smell?
14:36JardaI'm having a hard time shaking all these years with C-derived languages off my shoulders..
14:36seangrov`Jarda: Depends on what they're for
14:37seangrov`It certainly isn't very common though
14:38Jardathis module(?) I'm writing does a lot of Java interop so I'm having stuff like http://pastie.org/8344535 in my namespace
14:40JardaI'm just trying to split my huge functions to smaller ones using a lot of defs
14:40Jardathe functions get a bit verbose because of the Java interop calls..
14:41mdeboardJarda: Was that paste an example of verbosity? It's about as terse as it gets?
14:41Jardamdeboard: no that was something extracted from a bigger function
14:41seangrov`Looks like you're building a facade around the Java stuff?
14:41seangrov`Also, https://www.refheap.com/18871
14:42seangrov`And even that might be a bit much
14:42mdeboardJarda: When there's a lot of Java interop and the Java you're using is using mutable data structures, things get kind of gross-looking in terms of Clojure style
14:42mdeboardIME, anyway
14:42Jardayes I see
14:42seangrov`Jarda mdeboard: Yeah, sadly, a lot of nice stylistic things go out the window with Java interop
14:42seangrov`But this kind of function looks fine
14:43Jardathis project I'm building uses stuff that is sadly best supported in Java
14:43seangrov`It looks like a nice facade around the Java api's that can be composed nicely from Clojure
14:43Jardaand I didn't feel like writing Java
14:43jonasenambroseb_: is jvm.tools.analyzer able to analyze the clojure.core namespace now?
14:43Jardaso I chose to learn Clojure :)
14:44mdeboardJarda: Here's me trying to wrap a PDF-processing library in Clojure https://gist.github.com/mattdeboard/79bad31d2769e9f44639
14:44ambroseb_jonasen: no, I think the limitation is definline
14:44seangrov`ambroseb_: You're a prolific gentleman sir. Are you in Paris?
14:44Jardaseangrov` mdeboard thanks, then I'll just continue my travel through the wonders of Clojure. Reading Clojure Programming along the way
14:44jonasenambroseb_: ok
14:45seangrov`mdeboard: Looks like you could use doto in that case as well...
14:45ambroseb_jonasen: there's an issue where definline hard codes a fn name, so there's some issue with recompiling it.
14:45ambroseb_jonasen: I don't really know exactly.
14:45Jardaseangrov`: thanks for doto. I'll read up
14:45ambroseb_seangrov`: I'm not in paris, in Australia :)
14:46seangrov`ambroseb_: Ah, ok, I felt like I missed a chance to meet while I was in Paris, but that makes me feel better :)
14:46ambroseb_seangrov`: :)
14:46Jardayes, doto is definitely something I'll find useful. Thanks seangrov` :)
14:46mdeboardseangrov`: Yeah, but `let` to me kind of breaks up the function a little more for me. Like, makes it easier to process because I basically just treat the let block as a black box? It's dumb but it makes reasoning about such things a little easier. Of course that's probably just my institutionalized-by-imperative-languages brain.
14:52Jardaregarding module APIs.. is it allright to have say 'fetch_account' where the caller would give account type as a keyword? Like fetch_account(:github, "username") ?
14:53Jardano, I mean (foo/fetch_account :github "username")
14:53Jardathe C is strong in me
14:54Jardaif I read the documentation correctly keywords don't belong specifically to any namespace so I should be able to check for the keyword type in my implementation of 'fetch-account'
15:02seangrov`Jarda: Yeah, definitely
15:03seangrov`In fact, that's where multimethods will come in and make your system extensible from the outside later ;)
15:03Jardareading about multimethods now :)
15:03seangrov`Jarda: Probably best to ignore it for now, it'll make more sense later. Just keep down the road you were headed, it was right
15:04Jardacool, thanks :)
15:14vmarcinkohello, just a general question - has it ever been mentioned by Rich or other influential developers of clojure.core that storing function source as var metadata would be itnroduced in some future versions of clojrue maybe?
15:15seangrov`I'm using a service where I have to generate a token locally to interact with it. The token expires every 24 hours. I have an atom that holds the token - I'd like to update it every 12 hours in my process. Any thoughts on how to do this?
15:17robertfwgot an extremely noob question - i've got the following code in emacs: http://pastebin.com/wQAc2Vae - i realized i put the final line outside of main and want to move it inside. when i try to delete the last paren on line 7, the cursor just goes straight through it...how am i supposed to edit it?
15:17seangrov`vmarcinko: There's been discussion around it, yes
15:19seangrov`vmarcinko: In the meantime: http://clojuredocs.org/clojure_core/clojure.repl/source
15:19vmarcinkoseangrov`: thanx, i know about it; more itnerested in how to fetch source from only-REPL defined fns
15:20seangrov`Yeah, I agree it would be cool. I remember there were some hangups somewhere, and that something would allow for it
15:20seangrov`Sadly, that's clearly not a compelling answer :)
15:20vmarcinkoand strangely, i cannot find anywhere some todo list for future version of clojure - say 1.6 ?
15:20seangrov`Can't find the post/email that mentioned it
15:21seangrov`robertfw: Do you have paredit mode on?
15:21Jardahttp://adambard.com/blog/acceptable-error-handling-in-clojure/
15:21robertfwseangrov`: yes
15:21Jardais this a good way of handling "error control flows"
15:22Jardawhere one would in Java or like do "throw new ArgumentException("Value of 'foo' is invalid"); ?
15:22seangrov`robertfw: Are you new to emacs/lisp/clojure in general? If so, might want to hold off on paredit. If not, definitely time to learn it :)
15:22Jardaso should I do it like in the blog I pasted
15:23robertfwseangrov`: complete newb to emacs, i've tinkered a bit in clojure...enough to understand syntax and the general approach to things
15:24seangrov`robertfw: Yeah, hold off on paredit for now, learn emacs first
15:24robertfwseangrov`: sounds like a plan! buried in docs right now heh
15:24robertfwthx :)
15:24seangrov`Paredit is really amazing and useful, but it can be frustrating until you "get it". Trying to do that and learn emacs at the same time is going to make it a nightmare
15:24seangrov`No problem!
15:25seangrov`Jarda: I'd use pre/post conditions probably
15:25seangrov`It really depends on the function though... if there are no side effects, I wouldn't throw (generally, outside of pre/post conditions)
15:26seangrov`If you're doing some expensive/dangerous side-effect, I might through
15:28mockerPicked up 'Clojure Programming' on a whim, wish me luck! :P
15:29seangrov`g'luck
15:35noncomseangrov`: did you have any luck on finding info on aurora by ibdknox?
15:36seangrov`noncom: None yet, no. I suppose it'll come out when it comes out. Or ibdknox could be a dear and share it with us.
15:37noncomyeah..
15:38noncomhave you been at strangeloop?
15:38noncomand saw it?
15:46Jardaseangrov`: thanks, preconditions are absolutely suitable for this, thanks!
15:59BrackiHow do I implement a Java interface with a void method that mutates a passed in variable?
16:00Brackie.g. https://code.google.com/p/jsendnsca/source/browse/trunk/jsendnsca/src/main/java/com/googlecode/jsendnsca/encryption/XorEncryptor.java
16:10BrackiOr to reframe it, an interface with a void method and side effects.
16:10BrackiAny hint is appreciated...
16:14gfredericksBracki: those are two orthogonal questions
16:14gfredericksyou can implement an interface named via deftype, or unnamed via proxy
16:14gfredericksmutation on arrays can be done with aset
16:15gfredericksI don't know if special handling is required for the void
16:37gfredericksBracki: s/proxy/reify
16:47Brackithanks gfredericks.
16:49mdeboardIs there an idiomatic way of reading a file in clojurescript? I realize that sounds silly, but it's a json file.
16:50gfredericksmdeboard: like on node?
16:51mdeboardgfredericks: No, but I think I found my answer. Im' just working on a little toy project thing, an html game to mess with clojurescript. There's no server component, the browser is the platform. So I guess I need to use Chrome's fs api
16:54timgluzHi, i need help from native english speaker. I just added additional documentation for Monger library, but i need someone to check grammar for my changes: https://github.com/clojurewerkz/monger.docs/pull/7
16:56lunkgood afternoon
16:57lunkhow do I convert a Set<Type> from java collections to a #{} set in clojure?
16:57timgluzthanks, @gfredericks
16:58gfrederickslunk: can you pass it to the set function?
16:59lunkgfredericks: well it's odd, i have a proxy object for a java interface with the method 'public void execute(String g, Set<Type> set)'
17:00lunkooo, maybe i can convert in the proxy vs in the body
17:00lunkDuck debugging at it's best
17:01bruceadamslunk: what kind of conversion do you need? the clojure repl prints a java HashSet as #{1 2 3}
17:01bruceadams,(java.util.HashSet. [1 2 3])
17:01clojurebot#{1 2 3}
17:01lunklet me make a paste, too convluted
17:01lunkone second
17:02gfrederickstimgluz: done
17:03timgluzthanks @gfredericks, currently fixing it and going to refresh my grammar
17:04gfrederickstimgluz: it was pretty much all articles :)
17:04gfredericksI was going to suggest you just put articles everywhere and might be correct more often, but then I tried it myself and it seemed terrible.
17:05timgluz:D
17:05lunkhttp://pastebin.com/aSrz2Qch
17:05gfredericksthe english: it is worst.
17:05lunkyea, way too much to explain
17:06lunkbasically, if i put the class of the two inputs into a vector, i get [String TreeSet]
17:06lunkbut if i try to iterate over the treeset, I don't get any values
17:07lunkso i guess the real question, is how do i iterate over a TreeSet?
17:08yediboo: http://www.infoq.com/presentations/clojure-core-async?utm_source=infoq&amp;utm_medium=QCon_EarlyAccessVideos&amp;utm_campaign=StrangeLoop2013
17:14indigoWhat's the best Redis library for Clojure? Carmine?
17:14bruceadams,(let [ts (java.util.TreeSet. [1 2 3])] (for [i ts] i))
17:14clojurebot(1 2 3)
17:14SegFaultAXindigo: Probably carmine, yea.
17:14indigoHm okay
17:15lunkbruceadams: that's what i thought, hah
17:15bruceadamslunk: seems to just work. is there something unusual about your sets? might they be empty?
17:15lunkthey're definitely not
17:16bruceadams,(let [ts (java.util.TreeSet. [1 2 3])] (.size ts))
17:16clojurebot3
17:16lunkmaybe the silly thing doesn't have a toString implementation
17:16lunkand it doesn't
17:17lunkwow.
17:18bruceadamslunk: wow. gotta love it!
17:18lunkwow, working great now
17:18lunkbeer for all!
17:19bruceadamsI'm ahead of you on the beer!
17:19bruceadams(I do put it down to type)
17:21lunkbruceadams: pffft, time to step up your game ;)
17:32tupihello all. i don't understand what I am doing wrong here, any one available to look at it and kindly give me some hint ? http://paste.lisp.org/display/139088 tx
17:33mtpi don't either
17:33mtpit's helpful to try and answer these questions
17:33mtp"what did I do?" "what did I expect to happen?" and "what actually happened?"
17:35lunkbruceadams: seems to work better when I iterate over the set directly in the proxy instead of handing it off to a separate function. Very weird.
17:35tupimtp: were you talking to me :) ?
17:35gfrederickstupi: the docs say toEDM taks an argument, and you didn't supply one
17:35mtptupi: i don't know, were you the one with the problem that you didn't understand?
17:35gfredericksthus the reflector reports that it couldn't find a method matching your call
17:36tupigfredericks: I do supply, don't I ? (.toEDM (.getProcessor bin-imp))
17:36bruceadamstupi: this "(.toEDM (.getProcessor bin-imp))" seems like it's getting an instance of a processor object, then invoking toEDM on that.
17:36gfrederickstupi: as bruceadams said, the (.getProcessor bin-imp) is the object the method is being called on
17:37gfredericksin java you have bin_imp.getProcessor().toEDM()
17:37BrackiCan somebody point me to a good example on how to wrap Java builders with idiomatic Clojure?
17:38tupibruceadams: can i be sure, 1st of all, that clojure finds .toEDM ?
17:38bruceadamsclojure is looking for toEDM on the processor object and not finding it.
17:39gfrederickstupi: it's looking for a method called toEDM that takes 0 args
17:39bruceadamsthe package name (from the comment) suggests that toEDM is a filter thingy, not a processor thingy
17:39dobry-dentoEDM? does it add a drop?
17:40mtpthat'd be toDubstep
17:40lunkbruceadams: ooo, the interface also has a void return value. Since this method never yeilds anything, the proxy leaves nothing on the stack for the clojure repl.
17:41lunkbruceadams: it's like i'm starting to understand this stuff
17:41bruceadamslunk: neato
17:42tupii don't understand: what i read is: public void toEDM(ImageProcessor ip) Converts a binary image into a 8-bit grayscale Euclidean Distance Map (EDM)
17:42tupiand public ImageProcessor getProcessor() Returns a reference to the current ImageProcessor.
17:44gfrederickstupi: implicit in toEDM is that it must be called on an instance of EDM
17:44gfredericksso (.toEDM my-edm my-image-processor)
17:45tupiah,maybe that is. it is terrible to read java doc, because we don't know what 'it really expect'
17:46llasramtupi: Once you get the hang of a little Java, I assure you this case is pretty clear :-)
17:47tupi[never had to face this situation in 25y of programming :) never ever a doc would not tell us exactly what it expect, in arity and 'type'] quite frustrating, since i have to ask stupid quiz :) but ok, let me try to create an EDM ...
17:48tupiall this is because i am trying not to use the fiji command, which works fine, in this case, the fiji command is: (IJ/run bin-imp "Distance Map" "")
17:55SegFaultAXSo... the factor pastebin is crazy.
17:56tomjackwhat does "self-describing" mean in the context of fressian and edn?
17:57llasramtomjack: You don't need a separate scheme to interpret the data, such as you do with protobufs, Thrift, Avro, etc
17:57gfrederickstomjack: self-describing is self-describing
17:57llasrams,scheme,schema,
17:58tupigfredericks: that was it, thank you. I wonder how i can learn from this: I mean when I read the imagej [java] doc, I always have to assune there is 1 first '1hidden' arg ?
17:59tomjackhmm
17:59llasramtupi: Out of curiosity, what other programming language are you most familiar with?
17:59tupischeme
17:59gfrederickstupi: this is how object-oriented docs typically work; the keyword "static" alerts you to the exceptions
17:59akurilin2Has anybody here tried misaki or static? I'm wondering if I should bother trying them for the sake of staying within clojure or if I should be going straight for middleman since it appears to be very well maintained.
17:59tomjackah right, because extensions are built out of the things everyone can already read, like edn
17:59SegFaultAXtomjack: To put it differently, you can't parse any old protobuff message without knowing the structure. Communicating the structure is an out of band process, separate from communicating the message itself.
18:00dobry-denmtp: we're pretty funny
18:00SegFaultAXWhereas with json, all the information required for reading and parsing the message is already available to you. I don't need any additional out of band transmission to figure how to process it.
18:00mtpdobry-den: i am the cleverest of the clevar
18:00mtpSegFaultAX: hahahaha, good one
18:01SegFaultAXmtp: I didn't say you could derive value from it.
18:01SegFaultAXmtp: But that's an application-level concern.
18:01mtpSegFaultAX: you still have to know the structure of the message from an out-of-band process, so
18:01SegFaultAXmtp: No I don't.
18:01mtpand the exact same thing could be said about protobuff
18:02SegFaultAXNo, it couldn't.
18:02mtp"but that's an application-level concern"
18:02SegFaultAXprotobuff is structured binary data. I cannot correctly unpack it without the schema.
18:02mtpjson is structured text data
18:02mtpyou can turn it into structured representation, but you still can't derive meaning from it without knowing what's in there
18:02SegFaultAXmtp: I just said that.
18:03SegFaultAXLike, exactly that.
18:03mtpyes, but it's functionally no different than a binary blob
18:03mtpthey're both equally meaningless
18:03SegFaultAXmtp: Ok.
18:03tupigfredericks: thanks. for your info, CLOS and CLOS doc does not 'work like that', but thanks again. ah maybe i can ask clojure to tell me what a function or imagej method expect ?
18:03llasrammtp: Well, in principle maybe, but not in practice.
18:03mtpa human is a little more likely to be able to intuit structure from the json, sure
18:04llasrammtp: You can see a field named "username" with a value that matches a known username and guess what's going on
18:04mtpbut that's a different kettle of worms :)
18:04SegFaultAXmtp: Your argument is meaningless.
18:04mtpllasram: and you can see a thing that looks like a username in the blob and guess what's going on
18:04gfrederickstupi: maybe it's limited to languages that syntactically separate the target object from the other arguments?
18:04llasrammtp: But at a veeeery different bar.
18:04gfredericksi.e., the foo.bar(baz, bang) syntax
18:05mtpllasram: until you spend most of your time staring at binary blobs trying to discern meaning :)
18:05SegFaultAXThe point is I /can/ parse json (assuming it's well formed) without any additional knowledge about its contents. You cannot do that with eg protobuffs.
18:05SegFaultAXI literally have no information about how wide the fields are or what they're called, etc.
18:05llasramExactly
18:06mtpi debug c programs in my day job
18:06llasramSo?
18:06mtpand when the stack is fucked, i have no information about the state of the program other than "the stack is fucked"
18:06llasramI used to write kernel module for my day job
18:06llasramSeeing a username at byte offset 17 in one data container means nothing
18:06mtpand so i have to be able to parse random binary crap, possibly ill-formed, without any information about the thing
18:06SegFaultAXmtp: I'm now convinced that you're trolling.
18:06mtpSegFaultAX: ok
18:07mtpbut i can still parse random binary garbage without a whole lot of information about its contents
18:07mtpi'm glad that you can do the same with json
18:07SegFaultAXYou're really missing the point.
18:08mtpi think you're confusing representation with meaning
18:08mtpjson is a more informative representation to most people, sure
18:09SegFaultAXWe aren't talking about /to people/
18:09mtpthen why are you talking about your ability to parse it without context
18:09tupigfredericks: maybe, but as you know, in lisp/scheme/clojure, there is no target object, it is built and return to the caller ... the problem here is imagej, and java of course, not clojure. and it is _really_ difficult, for me, to pass an arg that we be 'affected' by the call ... but i guess i'll get there. i was hoping _not_ to have to learn [almost none of] java :) for a scheme, it is a nightmare. but i really tx you and all people
18:09tupihere, i will surely still ask stupid quiz for a while :)
18:09SegFaultAXmtp: Because I can parse json without context.
18:10mtpand i can parse certain kinds of binary goop without context
18:10mtpcongratulations
18:10SegFaultAXI cannot do that with an given binary blob that might also happen to be a protobuff.
18:10mtpi'm sorry for your loss
18:10tomjack"I can parse" -> "I can write a program which parses" ?
18:10amalloySegFaultAX: it's not entirely true that you can't parse protobuf without context; the protocol is built such that you can at least see the general shape of the data (ie, how wide each field is) without any prior knowledge
18:11gfrederickstupi: to some extent you only have to know how the jvm part of java works. There's a lot of details specific to the language that virtually never come up
18:11mtptomjack: now that, i'll take
18:11gfrederickstupi: clojure does not try to hide the JVM from you
18:11SegFaultAXamalloy: You haven't helped. That's just a nice detail of protobuffs in particular. But that's confusing the issue.
18:11mtpamalloy: having field widths is immensely helpful
18:11SegFaultAXamalloy: We're talking about what it means for something to be self-describing in the context of eg edn or json.
18:12amalloyi'm not trying to help mtp; the conversation you two are in is clearly a loss. i'm just informing you about protobuf
18:12tupigfredericks: undertood
18:12SegFaultAXamalloy: Oh yea, that's definitely a useful feature.
18:12SegFaultAX"feature"
18:13mtpwith field widths i can sit down and correlate values with tags
18:13llasramArbitrary plug for representing EDN in Avro via Abracad https://github.com/damballa/abracad
18:13tomjackI'm interested in the specifics of protobuf since if I use fressian I will end up having to answer "why not protobuf?" :(
18:13llasramIt's either the best or the worst of both words, depending on how you look at it
18:13llasrams,words,worlds,
18:15SegFaultAXtomjack: Binary protocols are great for performance reasons.
18:15SegFaultAXprotobuffs in particular have a lot of nice features (built in versioning, etc.)
18:16tomjackI'm not sure I like versioning
18:16SegFaultAXHow could you not?
18:16s4muelUh, yes you do.
18:17SegFaultAXThe whole point of protobuff is it can optimize the packing of your messages because it knows ahead of time of the exact structure of your messages.
18:18SegFaultAXBut if that structure needs to change over time (and it will), you need to be able to have different versions of the protocol interoperate.
18:18s4muelI would not want to think about a world in which I had to break all my clients because i added one new optional field to a message
18:18tomjackI get the story, but say I replace my protobuf messages with just maps from keywords in fressian
18:18tomjackI lose some compactness maybe
18:18tomjackbut what do I lose wrt versioning?
18:19gleagSegFaultAX: Isn't performance an issue best relegated to dynamic compilation techniques, even in this case?
18:20SegFaultAXgleag: I'm not sure what you're asking.
18:20mtpgleag: careful, he might become convinced that you're trolling
18:20gleagmtp: ?
18:21gleagSegFaultAX: The first time the library after initialization meets a structure definition, it compiles it. Then, it reuses the compiled definition. Sounds natural to me.
18:21tomjacks4muel: I'm not sure my serialization code should be concerned with that..
18:21s4mueltomjack: i am reading about fressian now. :P
18:21tomjacke.g. in my case, 'required' has been banned from .proto files, and instead applications must enforce required-ness.
18:22SegFaultAXtomjack: If you're using a binary protocol, you absolutely must be concerned with that.
18:22tomjackwhich seems like the right thing to me
18:22robbyncci
18:22gleagThe same thing would apply to interoperability: any conversion between versions of a protocol -to me at least - reminds me of such things as keyword argument defaults etc.
18:22robbync!list
18:22mtpwow i haven't seen a !list in forever
18:22gleagIt simpy sounds like an issue for a specialized minicompiler.
18:23mtpwhat is this, a 1997 xdcc chan?
18:23tomjackwhat does binary have to do with it?
18:23callenlast time I touched protocol buffers was to talk to RethinkDB. Can't say I really enjoyed it.
18:23SegFaultAXgleag: With an out of band protocol like protobuff, that isn't always possible. Sometimes there will be clients using older versions of the protocol. What should I do in that case? Drop them on the floor?
18:24gleagWhy would a support of the old protocol be an issue? Because of the need to parse it or because of the need to implement the functions?
18:24s4mueltomjack: that's not a bad idea as required is 'forever', but if you are anticipating those changes to begin with, why not just use a more flexible format like edn, etc
18:24callenprotocol buffers isn't really designed for rapid-changing, best effort communication.
18:24SegFaultAX+1 callen
18:25tomjacks4muel: well, yes, my plan is to use fressian :)
18:25callenSegFaultAX: have a pibble puppy: http://i.imgur.com/5vQZ1mf.jpg
18:26llasramtomjack: OOC, did you also evaluate Avro?
18:27tomjacknope
18:27SegFaultAXtomjack: Binary mode protocols trade off speed and overall message size for flexibility of encoding. Text mode protocols typically allow for considerably more flexible encoding at the cost of speed and size.
18:28llasramtomjack: I encourage you to take a look. IMHO it manages to combine the best features of the schema-based binary encoding systems while being friendly to use from dynamic languages
18:29llasramtomjack: It comes with support for most of the popular languages, and I hope to get Abracad rolled into upstream at some point
18:29SegFaultAXtomjack: If I have a message with a name and age field, a binary protocol would be very specific about the ordering and size of those fields in the serialized struct. A text mode protocol (json for instance) doesn't really care if its { name: "Joe", age: 16 } or { age: 16, name: "Joe" }.
18:30tupiany immediate correcponding clojure code for this: (string-split "A11.bin" #\.) -> ("A11" "bin")
18:30s4muel,(doc clojure.string/split)
18:30clojurebot"([s re] [s re limit]); Splits string on a regular expression. Optional argument limit is the maximum number of splits. Not lazy. Returns vector of the splits."
18:30SegFaultAX,(doc clojure.string/split)
18:30clojurebot"([s re] [s re limit]); Splits string on a regular expression. Optional argument limit is the maximum number of splits. Not lazy. Returns vector of the splits."
18:30SegFaultAXHeh
18:31tupigreat!
18:31callens4muel - fastest gun in the FreeNode.
18:32s4muelshazam.
18:33tomjackllasram: which features of schema-based binary encoding should I care about?
18:33Glenjaminare you wanting binary for speed or transmissions size?
18:34tomjackI don't feel like I want any schemas
18:34llasramtomjack: Well, depends on what you care about :-). They're compact in size, and efficient to both parse and generate.
18:35llasramtomjack: If those aren't useful for your applications, that's reasonable. I've gotten burned enough finding out I've stored data according to an unintended JSON structure that I've become very much a fan for non-transient values
18:38tomjack"non-transient" means.. with a schema?
18:39callenllasram: if the JSON is somehow leading to storage without cherry-picking, I usually implement some sort of fascist runtime schema checking.
18:40callenthen the "liberal in what you accept" goes out the window and paranoia becomes the order of the day :)
18:41llasramtomjack: Non-transient means "stored in a database, HDFS, or other persistent storage system"
18:41Glenjaminthe most common error with JSON-esque approaches is typoes in names of optional fields
18:41llasramcallen: Yeah, would have been a good idea, but with schemas you get that for "free"
18:41Glenjaminbut thats fairly rare
18:42callenllasram: JSON is familiar and easy, and if all I am doing is adding a schema after the fact, not at the conceptual stage, I'm not going to change a bunch of other things when all I wanted was a schema.
18:42callenI don't change the format until something other than schema enforcement speaks for it.
18:44llasramcallen: Fair enough. I've currently decided that the benefits of a richer serialization system (tagged types, binary values) and compact encoding (mostly for Hadoop I/O performance) are worth it
18:44callenllasram: yeah I'm talking about a slightly different set of parameters. That makes sense.
18:45callenllasram: I was talking to some Clojurians at a meetup recently, they were stashing JSON in HBase.
18:45callenI haven't done a lot of HBase so I was wondering what the expectations WRT queryability were there.
18:46callenI've done Hadoop and map-reduce, just not HBase. Got close to storing roll-ups in it though.
18:46llasramcallen: Hey, if that works for them :-). I'm actually working on migrating a system from CouchDB to HBase right now, and that was an option on the table.
18:47llasramcallen: Eh. For HBase it's all about your key design, which pretty much needs to be custom to support whatever queries you want. So serialization and query-ability are pretty much orthogonal
18:47callenllasram: please let me know the outcome of that, I've worked with CouchDB before and hated-hated-hated it.
18:47callenllasram: okay, that's what I suspected. So you just have to roll-up your data into the various keys that match your query strategy, kinda like how many redis users do?
18:48llasramcallen: Sure thing. My experience with couchdb has actually been pretty positive -- we're just outgrowing a single node and have already settled on HBase for some other systems
18:48callenllasram: I was working with a large cluster used for analytics. it was pain/hell itself.
18:48llasramcallen: I'll say "yes", although I don't have direct experience w/ redis to say
18:49callenllasram: well take it for granted that redis is a straight-forward kv store, has some nice data structures, but you still have to plan ahead for query patterns.
18:49llasramcallen: Ah, gotcha. Then un-quoted yes :-)
19:15indigocallen: Working on that clauth thing right now :P
19:21sinistersnarehello, does anyone have any recent examples (and possibly an article, if thats not too much :p) of using libgdx in clojure?
19:21sinistersnarei just finished updating this article on the new libgdx wiki https://github.com/libgdx/libgdx/wiki/Using-libgdx-with-other-jvm-languages and was hoping for some help!
19:23mdeboardI don't really understand core.async, at least in cljs, I don't think. Basically you have to have one god-function that inits all the chans you're going to need, and then passes them to consumer and producer fns that read from them in a while loop or something?
19:24mdeboardLike I want to have a chan for keypress events, so I assume I'll need a fn to put event data onto the channel, and one to pull event data off, right
19:25mdeboardisit just like (def keypress-chan (chan))
19:25mdeboardand pass that around, I'm probably an idiot
19:26Glenjaminmdeboard: i belive the idea is to have the keypress handler put a "keypress" message on some sort of "application input" channel
19:27mdeboardRight, so is there a channel consumer out there with a `(while true (keypress-handler (<! input-chan)))` loop
19:28mdeboardI'm much more familiar with network asynchrony, where the queue pings the consumer or the consumer polls the queue to check for new stuff
19:28mdeboardNot understanding the equivalent interchange in intraprocess asynchrony
19:35chordanything new in clojure land
19:35callenchord: libraries are awesome.
19:35chordcallen MY BUDDY
19:36chordyou still not willing to work on starcraft clone?
19:36callenchord: DUUUUUUDE
19:36callenchord: NOT FOR FREEEEEEEEE
19:36chordyou're getting paid when we sell the game
19:36callenchord: I'm an expensive companion :(
19:36chordyou get half ownership
19:36callenchord: "when we sell the game" don't pay the rent son :)
19:36callenI can't offer my landlord fractional ownership :P
19:36chordyou gotta have entrepeneur spirit
19:36chordbe a risk taker
19:37callenif it's about entrepreneurialism, I'll just go do things for businesses with money.
19:37callenthey will pay very well for you to solve their problems. That sounds nicer.
19:38chordbut don't you want all the loser nerds to thank you and spam you with email adoring you for how much they love the game you made
19:38callenNo, actually.
19:38chordyou're letting down all the nerds :(
19:39chordcallen: look if these guys have the confidence to be able to do it then so can you, https://artillery.com/
19:40callenit's not about confidence, I just find helping people make money a lot more compelling than helping people waste their lives on video games.
19:40indigoOh man, the troll again
19:41chordindigo I'm not a troll anymore
19:41mdeboardAny idea why 'speedometer' here https://gist.github.com/mattdeboard/c887905c0ee5b095bb70 isn't printing `1` or `-1` to console as expected?
19:41mdeboard(Take it for granted that events are registered properly, that definitely works)
19:42devnw/r/t the EPL -- in Clojure's src I see comments saying (C) Rich Hickey, etc. If I'm going to repurpose someone else's code who is also under the EPL but does not include that comment at the top of their file, is it assumed that it's there? What's proper?
19:51chordGood news I started reading chapter 12 of Learn You a Haskell
19:52chordwhy isn't there a book called Learn You a Clojure
19:54AimHereBecause the Learn-You-A-Haskell guy didn't write it, and anyone else would have trademark problems?
19:55chordso how about you and callen write the book
19:55chordso I can read it
19:55chordits guaranteed to sell
19:55llasram*plonk*
20:00callenI'm actually working on a LYAH-esque Clojure book.
20:00callenbut that has nothing to do with the troll.
20:00callenuhhh...have a puppy: http://i.imgur.com/ACkKMZt.jpg
20:00sinistersnareo my god thats so cute
20:03indigoWeird... sometimes clauth's token tests fail, other times they don't
20:03chordcallen: send link to github draft of the book please
20:09callenchord: you haven't shown me any of your code yet
20:09chordcallen: I want to read your clojure book to LEARN clojure, how can I have any code when I haven't learned clojure
20:10callenI have very little material prepared, I'm not going to start producing content in earnest until after Clojure Cup.
20:11chordomg why are you wasting time on clojure cup
20:12callenbecause I have a project I want to do anyway.
20:12callenand it's a decent fit for Clojure Cup.
20:12chorddoes it make money?
20:12callenI'm also kinda competitive.
20:12callenwas it with you and money?
20:12callenyou have a seriously unhealthy obsession.
20:12chordyou're the one that refused to make the game because of money
20:12chordnot me
20:12chordAH HA I CAUGHT YOU IN A SELF CONTRADICTION
20:14callenI said I didn't find investing my time in giving other people a better mouse-trap for wasting their lives was compelling.
20:14callenAnd if you check the back-log, you'll notice I said I was inspired by helping other people make money. :)
20:14callenalso it's just a contradiction, a self contradiction is a statement that contradicts itself. Somebody who contradicted themselves is caught in a plain old contradiction.
20:15arrdemcallen: I appreciate your picture. greatly.
20:15callenarrdem: good. I appreciate puppies.
20:15callenI choose my friends on the basis of which ones own dogs that I can hang out with.
20:16callenSegFaultAX: :)
20:16chordcallen: you know you should be working on the book instead of clojure cup because the book will give people the skills to inspire themself to make money
20:16chordAH HA try to get out of that one
20:16callenthe project for Clojure Cup will not only save people money, but help them make a lot more money too.
20:16arrdemchord: that just makes no sense at all
20:16arrdemcallen: well played
20:16callenit's a project that I've wanted for my own use, but I want to make it available to others too somehow.
20:17chordcallen: whats the project then
20:17callen'tis secret. You're not part of my elite Clojure Cup team :)
20:17chordarrdem: see he can't tell because he doesn't have one
20:17callenanybody that was at the San Mateo Clojure meetup knows what I'm working on.
20:17callenincluding... alexbaranosky.
20:18callenit's not actually secret, I just like jerking the troll around :)
20:18arrdemchord: the atx-clj team and I already have our own blackops teams, I'd be amazed if callen didn't too
20:18callenarrdem: most of the people I wanted to recruit refused on the basis of who some of the judges were.
20:18callenI'm a little sad about that :(
20:19arrdemcallen: loooooool
20:19callenarrdem: so if you get any people looking for a team, please send them my way. :)
20:19arrdemcallen: sorry, we got seven people running two teams. :/
20:20callenI'd better learn to do visual design then, looks like it'll be just me.
20:20arrdemcallen: just throw twitter bootstrap at the wall until it sticks and call it programmer art
20:20Glenjaminbe different, use foundation
20:20callenI already use Foundation, actually.
20:20callenIt's my preferred frontend framework because it's easier to customize.
20:21callenbootstrap is a PITA to change later on.
20:21Glenjaminmm, i use bootstrap for internal facing / admin interfaces, foundation for anything facing people
20:21callenI use foundation for both. I'm not willing to punish my coworkers with bootstrap.
20:21Glenjaminheh
20:22Glenjamini just got our guys to change 4 or 5 admin interfaces from "not styled" to bootstrap
20:22Glenjaminits better than what they were doing before
20:23calleno lawd
20:23Glenjaminclojure cup sounds fun, do you reckon the organisers would be annoyed if i sign up then discover i can't fit enough time in next weekend?
20:24callenthere, just ordered the domain for my book.
20:24callenGlenjamin: I think they're expecting it. You could join my team as a "maybe"!
20:24chordcallen: you afraid that I was going to steal the domain?
20:24callenthere is no way you would've guessed what I picked.
20:24Glenjamini've got an app idea that in theory is doable in a weekend if i don't bikeshed
20:25arrdemI think we've already registered ours...
20:25chordif its not about learn you a clojrue then its no good
20:25Glenjaminbut feel free to throw me an invite, i can't promise availability
20:25indigoWtf... an atom pointing to an atom
20:25callenindigo: http://c2.com/cgi/wiki?ThreeStarProgrammer
20:25arrdemindigo: someone must be blamed for this.
20:26callen,(:a @@@(atom (atom (atom {:a 1}))))
20:26clojurebot1
20:26callenglorious abomination.
20:26arrdemcallen: no. wrong. out of the channel.
20:26arrdem:p
20:27indigoMore like... a defonce'd atom pointing to a record which uses an atom to store data
20:30indigoOh I see what he tried to do here... I guess it makes sense
20:32chordcallen: i'm going to make learn you a clojure book and kill your book off
20:32callen"kill"
20:32arrdemchord: .... I thought you wanted his book so you could learn in the first place ....
20:32chordI'll learn from another book
20:32callenarrdem: if it means there are two free books for learning Clojure, then whatever.
20:33chordand then ddos your book's website to make it dead
20:33callenright.
20:33arrdemcallen: I'm just sitting here with popcorn laughing
20:33callendon't say that, I've been cutting the last month and I'm starving.
20:33callenbuttery popcorn *_*
20:34arrdemcallen: eep. sry
20:34callenarrdem: oh 'tis fine. :)
20:34chordarrdem: is too lazy he'll never make the book, the only way to get him going is through a race with another book
20:34chordyou know i'm right
20:36callenstarting to think chord is a karmic punishment for all the trolling I did on twitter.
20:36arrdemcallen: this is what you get for abusing mongodb to up your klout score
20:37chordmongodb is horrible
20:37chordwhy would anyone choose it
20:37mdeboardbecause they hate their company
20:37chorduse postgresql
20:37chordor voltdb
20:37callenarrdem: that's kinda what happened. I also troll Haskell users to up my klout score.
20:37arrdemno, because at scale N=1 it doesn't **** matter
20:38callenI'm a bad person ;_;
20:38callenI think I'm at 45 or so.
20:38arrdemcallen: yes, yes you are. but you're witty about it so you fit in well here.
20:44chordcallen tell me the project NOW
20:50indigoOh I see what he tried to do here... I guess it makes sense
20:51indigoWhoops, up arrow fail
20:57mdeboardCan anyone explain to me why https://gist.github.com/mattdeboard/cd6472f952d48ac5673b isn't logging "hello!" to console?
20:58chordask callen hes the "expert" at clojure
20:59callenmdeboard: are you using the latest clojurescript?
20:59callenmdeboard: there were changes in cljs and core.async recently that broke something.
20:59callendnolen can say more.
20:59mdeboardcallen: ` [org.clojure/core.async "0.1.222.0-83d0c2-alpha"]`
20:59mdeboard0.1.0 was unavailable.
20:59mdeboardthis was the only version I could find on clojars or maven
20:59callenmdeboard: latest clojurescript.
21:00mdeboardoop, copied wrong line
21:00mdeboard [org.clojure/clojurescript "0.0-1889"]
21:01mdeboardSo it looks like it from github
21:01callenmdeboard: https://groups.google.com/forum/#!topic/clojurescript/qnRQdmu5yT8
21:03mdeboardcallen: I've noticed some of those issues, mostly around wonkiness wrt compilation artifacts, but I do `lein cljsbuild clean && lein cljsbuild once` and that takes care of most of it. I just straight up can't get even *extremely* simple examples to work with core.async
21:04callenmdeboard: the clojurescript change that I described broke a lot of core.async stuff, dnolen was in here not too long ago explaining how to checkout master.
21:04mdeboardah I see
21:04mdeboardWell that's a bummer.
21:04callenmdeboard: I strongly suspect you'll need a checked out master of cljs and/or core.async.
21:05callencore.async and cljs are both not stable.
21:05mdeboardWasted an evening on it :(
21:05callencore.async especially.
21:05mdeboardAll fired up after strangeloop & seeing rhickey talk about it.
21:05callenmdeboard: it's a recent blip.
21:05callenmdeboard: normally both work fine, all the time.
21:05callenmdeboard: but cljs changed a bunch of stuff recently. it'll stabilize again soon. I use core.async quite a lot, myself.
21:05mdeboardhow earlier was earlier
21:06callenit started breaking when that cljs release was made. it was just unfortunate timing.
21:06chordcoffeescript > clojurescript
21:06mdeboardwhich 1889?
21:07callenmdeboard: did you read the thread I linked?
21:07callenthat's the release and that's when core.async issues were first reported.
21:07mdeboardyeah, honestly my brain is smoked atm, seriously been jamming it into this belt sander of a browser
21:07mdeboardfor hours
21:08callennew people should come to IRC for help sooner than that.
21:08mdeboardcore.async has been broken for two weeks?
21:08mdeboardI asked several times, no one answered. IRC's an asynchronous medium, no point in sticking around for answers
21:08callenit's not broken
21:08callenit works fine in Clojure and Clojurescript, but you need the master of CLJS and/or core.async
21:09callenI must've missed your messages. regrettable.
21:09callenit works fine in Clojure 1.5.1 with any version.
21:09chordjust use coffeescript, it is not broken, it works
21:09callenand ignore the troll.
21:09mdeboardWell, that's fine, but the pitch of core.async is literally 50% about clojurescript.
21:09mdeboardI put him on ignore like 20 minutes ago
21:10mdeboardI'm just a little frustrated, shit happens.
21:10callenmdeboard: I am sorry nolen didn't ask Hickey permission to keep making changes to CLJS
21:11mdeboardLike I said, shit happens.
21:11callenthe changes in 1887 were fairly major and important.
21:11callenwell when it comes to core.async, usually they don't.
21:11mdeboardJust disappointed.
21:11callenthis is the first time I've seen it break.
21:12mdeboardAnd relieved actually
21:12callenthere's nothing to be disappointed in, it works fine
21:12callenyou're just being impatient and refusing to use the versions that work.
21:12mdeboard:|
21:12mdeboardWhat?
21:12clojurebotWhat is 2d6
21:12mdeboardWait, who's the troll
21:12mdeboardam I being trolled?
21:12callenI have said repeatedly you need the HEADs of one or the other. I can't remember exactly which.
21:12callenI'm quoting from what I saw dnolen helping other people with.
21:13callendo you want me to do it for you?
21:13mdeboardRight, I just have no idea how to check out a clojure/script module to my classpath
21:13callenI can checkout master of each and test your example.
21:13callenmdeboard: are you using lein-cljsbuild?
21:13mdeboardfrom github*
21:13mdeboardyeah
21:14callenI am in the middle of a DotA game (alt-tabbing), I'll replicate after.
21:15callenbut you're probably going to end up lein installing the git masters.
21:15callenor something.
21:16chordcallen add me as friend on warcraft 3
21:16callenchord: go away
21:16chordwhy you hurt my feelings
21:17callenyou're a troll and constantly harass people on here.
21:18mmarczykmdeboard: you can just keep using a slightly older version of ClojureScript
21:18callenmdeboard: I get that you're frustrated. I'll see if I can reproduce your problem.
21:18mmarczykmdeboard: (if I understood correctly that you're trying to get cljs core.async to work)
21:19mdeboardmmarczyk, callen: I used git-dependencies in my project.clj, but it looks like cljsbiuld just added a different (older/known good?) version itself.
21:19callenmmarczyk: that's right.
21:19mmarczykcallen: thanks
21:19mdeboardThere we go, goroutines work now.
21:19mdeboardbrilliant
21:20mdeboardholy shit it works
21:20mdeboardI'm not an idiot
21:20mdeboardI mean, not that much of one
21:21lunkmdeboard: those 'aha' moments pretty much rule ;)
21:21mmarczykmdeboard: amazing stuff, no? :-)
21:21callendoes this mean I can stop losing in my DotA game?
21:21mdeboardWasn't really an aha moment, unless you're talking about the "aha" moment I had when callen told me the "recommended" version number was borked
21:21mdeboardno
21:21lunkcallen: no, someone will always hate you and get with your mom, on principle.
21:22callenmdeboard: so just so I can tell future troubled programmers, what fixed your problem and what was the broken state? briefly please.
21:22lunkcallen: LoL world championship group play has been awesome. I'll stop with the offtopic chat though
21:22mdeboardRemoved the clojurescript dependency from :dependencies
21:22mdeboardcljsbuild installed one itself.
21:22mmarczykmdeboard: that's basically going back to an older one
21:22callenwhich is fine.
21:22mdeboardOh, but I also had to delete ~/.m2/repository/org/clojure/clojurescript/
21:22callenhe doesn't need the magical keyword support.
21:23mmarczykmdeboard: 0.0-1859 currently
21:23mdeboardmmarczyk: Yeah
21:23mdeboardI wonder where I got 1889? I bet I looked at maven
21:23mmarczykor ggroup
21:23mdeboardsince there's not a "do this" thing in the readme
21:26mdeboardMan I really thought I wa smissing something obvious, this is a huge relief.
21:32lordQuasAnyone know how to use the clojure.contrib libraries with emacs nrepl? If I do good old (require 'clojure.contrib.math) I get class not found error. Thanks!
21:33mdeboardlordQuas: Clojure contrib has been deprecated for a long time
21:33mdeboardlordQuas: http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go
21:33callenwe're going to be saying this for years.
21:34lordQuasmdeboard thanks for the heads up, learning clojure and I was trying to find out how to do a simple square root. Stack overflow told me to use clojure.contrib.math.
21:35callenStack Overflow doesn't work well for things that change.
21:36Glenjamindoes it make sense to use core.async only in small isolated areas of code?
21:36callenGlenjamin: that's what I do.
21:36callenGlenjamin: I use it to marshal data from callbacks.
21:37Glenjamini've got a clojure app, but the only areas of concurrency are the web requests, and i've got one place where i make 3 HTTP calls at once
21:37callenlordQuas: https://github.com/clojure/math.numeric-tower
21:37Glenjaminand i hid that behind a parallel-let which is implemented as a macro to make futures
21:37callenGlenjamin: eh. Yeah futures are usually the way to do that. I'm a little o_O at your parallel let thing
21:37callengenerally you want the use of futures to be explicit.
21:38Glenjaminit's basically (plet [a call1 b call2, c call3] (render a b c))
21:38callenGlenjamin: you can use core.async in the place of futures, but your use-case doesn't sound very compelling.
21:38callenI was in a situation where I was forced to use callbacks, that's why I needed core.async
21:38callengenerally that's when you use core.async
21:38callennot when a future by itself would suffice.
21:38Glenjaminmm, not really run into that yet
21:38lordQuasSo do I have to use java.lang.Math to do a simple square root?
21:39GlenjaminlordQuas: you could raise to the power of 0.5
21:39callenlordQuas: and a programming language, and a computer, and a keyboard. and power. and electricity.
21:39Glenjaminoh, thats also Math
21:39callener, flatten power and electricity to the same thing.
21:40callenmdeboard: http://rigsomelight.com/2013/08/12/clojurescript-core-async-dots-game.html
22:00chordlets talk about something
22:01mdeboardcallen: yeah, was poring over that earlier. Nothing helps though when there's a library inconsistency
22:01mdeboardchord: I actually like coffeescript :)
22:01callenarrdem: how do you like Austin anyway?
22:01callenCoffeeScript is for muggles.
22:01RaynesYou like that word, don't you callen?
22:01RaynesMuggles.
22:02chordcoffeescript is good why would anyone want to deal with javascript's syntax
22:02callenRaynes: not my fault it fits so well.
22:02Raynesmmarczyk: How's things, pardner?
22:21chordok lets talk about cool stuff
22:21chordso that we can pretend we are cool
22:34chordwhy are you all ignoring me
22:35FrozenlockBecause we are already cool. :p
22:36FrozenlockHmm... I included a nrepl in a little standalone uberjar, but when I connect to it using nrepl.el, I get an error when using tab (autocomplete). ----> java.lang.ClassNotFoundException: complete.core
22:37FrozenlockIs this some components I forgot to include in my project dependencies? :-/
22:38callenusing nrepl in an uberjar is really strange.
22:38callenuberjar compilation won't include stuff from your user/dev profile or anything related to Leiningen plugins
22:38callenwhen you call lein repl, you're not just getting your project dependencies.
22:39chordcallen: what is your favorite game?
22:39znusgyHow would you change a map {:a 1 :b 2} to a flat vector [:a 1 :b 2]? (vec (apply concat {:a 1 :b 2})), or is there something better?
22:39Frozenlockcallen: OK, so complete.core is most probably a dependency added by Lein that I should add manually.
22:40callenFrozenlock: if you want to persist with this weird uberjar repl thing, then yes.
22:41Frozenlockcallen: You say it's weird, but it's actually a described case in https://github.com/clojure/tools.nrepl :-/
22:42callenFrozenlock: usually you don't embed an nrepl server until you understand Leiningen, dependencies, and nrepl.
22:43callenit's something "advanced" users will do for deployed applications.
22:48FrozenlockYou're saying a uberjar is not a deployed application?
22:49callenI'm saying people who don't understand Leiningen, dependencies, or nrepl usually don't need uberjars.
22:49callenor uberjars with working embedded nrepl servers.
22:49callendoes anybody know a good flow-charting app on the app store?
22:50lordQuascallen I use touchdraw on the ipad
22:51lordQuasmore robust than just flow charts though
22:51lordQuasDoes anyone know how to make 'map' keep going if one of the collections is smaller than the other (fillin in with nil or something)
22:52Frozenlockcallen: Ok, *assume* for a moment that I understand Lein, dependencies and nrepl. The autocomplete function missing is most probably loaded by Leiningen and I should be able to find from which library it is by looking at Lein source. Correct?
22:52chordcallen: how much do you charge for clojure tutorial?
22:52callenFrozenlock: complete/core was missing, yes?
22:53FrozenlockThat was the error message, yes.
22:55callenFrozenlock: so, I did some googling based just on your textual description
22:55callenFrozenlock: I'm trying to decide if you should just do the same googling I did, or if I should give you the link.
22:55callenI think if you buy me a blueberry-flavored slushie, we could have a deal.
22:56callenFrozenlock: deal/no deal?
22:56Glenjamineugh blueberry sucks
22:57callenFrozenlock: fine fine, here it is. https://github.com/clojure-emacs/nrepl.el/issues/318
22:58Frozenlockcallen: Thanks.
22:59FrozenlockJust found this browsing Lein https://github.com/technomancy/leiningen/blob/6853a511f9f68264a9fefd9c706b51faae13fc94/leiningen-core/src/leiningen/core/project.clj#L367
23:00callenFrozenlock: yes. reading the code. Keep doing that
23:00callenFrozenlock: I will expect my slushie to arrive by flying monkey.
23:01FrozenlockMight be by flying koopa. I'm out of monkeys.
23:02callenkoopa works :)
23:03FrozenlockNew uberjar done; works like charm. :D
23:04callenFrozenlock: good :)
23:08munderwoHi all. Im just starting out with clojure. Im updating the dependencies in the project.clj and notice that I can't not put a version number in. I think this is a good idea, but is there a way to just say, give me the latest version of a lib?
23:10callenmunderwo: don't do that.
23:11munderwook, so how do you find out the latest version? do you just have to look up the project?
23:11callenmunderwo: yeah, just google for the github repo or check clojars.
23:13munderwocallen: ok. I understand why you wouldn't just get the latest in a production app. Im just starting out and making faux apps at the moment, and it would be helpful to be able to go "just get me the latest". but thats cool. There i a discipline that I like in it. A tool to do it would be helpful tho.
23:14Frozenlockmunderwo: I think there's a 'snapshot' option for that. But I've been out of the Clojure game for a while. :-/
23:14munderwoFozenlock: the snapshot is in leon?
23:14munderwosorry leon?
23:14munderwoGAH! lein?
23:15chordfrozenlock you want to make a starcraft clone in clojure?
23:15lordQuaschord: that would be incredible
23:15chordFINALLY SOMEONE THINKS THE IDEA IS GOOD
23:15lordQuaschord: BUT every unit has its own thread with its own ai
23:16chordwhy is that so critical
23:17Frozenlockmunderwo: I really don't remember. I just have a vague idea that there was something for when you are fiddling with your own little dependencies. Perhaps the snapshots in the version number just allows to upload a new version to clojars without changing the version number each time.
23:17lordQuasIm proposing to do something similar in a game design grad school course
23:17chordwhich is?
23:17Frozenlockchord: I really don't have the knowledge nor the time for that :p
23:18lordQuasWar game where each unit is fierciely independent and intelligent, choosing at random (or not) from a personality set
23:18lordQuasYeah, not a starcraft clone at all actually
23:18lordQuasEither way I love starcraft
23:19chordlordquas rts only
23:25munderwon00b question: when do you use :require and when do you use :use ?
23:25Glenjaminalways use :require
23:25carlosgaldinoanyone knows how to get code eval'd on vim? I looked at vim-fireplace and vim-classpath but they require to have lein project or a main function
23:26carlosgaldinoI was looking for something that didn't require any of this
23:26carlosgaldinolike, if I throw a couple of functions, write some expressions, like a script. I wanted to see that eval'd
23:27lordQuasmunderwo: http://stackoverflow.com/questions/7143406/what-are-the-differences-among-require-import-and-use
23:27lordQuasCan somebody explain an idiomatic way to use 'map' with different sized collections?
23:28munderwolordQuas: thanks. that was the definition of "here let me stack overflow that for you"
23:29lordQuasmunderwo: Somebody needs to write a "here let me stack overflow that for you"
23:29munderwolordQuas: yup, would be totally awsome
23:35fkeyGiven two vectors, [a b] and [c d], is their a built-in function to combine them to get the result [a b c d] ?
23:37metellus,(veccat [1 2] [3 4]) ; maybe
23:37clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: veccat in this context, compiling:(NO_SOURCE_PATH:0:0)>
23:37metellus,(concat [1 2] [3 4]) ; maybe
23:37clojurebot(1 2 3 4)
23:38lordQuas(into [] (concat [1 2] [3 4] [5 6]))
23:38lordQuas,(into [] (concat [1 2] [3 4] [5 6]))
23:38clojurebot[1 2 3 4 5 ...]
23:38fkeyah, just found into right before i alt tabbed. Thanks! =)
23:38lordQuasyup
23:39lordQuasCan sombody please tell me how to use map with different sized collections haha? This has been driving me crazy all day!
23:39fkeymetellus: thanks too, going to do some research whats the difference now
23:40metellusconcat returns a list instead of a vector
23:40fkeyaah
23:40metellus,(apply vector (concat [1 2] [3 4])) ; this will get you a vector
23:40clojurebot[1 2 3 4]
23:41fkey(into nil [1 2 3])
23:41fkeyoops
23:41fkey,(into nil [1 2 3])
23:41clojurebot(3 2 1)
23:41fkey,(into [] [1 2 3])
23:41clojurebot[1 2 3]
23:44technomancyheh; from #emacs: "Omit needless forms" -- (and strunk white)
23:47carlosgaldinotpope: is there a way to use vim-fireplace, vim-classpath with a regular clj file that's just a bunch of function definitions, more like a script?
23:50carlosgaldinostandalone clj file, not attached to any project or anything
23:55lordQuastechnomancy: down with forms!
23:56lordQuascarlosgaldino: I know you dont want to hear this, but emacs evil-mode has come a long way!
23:57Glenjaminoh technomancy, someone told me you have / are working on something to allow multiple versions of the same dependency at the same time
23:57Glenjaminis this true?
23:57carlosgaldinolordQuas: I'm new to this so I don't understand what you're saying
23:57carlosgaldinolordQuas: what does that mean?
23:59lordQuasare you married to using vim? If not, emacs has incredible support for clojure. If you are married to vim, then emacs evil-mode is a way to keep all your vim key-bindings with emacs.
23:59carlosgaldinolordQuas: and in emacs there's a way to eval clojure without needing to have the code inside a leinigen project?
23:59lordQuasYes