#clojure logs

2014-11-27

00:58mcblumpersonhey malakas
01:19postpunkjustinIs (go (while true ...)) considered an idiomatic way to read from a core.async channel?
01:20postpunkjustinI mean, to repeatedly take from that channel
01:20postpunkjustinI'm looking at this specifically and it just seems... odd: https://github.com/clojure/core.async/blob/master/examples/walkthrough.clj#L91
01:22tomjackpostpunkjustin: that example assumes the channels never close, I think
01:23postpunkjustinYeah, I'm not super excited about making that assumption.
01:24justin_smithyeah, it should be (while-let ...) I would think
01:25postpunkjustinjustin_smith: yeah, that sounds perfect
01:25justin_smithif there were such thing as while-let
01:25tomjackone possibility is (go-loop [] (if-let [x (<! ch)] (do (stuff-with x) (recur)) (done)))
01:25postpunkjustinthere easily can be
01:26justin_smithfair point, yeah :)
01:27postpunkjustintomjack: That'll definitely work. Is it just me, or is that hella Erlangish?
01:28tomjackdunno, but that might be appropriate if erlang is a language designed for communicating processes :)
01:28postpunkjustinYeah, not an insult by any means. It's just eerie.
01:35postpunkjustinYep, while-let works great. Thanks!
01:56dmahantawhy does group-by on a list returns a null (group-by :a ({:b 1 :a "User1"} {:b 1 :a "User1"} {:b 2 :a "User2"}))
01:56dmahantabut if i do this i get values (group-by :a [{:b 1 :a "User1"} {:b 1 :a "User1"} {:b 2 :a "User2"}])
01:56dmahantai am trying to group-by a result from zipmap
01:57dmahantawhich lways returns a ()
01:57postpunkjustinIf you don't quote that list of maps, it uses the first map as a function
01:58postpunkjustin,(group-by :a '({:b 1 :a "User1"} {:b 1 :a "User1"} {:b 2 :a "User2"}))
01:58clojurebot{"User1" [{:b 1, :a "User1"} {:b 1, :a "User1"}], "User2" [{:b 2, :a "User2"}]}
02:02TEttinger,(group-by :a [{:b 1 :a "User1"} {:b 1 :a "User1"} {:b 2 :a "User2"}]) ; vectors are more idiomatic in clojure
02:02clojurebot{"User1" [{:b 1, :a "User1"} {:b 1, :a "User1"}], "User2" [{:b 2, :a "User2"}]}
02:05dmahantathanks got it
04:17dysfunis there any documentation on how clojure implements persistent maps?
04:17dysfuni was about to resort to reading the code but would prefer something a bit more designed for humans than computers
04:20dysfunaha, i've found http://lampwww.epfl.ch/papers/idealhashtrees.pdf, which is apparently what they're based on
04:22luxbockdysfun: there's also this blog post: http://blog.higher-order.net/2009/09/08/understanding-clojures-persistenthashmap-deftwice.html
04:22dysfunthanks
04:25Glenjaminhttp://hypirion.com/musings/understanding-persistent-vector-pt-1 is good for vectors
04:27akkadI don't how people debug these sorts of errors https://gist.github.com/fa2a102a4427aa22fa33
04:36dysfunoh wow, that's special
04:36dysfuni think too much of the java stack is layered with too much magic :/
06:32mandelumHello, complete noob here, I would like to see how you could cycle through the themes in lighttable with some simple code? anywone wants to help?
06:32mandelumso that you could cycle though all themes supefast
06:34mandelumI know enough about clojure to know that there is some super clean and elegant way of doing this, but I have never actually coded in clojure
06:35luxbockmandelum: seems like this would be more of a LightTable question than a Clojure one
06:36mandelumbut I am quite sure it is possible with like one line of code, no?
06:36mandelumyou change the string in the end of this line [:editor :lt.objs.style/set-theme "default"]
06:39luxbockyeah I have no experience with LT so I don't really know how it would work
06:39plllxM why do you want to cycle through themes
06:40plllxlike to identify one that you want or something?
06:42TEttingermandelum: I imagine you'd define a hook or whatever LT calls user scripts
06:43mandelumprobably, but no big deal
06:43mandelum:)
06:51TEttinger(lt.objs.style/set-theme (rand-nth (lt.objs.style/get-skins)))
06:51TEttingermandelum, that should set the theme to a random theme from the installed list of themes
06:51plllx:)
06:53TEttingeryou can stick that line in a command, https://github.com/LightTable/LightTable#commands (in the :exec stuff, after the (fn [] )
06:53TEttingerbut I must go to bed
06:56martinklepsch[humor/OT] Hello World, Enterprise Edition http://wiki.jetbrains.net/intellij/Developing_and_running_a_Java_EE_Hello_World_application
07:16trisshey all. if I've got an atom whose value is true or false whats the simplest way of setting it?
07:17trisscurrently i do:
07:17triss(defn recording-on [] (swap! recording (fn[r] true)))
07:17trissis there a neater way than using swap? I don't need to check what the value is currenlty
07:20opqdonuttriss: reset!
07:21opqdonut,(doc reset!)
07:21clojurebot"([atom newval]); Sets the value of atom to newval without regard for the current value. Returns newval."
07:30trisscheers opqdonut!
07:39xelxebarPlaying around with lein-oneoff. Can't seem to get the dependencies to be resolved. Trying to run the example on the oneoff github page throws complaints about how compjure isn't found.
07:40xelxebarcompojure*
07:42clgvmartinklepsch: but seems to be informative on how to setup such an application skeleton
07:43clgvxelxebar: what's the error message?
07:50xelxebarclgv: Thanks for the help. Essentially "Could not locate compojure/core__init.class or compojure/core.clj on classpath"
07:51clgvxelxebar: nothing else before that?
07:53xelxebarclgv: Well, here's the whole stacktrace http://cwillu.com:8080/118.241.146.97/6
07:54xelxebaroneoff is supposed to pull deps in to $HOME/.m2 I think and automagiacally set up your classpath from there
07:55clgvxelxebar: that example works like a charm here
07:55xelxebarIf I've only got the org.clojure/clojure dep then things seem to run fine
07:56clgvxelxebar: did you copy the whole thing including defdeps?
07:57clgvxelxebar: I updated the deps to most recent versions - still works
07:58xelxebarclgv: Here's the file http://cwillu.com:8080/118.241.146.97/7
07:58clgvxelxebar: did you try running it as "lein oneoff example.clj"?
07:59xelxebarclgv: yeah. I thought that maybe the shabang thing might have been screwing it up too
08:00xelxebarThing is, if I strip it down to just the org.clojure/clojure dep then it's fine. (println "Hello, World!") and all that work as expected.
08:00clgvxelxebar: what does "lein version" say?
08:01xelxebarclgv: Leiningen 2.5.0 on Java 1.7.0_71 OpenJDK 64-Bit Server VM
08:01clgvok
08:05xelxebarclgv: Any other tests you can think of to pin this down? I've evidently got something snafu'd.
08:06clgvxelxebar: no. no idea.
08:06clgvxelxebar: it worked out of the box here. I have never use lein oneoff before
08:12xelxebar:(
08:13clgvxelxebar: well, you can delete the ".m2" folder to start fresh. but all deps need to be redownloaded then
08:15xelxebarclgv: Tried it out. Works with a hello world but not with the example. :-/
08:16clgvxelxebar: is compojure downloaded to .m2
08:20xelxebarclgv: oddly enough, yes. as well as ring-jetty-adapter. versions match versions in example
08:30clgvxelxebar: regular projects are out of question? clojure isnt that well suited for cli scripts because of its startup time
08:32xelxebarclgv: I'm just mucking about with Project Euler. Seems a bit much to have 10s or eventually 100s of lein projects just for one off files really.
08:33xelxebarIt's doable, but then I feel like I'm just circumventing a problem. lein oneoff should really be running regardless!
08:36clgvxelxebar: just create one project for all of your project euler stuff. one namespaces per exercise should work to structure it
08:36Morgawrjust use a repl to call into specific problem solutions :)
08:36Morgawrthat's what I did last time, at least
08:36clgvxelxebar: do you really need dependencies for project euler?
08:37clgvxelxebar: does project euler use a recent clojure version?
08:38Morgawrclgv: project euler is a website that gives out math/programming problems and you need to solve them to provide a solution.. I don't think "it" runs anything
08:38Morgawrit's up to you how you solve them
08:39ennI'm having a hard time understanding the use case for clojure.tools.trace/trace with a value. It just prints the value? How is that different than println?
08:39clgvMorgawr: ah ok. didnt they have runtimes up there?
08:39clgvMorgawr: I thought it was similar to 4clojure or spoj
08:40clgvenn: it traces nested calls, right?
08:40Morgawrclgv: not last time I checked (that is, 2 years ago)
08:40Morgawrit's just a text form where you input your solution (usually a number)
08:40xelxebarclgv: No. The "project" is implementation agnostic. It's just a collection of cool problems.
08:40clgvMorgawr: well they have not much info for people without an account, so I couldnt find out ;)
08:40Morgawryeah, it's super secret club :P
08:41xelxebarEeeeeuuuuuuler and the iluminati, man.
08:41xelxebarReally though. This is vexing that I can't add deps to a oneoff. :-/
08:42xelxebarWish I know how to go about troubleshooting this.
08:42clgvxelxebar: you got the latest version?
08:42xelxebarclgv: of oneoff and leiningen? Yeah.
08:42clgvxelxebar: just create one project. it is a onetime effort that take much less time than you already spent on lein oneoff ;)
08:43xelxebarclgv: Yeah, that might work.
08:43xelxebarclgv: But then I feel like I'm just shoving a latent problem under a rug...
08:46clgvxelxebar: not really. since lein oneoff is an additional plugin from a third party
08:48xelxebarclgv: Well, oneoff isn't working, but we don't know *why*. The root cause could lead to problems down the line.
08:48xelxebarclgv: Also, this is an opportunity to figure out how stuff works under the hood which is useful for debugging future problems too.
08:48clgvxelxebar: if the leiningen project works as supposed, it is very likely lein oneoff's fault ;)
08:48xelxebarclgv: But it works for you!
08:49clgvxelxebar: you overrate the debugging experience for this one ;)
08:49clgvxelxebar: I thought solving project euler problems is the task at hand ;)
08:49mandelumbtw if anyone else ever cares about themes http://tmtheme-editor.herokuapp.com/
08:50xelxebarclgv: Learning Clojure and the process of development in cojure is the actual goal. Project Euler is really just a means for me.
08:50clgvxelxebar: ok, lein oneoff is not a significant part of development in clojure
08:52xelxebarclgv: You're really set on this one aren't you. lol. I'm fine if we can just chock it up to a oneoff problem, but given that you were able to run it fine, this seems likely to be some issue with my environment/setup.
08:52mavbozoxelxebar: sorry, just joined in. have you tried 4clojure.com?
08:53mavbozoit's easier path to learn clojure
08:53clgvxelxebar: I'd recommed to check whether a normal leiningen project with these dependencies works for you
08:53xelxebarmavbozo: I saw where clgv mentioned it above. Seems interesting!
08:54mavbozoxelxebar: it helps you to just focus on the clojure constructs
08:56mavbozoxelxebar: working on project euler problems brings me toward unhealthy obsession with program execution speed.
08:57xelxebarclgv: Good idea. I've created a new lein 'app' and dropped in the deps in lein oneoff.
08:57xelxebarnot really sure how to run it though :-/
08:57clgvlein repl
08:57clgvwhich editor do you usually use?
09:00xelxebarclgv: Huh. `lein run` spit out "Hello, World" just fine, but `lein repl` is complaining: "Exception in thread "main" java.lang.IllegalStateException: Var null/null is unbound. "
09:00xelxebarI use vim almost exclusively.
09:03clgvis a blowup of factor 6 in memory consumption for clojure hashmaps compared to plain mutable tuples realistic?
09:04xelxebarclgv: Okay... So I upped the version numbers to the most recent and `lein repl` and that previous exception disappeared.
09:04xelxebarProbably has something to do with the version of nrepl I'm using...
09:05clgvor outdated dependencies
09:05clgvthere was a huge leap from clojure 1.2.1 to 1.3 - the lein oneoff example seems to be from the 1.2.1 era
09:08xelxebarclgv: Okay. I'll take you're advice and say screw it to oneoff. Would you mind walking me through how I'd set up a project where I could indepedently run any of a bunch of individual files?
09:08ennclgv: afaict, trace doesn't trace any calls at all, only trace-vars and trace-ns do. Trace just prints and returns its evaluated argument.
09:09clgvenn: I thought its readme says otherwise but maybe wrong...
09:09clgvxelxebar: you could use vim fireplace then
09:10clgvxelxebar: it adds clojure integration to vim
09:10xelxebarclgv: Already am!
09:10clgvxelxebar: so you should be able to evaluate code from vim
09:10clgvand have a repl
09:10clgvxelxebar: I dont use that one myself
09:11xelxebarso just `lein new app` should work fine?
09:11xelxebarI really don't know how this dependency magic works
09:11clgvxelxebar: maybe some setup in vim fireplace is required? you have to consult its docs. usually you then have a repl and can switch to the namespace of the file you are editing and run its functions in the repl
09:12clgvxelxebar: e.g. when spinning up the repl, leiningen handles dependency resolution
09:12xelxebarclgv: I've got fireplace running just fine. Guess I'm just wondering if there's some skeletal lein template that will give me only enough to run these files.
09:13xelxebarWould creating a project.clj file manually be enough?
09:13clgvxelxebar: lein new yourprojectname
09:14clgvbut yeah, you can also create it manually
09:15xelxebarclgv: goodness. that was an obvious one. :P
09:15xelxebarclgv: Thanks for putting up with all my n00b questions
09:18superbob`I'm building an app with the aid of Freactive, do I loose/break anything by just pulling in vanilla bootstrap?
09:19clgv:D
09:23dcunit3dwhy does (dec -9223372036854775808) blow up, but not (dec -9223372036854775809) ?
09:23mavbozo,(dec -9223372036854775809)
09:23clojurebot-9223372036854775810N
09:23Bronsa,(class -9223372036854775809)
09:23clojurebotclojure.lang.BigInt
09:23Bronsa,(class -9223372036854775808)
09:23clojurebotjava.lang.Long
09:24dcunit3dit's right on the negative minimum for 64 bit numbers
09:24Bronsadcunit3d: dec doesn't auto promote, so you're getting the overflow for -9223372036854775808
09:25Bronsadcunit3d: but -9223372036854775809 is already a bigint so no overflow
09:25clgv,(unchecked-dec -9223372036854775808) ; :D
09:25clojurebot9223372036854775807
09:26Bronsa,(dec' -9223372036854775808)
09:26clojurebot-9223372036854775809N
09:27dcunit3dBronsa: that's what i was thinking it was
09:27dcunit3dbut assumed that it would promote
09:28Bronsadcunit3d: no, the normal math ops don't autopromote. you have to use the autopromoting versions
09:28Bronsae.g. inc' dec' +' -'
09:30Bronsadcunit3d: btw ##(doc dec)
09:30lazybot⇒ "([x]); Returns a number one less than num. Does not auto-promote longs, will throw on overflow. See also: dec'"
09:37dcunit3dBronsa: cool, i keep forgetting that i can look up docs in the repl
09:37dcunit3di'm trying to do some things with binary using 64bit integers, but running into some issues at the min/max values
09:54trissok so I'm using assoc to update a maps values...
09:54trissI'd like to update two values and return that
09:55trisswhat does kvs mean in the help: (assoc map key val & kvs)
09:56trissdoe sthis mean I can specify more than one key/value pair to update?
09:56ToxicFrogtriss: & is varargs. So yes.
09:56ToxicFrog,(assoc {} :a 1 :b 2)
09:56clojurebot{:b 2, :a 1}
09:56trissawesome thanks ToxiFrog!
09:56ToxicFrogtriss: and indeed if you look at the documentation: http://clojuredocs.org/clojure.core/assoc
09:56ToxicFrogThere are examples showing exactly that.
09:58trissdoh. I've been using the API ref here: http://clojure.github.io/clojure/clojure.core-api.html
09:59trissmany many thanks for that. the docs look a lot nicer here!
10:00xelxebarclgv: I got the proper lein project all set up fine! I'm really curious how leiningen works its dependency magic.
10:02clgvxelxebar: it uses maven central and clojars.org as default repositories to resolve dependencies
10:08justin_smithxelxebar: it's not really magic. Each artifact has a pom file that lists its dependencies, so lein walks the tree, pulling the poms as needed, until there are no more deps to find. Then it does some conflict-resolution so only one version of each artifact is pulled in. Then it downloads all the needed artifacts and sets the classpath so each one is on it.
10:09justin_smithnot super different than how a distro package manager works on linux
10:09nonubyyesql (https://github.com/krisajenkins/yesql) makes the claim "Better editor support. Your editor probably already has great SQL support. By keeping the SQL as SQL, you get to use it." however I can't see Im meant to subsitute parameters (?) when open the sql in say pgadmin3 or any other editor?
10:10nonubyunless I do a tedius replace and put back in which kind of isn't a great sell
10:10justin_smithI think it means text editor, not GUI query building tool
10:11justin_smithie. when I open my sql file in emacs, I get proper indentation, syntax hightlighting, etc.
10:11nonubypossibly seems a odd complain as most will complain like fuck about a random ?
10:11nonuby? -> "?"
10:12justin_smithemacs doesn't... maybe it's weird
10:14nonubyalso Team interoperability. Your DBAs can read and write the SQL you use in your Clojure project.. Easier performance tuning. Need to EXPLAIN that query plan? It's much easier when your query is ordinary SQL. Query reuse. Drop the same SQL files into other projects, because they're just plain ol' SQL. Share them as a submodule....
10:15nonubyso im not missing some magic trick with some unknown standard parameter subsitution that applicable across all editors, sql query runners... kind of doubting myself for a minute then
10:15martinklepschare there helpers to download patches from a jira ticket or does everyone click, download and move those files?
10:16justin_smithnonuby: I guess if you can't accept placeholders in your sql, then yesql is unacceptable. But there is nothing else that gets that close to just being sql, other than plain sql files with no clojure integration at all.
10:34xelxebarjustin_smith: Appreciate the high-level description. I'm wanting to get a handle off the different layers of abstraction involved. Perhaps it'd be worthwhile directly workind with the clojure jar and jvm for a bit just to get a feel for how things fit together...
10:35justin_smithxelxebar: java -cp jars:go:here clojure.main
10:35justin_smiththat's it
10:36xelxebarBut then you've gotta worry about classpath stuff, no?
10:36justin_smithright, build it yourself or let lein build it
10:36justin_smithlein is a classpath building tool
10:37xelxebarI'm gonna dig into this for a bit.
10:37justin_smiththe "layers of abstraction" are - figure out what artifacts are needed, and build a classpath
10:37justin_smithit doesn't go very deep
10:39xelxebarHehe. Simple enough.
10:39justin_smithnow there are other features that get added to lein, for other tasks at compile / launch time. But you don't need to opt into those.
10:42justin_smithxelxebar: also, there is the option of a) lein cp > classpath.txt b) java -cp $(cat classpath.txt) clojure.main
10:42justin_smiththat means you only run lein once for each time you update your deps
10:43justin_smithonly have to run it once, that is
10:43xelxebaroh cool
10:44justin_smiththough that only runs the clojure.main repl, and "lein repl" gives you the clojure.tools.nrepl one (which has extra stuff like readline bindings, network port to connect to, tab completion)
10:44justin_smithbut, as mentioned, you can opt out of all the fanciness if you desire to do so
10:44clojurebotHuh?
10:46xelxebarjustin_smith: running the repl directly seems to still have tab completion!
10:47justin_smithahh, I didn't realize
10:47justin_smithyou can use rlwrap to get line editing back
10:47justin_smith(on linux or mac at least - I dunno if you can get rlwrap for windows)
10:49xelxebarHow would one go about building a jar say to just run your hello-world.clj, say?
10:49justin_smiththe easy way is to declare your main ns in project.clj, and make sure there is a -main taking varargs of string; then use lein uberjar
10:50justin_smiththe other way would be to build your own (uber?)jar, but I haven't dived into that
10:51xelxebarWhat's the difference between the uberjar and jar? An uberjar packes all dep classes in it or something?
10:51justin_smithright, all transitive dependencies
10:52justin_smithit's what I use for deployment, then all the server machine needs is a jvm
10:52ToxicFrogxelxebar: exactly. Uberjar can be distributed standalone because all the deps are built into it.
10:52justin_smithTEttinger2 was even working on a plugin that would bundle the jvm into the executable uberjar, so you wouldn't even need a vm pre-installed on the target
10:53justin_smithat the cost of a very large jar...
10:53ordnungswidrigjustin_smith: you should go full throttle and bundle a vm image :-)
10:54justin_smithxelxebar: I guess you could follow this guide if you wanted to build a jar from the command line, but lein does make it very easy https://docs.oracle.com/javase/tutorial/deployment/jar/build.html
10:54xelxebarIf we're going that far, might as well compile clojure directly to and elf
10:55justin_smithwell, that requires writing a new clojure compiler
10:55mavbozothat's a good solution for devs with > 50 MB/sec data rate internet connection or intranet deployment only
10:55xelxebarIs anyone working on a clojure to C compiler or something?
10:55mavbozoxelxebar: LLVM precisely
10:56xelxebarsexy
10:56justin_smithxelxebar: there have been a few things like that, but nothing usable at the moment. Good luck making a gc and vm that beats java, and clojure really needs a gc and vm.
10:56xelxebarthask for the link, justin_smith
10:59SagiCZ1is 'enm' not a valid Java identifier?
10:59mavbozojustin_smith: have you heard anything about clojure using erlang vm?
10:59justin_smithSagiCZ1: I can't see why it wouldn't be, unless there is some nasty unicode hiding in there
10:59justin_smithmavbozo: not at all
10:59SagiCZ1justin_smith: thank you
11:00SagiCZ1justin_smith: oh it actually was 'enm;' cant believe i didnt see that
11:00justin_smithhmm, does ; count as hidden unicode? lol
11:01SagiCZ1justin_smith: IMO totally haha
11:04piero_d_shello
11:04piero_d_sneed a little help with melpa
11:05piero_d_sfrom here: http://melpa.org/#/getting-started
11:05piero_d_s(add-to-list 'package-archives
11:05piero_d_s '("melpa-stable" . "http://stable.melpa.org/packages/&quot;) t)
11:05piero_d_sbut
11:05justin_smithpiero_d_s: maybe someone here can help, but #emacs is more likely to be helpful
11:05piero_d_sok thanks
11:06justin_smithpiero_d_s: there is also #clojure-emacs if this is cider / clojure-mode related
11:06piero_d_syes indeed, thanks
11:25clgvxelxebar: https://github.com/pixie-lang/pixie
11:28xelxebarclgv: Interesting. I've also peeked at racket a bit before.
11:56sm0kehello i write a whole app with reagent with :whitespace optimization in cljsbuild profile
11:57sm0ketoday i tried to swtich it to :advanced and nothing seems to work
11:57sm0keis it supposed to be like this?
12:04beppusm0ke: you have to be careful with advanced compilation, especially if you're using 3rd party js libs: http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html
12:09sm0kebeppu: thanks for the link, will have a look
12:18Psy-Qi might be too stupid, but for some reason when i try to scrape an HTML page with enlive, each element i find is surrounded by seemingly random amount of whitespace and linebreaks. is there some convenience function in enlive that would remove that so i don't have to roll my own?
12:19Psy-Qas in here, this would return a lot of "/n Foo - Bar ": https://github.com/psy-q/vinylla/blob/master/crawler/app/src/app/core.clj#L21
12:20justin_smithPsy-Q: this ensures that when rendered again you get the same content
12:21CookedGryphondoes anyone know if it's possible to apply the equivalent of java's synchronised methods to a function invocation (i.e. synchronising without using the locking macro)
12:22justin_smithyou can use clojure.string/trim ##(clojure.string/trim "/n Foo - Bar ")
12:22lazybot⇒ "/n Foo - Bar"
12:22justin_smithhmm
12:22justin_smithyou can use clojure.string/trim ##(clojure.string/trim (clojure.string/trim-newline "/n Foo - Bar "))
12:22lazybot⇒ "/n Foo - Bar"
12:22justin_smithweird
12:23justin_smithoh, that's not \n, that is /n
12:25justin_smithCookedGryphon: the docs for locking claim that it is the equivalent of Java's synchronized
12:25justin_smithhttps://clojuredocs.org/clojure.core/locking
12:27Psy-Qoh, did i type /n? sorry!
12:27Psy-Qjustin_smith: and thanks, that explains it
12:27CookedGryphonjustin_smith: I know, it's the equivalent of a synchronized block, I want to know if anyone has implemented synchronized method annotation
12:27Psy-Qi like the way the transforms and the selectors work in enlive, if i can trim that output and keep it around, that'd be fantastic
12:27clgvCookedGryphon: the clojure compiler would need to support this for regular functions
12:27justin_smithCookedGryphon: clojure supports annotations, but I keep forgetting how it is done. There is a gist from rich hickey on github that demonstrates it
12:28justin_smithbut if it's an annotation that drives javac, then yeah it won't help much unless you are getting compiled by javac
12:28clgvis "synchronized" only an annotation?
12:29justin_smithclgv: it is a syntax, which locking claims to be equivalent to
12:29clgvjustin_smith: yeah and I think in java the compiler actually does some code generation for that
12:29clgvor adds a special byte code item
12:29justin_smithbut there is also @Synchronized as an annotation
12:30clgvjustin_smith: does it work the same? or is it just docs?
12:30justin_smithoh, that's a lombok thing I guess...
12:30justin_smithnever mind, the annotation is a lombok directive
12:32Psy-Qjustin_smith: fantastic, it works with clojure.string/trim. i'll try splitting things now and once the scraper works i guess it's off to code review somewhere :)
12:32justin_smithcool
12:35clgvnot only maven downloads the whole internet, the eclipse dialog to install new software does so as well...
12:36CookedGryphonit's not an annotation
12:37CookedGryphonit's a bytecode marker on the function definition, like abstract etc.
12:37justin_smithCookedGryphon: right, I was misled by something from lombok, sorry
12:37CookedGryphonand is different to the synchronized block which inserts a monitor-enter, monitor-exit instruction
12:37CookedGryphonand locking isn't exactly equivalent on a bytecode level to java language's implementation
12:38CookedGryphonwhich is causing me issues, so I was wondering if anyone knew how I'd go about wiring the compiler up to emit the marked method variation instead
12:38CookedGryphonso I might be able to reimplement locking
12:44jballancAm I reading this code right: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6596 ? Slurp reads a byte at a time?
12:44jballancHow is that not horribly inefficient?
12:46clgvjballanc: with buffered readers underneath that should be fine
12:46clgvjballanc: at least with respect to os io overhead
12:47jballancSure io overhead...I wonder if the JIT can optimize at all
12:47jballancbut it doesn't seem like there's any chance for unrolling or the like
12:48clgvjballanc: what overhead concerns you then? method calls?
12:48jballancyeah
12:50jballancI mean, granted that slurp probably isn't the wisest choice for large files to begin with...
12:50jballancbut I've seen it used for such
12:52clgvjballanc: I think `slurp` is just a general purpose "oh lets read that in and try my functions on it" tool
12:53jballancoh, I know
12:53Psy-Qwouldn't you be using some java reader or such if you need performance?
12:53justin_smithclearly, now one of us must write turbo-slurp
12:54jballancjust, in my experience, since slurp is so easy, and every other IO class in Java is a pain to work with, slurp ends up being used places it probably shouldn't
12:54jballancjustin_smith: I'd settle for something with an API similar to the File libs from Ruby or Python
12:55jballanci.e. don't make me allocate my own byte[] just because I want to read more than one char at a time
13:07justin_smithjballanc: if the arg to slurp is buffered, the underlying input will be buffered, and the jvm will hella-optimize a small eager loop like that
13:08justin_smiththe .read called there isn't always a filesystem read, it's likely calling to a buffer, which is not going to read one char at a time, no matter what you ask for
13:08jballancjustin_smith: that's what I'd hope...just never benchmarked it myself
13:08jballanc...honestly, I never thought slurp was byte-at-a-time :-/
13:08justin_smithextra buffering inside slurp would likely hurt performance, since the input is already buffered in all but the most pathological case
13:09justin_smithjballanc: that doesn't matter, because the access to the underlying data is not one byte at a time
13:09jballancbut the loop is one at a time
13:09justin_smithsure, and like I said, the JIT can fix that
13:09justin_smiththat's the kind of thing the JIT is very good at
13:09jballancwhich still means there's as many calls to read as bytes in the array
13:11justin_smithmaybe not, after JIT
13:11jballancjustin_smith: I don't doubt it, but I'd love to know how it's doing that
13:11justin_smithOK, criterium is great for benchmarking, it should be easy to make a few versions of slurp and try them out
13:11justin_smithit will even warn you if JIT isn't on
13:12jballancwill have to give it a go
13:19jaaqoEhh. c3p0.DtiverManagerDataSource is throwing ClassNotFoundException: com.postgresql.Driver, yet my applications database seems to be working... My setup is as in clojure docs connection pool example word to word basically..
13:20jaaqoDoes it c3p0 fall back to something else or how am I supposed to interpret this
13:21justin_smithjaaqo: weird. If your app can find the driver, c3p0 should find it. can you make a paste of the relevant part of your code?
13:38kenrestivook, what is (∀ ?
13:38kenrestivoi know what λ is, but what's the other one?
13:38Bronsaevery
13:38justin_smithM-x describe-char in emacs says "for all"
13:38Bronsa,(doc every?)
13:38clojurebot"([pred coll]); Returns true if (pred x) is logical true for every x in coll, else false."
13:38justin_smithso yeah, every
13:38justin_smithkenrestivo: if you are an emacs user, describe-char is awesome
13:39kenrestivothanks. but, weird. why not just write out "every"? context: http://crossclj.info/fun/clojure.core/deref.html
13:39justin_smithalso helpful for things that won't display - you can at least get the name of the non-displayed thing
13:39justin_smithcrossclj makes really weird UI decisions
13:40justin_smithgreat content, odd UI
13:40Bronsait's not really unusual to use greek symbols in type signatures though
13:40Bronsakenrestivo: in that context it has the math meaning of forall
13:40kenrestivook, thanks.
13:41kenrestivowhere do those type declarations come from?
13:41daGrevishey! what's the idiomic way to check if string is empty?
13:41Bronsakenrestivo: core.typed
13:41kenrestivoi don't remember seeing them in the actual clojure.core source
13:41daGreviss/idiomic/idiomatic sorrs
13:41justin_smithdaGrevis: #(= % "") or empty? I guess, each have arguments in their favor
13:42daGreviswhat arguments if it's not a secret? :)
13:43justin_smithempty? reads more clearly, #(= % "") does the minimum amount of work
13:44andyf_empty? also returns true for empty collections, not just strings.
13:44daGrevisi read that it was bad to use empty? on coll
13:44justin_smithwell, "" is not a coll, so you are in luck there - but what was the reasoning for not using empty?
13:45justin_smith&(doc empty?)
13:45lazybot⇒ "([coll]); Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))"
13:45daGrevis^ yes that
13:45justin_smiththat doesn't say what you said
13:45daGreviswell i meant to say that :/
13:45justin_smithit says (not (empty? x)) is (seq x)
13:45andyf_(seq x) is recommended of (not (empty? x)). It is not saying never use empty?
13:46andyf_s/of/instead of/
13:46daGrevisy, my bad. i didnt remember it correctly
13:46daGrevis,(seq "")
13:46clojurebotnil
13:46daGrevis,(seq "a")
13:46clojurebot(\a)
13:46daGrevisi could use seq, right?
13:46justin_smithyeah, but that does even more useless work
13:47andyf_I highly recommend not using (not (seq s)) instead of (empty? s) :-)
13:47justin_smithif what you are really checking for is a non-empty string, I would use #(not= % "")
13:47daGrevisimo (not (empty? %)) sounds the best but docs says that i need to use seq in cases like that so im a bit confused :
13:48justin_smith#(and % (not= % ""))
13:48justin_smiththat catches the nil case too
13:48andyf_daGrevis: It said please, not must
13:48daGrevisandyf_, true that :)
13:48justin_smiththe problem is (seq "adfka....askfj") creates a big data structure you don't use at all, since strings are not lazy
13:48daGrevis,(= "" false)
13:48clojurebotfalse
13:49daGrevistoo bad
13:49daGrevisahh i'll just use not=
13:49daGrevisty
13:50justin_smith&(map #(and % (not= % "")) ["hello" nil ""])
13:50lazybot⇒ (true nil false)
13:50justin_smithso it correctly only gives you the first of the three
13:50daGrevisi believe it works correctly
13:50Bronsajustin_smith: that's not true, stringseq is like subvec, it just holds the string + index
13:50daGrevisim not sure if I can ever get nil there tho
13:51justin_smithBronsa: oh? that's excellent news, I had no idea
13:51justin_smithin that case ##(map #(boolean (seq %)) ["hello" nil ""])
13:51lazybot⇒ (true false false)
13:52justin_smithor skip the boolean check even
13:52daGrevispretty readable, imo :) https://gist.github.com/b2dfed11cd5af04a291d
13:53vermaclojuredocs API seems to be denying my api requests, because of CORS stuff, I thought it was an open API
13:53vermatrying out their package to see if that works
13:54justin_smithdaGrevis: what is that .preventDefault method? -- oh wait, cljs
13:54justin_smithverma: as I mentioned before, grimoire has an api that is meant to be queried
13:54justin_smithverma: and if you get issues with that, arrdem is often around to address them
13:55vermanice, justin_smith taking a look now
13:56vermaoh nice
13:56vermawere the examples there imported over from clojuredocs
13:56verma?
13:56vermaor were they sourced dfifferently?
13:56justin_smithyeah - arrdem made grimoire because clojuredocs was so slow to update
13:56vermaarrdem: ^ :P
13:56vermaoh ok
13:56justin_smithand he imported the content (with permission) from clojuredocs
13:57vermamuch nice!
13:57razum2um,(instance? clojure.lang.LazySeq (seq (hash-map)))
13:57clojurebotfalse
13:57razum2umwhy?
13:57clojurebotwhy is the ram gone is <reply>I blame UTF-16. http://www.tumblr.com/tagged/but-why-is-the-ram-gone
13:57andyf_verma: Did you try the cd-client lib, or something else?
13:57daGrevisdon't hate firefox :D
13:57Bronsarazum2um: seq has little to do with lazy-seqs
13:58vermaandyf_: no not yet, justin_smith already sold me on grimoire
13:58razum2umBronsa: I ask why getting keys and vals of hash-map isn't lazy
13:58razum2um*they both use seq under the hood in RT.java
13:59justin_smithrazum2um: seq isn't a concrete implementation, it's an interface right?
14:00razum2umjustin_smith: i talk about this: APersistentMap.ValSeq.create(seq(coll));
14:00vermaI feel the browser interfaces are nice, but they always force the user to go though this generic channel which everyone hopes works (browsers etc.) clojuredocs and grimoire look awesome but such a context switch to interact with them.
14:00justin_smithright, and seq is an interface method
14:00vermaI like dash since its a dedicated documentation interface
14:00vermawhich I can bind to a key
14:01justin_smithrazum2um: and the way that coll implements seq, in that context, has no laziness to it
14:01vermabut there's one thing about generic tools
14:01Bronsarazum2um: there's no lazyness that could be added to the current impl
14:01vermathey suck at user experience :(
14:01Bronsarazum2um: maps are non lazy so all the elements are already realized
14:02Bronsarazum2um: calling vals/keys on a map is a constant operation
14:03razum2umBronsa: yep, thanks, but still - could we have lazy maps build by (zipmap) from 2 lazyseq's?
14:03justin_smithrazum2um: there are lazy-maps in libraries
14:03justin_smithbut none in clojure.core
14:03justin_smithand they would have their own seq impl, that would likely be lazy
14:03technomancyhttps://twitter.com/benontherun/status/537580012892086272
14:04razum2umjustin_smith: ok, thanks :)
14:04Bronsarazum2um: the issue with lazy maps is that they behave in a weird way on conflicts
14:05vermanice api arrdem :)
14:05Bronsarazum2um: e.g. (zipmap '(1 2 1) '(1 2 3))
14:06trissso i guess the simplest way of getting rid of duplicates in a list is to convert it to a set?
14:06trisshow do i do that?
14:06Bronsatriss: there's also dedupe
14:06justin_smith(doc set)
14:06Bronsa,(dedupe '(1 2 3 1 2 3 4))
14:07clojurebot"([coll]); Returns a set of the distinct elements of coll."
14:07clojurebot(1 2 3 1 2 ...)
14:07Bronsauhm. nevermind
14:07Bronsadedupe is for consecutive duplicate elements
14:07Bronsa,(dedupe '(1 1 2 2 3 3))
14:07clojurebot(1 2 3)
14:07justin_smith&(set '(1 2 3 1 2 3 5))
14:07razum2um,(set '(1 2 1 2 3 1))
14:07lazybot⇒ #{1 3 2 5}
14:07trissah thanks justin_smith/Bronsa
14:07clojurebot#{1 3 2}
14:08trissand razum2um
14:08trissbit obvious really!
14:08razum2um,(into #{} '(1 2 3 1 2 3))
14:08clojurebot#{1 3 2}
14:08razum2umis there a difference between them?
14:09justin_smith$source into
14:09lazybotinto is http://is.gd/caQYZB
14:09justin_smith$source set
14:09lazybotset is http://is.gd/CrvBh4
14:09Bronsarazum2um: don't think so, no the impls should be the same
14:10Bronsaone is in java and the other in clojure but they both loop over the coll + use transients
14:12razum2umjustin_smith: nice bots ;) are there any connectors for slack.com/kato.im/hichat for them?
14:13justin_smithnot that I know of
14:13justin_smiththey are both open source
14:14justin_smithif you want to run one and connect it to one of those chat services
14:14justin_smitha clojure evaluator that responds to IM could be cool
14:14justin_smithjabber would likely be easier
14:15jaaqoexit
14:17vermaandyf_: its weird, I can curl the URL and get stuff, so not clojuredocs problem
14:18andyf_verma: You are trying cd-client lib again?
14:18vermano, I need this to run in clojurescript
14:19vermaI was just wondering why it isn't working
14:19verma+ not sure grimoire provides search
14:26justin_smith$grim clojure.core/filter
14:26lazybothttp://grimoire.arrdem.com/1.6.0/clojure.core/filter
14:26justin_smithverma - search like that, or more general?
14:27vermamore general
14:27vermalike "fil" -> ["filter" "filtype" ...]
14:27vermaI mean I could write my own
14:27vermabut it probably won't be as good :)
14:28justin_smithyeah, I seem to recall arrdem was working on something like that, but I don't know how ready it is
14:33vermajustin_smith: that would be nice, anyway don't think clojuredocs sent me search results in any specific order, e.g. for "m" I got "sum" as the first result :/
14:33vermaso I would still have to process them a bit
14:35vermamay be I should use the API clojuredocs is itself using, instead of the documented one :/
14:42kenrestivois this the most idiomatic/bulletproof way to start/stop a go-loop as if it were a daemon/thread? https://www.refheap.com/94123
14:44vermakenrestivo: closing a chan also always returns nil on waiting <!
14:45arrdemjustin_smith: verma: not yet on that API
14:45arrdemin hiding from relatives it's more than likely to get finished today tho
14:45vermaarrdem: nice!
14:46vermayou can tell your relatives that there's an internet emergency
14:46arrdemlel
14:46arrdemI just don't want to watch frozen for the 50th time
14:46arrdemit's easy
14:47arrdemand my phone is flat so I'm bound to my computer for screening noise :/
14:47arrdemalright. api time.
14:47arrdemverma: https://github.com/clojure-grimoire/grimoire/issues/84
14:47arrdemapi as proposed
14:51vermaarrdem: nice, taking a look
14:56justin_smithkenrestivo: yeah, it should suffice to just shut the loop down when you get nil from the chan, but what you have there should work
14:56nybbleshey i’m using cider with clojurescript and seeing that my namespace gets reset to cljs.user after every command. my setup is based on the chestnut lein template.. any ideas where i should look to figure out why this might be happening?
14:57kenrestivowell the example is contrived; in reality it'll be a subscription not a channel
14:58justin_smithoh, do subscriptions act differently when closed?
14:58kenrestivoi don't know how to close one
14:58justin_smithwrite nil to it
14:58kenrestivoit's a subscription, it takes its input from its pub channel
14:59kenrestivooh, i guess i could write to it directly too, duh
14:59justin_smith"By default the channel will be closed when the source closes, but can be determined by the close? parameter."
14:59justin_smitha nil on the source will close the subs
15:03kenrestivoright, but i want to close just one sub
15:03kenrestivofrom the top-level bus. so i was going to send an :exit message on the topic channel
15:04kenrestivowhich'll get sent to that sub, to that "daemon", and shut it down, i hope
15:04kenrestivoyes, i'm trying to reinvent posix in clojure inside a jvm
15:06kenrestivokill $processid; sleep 2; kill -9 $processid
15:44justin_smithI love how I get really ambitious ideas when I consume enough caffiene
15:44ffwacom^
15:45justin_smithfourth cup of tea: "I know, I could write something like expect for clojure, but wrap not just line oriented text streams, but also apps that use terminal control characters, and GUI apps via vnc"
15:46justin_smithhaving a lib that helps you wrap a GUI via a json api or text command oriented intput would be awesome tho
16:04prachetaspis there any way to filter out all these joining and leaving lines? I just want to see when people say something
16:05justin_smithprachetasp: it depends on your client, but most clients should provide such a thing
16:05prachetaspjustin_smith using the web client right now. I'm on Ubuntu any suggestions for a good client?
16:06justin_smithI use erc because I am an emacs addict. ymmv of course
16:06prachetaspI use emacs too - I'll check it out. thanks
16:07justin_smithprachetasp: in my custom config block I have '(erc-hide-list (quote ("JOIN" "NICK" "PART" "QUIT")))
16:07justin_smithshouldn't be too hard to translate that to vanilla config, or replicate those settings in your custom block
16:09prachetaspadmittedly still an emacs noob :/
16:10prachetaspbut thanks for the config. I'll give it a shot
16:10technomancyprobably don't want two levels of quote on that?
16:10justin_smithtechnomancy: I used customize, it's part of my customize block
16:10technomancy(setq erc-hide-list '("JOIN" "PART" "QUIT" "NICK")) ; <- what I have
16:10technomancyboo customize =P
16:10justin_smithtechnomancy: looks like the apropriate translation
16:12prachetasptechnomancy: so I can just dump the setq statement into my .emacs and reload emacs?
16:12technomancyprachetasp: yeah
16:12prachetaspsweet!
16:12justin_smithprachetasp: you can even reload the file, and not restart emacs at all
16:12technomancyyou can use customize of course, but customize is just an elaborate plan to trick you into believing you don't need to write elisp
16:13prachetaspthat's right - how do I do that again?
16:13technomancywhich is like ... the opposite of good emacs
16:13justin_smithprachetasp: load-file
16:13technomancyor M-x eval-buffer
16:13prachetasproger that
16:14justin_smithor even M-x eval-defun within that block
16:15prachetaspI have the emacs live pack installed
16:15prachetaspmy configuration has devolved into madness
16:15justin_smithhaha
16:19prachetashello
16:20prachetassweet! justin_smith I'm in erc now
16:20prachetasthanks!
16:20justin_smithnp
16:20justin_smiththere is #emacs for the most expert emacs / erc knowledge, of course
16:20prachetasyeah I need to get better with my editor
16:21prachetasmy lack of knowledge is lame
16:21technomancyjustin_smith: eh, that's mostly for ranting about how annoying git and python are
16:21justin_smithI switched to evil mode recently, because I get tired of chord keys
16:21justin_smithhaha, that too
16:21technomancyooh, how's that going?
16:21justin_smithbut they do come through with answers
16:21technomancyjustin_smith: how long has it taken to get comfortable?
16:21justin_smithtechnomancy: I like it, I was a vi user before I switched to emacs over a decade ago for the lisp process integration
16:21technomancyoh, right
16:21justin_smithnot long, but like I said, vi was my "first language"
16:21poushkarHelp! Why does Ring force saving index.html on / and load it well on /index.html in browser with this code: (GET "/" [] (response/resource-response "index.html" {:root "public"})) ?
16:22technomancyI would like to at least try that at some point
16:22jasonjckncursive is looking great
16:22weavejesterpoushkar: Force saving?
16:22technomancyevil feels like it could mend the ancient rift of hackerdom
16:22poushkar@weavejester yeah, like opens save file dialog
16:23justin_smithtechnomancy: my fingers / wrists like the single key bindings a lot
16:23weavejesterpoushkar: Oh, it might have the wrong content-type
16:23justin_smithpoushkar: sounds like a content-type issue
16:23justin_smithyeah
16:23prachetas@poushkar probably a combination of your content-type and browser
16:23technomancyjustin_smith: OTOH, I have thumb modifiers, so that doesn't really help as much for me as it would for others
16:23justin_smithoh yeah, you and your fancy layout
16:24weavejesterpoushkar: Yeah, resource/response doesn't automatically add a content-type field
16:24technomancystill, I really like the idea of composable commands that take arguments
16:24weavejesterpoushkar: If you're using Compojure 1.2.1, you could write: (GET "/" [] (io/resource "public/index.html"))
16:24poushkarI see you discussing Evil here. Just my 2 cents: I am already 2 weeks on this https://github.com/syl20bnr/spacemacs and it’s exciting! Give it a try
16:24technomancythe fact that forward-sexp, forward-sentence, forward-defun etc are different commands is just plain stupid
16:25justin_smithtechnomancy: yeah, the mini grammar of movements and actions is great, and to have that without losing my favorite things about emacs is massive
16:25poushkar@weavejester thank you, gonna try now
16:25weavejesterpoushkar: The latest Compojure is a little smarter about guessing content-types. Ring is dumber by design.
16:25technomancy"batteries included" -> nope-badger.gif
16:25technomancyno offense
16:26poushkarread configuration section
16:26poushkaryou can switch “batteries” off
16:26poushkarit introduces concept of “configuration layers"
16:26technomancypoushkar: I maintained the original starter kit for three years. not going to fall into that trap again =)
16:27justin_smithpoushkar: I recall you were talking about how messy your config was getting, these kind of things tend to make it worse in my experience
16:28technomancy"configuration layers" to me means "we've invented a separate ecosystem of how functionality is organized so now you have to understand two different ways of doing things that don't interoperate"
16:28technomancybecause even if the vanilla way is flawed, you can't get away from it, you can only add to it
16:28technomancyemacs live "packs" =\
16:29prachetasmy god. live packs...
16:29prachetasI don't even understand my setup
16:30prachetasbut it looks cool!
16:30justin_smithwe should port the clojure version of namespaces to elisp. That would solve everything.
16:30justin_smithand replace package.el with lein
16:30justin_smith(actually let's not)
16:30weavejesterIsn't emacs supposedly getting namespaces next version?
16:30poushkarActually I liked it because it introduces some order I always missed and couldn’t make up myself
16:31justin_smithweavejester: interesting. I wonder what version of namespaces they'll shoot for
16:39justin_smithhttp://nic.ferrier.me.uk/blog/2013_06/adding-namespaces-to-elisp this is what I find
16:45technomancythere have been a couple attempts to add them as code-walking macros in userland
16:46technomancyit's a decent idea
17:43poushkar@weavejester could you please specify what you meant by “io/response”? what is “io” here?
17:43weavejesterpoushkar: clojure.java.io
17:45poushkar@weavejester well, you see, the problem is that I get this error “clojure.lang.PersistentArrayMap cannot be cast to java.lang.ClassLoader”
17:46weavejesterpoushkar: Are you calling the function as I outlined in my earlier message?
17:46weavejesterpoushkar: i.e. (io/resource "public/index.html")
17:47justin_smith(doc clojure.java.io/resource)
17:47clojurebot"([n] [n loader]); Returns the URL for a named resource. Use the context class loader if no loader is specified."
17:47justin_smithyeah, looks like one too many args
17:48poushkaryeah, sorry, I’ve accidentally left {:root “resources”} param used for Ring *facepalm*
17:48poushkarit works fine now
17:49weavejesterpoushkar: I figured it was something like that :)
18:27kenrestivosadly, routing messages through core.async pub/sub doesn't seem to be terribly performant
19:02justin_smithkenrestivo: yeah, my impression of core.async is that it is a good abstraction for organizing things, but not high performance. But if you can chunk things so there is more work per message it still might work out (this entirely depends on your problem domain I would assume)
19:03kenrestivopub/sub is very slow. just plain channels are not too bad, but in this case i can't beat atoms and add-watch, so that's what it's likely going to end up as
19:11MorgawrI take it load-string doesn't work in clojurescript right? is there a way to make it work, or an alternative or something?
19:12Morgawrbecause I need to pass some strings as clojure code and have them evaluated at runtime but in clojurescript this doesn't seem to be possible
20:01justin_smithyeah, the compiler just isn't there
22:44maya^^Does anyone know why clojure's main function has a dash in front of it? Already asked google, but didn't return anything helpful.
22:45ffwacomlein quirk?
22:46xeqi"gen-class
22:46xeqiwill generate an implementation that looks for a function named by
22:46technomancyit's a gen-class convention
22:46xeqi(str prefix mymethod) (default prefix: "-")"
22:47xeqihttp://clojure.github.io/clojure/clojure.core-api.html#clojure.core/gen-class
22:47xeqiwell that didn't paste as well as I was hoping
22:53maya^^ah, great, thank you, so it's just a convention
23:01prachetasanybody used https://github.com/adamwynne/twitter-api?
23:02prachetasif so, thoughts?
23:10dbaschprachetas: I used it here https://github.com/dbasch/twittercloud
23:10dbaschprachetas: blog post about it http://diegobasch.com/open-source-something-often
23:12prachetasfunny story - I actually read this months ago when I was first looking to do sentiment analysis on tweets : )
23:12prachetasthen I got distracted...
23:12prachetaswhat did you think of the library? any gotcha's?
23:13prachetasdbasch: ^^
23:13dbaschprachetas: can’t remember any gotchas, it worked as advertised (as much as the twitter api allows)
23:13dbaschthe twitter api of course is not super dependable
23:14prachetasdo they kill it when they have capacity issues?
23:14dbaschor degrade it, or return various error codes
23:14dbaschor a request hangs for a long time
23:14prachetashm - not ideal but my requirements aren't real-time I guess
23:15prachetastweetclouds pretty cool - I'm gonna play around with that