#clojure logs

2014-07-08

00:02TEttinger,(find-doc #"ns-")
00:02clojurebot-------------------------\nclojure.core/ns-aliases\n([ns])\n Returns a map of the aliases for the namespace.\n-------------------------\nclojure.core/ns-imports\n([ns])\n Returns a map of the import mappings for the namespace.\n-------------------------\nclojure.core/ns-interns\n([ns])\n Returns a map of the intern mappings for the namespace.\n-------------------------\nclojure.core/ns-map\n([n...
00:02TEttinger##(find-doc #"ns-")
00:02lazybotjava.lang.RuntimeException: Unable to resolve symbol: find-doc in this context
00:02TEttingerhm
00:02TEttinger##(find-doc find-doc)
00:02lazybotjava.lang.RuntimeException: Unable to resolve symbol: find-doc in this context
00:02TEttinger##(find-doc "find-doc")
00:02lazybotjava.lang.RuntimeException: Unable to resolve symbol: find-doc in this context
00:02TEttingerwhat
00:02Frozenlocklol
00:02TEttinger,(find-doc "find-doc")
00:02Frozenlockof course :-p
00:02clojurebot-------------------------\nclojure.repl/find-doc\n([re-string-or-pattern])\n Prints documentation for any var whose documentation or name\n contains a match for re-string-or-pattern\n
00:03TEttinger##(clojure.repl/find-doc #"ns-")
00:03lazybot⇒ ------------------------- findfn.core/*ns-set* A set of namespaces where find-fn will look. ------------------------- clojure.main/main ([& args]) Usage: java -cp clojure.jar clojure.main [init-opt*] [main-opt] [arg*] With no options or args, runs an interacti... https://www.refheap.com/87959
00:03TEttingerwell now you have the full link
00:04TEttingerlazybot may not include clojure.repl by default, but it does use refheap, and refheap is wonderful
00:04FrozenlockPfff, I'm not going to type clojure.repl/find-doc
00:05FrozenlockHow can a bot use refheap? What's the use case?
00:05TEttinger##(clojure.repl/find-doc #"clojure.core/ns-")
00:05lazybot⇒ nil
00:05TEttinger##(clojure.repl/find-doc #"clojure.core.ns-")
00:05lazybot⇒ nil
00:05TEttingerhm
00:06TEttinger,(doc "find-doc")
00:06clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.Symbol>
00:06TEttinger,(doc find-doc)
00:06clojurebot"([re-string-or-pattern]); Prints documentation for any var whose documentation or name contains a match for re-string-or-pattern"
00:06TEttingeroh come on
00:06TEttingerthen why do lazybot and clojurebot print different things
01:24seancorfieldIs it my imagination or has this channel gotten a LOT quieter in the evenings than it used to be?
01:37hellofunkseancorfield it is likely your imagination.
01:44seancorfieldhellofunk perhaps... but only two messages in an hour and change? used to be conversations all the time in the evenings...
01:44FrozenlockI have the same impression
01:44FrozenlockSummer, maybe?
01:48devnseancorfield: pay no mind
01:48devnseancorfield: everyone who used to peep late at night is now employed :)
01:49Frozenlockclojure ain't cool anymore
01:51hellofunkwow, it's loud in here. too much activity
01:57seancorfielddevn you might have a good point there
01:57seancorfieldi'm kind of a night owl so i'm always online
01:58seancorfieldbut it may be that many of the old guard are now doing Clojure all day and don't bother with IRC at night?
01:58hellofunkanyone who uses Om, is there any reason why I couldn't put the Om atom in a separate namespace? there's no reason it must be in the same namespace as the Om root, right?
01:58seancorfieldhmm, can't think of a reason hellofunk
01:58ttasteriscohellofunk: right
01:58cj3kimhello
01:59ttasteriscoplus you can have multiple roots
01:59hellofunkok
01:59cj3kimQuestion.
01:59seancorfieldcj3kim yay! a discussion!
01:59cj3kimI have some software written in clojure that I would like to expose as an API on my node js server. Is this possible?
02:00hellofunkfrom a performance question (and i'm using cljs) if you reset! an atom map but only one item changes, would this have similar performance as just swap! with an assoc? are reset! and swap! mainly syntactic tools, or do they affect performance as well?
02:01cj3kimAnything is possible, but would there be a lot of effort in comparison to writing the server in clojure?
02:02seancorfieldcj3kim not quite sure i understand what you're asking - sounds like you want to call from node.js to clojure/java?
02:02cj3kimseancorfield: yes
02:02cj3kimI want to take data from a POST request in node and pass it onto a clojure process
02:02cj3kimin the background.
02:03seancorfieldspinning up a web server in clojure is pretty easy tho'... do you just want to expose your clojure stuff as a REST API?
02:03seancorfieldwhy use node.js?
02:04Frozenlockcj3kim: I'd keep the clojure stuff in its own server... less stuff to debug if something goes wrong.
02:04FrozenlockFrozenlock rule n.634: everything goes wrong.
02:04seancorfieldyeah, exposing the Clojure stuff with its own REST API sounds simpler
02:04cj3kimhmmr, okay
02:05cj3kimthanks for the opinion :)
02:06seancorfieldcj3kim the real question is probably more around how you'd handle responses and the async aspects of node.js in that context
02:07cj3kimseancorfield: I'm used to coding on Node.js, which is why the thought occurred.
02:07Frozenlockcj3kim: http://clojure-liberator.github.io/liberator/ makes thing even easier
02:08cj3kimFrozenlock: thank you
02:10hellofunki'm guessing a reset! still takes advantage of persistent structures to minimize value changes so it would be similar overhead as a swap!
02:10cj3kimquick question, i'm doing a math heavy start-up with a friend. if necessary, could I pay one of you guys to refactor some areas of my code? ( I'm not the best at clojure)
02:16Frozenlockcj3kim: I'm sure you can find someone good with clojure/java math operations, but you would probably have a better luck in the americas-day-hours
02:23mangehellofunk: From what I understand reset! just changes the pointer inside the atom. It won't do anything magical if you've constructed an entirely separate object.
02:24cj3kimFrozenlock: Thanks. I will take that into account.
02:43Frozenlockseancorfield: Have you tried TokuMX http://www.tokutek.com/products/tokumx-for-mongodb ? (No question in particular, I'd just like your opinion if you have one)
02:44seancorfieldHaven't looked at it Frozenlock
02:49seancorfieldFrozenlock almost sounds too good to be true :) i'll have to take a look at that...
02:50Frozenlockseancorfield: Yeah, if it had geospacing I'd be all over it.
02:51FrozenlockKeep me posted on your findings :-p
02:52seancorfieldFrozenlock we're already relying heavily on some MongoDB 2.4.x stuff so I don't know how compatible TokuMX would be...
02:53seancorfieldbut i'll try it out
03:31ttasteriscoseanaway:
03:31ttasteriscohey, I think it's just your imagination https://github.com/ttasterisco/is-it-seancorfields-imagination-
03:50evanmorganhello
04:18sm0kehow do i specify a classifier in lein?
04:19sm0kei have 2 profiles and i want that when i do `lein with-profiles +pro1` it installs with a classifier prfo1
04:22sm0keisnt there something like :classifier ?
04:26otfromANN: London Unconference on 24 July: Sign up here: https://www.eventbrite.co.uk/e/london-clojure-unconference-2014-tickets-5542965158
04:27otfromand good morning
04:30kaphello guys, i want to write a simple client/server in clojure
04:30kapi am a super-beginner
04:31kapthe client part fetches a json and stores to couchdb
04:31kapthe server exposes a restful api
04:31kapi was thinking of using Liberator for the server side
04:32kapI was thinking of separating client (batch download and store)
04:32kapand server
04:33kapbut i would like to share some memory between the two for quickly exposing freshly downloaded data from the client
04:33kapthere will be two processes then
04:33kapis there a way to handle intra-processes data in clojure?
05:07jonathanjwouldn't it make sense to write the client and server as though they're on the same network (instead of the same computer)?
05:12rurumatehow to wrap rabbitmq channel into core.async channel?
05:14rurumatethis is what I have so far, but q-chan is read-only and closes after one message: https://www.refheap.com/87966
05:14rurumateis it possible to make q-chan an unlimited async channel that works "over the wire" ?
05:23rurumate*to make q-chan return an r/w async.channel that you can take! from and put! into, as well as use <! and >!, and which delegates to lb/publish and lc/subscribe
05:32kap@joanathanj and send json from server to client when i need to fetch fresh data without passing from the db?
05:33rurumateIn order to get rid of a callback, it's common to return a new channel that will receive a value, i.e. it's supposed to be take!n from. Is is also possible to create / return a channel that "listens" on a put! ?
05:34kap@jonathanj and send json from server to client when i need to fetch fresh data without passing from the db?
05:35jonathanjkap: i'm not exactly sure what you're asking, but presumably you know how to write network software
05:36kap:) i was thinking of having client and server on the same machine and share some memory intra-process instead of intra-network ;)
05:36kapand wondering if there is a lib in clojure to do that...like osgi that can share memory between plugins
05:46rurumateoh I think I get it. just attach a taker on the channel before returning it
05:59AeroNotixhmm, clojure-mode doesn't seem to be highlighting properly any more. I updated it.
05:59AeroNotixanyone else see this?
07:17hellofunkAeroNotix haven't updated in a while
07:36mbachey what's something that always trips up noob programmers. so far i've got tabs vs. spaces and merge conflicts.
07:36AeroNotixthe fact that all development is basically shovelling shit from one toilet to another
07:36borkdudecomplexity
07:39mbacAeroNotix: too real
07:41koreth__Novices get way too hung up on programming language selection in my experience. It matters, but it is not the initial decision whose lack of answer should block one from thinking about any other aspect of the problem.
07:43koreth__(But maybe that's more abstract than what you wanted; not on the same level as tabs vs. spaces.)
07:46winkpeople ranting about languages if they haven't used more than 2
08:03Glenjaminmbac: mixing levels of abstraction within the same procedure
08:13TimMcmbac: The idea that all software is infinitely mutable, unlike hardware.
08:13TimMc("I'll just go and fix this" and then the sweater unravels.)
08:19rurumateAeroNotix: will clojure-mode highlight #_ comments correctly now?
08:20AeroNotixrurumate: didn't check
08:20AeroNotixrurumate: in what way? Doesn't seem to do anything right now
09:23TimMcOK, free project idea: Given two git commits, display a namespace diff graph that shows which namespaces have been deleted, edited, or added by decorating the lines and boxes. https://github.com/timmc/nephila would be a good starting point.
09:28rurumateAeroNotix: right, doesnt't do anything, it should be red like a comment no?
09:29hyPiRionTimMc: (merge nephila codeq) ?
09:29rurumateAeroNotix: counterclockwise highlights it like a ;; comment
09:29AeroNotixI dunno, I'm sure your colours are different but still -- it does nothing right now
09:29rurumateit _should_ do something
09:31TimMchyPiRion: whoa
09:32TimMchyPiRion: ...and then make a github web hook that generates the graph and uploads it as a comment to the pull request.
09:39Glenjaminis there a way to make clojure(script) throw away the tail of a list?
09:40Glenjaminat the mo i'm doing (-> xs (conj x) (take 1000))
09:40ssiderisGlenjamin: butlast
09:40ssiderishm, sorry I don't think that's what you need
09:42bacon1989ping
09:53TimMcborkdude: PONG
09:53TimMcbah
09:53TimMcbacon1989: PONG
09:54TimMcborkdude: Sorry, tab-completion + moderate latency.
09:59hellofunki have a bunch of key value pairs where i will often need to look up one based on the other, thus sometimes it is the key I want when I search for the value. is there a better way to do this than have 2 separate maps with the keys and values switched?
10:04cursorkhellofunk: 2 maps *might* maybe work. Are you prepared for multiple keys being returned by a lookup on one value though?
10:07hellofunkcursork so actually in my scenario both the keys and the values will always be unique
10:08hellofunkcursork besides, if i was storying one map's values as another map's keys, i wouldn't have multiple values or multiple keys anyway, since you can't have two identical keys in a hash-map
10:10borkdudewhy is clojuredocs still based on clojure 1.3 and is there a better newer alternative?
10:10Kneivaany idea why lein repl fails to start under cljs project? error message is: Error: Could not find or load main class clojure.main
10:10KneivaException in thread "Thread-4" clojure.lang.ExceptionInfo: Subprocess failed {:exit-code 1}
10:11Kneivaif I go to parent directory lein repl works as expected
10:13koreth__borkdude: I use the Clojure cheat sheet at http://clojure.org/cheatsheet -- it links directly to the official Clojure docs for stuff that was added after 1.3, but to ClojureDocs for older stuff.
10:14ddellacostahellofunk: I would just use group-by val, then you can directly access the values as hashmap keys
10:14ddellacosta&(get (group-by val {:foo "foo" :bar "bar"}) "foo")
10:14lazybot⇒ [[:foo "foo"]]
10:14bacon1989question for you guys regarding InputStream, how would I pass into the InputStream.read(...) command? it's expecting a byte array as the first parameter, which appears to be passed by reference
10:14bacon1989which doesn't make sense in the java world, and even less sense in the clojure world
10:14koreth__There was an effort to rework ClojureDocs to make it more capable (and bring it up to date) but as far as I can tell that effort has been completely stalled out for quite a while now.
10:14bacon1989unless i'm supposed to use transients?
10:15ddellacostabacon1989: slight digression but have you taken a look at clojure.java.io? https://clojure.github.io/clojure/clojure.java.io-api.html
10:17TimMchellofunk: Google Guava has BiMap, but it's not persistent. (Might be immutable, at least...)
10:18cursorkhellofunk: No problem. I've just seen people make naive hashmap-reversing functions and end up in trouble
10:19bacon1989ddellacosta: interesting, but this is essentially creating a Java InputStream
10:21bacon1989doesn't appear to be any clojure methods here that jump out at me, how do I get data out of my input stream?
10:23bacon1989this is frustrating to no end, every single reader tries to read a file line-by-line, what if I have a constant 5mb binary? there are no lines!
10:23ToxicFrogbacon1989: clurp?
10:23ToxicFrogslurp, rather?
10:23bacon1989you mean slurp?
10:23bacon1989same problem, I feel like the implementation uses line-seq
10:24bacon1989because it only reads the first 5000 chars
10:24ToxicFrogIt does?
10:24bacon1989testing using a web browser produces the correct results
10:25bacon1989hmm.. maybe it doesn't
10:25bacon1989appears to create a stringbuilder, and .read into it
10:25bacon1989hmm...
10:25ToxicFroghuh
10:26ToxicFroguser=> (let [s (slurp "/tmp/8M")] (.length s))
10:26ToxicFrog1048576
10:26ToxicFrogThat's not the same result you're seeing, but it's not even slightly correct either
10:26bacon1989strange
10:27andyfbacon1989: Use Java read methods that work on InputStream objects using Java interop expressions: http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html
10:27ToxicFrogOh wait, no
10:27ToxicFrogI typoed the invocation of dd
10:27ToxicFroguser=> (let [s (slurp "/tmp/8M")] (.length s))
10:27ToxicFrog8388608
10:27ToxicFrogWFM
10:27joegalloheh, good ol' disk destroyer
10:28andyfkoreth_: The effort to rewrite ClojureDocs in Clojure (rather than the original Ruby implementation) is active recently: https://github.com/zk/clojuredocs/commits/clj-rewrite
10:28bacon1989I have something like this ToxicFrog http://pastebin.com/qNWRbhM5
10:28bacon1989output is: 1551324 2649
10:29andyfborkdude: If you don't want to wait for ClojureDocs to update (assuming it will), you can also try Grimoire: http://www.arrdem.com/grimoire/ https://github.com/arrdem/grimoire
10:29bacon1989content-stream is an EOFSensorInputStream from the org.apache.comm.http class, etc
10:30borkdudeandyf thanks
10:30andyfGrimoire is not as quick & simple to add/edit examples as ClojureDocs is, though.
10:30bacon1989is clojuredocs sortof set up like a wiki?
10:31andyfbacon1989: yes
10:31andyfbacon1989: but based on a custom implementation of its own, AFAIK, not some widely used wiki software
10:35Bronsaouch clojuredocs still links to clojure contrib :(
10:35sdegutisi made a wiki that has updated clojure docs, and imported all clojuredocs.org examples to it
10:35sdegutisand updated it for clojure 1.5.1
10:35sdegutisand people were like "screw you" so i deleted it.
10:39bacon1989why does this have to cause me so much grief
10:41sdegutis:)
10:41sdegutisbacon1989: grief is for when someone close to you dies
10:41sdegutisbacon1989: github wikis are for when you have a project that needs extra room for user-editable docs
10:42bacon1989my inputstream is something close to me, he just won't do what he's supposed to do
10:42bacon1989I think I might have to put him down
10:42bacon1989like an old dog
10:42andyfbacon1989: Have you tried Java .read ?
10:42andyfwith a specified buffer size?
10:44bacon1989andyf: does such a method exist? there appears to be only a .read(), and a .read(buf[]), which puts values into buf[]
10:44bacon1989which i have no idea how to implement in clojure, do I use transients?
10:45bacon1989slurp is implemented to .read()
10:45bacon1989it stops at the first negative input, as outlined in InputReader, is it getting a false negative?
10:47pandeiroi would like to use midje for e2e testing with webdriver as a standalone program (ie, testing an environment, not a particular project's code base) - is this possible? advisable?
10:47pandeiroi just tried to use it inside a -main function and got Exception in thread "main" java.lang.ExceptionInInitializerError
10:47andyfsorry, busy there for a bit
10:47andyf.read(buf[]) is what I meant
10:48pandeiroi'm thinking i must have failed to initialize midje in some way
10:48andyf(byte-array 50) create a byte[] with length 50
10:50pandeiroi found this from 2011: https://github.com/marick/Midje/issues/12
10:51pandeiroor maybe my issue is with aot (i am using the standard `lein new app` boilerplate) but i understood i will need that in order to work with an uberjar
10:54pandeirohm, looks grim: http://stackoverflow.com/questions/23018826/clojure-midje-using-aot-compilation-with-tests-inside-source-fails-to-run
11:03andyfbacon1989: In case you are still looking for a working example, read this: https://gist.github.com/jafingerhut/1c61ec6b99a7656895e0
11:07bacon1989thanks andyf, i'll give this a shot
11:13bacon1989andyf same results
11:14bacon1989it still maxes out at 2600 bytes
11:18andyfbacon1989: You mean it prints out one line that shows it reading 2600 bytes, or it prints out many lines saying it read that many?
11:18andyf(assuming you left the debug println in there)
11:18bacon1989andyf: I changed it to a bufsize of 512, and it prints out several reads
11:19bacon1989Read 512 bytes
11:19bacon1989Read 512 bytes
11:19bacon1989Read 512 bytes
11:19bacon1989Read 512 bytes
11:19andyfAll of them max size except the last one?
11:19bacon1989Read 512 bytes
11:19bacon1989Read 89 bytes
11:19bacon19891551324 2648
11:19bacon1989
11:19bacon1989
11:19andyfWhat is the size of the file you are reading?
11:19bacon19891551324
11:20bacon1989at least that's what the http-response says, but I know it's that big
11:20andyfno exception thrown?
11:20bacon1989nope
11:20bacon1989i feel like my client settings might have something to do with it, that's just a guess though
11:21andyfThe InputStream is created from what?
11:21bacon1989it's created from the entity
11:21ndalyso I've been out of Java for a while, and now when I look around I keep seeing @stuff
11:21ndalywondering what it meant, I did a quick search
11:21ndalythis reads like satire: http://docs.oracle.com/javase/1.5.0/docs/guide/language/annotations.html
11:21bacon1989andyf: http://pastebin.com/iC4zT9Ar
11:22bacon1989on line 7
11:22bacon1989this has worked just fine on every other call i've been making
11:23bacon1989but they've all been below the given length
11:23bacon1989I think I might start sending fake lengths, and see when the cutoff happes
11:23bacon1989*fake data of different lengths
11:25andyfI don't know what is going on there. I tested the code on some files on disk opened as InputStream, and it worked as expected. I would guess either the larger number is wrong, or the Java objects there are returning an InputStream that cuts off early for some buggy reason, but that is just guessing on my part.
11:28bacon1989yeah idk, it fails when I send a base64 Byte[2048]
11:28bacon1989this is rediculous
11:38bacon1989think I just figured it out!
11:38bacon1989http://stackoverflow.com/questions/6585191/string-that-came-as-http-response-cut-off-java-platform-android-3-0
11:39bacon1989haven't tried it yet, but I know i'm closing it partway through the request
11:41bacon1989that was it
11:42bacon1989ugh, what a pain in the butt
11:45bacon1989thanks for the help andyf, and ToxicFrog
12:00TimMcndaly: How so?
12:17Frozenlock"If you operate a commercial Web site or online service that collects personally identifiable information through the Internet about individual consumers residing in California who use or visit your website, your Privacy Policy must be California Online Privacy Protection Act compliant." California jurisdiction: the world!
12:22vermais there something like clj->js for clojure that converts a clojure object to a java object ... e.g. a hashmap to java Map<>
12:23sritchieverma: you can just pass it to the map constructor, I believe?
12:23vermayeah, but I was wondering if there's something more flexible .. converts array to ArrayList e.g. as well
12:23sritchieverma: (java.util.HashMap. {“a” 1 “b” 2})
12:24sritchieverma: sounds like a pretty easy protocol to write
12:24sritchieI don’t think clojure has that, though, no
12:24sritchieverma: why would you want to do that?
12:24sritchieverma: the data structures conform to java interfaces
12:25sritchieverma: why program against the specific java data structures when you could just use the interface, and keep the code nice and abstract
12:25vermasritchie, I want to push java objects to firebase, for http://github.com/verma/pani
12:25vermasritchie, you're right, I haven't really tried pushing stuff directly, may be that'll just work :)
12:25sritchieyeah, give it a try
12:28ndalyTimMc: "Annotations do not directly affect program semantics, but they do affect the way programs are treated by tools and libraries, which can in turn affect the semantics of the running program."
12:29ndalydoes it seem like a good idea to add something to a language that officially makes it so you can't tell what the code will do by just reading it?
12:29TimMcndaly: Ah, yeah, that's a pretty good line.
12:29Glenjaminyou mean like macros?
12:29Glenjamin:p
12:29ndalyGlenjamin: point taken :)
12:30vermasritchie, worked for maps :P trying other things
12:30ndalyGlenjamin: but annotations make me want to kill myself, and macros don't, so maybe I'm biased
12:31gfredericks
12:31gfrederickshas anybody worked on getting the new lein-release feature to create tags and/or gsub the README?
12:31TimMcndaly: Actually, it changes the behavior of *other* code, not the marked code -- unless you're bringing in bytecode weaving and other freaky things.
12:32ndalybytecode weaving sounds like dark magic
12:32TimMcIt allows you to inject behaviors into the code. :-/
12:33TimMcndaly: See https://code.google.com/p/gag/ for some horrifying examples.
12:34TimMcOh, I guess that's bytecode instrumentation, which is maybe different?
12:35Glenjamin@Roulette is awesome
12:38jcromartieany tips on troubleshooting startup times?
12:38jcromartiesometimes it takes ages to start a REPL
12:38TEttingerdrip?
12:38jcromartiesometimes not
12:39TEttinger$google clojure drip
12:39lazybot[Clojure · ninjudd/drip Wiki · GitHub] https://github.com/ninjudd/drip/wiki/Clojure
12:39technomancyclojurebot: faster?
12:39clojurebotIt's greek to me.
12:39technomancyclojurebot: faster boot?
12:39clojurebotIt's greek to me.
12:39jcromartieI don't want to work around a slow startup
12:39jcromartieI want to know why :)
12:39TEttingerDrip is a launcher for the Java Virtual Machine that provides much faster startup times than the java command. The drip script is intended to be a drop-in replacement for the java command, only faster.
12:39jcromartieI guess I could println in my namespaces
12:39technomancyclojurebot: faster boot is https://github.com/technomancy/leiningen/wiki/Faster
12:39clojurebotRoger.
12:40jcromartiethis is weird
12:40jcromartiefirst time, I get an OOM
12:40jcromartiethen it works fine
12:40TEttingerjcromartie, the JVM needs to load 32 MB of "kernel" into RAM before it can do anything
12:40jcromartiestarting from Cider
12:40TEttingerand that always takes time it seems
12:40jcromartieyeah, I am not talking about regular Clojure startup time
12:40jcromartieI'm familiar witht hat
12:41JaoodTEttinger: I don't think the problem is the JVM, it already starts up fast
12:41jcromartiethis particular app is obscene
12:41vince___Hi, all. I'm teaching myself clojure, and I got stuck on the following (I think basic) thingy. Its about applying map on a HOF. Example
12:41vince___(map + [1 2 3] [4 5 6]) -> (5 7 9)
12:41vince___but... (??? + [[1 4] [2 5] [3 6]]) -> (5 7 9)
12:41justin_smiththere is no hof there
12:41vince___which function to use for ???
12:41lazybotvince___: Yes, 100% for sure.
12:42justin_smithoh, I see
12:42TEttinger,(reduce + [[1 4] [2 5] [3 6]]) -> (5 7 9)
12:42clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to java.lang.Number>
12:42TEttingerhm
12:42jcromartie(partial apply map)
12:42justin_smith,(map (partial apply +) [[1 4] [2 5] [3 6]])
12:42clojurebot(5 7 9)
12:42jcromartie,((partial apply map) + [[1 4] [2 5] [3 6]])
12:42clojurebot(6 15)
12:42jcromartieoops
12:43jcromartieoh I see
12:43vince___let me try
12:43cbpmap #(reduce + %)
12:43justin_smith,(map #(apply + %) [[1 4] [2 5] [3 6]]) is better actually
12:43clojurebot(5 7 9)
12:44justin_smithcbp: apply + and reduce + do the same thing, but the former should be faster
12:44vince___ (reduce + [[1 4] [2 5] [3 6]])
12:44justin_smithvince___: not quite
12:44vince___gives me ClassCastException clojure.lang.PersistentVector cannot be cast to java.lang.Number
12:45vince___the one with map and apply works!
12:45vince___next step is to figure out why it works, but I consider that as an assignment :)
12:45justin_smith,(map #(reduce + %) [[1 4] [2 5] [3 6]])
12:45clojurebot(5 7 9)
12:46vince___(map #(reduce + %) [[1 4] [2 5] [3 6]]) also work
12:46vince___thank you, justin_smith
12:46justin_smithvince___: if you look at the source for +, you will see why they both work :)
12:46justin_smith$source +
12:46lazybot+ is http://is.gd/zSqIg7
12:46Bronsajustin_smith: reduce is actually faster
12:47justin_smithBronsa: oh, interesting
12:47justin_smithI guess because of the arity dispatch overhead?
12:47Bronsaproably, I never investigated though
12:47justin_smith$source apply
12:47lazybotapply is http://is.gd/ffhNFw
12:48justin_smithmaybe the overhead of apply
12:49bacon1989question: how do I slice an java array in clojure?
12:49Bronsajustin_smith: sorry I misunnderstood what you said before, arity dispatch is negligible, it's definitely because of apply overhead
12:50Bronsajustin_smith: apply has to count the args
12:53vince___is (map (partial reduce +) [[1 4] [2 5] [3 6]]) exactly the same as (map #(reduce + %) [[1 4] [2 5] [3 6]]) ?
12:53hellofunkddellacosta thanks for group-by suggestion
12:54gfredericksvince___: it has the same return value, yeah
12:54Bronsavince___: partial has some overhead over #()
12:55vince___okay, thanks
12:55gfredericksstack traces can be slightly less helpful with point-free style
12:58rurumateok this seems to work; it's the langohr "getting started" example, with a touch of component and async: https://www.refheap.com/87981
12:59rurumatenot sure if doing it right
13:02cespareIf you have (defrecord R [^String s]), if you have R in a macro, is there any way to get at the fact that s is type-hinted as a String?
13:02Farewow, while reading the python grammar, I realized it has limited destructuring in its arguments, too
13:03gfredericks,(defrecord R [^String s])
13:03clojurebotsandbox.R
13:03gfredericks,(-> ->R meta :arglists)
13:03clojurebotnil
13:03gfredericks,(-> #'->R meta :arglists)
13:03clojurebot([s])
13:03gfredericks,(-> #'->R meta :arglists ffirst meta)
13:03clojurebotnil
13:03cespareexactly :)
13:03gfrederickscespare: looks bleak
13:03gfredericks,(->R 42)
13:03clojurebot#sandbox.R{:s 42}
13:04gfredericksthat hint is just for interop in the record's body?
13:04cesparegfredericks: what does that mean?
13:04Bronsa,(defrecord X [^long x])
13:04clojurebotsandbox.X
13:04Bronsa,(X. "")
13:04clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number>
13:04BronsaI love how type hinting is not consistent at all
13:05gfrederickscespare: I'm wondering what you're using the type hint for
13:05cesparewait, that suggests that maybe I could use java reflection to get at the type maybe?
13:05cesparemaybe maybe
13:05cespareheh
13:05gfredericksBronsa: does non-primitive type hinting result in behavioral changes to non-interop code anywhere in clojure?
13:05Bronsagfredericks: not that I'm aware
13:06gfredericks,((fn [^long x] ['inc x]) "a string")
13:06clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number>
13:06cesparegfredericks: I have a fast record access macro so that (rget r :foo) will (a) raise a compile-time error if foo is not a field and (b) compile down to (.foo ^R r), which is the fastest kind of access
13:06gfredericksBronsa: seems consistent to me then, at least keeping a primitives vs non-primitives distinction
13:06cesparegfredericks: I want to make a similar thing for nested records
13:07gfrederickscespare: ah ha.
13:07cespareI guess I can make my own defrecord wrapper macro that records more type information in metadata.
13:08gfredericksmetadata on what though?
13:08cespareR?
13:08gfredericksthat's a class
13:09Bronsagfredericks: sure it's consistent between deftype and fn, not consistent between primitive/not-primitive hints though
13:09gfredericksBronsa: yeah but that's kind of jvm style. primitives act differently from Objects
13:10cesparegfredericks: define an extra method on it?
13:10cesparelike getBasis
13:10cesparei dunno.
13:10Bronsacespare: you can use getBasis to retrieve the tag
13:10cespareBronsa: but not the hinted type
13:10gfredericks,(.getBasis R)
13:10clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching field found: getBasis for class java.lang.Class>
13:10Bronsa(-> (R/getBasis) first meta)
13:10Bronsa,(-> (R/getBasis) first meta)
13:10clojurebot{:tag String}
13:10gfredericksmagic!
13:10gfredericks,(class (R/getBasis))
13:10clojurebotclojure.lang.PersistentVector
13:11cespareBronsa: hmm, thanks. I thought that was the first thing I tried.
13:12cesparehow long does the state of clojurebot hang around?
13:12gfredericks~10 min
13:12clojurebotexcusez-moi
13:13cespare,(def r (->R "hello"))
13:13clojurebot#'sandbox/r
13:13Bronsalol.
13:13gfredericksclojurebot: 10 min is 0.6944 centidays
13:13clojurebot'Sea, mhuise.
13:13Bronsa,(set! *warn-on-reflection* true)
13:13clojurebot#<IllegalStateException java.lang.IllegalStateException: Can't change/establish root binding of: *warn-on-reflection* with set>
13:13Bronsaff
13:13cespareBronsa: ah, that's what I was gonna do.
13:13Bronsa,*warn-on-reflection*
13:13clojurebotfalse
13:13technomancygfredericks: over half a kilosecond
13:13Bronsaweell
13:13Bronsaanyway http://sprunge.us/YQUW?clj this is funny
13:14cespare,(.startsWith (.s ^R r) "h")
13:14clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: r in this context, compiling:(NO_SOURCE_PATH:0:0)>
13:14cespareah, wiped?
13:14gfrederickstechnomancy: 19 microyears!
13:14cespareanyway, how come the field type hint doesn't come through?
13:14Bronsacespare: all fields are compiled to Objects
13:15Bronsaexcept for fields with primitive type hints
13:15cespareWhy?
13:15clojurebotcespare: because you can't handle the truth!
13:15gfredericksclojure is a big fan of Object
13:15cespareI'm getting that :|
13:15gfrederickscespare: usually type hinting is just used for avoiding reflection
13:16gfredericksnot for affecting other parts of the byte code
13:16gfredericksprimitives being the major exception
13:17Bronsagfredericks: I find it ridiculous that we have to pay the price of a checkcast for every interop call & can't improve type inference just because the compiler likes to compile everything as an Object
13:17gfredericks,(R/getFields)
13:17clojurebot#<CompilerException java.lang.RuntimeException: No such namespace: R, compiling:(NO_SOURCE_PATH:0:0)>
13:17gfredericks,(.getFields R)
13:17clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: R in this context, compiling:(NO_SOURCE_PATH:0:0)>
13:17gfredericks,(defrecord R [^String r])
13:17clojurebotsandbox.R
13:17gfredericks,(seq (.getFields R))
13:17clojurebot(#<Field public static final clojure.lang.Var sandbox.R.const__0> #<Field public static final clojure.lang.Var sandbox.R.const__1> #<Field public static final clojure.lang.Var sandbox.R.const__2> #<Field public static final clojure.lang.Var sandbox.R.const__3> #<Field public static final clojure.lang.Var sandbox.R.const__4> ...)
13:18gfredericks,(->> (.getFields R) (filter #(= "r" (.getName %))))
13:18clojurebot(#<Field public final java.lang.Object sandbox.R.r>)
13:18gfredericksBronsa: that I cannot defend :)
13:18silasdavisI can extend an interface with a protocol, a protocol generates an interface, can I extend a protocol with another protocol?
13:22gfrederickssilasdavis: I don't think so
13:23silasdavisdoes the interface generated have the same name as the protocol?
13:28sm0kehurm
13:28sm0kehttps://github.com/technomancy/leiningen/issues/1589
13:29rurumateok now also made a github, it's been a productive day https://github.com/methylene/langohr-component-async
13:29sm0keregarding this one..how do i have deployed jars renamed with the classifier name to coexist?
13:30technomancysm0ke: it looks like the docs for that are missing. probably hugod knows; iirc he added that.
13:30silasdavisgfredericks, looks like you can: same name as the protocol, i.e. given a protocol:
13:30silasdavismy.ns/Protocol, an interface: my.ns.Protocol.
13:31sm0ketechnomancy: let me put the comment on issue as well
13:32sm0ketechnomancy: do you think the default behaviour should be to append -<classifier-name> to jar file?
13:33technomancysm0ke: I think that's how it works
13:33technomancyat this point you'd have to read the source of jar.clj
13:33sm0ketechnomancy: ok so i can confirm this
13:34sm0keputting :classifer "xyz" .. and grep xyz * in ~/.m2/.. shows classifier in the pom.xml
13:34sm0kebut the jar is always deployed with the same name
13:34gfrederickssilasdavis: that's the interface though, not the protocol -- not everything that satisfies the protocol implements the interface
13:35silasdavisah
13:35silasdaviswhat wouldn't?
13:35sm0kesorry i mean *.pom
13:36technomancysm0ke: gotcha. not sure if there's a way to fix that, but repro details in the issue report would be helpful.
13:36sm0keok i will update issue description
13:47bacon1989can anyone tell me why out is an empty list in this stream reading function? http://pastebin.com/j7v4GFub
13:48gfredericksbacon1989: don't use transients that way
13:49gfredericksbacon1989: but your main issue is that for is lazy
13:49sm0kewow amazing that it doesnt work that way inspite of this
13:49sm0kehttps://github.com/technomancy/leiningen/blob/master/src/leiningen/jar.clj#L175
13:49technomancysm0ke: you may be the second or third person ever to use classifiers
13:49gfredericksbacon1989: transients should be used in the same way as the persistent data structures, i.e. by using the return value from conj!
13:50bacon1989ah
13:50sm0ketechnomancy: :P
13:51sm0ketechnomancy: you know what someday you would be doing so too and will thank me for reporting this :P
13:51vermasritchie, it works pretty well, only that I probably need to stringify-keys from keywords to strings, because they go as is and appear as :keyname on firebase :)
13:51bacon1989how the heck am I supposed to do this...
13:51bacon1989it seems like I need to write way more code than I should have to
13:52justin_smithbacon1989: you are using transients wrong
13:52bacon1989yeah, I got that, I was under the impression it was a mutable type, and conj! manipulated it
13:52justin_smithbacon1989: you need to bind to the return value of transients, they are not guaranteed to modify the value in place
13:52bacon1989apparently not
13:53sm0kehumm i am not sure if i am looking in the right place is jar.clj also responsible for deploying to local maven repo
13:53bacon1989actually, could I use set!?
13:53justin_smithno
13:53bacon1989or is that only for global vars, etc
13:53justin_smithuse the return value as a loop binding
13:53technomancysm0ke: might need install.clj and/or deploy.clj
13:53bacon1989justin_smith: i'd have to write a loop within a loop
13:54justin_smith(loop [out (transient [])] ... (recur (conj! out something)))
13:54bacon1989not that it's a big deal
13:54sm0keaha
13:54sm0ketechnomancy: jar function towards the end in jar.clj uses get-jar-filename*
13:54bacon1989justin_smith: is there an easy way to grab a subsection of a buffer?
13:54sm0keinstead of the classifed version
13:55bacon1989I mean, a byte-array
13:55justin_smithbacon1989: use reduce with conj! for the inner, instead of for
13:55sm0keoh but it calls classifed function
13:55justin_smithbacon1989: sorry, that was not an answer to your last question
13:55sm0keugh
13:55bacon1989justin_smith: so a reduce over the array index using aget
13:55justin_smithbacon1989: subseq
13:56justin_smitherr, never mind, not subseq
13:56sm0kehurm but looks like it doesnt passes the classifier at all
13:56bacon1989byte-array is considered a sequence?
13:56sm0keonly suffixes if we do a uberjar
13:57justin_smithbacon1989: no, don't use subseq, I was wrong
13:57gfredericks,(doc subseq)
13:57clojurebot"([sc test key] [sc start-test start-key end-test end-key]); sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (test (.. sc comparator (compare ek key)) 0) is true"
13:58gfredericksbacon1989: you shouldn't need an inner loop for what you're doing
13:59bacon1989gfredericks: if the entire buffer isn't consumed, won't it conj crap at the end of my output?
13:59justin_smith,(java.util.Arrays/copyOfRange (byte-array (map byte (range 8))) 3 7) bacon1989
13:59clojurebot#<byte[] [B@3a8544>
13:59bacon1989right... so there is no easy way to grab a range...
14:00justin_smithbacon1989: look above, that's an easy way to grab a range
14:00justin_smithmost of that code is just generating a byte array, for exampling purposes
14:00sm0keif i knew how to get :classifier for the current profile. we can patch it to (if uberjar? :standalone (classifer))
14:00bacon1989ah
14:01technomancysm0ke: don't think in terms of profiles; at that point all you have is a project map.
14:01justin_smith,(into [] (java.util.Arrays/copyOfRange (byte-array (map byte (range 8))) 3 7)) bacon1989: for clarity
14:01clojurebot[3 4 5 6]
14:01sm0keyes? (:classifer project-map)
14:01sm0kehow do i get project map?
14:01sm0ke:P
14:02sm0keor may be not so simple
14:02sm0keif its nested in a profile?
14:02technomancysm0ke: it's passed as an argument to the task function
14:02technomancysm0ke: during task execution, profiles don't exist
14:03sm0keaha
14:03technomancyonly the project map exists meaningfully
14:03sm0ketechnomancy: does the project map is as is? i mean are profiles merged in it?
14:04sm0keif merged we can just do (:classifier project) right?
14:04technomancysm0ke: yeah, the profile merge has happened upstream, but tasks shouldn't be aware of it
14:04bacon1989justin_smith: if I had an array of length 8, would I need to copyRange 0 7 to grab the entire thing?
14:04bacon1989i'm assuming it's zero-indexed
14:04technomancytasks must operate just based on the map they're given, which will have everything they need
14:04justin_smithbacon1989: you could just use into to get it as a vector
14:04justin_smithbacon1989: or seq to get it as a seq
14:04justin_smithetc.
14:04bacon1989yeah, maybe I should just do that
14:04justin_smith,(seq (byte-array (map byte (range 8))))
14:04clojurebot(0 1 2 3 4 ...)
14:05justin_smiththat example shows both halves of the monad (from seq to byte-array back to seq)
14:05justin_smithI thought you wanted some subsequence
14:06justin_smithok, now that I read that paste less myopically, you just want the whole array, and calling seq will just do the right thing there
14:06sm0keok got to sleep now.. i will try my hands on this and will send a pr for review by tomorrow..nobody else wants this anyways
14:07justin_smith(and less verbosely, since seq already checks the size etc.)
14:07bacon1989justin_smith: as in, it will truncate any garbage for me?
14:07justin_smithbacon1989: hmm, that may be a "try and see" type thing actually
14:07bacon1989I don't think it will
14:07justin_smithbut (take n s) is the solution if you get garbage
14:08bacon1989ah
14:12bacon1989I got an out of memory exception
14:12bacon1989i'm on the right track
14:13bacon1989is a string just a character sequence
14:14justin_smithwell, it does implement the CharacterSequence class
14:14justin_smith*interface
14:14justin_smith*CharSequence that is
14:15justin_smithhttp://docs.oracle.com/javase/6/docs/api/java/lang/CharSequence.html
14:15justin_smithit isn't just that, because it does stuff with interning, and immutibility, and hashcodes etc.
14:15justin_smithso it is more than just an Array of characters
14:21bacon1989I actually need a string of the output, so this is what i'm going to try after a reboot http://pastebin.com/LGHVkpRL
14:23bacon1989still getting out of memory, i'm doing something wrong here
14:27bacon1989screw it, i'm using slurp
14:31justin_smith,(String. (byte-array (map byte "hello"))) bacon1989:
14:31clojurebot"hello"
14:42alloyed 18:21 < bacon1989> still getting out of memory, i'm doing something wrong here
14:42alloyed18:25 < bacon1989> screw it, i'm using slurp
14:42alloyed18:30 < justin_smith> ,(String. (byte-array (map byte "hello"))) bacon1989:
14:42alloyedlol oops
14:43cespareIs there a reason the ->R record constructor cannot/does not attach a type hint to the result?
14:45cespareoh, because it's a function.
14:56gfrederickscespare: I think it still could
14:57gfredericks,(defrecord R [^String s])
14:57clojurebotsandbox.R
14:57gfredericks,(meta #'->R)
14:57clojurebot{:ns #<Namespace sandbox>, :name ->R, :file "NO_SOURCE_PATH", :column 0, :line 0, ...}
14:57gfredericks,(:tag (meta #'->R))
14:57clojurebotnil
15:00TEttinger,(:args (meta #'->R))
15:00clojurebotnil
15:00TEttinger,(:arglist (meta #'->R))
15:00clojurebotnil
15:00TEttinger,(:arglists (meta #'->R))
15:00clojurebot([s])
15:00TEttinger,(meta (:arglists (meta #'->R)))
15:00clojurebotnil
15:01TEttinger,(map meta (:arglists (meta #'->R)))
15:01clojurebot(nil)
15:01TEttingerhm
15:08gfredericksI'm surprised the metadata doesn't make it there even accidentally
15:08gfredericksseems like the natural impl would have to go out of its way to suppress it
15:11gfrederickscannot figure out where that gets lost
15:11gfredericks,(defn thing [^:foo a])
15:11clojurebot#'sandbox/thing
15:11gfredericks,(-> #'thing meta :arglists ffirst meta)
15:11clojurebot{:foo true}
15:12TEttinger,(-> #'->R meta :arglists ffirst meta)
15:12clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve var: ->R in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:12TEttinger,(defrecord R [^String s])
15:12clojurebotsandbox.R
15:12TEttinger,(-> #'->R meta :arglists ffirst meta)
15:12clojurebotnil
15:13TEttinger,(class R)
15:13clojurebotjava.lang.Class
15:13Bronsagfredericks: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_deftype.clj#L360
15:13TEttinger,(class thing)
15:13clojurebotsandbox$thing
15:13gfredericksBronsa: oh geez I missed that since it's shadowing
15:14gfredericksWELL GREAT
15:14avgerino_hello everyone
15:14Bronsagfredericks: there's no particular reason why this https://github.com/clojure/clojure/blob/master/src/clj/clojure/core_deftype.clj#L366 uses fields rather than hinted-fields though
15:14silasdavisgfredericks, earlier you mentioned that not everything that satisfies a protocol implements the interface
15:14silasdaviscouild you expand on that
15:14Bronsasounds like that would be a reasonable improvement
15:14silasdaviswhat doesn't for instance?
15:15gfrederickssilasdavis: anything you extend via extend-{protocol,type}
15:15gfredericksalso nil
15:15gfredericksI guess that fits under the prior definition
15:15silasdaviswhat about within defrecord?
15:15arrdemBronsa: er... do hinted fields make any sense except in the case of propagating the hint to (.foo my-record) cases?
15:16arrdemBronsa: in which case you take a cast check anyway..
15:16cespareI'm sure I'm being dense, but when I've got something like (let [s ^String (...)] (mymacro s)) why doesn't mymacro see the type hint on s?
15:16gfrederickssilasdavis: inline impls are via the interface
15:17Bronsaarrdem: gfredericks was wondering why the :arglists for ->record ctor doesn't preserve the hints
15:17arrdemBronsa: ah
15:17gfrederickssilasdavis: but inline isn't always possible, e.g. if two protocols have a function with the same name
15:17gfredericksarrdem: yeah it's not a big deal since the basis vector has them
15:18arrdemdevn: dare I ask what you're using git-bump for? :P
15:19silasdavisgfredericks, ah I had wondered about that
15:19silasdavisso I am controlling the record definitions, and I am extending the interface of the protocol with another protocol
15:19silasdavisreally it's a convenience to not have to repeat it
15:20silasdavisand I guess has some speed benefits
15:20silasdavisif I needed to I could copy the implementation into an (extend ...) macro
15:21silasdavisIs it possible to share implementation between and extend form and a defrecord form?
15:21silasdavisas a map
15:21silasdaviscould I splice it in, so I don't have repeat the defintion?
15:21gfredericksextend takes a map I think
15:22gfredericksI think doing a bunch of stuff programmatically via extend is the most flexible thing you could come up with
15:23cespareand same thing with functions. mymacro only seems to get hints that are given directly to its arg
15:24VfeHow can I ensure sequential execution of seveal functions? I’m having an issue where I have a let statement, and one of my assignments has to pull from a DB, and sometimes the functions afterwards executes before that assignment completes, and it ends up with a null value.
15:24silasdavislooking at the source, emit-defrecord is called by defrecord and is marked private
15:25silasdavisso I suppose if you want to share implementations you can't easily include them inline
15:25Bronsasilasdavis: extend takes a map of functions, defrecord does not
15:26silasdavisBronsa, yep I was aware of that, I was just wondering if I could use a macro or something to get the benefit of sharing implementations and the speed benefit of implementing inline
15:26JaoodVfe: use an atom
15:27Bronsasilasdavis: I wrote https://github.com/Bronsa/neurotic which allows you to share implementation between deftypes/defrecord
15:27Bronsanot between a deftype and an extend though
15:30silasdavisBronsa, bonkers
15:30silasdavisreally cool
15:30gfredericks,(->> (repeat 10000 ['(3) [4]]) (apply concat) (apply concat) (reduce +))
15:30silasdavisjust what I had in mind
15:30clojurebot#<StackOverflowError java.lang.StackOverflowError>
15:30VfeJaood: On what exactly? each element of the let? Here’s what’s going on, https://gist.github.com/VFe/3c8fe2f088301c931339 . I just want to make sure all let assignments complete before anything that will come after the let.
15:30silasdavishow much have you had to modify the implementations of defrecord*
15:30silasdavisI couldn't tell by inspection
15:30Bronsagfredericks: IIRC there's already a ticket w/ patch for that
15:31Bronsasilasdavis: I really don't remember
15:31gfredericksBronsa: yeah that was mine I just sometimes feel this insatiable urge to make the bot do something
15:31gfredericksit's a personal shortcoming.
15:31Bronsaah ok :)
15:31silasdavisBronsa, is it possible it could have diverged from functionality in 1.6?
15:32Bronsasilasdavis: let me check one sec
15:33Bronsasilasdavis: no there hasn't been any changes to defrecord/deftype since I wrote neurotic
15:33cespareIf I have (let [s ^String (...)] (mymacro s)) why doesn't mymacro see the type hint on s?
15:35JaoodVfe: on the data you are receiving from the DB, atoms will block until modifications on them are complete
15:36silasdavisBronsa, great thanks for checking I think I'll find this useful :)
15:36VfeJaood: Thanks!, I’ll give it a try.
15:37JaoodVfe: so your function after the let will run after the modification of the atom (retrieving the data from the DB) is complete
15:40JaniczekIs there a way for `cljsbuild test my-test-profile` not to run ALL cljsbuild tasks beforehand? I'd like it to not run any, or to at least run one, specified by me. This way testing takes too long because it compiles dev, prod, test, just about every cljsbuild build I have.
15:55borkdudeAre microservices a chance to smuggle more clojure into production?
15:58whodidthismaybe modestservices, jvm to big for micro
16:06gfixlerdoes clojure have a thing which I'm tempted to call juxtcat?
16:10borkdudeprobably not
16:11borkdudegfixler but mapcat can be used thusly:
16:12borkdude,(mapcat #(% 1) [vector vector vector])
16:12clojurebot(1 1 1)
16:12borkdudewhich looks kinf of like ((juxt vector vector vector) 1)
16:13gfixlerhmmm
16:13gfixler,(map (juxt #(apply vector %) #(apply (comp reverse vector) %)) ["foo" "bar" "baz"])
16:13clojurebot([[\f \o \o] (\o \o \f)] [[\b \a \r] (\r \a \b)] [[\b \a \z] (\z \a \b)])
16:13gfixlerjuxtcat would just merge those subcollections
16:14gfixler([[\f \o \o \o \o \f] [\b \a \r \r \a \b] etc...])
16:14borkdudegfixler what is the exact result you want. [\f \o \o \o \o \f ...], or a nested nested thing?
16:14gfixlerit's actually for 3-space stuff
16:15gfixler(map (juxtcat pos rot) ["node1" "node2" "node3"])
16:15gfixlerpos and rot would both give back [x y z] triples
16:15borkdudeI think a for comprehension might be better here
16:15llasramgfixler: So (comp (partial apply concat) (juxt ...)) ?
16:15gfixlerI suppose
16:15gfixlerI can make it happen a few ways, but clojure has so many of these little tools, I figured I'd ask :)
16:16llasram,(defn juxtcat [& args] (comp (partial apply concat) (apply juxt args)))
16:16clojurebot#'sandbox/juxtcat
16:16gfixlerllasram: yep, that would do it
16:17borkdude,(for [word ["node1" "node2" "node3"]] (concat word (reverse word)))
16:17clojurebot((\n \o \d \e \1 ...) (\n \o \d \e \2 ...) (\n \o \d \e \3 ...))
16:17gfixler,(map (juxtcat #(apply vector %) #(apply (comp reverse vector) %)) ["foo" "bar" "baz"])
16:17clojurebot((\f \o \o \o \o ...) (\b \a \r \r \a ...) (\b \a \z \z \a ...))
16:17gfixlerclojurebot abbreviates?
16:18gfixler,(map (juxtcat #(apply vector %) #(apply (comp reverse vector) %)) ["foo" "bar"])
16:18clojurebot((\f \o \o \o \o ...) (\b \a \r \r \a ...))
16:18gfixlerinteresting
16:18gfixlerborkdude: also a good idea
16:18llasramgfixler: (apply vector ...) is pretty much just vec, and in this context is pretty much just seq
16:19gfixler,(map (juxtcat #(seq %) #(apply (comp reverse vector) %)) ["foo" "bar"])
16:19clojurebot((\f \o \o \o \o ...) (\b \a \r \r \a ...))
16:19gfixleryep
16:20moeaI have a pretty simple macro which, for debugging, is doing this: (println (into {} (map (fn [[k v]] [(name k) (mapv str v)]) output-spec))), where output-spec is a literal map which is one of the macro's parameters
16:21moeait collapses three keys with distinct keyword names into nil - i.e. (name) is returning nil
16:22moea(class k) is Keyword
16:22moeaand doing (str k) results in ":keyword-name"
16:22moeaso i have no idea why name would be returning nil
16:23borkdudemoea because of the println
16:23borkdudeoh wait sorry, misread
16:24edwmoea: Could you re-post your paste?
16:26devnarrdem: RE: git-bump. i was stalking your github profile last night and thought it looked like it might be a good idea (maybe :)
16:27devnarrdem: I was thinking the hook could prompt me or something
16:27devnarrdem: another thought i had was to use rewrite-clj to auto-update my project.clj at the same time
16:27technomancydevn: ahem
16:27devntechnomancy: yessir?
16:27moeaedw: https://gist.github.com/moea/09f5465acec4f3333014
16:28technomancydevn: https://github.com/technomancy/leiningen/blob/master/src/leiningen/change.clj
16:28moeaoops
16:28edwThanks.
16:28devntechnomancy: :) oops
16:29edwThere's a lot wrong going on there, moea.
16:29technomancywell it is brand new functionality =)
16:30technomancydevn: also the release task
16:30devntechnomancy: that's really nice to have. i may try and co-opt some of that for hoplon
16:30edwmoea: Do you know that you can use `macroexpand-1` to see what a macro will expand into?
16:30moeaedw: yeah, i figured spitting it out would make it easier to talk about the about output
16:30technomancyman
16:31technomancyevery time I read Papert, I'm all "this guy knows where his towel is"
16:31technomancyhttp://www.papert.org/articles/ACritiqueofTechnocentrism.html
16:31amalloymoea: your macro only takes one parameter, but you're passing it four? that breaks long before this "collapsing different keywords" thing you're talking about
16:32edwmoea: Is this closer to what you were looking for?
16:32edwhttps://gist.github.com/moea/09f5465acec4f3333014#comment-1259965
16:32moeayeah, i screwed up paste, sorry :(
16:32amalloyedw: that would be a silly macro definition
16:33amalloyeven if you fixed it to compile, by adding the gensyms, you've just defined something that a function could do
16:33edwamalloy: Yeah, obviously.
16:33edwamalloy: I'm more of a "make it work, then explain why it was the wrong solution in the first place" kind of person.
16:33amalloywell, you missed step 1, then :P
16:34amalloyhis defmacro compiles and then fails when used; yours doesn't even compile
16:34edwI don't have a REPL open right now, and it might be half-written in Scheme.
16:35amalloyhis definition looks fine to me, honestly, as long as he only calls it with one argument which is a literal map
16:35gfixleredw: can confirm, it runs in (partial clojure scheme)
16:35gfixlerI mean (comp clojure scheme)
16:35amalloywhich is what he said was happening
16:35gfixlerthat's what I want someday - composable languages
16:36TEttingercan't racket kinda do that?
16:36gfixlerI don't know. I haven't used it
16:36edwgfixler: I've been writing some nasty `comb` templates that generate JavaScript inside HTML. It's not fun.
16:37TEttingerand wouldn't it end up with a JS/CSS/HTML hybrid monstrosity like web dev has?
16:37edwTEttinger: Yeah, good luck getting Emacs to indent that shit correctly.
16:38TEttingerhaha
16:38Frozenlockedw: Emacs can already indent many different codes in org-mode babel
16:39edwFrozenlock: So to edit HTML with embedded CSS and JS, I should use…org-mode?
16:39Frozenlockclearly the superior solution :-p
16:39Frozenlockorg-html-css-js, the future of the web
16:39moeanever mind, i'm a moron. part of me screwing up the paste was me removing a "name" parameter to the macro. so dumb.
16:39Frozenlockbe afraid, very afraid
16:40moeai also removed the body, which couldn't be accomplished in a function, FWIW
16:41edwmoea: In general 99% percent of what you want a macro to do *can* be done in a function, so make the macro nothing more than the syntactic glue-sugar to make that happen.
16:43cespareIf I have (let [s ^String (...)] (mymacro s)) why doesn't mymacro see the type hint on s? It seems like the compiler consumes the tag and the macro doesn't get to see it.
16:43cespareunless (...) yields something that is not a string.
16:45shiranaihitooff-topic, but educational: https://www.youtube.com/watch?v=5IJeemTQ7Vk
16:48edwshiranaihito: Troll elsewhere please.
16:49shiranaihitoedw: please remain calm :) you might want to watch the video anyway
16:49edwI don't think I'm ready to handle the Ron Paul Revolution.
16:49shiranaihitoi'm inclined to agree :P
16:51shiranaihitobut instead of objecting to seeing a video because it's got a controversial title, it might be more sensible to just watch it a bit further and see if it makes any sense etc
16:52bbloomshiranaihito: not appropriate for this channel.
16:54shiranaihitoyes, i was expecting a hostile reaction, but that's alright
16:55FrozenlockThat's even less related to clojure than my Carl Sagan videos.
16:58shiranaihitoobviously, the idea here was just to post a link hoping that someone would see it without having a fit, watch it and learn about the world we all live in.. i was well aware that it would be frowned upon, but linked it anyway.. on the other hand, i'd expect a bunch of people as smart as Clojure programmers to be reasonably well equipped to process new information
16:58amalloycespare: what do you mean, the macro doesn't get to see it? do you know how metadata works? try posting some compilable code, its actual results, and what you expected to see instead
16:59technomancy,(= "equipped to process new information" "appreciates political propaganda spam")
16:59gfredericksamalloy: I think he means the symbol passed to the macro doesn't have metadata
16:59clojurebotfalse
17:00amalloygfredericks: that would be one reasonable interpretation, but i'm not going to explain what's going on until i know that's the question
17:01TimMctechnomancy: If spam, why not kick?
17:02technomancyTimMc: I save kicks for repeat offenders =)
17:02TimMc*nod*
17:02gfredericksclojurebot: why is <reply> because that's not how macros work
17:02clojurebotRoger.
17:03TimMcI am a bit more of a hard-ass^W^W^Wproactive.
17:03Frozenlockand that's why we prefer technomancy :-p
17:04vermawhe I reify a java interface, do I have to implement all methods?
17:04TimMcI mod some subreddits and it would be really nice to have a /kick option to complement bans -- something where the offender has to take a small action to start participating again.
17:04Frozenlockseancorfield: I'm loading my database into into tokumx, I should be able to test congomongo with it very shortly.
17:05gfredericks,(reify clojure.lang.ISeq (first [_] 42))
17:05clojurebot#<AbstractMethodError java.lang.AbstractMethodError>
17:05gfredericks,(let [x (reify clojure.lang.ISeq (first [_] 42))] (instance? Object x))
17:05clojurebottrue
17:05gfredericksverma: I don't think you do?
17:07amalloyyou don't have to, but if anyone tries to call one of those methods they'll get an unpleasant surprise (and you're "supposed" to implement them all)
17:07stuartsierraAbstractMethodError is what you get, I think
17:08amalloyyeah, but only if someone calls it, not when you actually reify it
17:08stuartsierrayes
17:08gfredericksyou're supposed to? we're held to a higher standard than vectors implementing java.util.List?
17:08amalloygfredericks: they implement all of it
17:08amalloyas far as i know
17:08gfrederickswat
17:08amalloythey throw UnsupportedOperation for the mutating methods
17:09amalloyi mean, vector is written in java. it's impossible to not implement all of an interface in java
17:09gfredericksamalloy: oh is the exact exception type the relevant difference?
17:09seancorfieldFrozenlock: cool, i look forward to any tickets you raise to add full support! :)
17:09amalloyerrrr
17:09amalloywell, AbstractMethodError is kinda different
17:09amalloyit's not even an exception, it's an error
17:09gfredericksI'm just wondering where this supposing comes from since there seem to be a plethora of java interfaces that have sane partial implementations
17:10amalloyit's like a linker error
17:10gfredericksokay so that *is* the difference you're after then
17:10gfredericksand if there was a helper macro that threw the UnsupportedOperation then that'd be better?
17:10amalloygfredericks: the java.util.* interfaces explicitly say "if you don't support mutation, you can throw UnsupportedOperationException for those methods"
17:11gfredericksoh are they checked?
17:11amalloythrowing it for arbitrary other methods in other interfaces would be wrong
17:11amalloyno, it's just a sentence in the javadoc
17:12amalloyrelated: this is the minimum you have to implement for the clojure printer to be willing to print you as a sequence: ##(take 10 (reify clojure.lang.ISeq (first [this] 1) (more [this] this) clojure.lang.Seqable (seq [this] this) clojure.lang.Sequential))
17:12lazybot⇒ (1 1 1 1 1 1 1 1 1 1)
17:14gfredericksamalloy: TIL.
17:15amalloygfredericks: Error is supposed to be an indication that something is seriously wrong with the vm and you generally shouldn't attempt to recover
17:15gfredericksamalloy: that bit I was aware of
17:16amalloyit's always seemed wrong to me that clojure and/or the jvm let you define partial implementations of an interface that throw an Error when you try to use them
17:17gfredericksyou'd prefer the jvm abort when loading the class?
17:17gfredericksand/or the spec disallow it?
17:19amalloythat seems reasonable to me
17:19amalloyotherwise you can get a disastrous Error literally anywhere in your code, where you don't have any catch blocks set up to handle it because it's an Error
17:21gfredericksI think the biggest bug I've caught in clojureland was java.jdbc catching Exception around transactions
17:25cespareamalloy: gfredericks came up with several different questions: http://pastie.org/9369240
17:25cespareplease correct my misunderstandings
17:26amalloycespare: yes, reader metadata is for the compiler,not for you to work with at runtime
17:27amalloyif you want your m macro to work, you can/should write (let [^String s (str "1")] (m s))
17:28gfredericksamalloy: I don't think that works
17:29gfredericksamalloy_: well at least not the stricter thing I thought you meant, but you probably didn't
17:32gfredericks,(defmacro sym-meta [sym] (meta sym))
17:32clojurebot#'sandbox/sym-meta
17:33gfredericks,(sym-meta ^:foo ^:bar x)
17:33clojurebot{:bar true, :foo true}
17:33gfredericks,(let [^String s (str "1")] (sym-meta s))
17:33clojurebotnil
17:34Bronsagfredericks: you could always (ab)use &env
17:34gfredericks,(defmacro sym-meta [sym] (-> &env (find sym) key meta))
17:34clojurebot#'sandbox/sym-meta
17:34gfredericks,(sym-meta ^:foo ^:bar x)
17:35clojurebot#<NullPointerException java.lang.NullPointerException>
17:35gfredericks,(let [^String s (str "1")] (sym-meta s))
17:35clojurebot{:tag java.lang.String}
17:35gfredericksHUH.
17:35gfredericks(inc Bronsa)
17:35lazybot⇒ 27
17:35gfredericksI woulda declared that impossible
17:35Bronsathat's just horrible though never do that again
17:35TEttinger(inc Bronsa)
17:35lazybot⇒ 28
17:35Bronsaa puppy dies every time you use &env etc
17:36gfredericks,(defmacro sym-meta "Despite Bronsa" [sym] (-> &env (find sym) (some-> key) (or sym) meta))
17:36clojurebot#'sandbox/sym-meta
17:36gfredericks,(sym-meta ^:foo ^:bar x)
17:36clojurebot{:bar true, :foo true}
17:36gfredericks,(let [^String s (str "1")] (sym-meta s))
17:36clojurebot{:tag java.lang.String}
17:37gfredericksthere now it is more robust and production-ready
17:37gfrederickseh it should probably merge the two eh?
17:37gfrederickswe're already on version 0.2.0 of this
17:38gfredericks,(defmacro sym-meta "Despite Bronsa" [sym] (let [immediate (meta sym), env (-> &env (find sym) (some-> key) meta)] (merge env immediate)))
17:38clojurebot#'sandbox/sym-meta
17:38gfredericks,(sym-meta ^:foo ^:bar x)
17:38clojurebot{:bar true, :foo true}
17:38gfredericks,(let [^String s (str "1")] (sym-meta ^:immediate s))
17:38clojurebot{:tag java.lang.String, :immediate true}
17:41iamdustanTotal noob question here. I'm learning clojure right now and decided to do some codeeval's. Only problem is I cannot find any way to read from stdin like codeeval requires that works.
17:42Frozenlockseancorfield: Everything (except the geo thingy) is working for me... and the DB is indeed 90% smaller. o_O
17:42iamdustanit's example code looks like:
17:42iamdustan(doseq [line (remove empty? (line-seq rdr))] (do-something-with line)))
17:42iamdustanwhich throws an error about rdr
17:43iamdustanand another think I found on stackoverflow looked like the following:
17:43iamdustan(defn -main
17:43iamdustan [& args]
17:43iamdustan (with-open [rdr (clojure.java.io/reader (first args))]
17:43iamdustan (doseq [line (remove empty? (line-seq rdr))]
17:43iamdustan (println (solve line)))))
17:43iamdustanwhich also throws an error.
17:43Frozenlockseancorfield: the congomongo test returns 4 errors however. (on 52 tests / 180 assertions)
17:44FrozenlockStill, I'd say it's pretty impressive.
17:44iamdustanwait. that one doesn't error, it just doesn't ever print anything...
17:45seancorfieldFrozenlock: not bad!
17:45aperiodiciamdustan: is ##(doc read-line) what you're looking for?
17:45lazybot⇒ "([]); Reads the next line from stream that is the current value of *in* ."
17:45seancorfieldfeel free to open an issue with the test failure details and i'll take a look
17:45seancorfieldcan't promise anything, but i'll take a look :)
17:45Frozenlockunderstood :-p
17:47iamdustanaperiodic: trying that now. thanks
17:47aperiodiciamdustan: you probably would've found it by looking at http://clojure.org/cheatsheet
17:48iamdustanbookmarked!
17:56cespareamalloy_: oh jeez, thanks.
17:57amalloyman. my isp's field tech cannot fix my internet soon enough. it's frustrating getting dropped out of #clojure in the middle of explaining something
18:00amalloyhuh. i just got emacs to ask me if i want to abort and dump core
18:01amalloybut C-h l doesn't show me typing anything out of the ordinary. just a bunch of movement commands and then C-g
18:02amalloybut when i said "no thanks" it just went back to working as usual, so i guess i don't get to say i crashed emacs
18:05gfredericksamalloy: it asks me that almost every day
18:05gfredericksusually after I've been mashing the keyboard for a couple seconds
18:06amalloyreally???????
18:06gfredericksactually it's after accidentally backgrounding
18:06amalloyi've been using emacs for like four years, never seen that in my life. i feel like emacs is willing to do things with you it never does for me
18:06gfrederickskeyboard mashing -> in the background -> `fg` -> "abort and dump core?"
18:06gfredericksit's like this married routine we have
18:07amalloyand yes, i think it's backgrounding related. i discovered that i can't background it (C-z gets ignored) when i'm running it via `ssh some-host -t emacs`
18:07gfredericksz is my tmux hotkey so this stuff is complicated for me
18:07amalloyso i was smashing on keys to see what would happen
18:07gfredericksevery month or so I end up crashing my whole tmux session somehow
18:08arrdemBronsa: tejvm will only emit .invoke for {:op :fn-method}, right? I can't force a different method name without forking to my own emitter?
18:14Bronsaarrdem: yeah that's not really configurable
18:15arrdemBronsa: kay. thanks.
18:15Bronsaarrdem: but well, you could provide your own -emit multimethod that defaults to c.t.e.j.emit/-emit and provides different compilation methods for the op you need
18:16arrdemBronsa: I think that's what I'm gonna do, the question is whether the common set of emit operations is large enough to justify not just writing my own from scratch due to other differences.
18:17Bronsathat's up to you :)
18:18arrdem:P
18:31technomancyamalloy: spamming C-g will let you dump core at any point with emacs
18:32technomancyif you tip some threshhold
18:32amalloyfor real? nice
18:32technomancypresumably for debugging the lisp engine
18:32amalloyhuh, so it will
18:32technomancyI've only ever seen it over SSH
18:42gfredericks(inc technomancy)
18:42lazybot⇒ 117
18:42gfredericksthat explains a lot
18:42gfredericksspamming C-g is my primary debugging tactic
18:42Janiczek(inc gfredericks)
18:43lazybot⇒ 74
18:43gfredericksI'll assume I just got inc'd because I inc'd somebody
18:43gfrederickssomebody inc Janiczek plz
18:44Janiczekgfredericks: haha no, I liked the "spamming C-g" line. :)
18:44gfrederickscan we turn this into a pyramid scheme somehow?
18:44amalloyi'll never reveal the secret of my scheme, gfredericks
18:44gfredericksif anybody figures out how make sure that everybody involved inc's me for coming up with the idea
18:44seangrove(* -1 amalloy)
18:45amalloyseangrove: ITYM (- amalloy)
18:45seangrove(inc amalloy)
18:45lazybot⇒ 144
18:45technomancyI've upgraded to pyramid rackets.
18:46gfredericksyou guys had me suspecting I had missspelt something
18:48gfredericksis pyramid scheme the name of an interpreter?
18:49gfredericksif not I offer $10 to anybody who starts one and takes over the google search results for that phrase
18:49gfredericksI'll be willing to go up to $11 but that's my best offer
18:50j0niwin 2
19:06noncomhow do i make this work : https://www.refheap.com/87991
19:06noncomit does not accept "pres" there
19:06ShayanjmGiven a lazyseq in the form of (("thing1" "thing2") ("thing3" "thing4")...) - what would be the most efficient way to iterate over each sub-seq, determine if "thing2" and "thing4" are equivalent - and merge the adjacent elements together if they are (i.e: (("thing1 thing3" "thing2 thing4")))
19:07ShayanjmThe hard part is preserving the rest of the lazyseq as is
19:08noncomsplit in two lazyseqs ?
19:08noncoma lazyseq built from a lazyseq preserves laziness i guesss.. ?
19:09noncombut plitting them, you will have two seqs of equal length..
19:09noncomif that helps..
19:37Shayanjmyeah I'm drawing a blank here. Any help would be much appreciated
19:37ShayanjmI have a lazy-seq in this format: https://gist.github.com/shayanjm/51b19051fead468158a5
19:37clojurebotNo entiendo
19:38Shayanjmeach element of the lazy-seq has two values. I'd like to compare the second value of the element to the second value of the next element. If both are the same, I'd like to merge both elements together in the form ("thing1 thing2" "thing3 thing4")
19:39ShayanjmI'm just unsure as to how to iterate over the lazy-sequence, merge the elements and insert while still preserving the rest of the sequence
19:39arrdemwell that's a trivial reduce operation...
19:39arrdemI think there's a clojure core function for it
19:39Shayanjmseriously? :o
19:40amalloymapcat
19:40arrdemI was thinking for partition-by, which won't do this job
19:41ShayanjmMy issue is selecting a 'current element' and a 'next element'
19:41Shayanjmprobably just a mental block
19:42arrdem(reduce (fn [[previous-hunks this-hunk prev] this] (when (= (second prev) (second this))...)))
19:42amalloyare you sure you actually mean pairs of elements? it looks like your example wants to combine all the things whose second element is "O" together, or something
19:42amalloywhich is just partition-by
19:42Shayanjmamalloy: it's not. It must be adjacent elements
19:42amalloyarrdem: gross. not lazy enough
19:42amalloyright right, all the adjacent ones with the same second element
19:43ShayanjmYeah. I'm basically scraping for tags inside article content
19:43amalloyas opposed to each pair, which sounds very different: the number 2 is not special to you at all, so pair is wrong
19:43Shayanjmif two words next to each other are tagged the same (i.e: "Gaza" and "Strip" are both tagged as locations)
19:43amalloyyou just want (partition-by second xs)
19:43Shayanjmthey should be concat'd so it becomes "Gaza Strip"
19:43arrdemamalloy: you could partition-by over (map vec seq (rest seq))
19:44amalloyarrdem: there's no reason to do that. he doesn't care about pairs. he's just trying to partition-by. observe: Shayanjm, should '(("has" "O") ("launched" "O") ("what" "O")) all three be merged into one thing?
19:44ShayanjmThey could be. It doesn't really matter at that point
19:45Shayanjmbut if "launched" had something other than O attributed to it, they shouldn't be.
19:45ShayanjmIt probably would simplify things if the O's were merged as well
19:45arrdemamalloy: amaze me, I don't think that's possible with a single partition-by.
19:46seangroveJust to be sure, (doseq [s (doall (map :name some-seq))] ...) - the doseq isn't lazy, so the doall is unnecessary, right?
19:46amalloyarrdem: it is literally (partition-by second xs). that is is all that's being requested. then you map over that
19:46Shayanjmamalloy: xs?
19:46amalloyyour input seq
19:46Shayanjmoic
19:46Shayanjminteresting. Let me try
19:47gfixlerShayanjm: (map #(apply str (map first %)) (partition-by second '(("Israel" etc...?
19:47gfixlerall: critiques of this approach?
19:47gfixlernot lazy?
19:47amalloybut, as always, i'd like to repeat the general rule: if you want help writing a function to turn X into Y...include an exact, specific value for X and Y
19:47vermahey you guys think there's a better way of doing this: https://gist.github.com/verma/6cf76edffd91a93bac3e
19:48amalloyit dramatically cuts down on the pointless guessing and back-and-forth everyone has to do to figure out what you want to do
19:48Shayanjmamalloy: that's fair. The partition-by didn't work. I'll rewrite my gist so its more clear
19:48gfixlerShayanjm: partition-by works fine for me
19:48amalloyShayanjm: the partition-by gets things grouped together. then you map over the seq and format them however you want
19:48amalloyas in gfixler's example
19:49amalloywhich in fact is perfectly lazy
19:49gfixlermy apply str doesn't put in spaces, but that's simple enough to add in
19:49arrdem(inc amalloy)
19:49lazybot⇒ 145
19:49amalloygfixler: (clojure.string/join " " (...))
19:49Shayanjmoh you're right
19:49Shayanjmmuch appreciated amalloy gfixler
19:49gfixlerarrdem: is that a clojurecoin?
19:50amalloybut, really, combining the strings with spaces - are you *sure* you want to do that? having a list of strings instead of one string with spaces in it doesn't lose any information, and is easier to chew on later
19:50arrdemgfixler: I mean.. I'd dogetipbot amalloy but apparently I'm on thin ice as a channel nusance according to hiredman so I refrain
19:51gfixlerarrdem: I see. It's about day 4 for me on freenode, and day 1 for me on irssi; still learning
19:51arrdemgfixler: welcome then. yeah inc is for in-channel karma.
19:52arrdemnote that it's not really a function. code is , or & prefixed whereas inc is just a bot command.
19:53Shayanjmamalloy: I'm mining keywords from an article. It actually fuzzes the results by quite a bit if I'm returning multiple adjacent 'similar' elements
19:54amalloyShayanjm: feel free to combine them, but make it a list
19:54ShayanjmThat's fair
19:54amalloy'((gaza strip) (has whatever blah foo) (west bank))
19:59arrdemBronsa: is it safe to say that your bytecode AST is AST :- (Seq Op); Op :- [icode :- Keyword [ method :- Keyword . args :- (Seq Object)] ret-type :- Class]
20:02ttasterisco(karma amalloy)
20:02ttasterisco; how do I check the karma of someone?
20:02amalloy$karma ttasterisco
20:02lazybotttasterisco has karma 0.
20:02ttasterisco$karma amalloy
20:02lazybotamalloy has karma 145.
20:03ttasterisco$karma lazybot
20:03lazybotlazybot has karma 28.
20:03ttasterisco$karma clojurebot
20:03lazybotclojurebot has karma 40.
20:05Bronsaarrdem: uhm, not really, only a small part of the bytecode represent calls
20:06arrdemBronsa: yeah I see that as I'm reading more of this. disregard the above :P
20:06Bronsaarrdem: and besides, symbols/strings/classes/keywords can be used interchangeably right now
20:07Bronsaarrdem: also -emit doesn't return [bc*] for :method and :fn-method, which is something that'll probbaly need to change
20:07arrdemBronsa: yeah it doesn't, which is something I'm gonna have to change
20:08BronsaI was just too lazy to think of another function name for that so I implemented it with -emit
20:08arrdemI have my own -emit fork that handles only the AST elements involved in my hello world test. I'm going through transform.clj trying to get a handle on it so I can either use it or yak shave it into something I will use.
20:09arrdemI kinda feel like transform.clj is general purpose enough that it could be its own objectweb ASM wrapper lib..
20:09Bronsaarrdem: yeah it's easier to figure out all the allowed bc representations by reading transform.clj
20:09Bronsait's really straightforward
20:10arrdemBronsa: yah. probably a documentation patch headed your way once I'm done :P
20:11Bronsaarrdem: when I was moving CinC to the contrib infrastructure Rich proposed to pull transform.clj into its own library to manipulate bytecode
20:11Bronsathe reason why I didn't think it was a good idea is because as it is, it's pretty much just a POC
20:12Bronsabefore putting any considerable amount of work into making it more than just that I'd like to assess if it's reasonable to keep using this approach, performance wise
20:13arrdemyeah... I'm tempted to yak shave a pure clojure JVM class emitter but that's just a waste of time. a better objectweb ASM wrapper would be nice tho.
20:14Bronsaarrdem: I havent done any specific benchmark to see how much impact that little interpreter has on the compilation speed but I fear that all that destructuring + multimethod dispatching for EACH bytecode op might be too much
20:14arrdemBronsa: I doubt that's a problem. I'd expect that all the vector mashing you do in emit.clj is the primary roadblock.
20:14arrdemBronsa: I think that cleaning that up with a better bytecode DSL should solve most of our woes
20:16atyzDoes anyone have an opinion on the following om libraries: Devcards, om-tools or would you rather just use om?
20:16Bronsaarrdem: I talked with bbloom a while ago what the alternatives could be for avoiding all that unquote-splicing and he pointed me to his transduce library which he uses for flipp
20:18Bronsaarrdem: I looked into it and it looks like a reasonable approach but I haven't had the time to work extensively on tej yet, dunno if you'll have before me but feel free to experiment if that's the case
20:18arrdemBronsa: I'll check it out. I was just thinking that at an architectural level we don't really care about the sequence _type_ of bytecode so long as the _order_ is preserved. This means that if we represent a single op as an obvious {:op ..} map ala the rest of TANAL it's trivial to detect nested subsequences of bytecode that need to be inlined. This would let us make all bytecode generation lazy and soforth until it hits the emitter which is strict anyway.
20:19arrdembut it may be worth sweating the memory overhead of a crapload of small maps compared to some vectors....
20:19bbloomBronsa: i forget the details, but i'm not sure what i suggested transduce for..... i think i just suggested you do like fipp does prior to the transduce stage: where it does it's own serialization
20:19bbloomer linearization/flattening/whatever you wanna call it
20:20bbloomthe slow part being this:
20:20bbloom'`[~x ~@y ~z]
20:20bbloom,'`[~x ~@y ~z]
20:20clojurebot(clojure.core/apply clojure.core/vector (clojure.core/seq (clojure.core/concat (clojure.core/list x) y (clojure.core/list z))))
20:21bbloomnotice all the extra vector constructios, applies, concats, etc
20:21bbloomif instead you flattened seqs as part of the traversal, hiccup style, then you'd save a lot of construction/garbage costs
20:21arrdemYep.
20:23bbloomoh, and then there's metadata:
20:23bbloom'`^{:omg "this" :is "nuts"} x
20:23bbloom,'`^{:omg "this" :is "nuts"} x
20:23clojurebot(clojure.core/with-meta (quote sandbox/x) (clojure.core/apply clojure.core/hash-map (clojure.core/seq (clojure.core/concat (clojure.core/list :is) (clojure.core/list "nuts") (clojure.core/list :omg) (clojure.core/list "this")))))
20:23bbloomlol
20:24arrdemheh
20:24bbloomsyntax quote is killing your perf :-P
20:24Bronsabbloom: yeah right, I actually profiled that quite a while ago and I remember tej spending close to ~60% of the time flattening the bytecode
20:25Bronsagetting rid of that would be a good performance win
20:25bbloomthat's why i do this: https://github.com/brandonbloom/fipp/blob/master/src/fipp/printer.clj#L28
20:25Bronsabbloom: have you actually looked at how other lisps implement syntax-quote while writing backtick?
20:26bbloomwhere seqs are treated the same as a :span node: https://github.com/brandonbloom/fipp/blob/master/src/fipp/printer.clj#L43-L44
20:26arrdem&(seq? {})
20:26lazybot⇒ false
20:26bbloomBronsa: clojure's syntax-quote is pretty standard, but has some oddities regarding 1) metadata and 2) namespaces & symbol qualification
20:26bbloomand 3) the pretty standard gensym unification extension
20:27Bronsa2 and 3 shouldn't cause any performance problem here
20:27Bronsa1 probably does since it's operating on read-time literals that will have line/column/file metadata
20:27bbloomyeah, both of those happen statically
20:28bbloomyup :-/
20:28bbloombut good news is that you can just remove the `, ~, and ~@s and put a little flattening recursive walk around the whole thing, and the code basically doesn't need to change beyond that
20:28bbloomshould just be faster AND prettier
20:29BronsaI belive you on faster, not sure about the prettier ;P
20:29bbloomBronsa: how is simply removing some sigils not prettier?
20:29arrdembbloom: I don't think it's that trivial... remember the single op representation is [:keyword [] ..] and (seq? []) is definitely true.
20:29bbloom,(seq? []) ;nope
20:29clojurebotfalse
20:30arrdemwhy do I even bother..
20:30arrdemshrug. not the way I would have expected that to work. okay.
20:31bbloom~colls
20:31clojurebotcolls is http://www.brainonfire.net/files/seqs-and-colls/main.html
20:32Bronsaarrdem: you're thinking of seqable? which is not even in core unfortunately
20:32Bronsabbloom: ah nevermind I get what you're saying now
20:33Bronsabbloom: so the way it would work is, -emit would output nested bytecode and then flatten it before passing it to the bytecode interpreter
20:33bbloomBronsa: yup
20:33bbloomand as a bonus, the whole thing becomes lazy
20:34Bronsabbloom: not too sure if that'd be a feature we'd care about
20:35Bronsabytecode always needs to be emitted, being it generated lazily only adds overhead
20:35bbloomBronsa: won't hurt anything
20:37Bronsahttps://github.com/clojure/core.async/commit/4b06327455d993930a121db7ecfadc6359a23e95 looks like Rich forgot to commit this `transformer` function
20:40arrdemBronsa: hum... I guess this means (emit) should be AST -> (Seq Class) and then do (doseq [c classes] (load-class! (class->bytecode c)))
20:40arrdemwhich coincidentally is what I was looking at for Oxcart :D
20:40arrdemrather than just injecting classes in-place when they are generated..
20:43Bronsa;; (The hairier macro-character definitions, for #\# and #\`, are
20:43Bronsa;; defined elsewhere, in their own source files.)
20:43Bronsagreat I love searching for files
20:44Bronsaarrdem: Class being java.lang.Class or "class"?
20:44arrdemBronsa: class AST
20:45bbloomBronsa: where's that comment :-)
20:45Bronsabbloom: sbcl/src/code/reader.lisp
20:45Bronsabackq.lisp is where ` is defined btw
20:46Bronsaarrdem: sounds reasonable, but I'm not 100% sure it's going to be that easy
20:46Bronsaarrdem: I'm worried about nested functions for example
20:47arrdemBronsa: state monad or just a thread local atom. I'm kicking off a branch aimed at the latter.
20:47Bronsabbloom: it's never been a very pleasant read
20:48Bronsabbloom: reading through bits of the compiler made me realize how much not having implicit forward deps in clojure helps
20:49brehautBronsa: i believe F# explicitly forbids almost all forward deps they consider it so advantageous
20:50bbloomBronsa: define before use is the only sane thing for non-mutually exclusive functions
20:50brehaut(theres a mutually recursive thing for stuff within the same module, and via interfacse with objects)
20:55Bronsabbloom: so it looks like sbcl actually transforms `(~@'(1 2)) into `(1 2) at read time
20:56Bronsabeing able to do that could help us for metadata at least
20:56BronsaI could try doing something like that in tools.reader
20:57bbloomBronsa: seriously, just get rid of the use of backquote in emit
20:57bbloomBronsa: it should be a very straightforward change
20:58Bronsabbloom: yeah yeah that was unrelated to tej, I'm already sold on getting rid of ` there
20:59bbloomBronsa: i don't think it pays to complicate the reader with a very simple partial evaluation scheme
20:59arrdembbloom: agreed. let the compiler do the partial evaluation.
21:00Bronsabbloom: I've always had an issue with ` as it makes the output of macroexpand-1 barely readable
21:02Bronsasbcl also uses backq-cons and friends rather than cons so that the printer can output using `,@ rather than printing the expansion
21:03bbloomhuh?
21:03Bronsabbloom: * '`(,@x y) ;=> `(,@X Y)
21:04Bronsabackq-cons is just defined as (def back-cons cons)
21:04Bronsait's only as a hint for the printer
21:05bbloomi get it, but seems weird that it would print that way as if nothing happened
21:05bbloom,'`(~@x y)
21:05clojurebot(clojure.core/seq (clojure.core/concat x (clojure.core/list (quote sandbox/y))))
21:06Bronsabbloom: you'd really rather read a macroexpand output consisting of nested calls to seq/concat/list rather than some ~ and ~@ thrown here and there?
21:06tufttried to have the OOP/FP debate with a new colleague today -- need to sharpen up my arguments =)
21:06bbloomno i just don't understand what cons has to do with it
21:07tuftdoing a lot of FP here, but it's a hybrid language (Python), so it's a discussion every time someone new comes
21:07Bronsabbloom: oh suppose ` in clojure wasn't emitting (clojure.core/seq ..) but (backtick-seq ..) with backtick-seq defined as seq
21:07Bronsaevaluation is the same but when the form gets printed, the printer can check whether op is one of the backtick ops and pretty print it
21:07bbloomyeah, i get that, but then the printer is lying to you... it's telling you that it's got syntax-quote, but it's really got backtick-seq
21:08bbloomtwo different expressions shouldn't have the same printed representation
21:08bbloomalthough i guess that happens plenty
21:08bbloom,(int 5)
21:08clojurebot5
21:08bbloom,(long 5)
21:08clojurebot5
21:08Bronsa,(symbol "String")
21:08clojurebotString
21:08bbloomgrumble grumble
21:09bbloomcan't trust the damn printer at all
21:09Bronsa^that caused me&Andy a lot of troubles while debugging t.a.j once
21:09Bronsabbloom: I suppose there is a flag on the cl printer to turn off the backtick pretty printer
21:10Bronsayes the printer is lying to me, but I really don't care about what ` expands to
21:10Bronsathat's an implementation detail to me, I just want to see how the expression is shaped
21:11bbloomuntil you have some piece of code that tries to deconstruct a backtick form, and you're pulling your hair out b/c testing if the symbol = 'syntax-quote doesn't work b/c you should be testing for back-cons
21:12bbloomspeaking of silly things like that
21:12bbloom,`syntax-quote
21:12clojurebotsandbox/syntax-quote
21:12bbloom,`unquote
21:12clojurebotclojure.core/unquote
21:12bbloom,(let [x 1] `(clojure.core/unquote x))
21:12clojurebot1
21:12Bronsabbloom: well we have metadata, just output ^:backtick clojure.core/seq rather than clojure.core/seq :P
21:12bbloomthat's more reasonable...
21:13bbloomstill, damn lying reader :-P
21:13Shayanjmhmm
21:19ShayanjmI'm trying to do the following data transformation but having serious troubles constructing my reduce function...
21:19Shayanjmhttps://gist.github.com/shayanjm/054cdeb380bf2daf4b2b
21:19Shayanjmany pointers would be very helpful
21:23arrdemShayanjm: (for [tokens token-sequence] [(->> tokens (map first) (interpose " ") (reduce str)) (first (second tokens))])
21:23arrdemoops. flip the first and second
21:24arrdemthere may be something faster than the (reduce str), but I don't know it offhand.
21:27mangeI think (apply str ...) is a bit faster than (reduce str ...).
21:28bbloomapply str is definitely faster
21:28bbloomreduce str will be quadratic
21:28arrdembbloom: StringBuilder backed?
21:28bbloomvariadic str uses a string builder, and will be amortized linear
21:28arrdemyep.
21:28arrdemdo that then.
21:29bbloomit's kinda a shame that (into "" ...) doesn't work :-)
21:29arrdem:P
21:29Shayanjmso (for [tokens token-sequence] [(->> tokens (map first) (interpose " ") (apply str)) (first (second tokens))])?
21:30arrdemShayanjm: flip the first and second. it needs to be (second (first))
21:30arrdemShayanjm: right, because that's pulling the first (token, value) pair and taking the value of it.
21:30ShayanjmRight right
21:30Shayanjmso I guess a follow up question: is there a way to do this in a single reduce function?
21:31Shayanjminstead of using a for loop, etc.
21:31arrdemwell... for isn't a loop. it's a sequence comprehension that's lazy.
21:31arrdemso it's better than reduce :P
21:31Shayanjm:o
21:31Shayanjmyou just blew my mind
21:31arrdem:D
21:31ShayanjmI've been avoiding using for this whole time for that reason
21:31Shayanjm"nah for's probably not lazy. Probably would be way less performant than reduce"
21:31Shayanjmlol thank you so much
21:31arrdemhttp://grimoire.arrdem.com/1.6.0/clojure.core/for/
21:31amalloyShayanjm: it's pretty easy to test that theory
21:32Frozenlock'for' is awesome http://programming-puzzler.blogspot.ca/2013/03/logic-programming-is-overrated.html
21:32amalloy,(first (for [x (range)] (+ 100 x)))
21:32clojurebot100
21:32arrdemFrozenlock: haha love that post
21:32amalloytada, must be lazy!
21:33FrozenlockIt took me a while to notice the (range) in there
21:34Frozenlock... which is why it must be lazy.... for those even slower than me :-p
21:57cespareIf I change from plain jetty to http-kit, does that change/break usage of dynamic vars?
21:57cesparegiven that dynamic vars are thread-local and http-kit is presumably multiplexing multiple requests onto a single thread?
22:41justin_smithcespare: yeah, you'll have to avoid using dynamic vars mostly with http-kit
22:41justin_smithwhich is for the best, I think
22:42justin_smithyou can just put whatever data you need for that request into the request map intself
22:42justin_smith(if it is not localized in lifetime enough to be a local in one let block, of course)
22:45justin_smithyou already have the request map as a per-request data store, you don't need to also assume that a per-thread data store will also map seamlessly to per-request (this is ugly even if you aren't using http-kit)
22:51bsimaAre there any API docs for the enlive library? I'm doing some web scraping…
23:02ddellacostabsima: you're probably best of digging through the code itself, in my experience. Other than that there is just the main README and tutorials linked to from there (https://github.com/cgrand/enlive)
23:02ddellacosta*best off
23:03bsimaYeah I've decided that's what I'll do. The code is a tiny bit messy though… maybe api docs will be a future pull request of mine…
23:13hellofunkis there a more idiomatic/efficient way to write (or (= t 2) (= t 33) (= t 56)) for checking if a value is one of three possibilities?
23:13technomancy,(#{2 33 56} 2)
23:13clojurebot2
23:13Frozenlocknooooo, I wanted to be the one to answer that!
23:13hellofunkwell now how about that
23:14technomancyFrozenlock: learn dvorak and type fast like meeeeee
23:14technomancy(never mind that none of those were letters)
23:15hellofunktechnomancy are you referring to the new world symphony?
23:15FrozenlockIs there a difference in speed for (some #{2} [2 33 56])?
23:15amalloyFrozenlock: well, do you think there should be?
23:16Frozenlockno...
23:17amalloyof course, if they're both literals it's O(0), because you could just reduce to either true or false
23:17amalloybut try making the set of numbers to compare against larger, say a million elements, and imagine someone passed it to you
23:18hellofunk(some.. ) will bail on the first match, right? so out of a million, if the 10th matches, only 10 were looked at
23:18hellofunkdoes the set as function behave that way as well?
23:19Frozenlock,(time ((set (range 1000000)) 2))
23:19clojureboteval service is offline
23:19amalloylike, i'm imagining (let [candidates (vec (range 1e6))] (fn [x] (some #{x} candidates))) vs (let [candidates (set (range 1e6))] (fn [x] (candidates x)))
23:20hellofunkamalloy my *guess* is that the some.. operation is better performant
23:20amalloyhellofunk: no, it is terrible
23:20FrozenlockReally? In my repl the 'some' is much, much faster
23:20amalloyif the thing you're looking for is the last element, you have to look at every possible item in the seq
23:21hellofunkamalloy so how does the set-as-function do it, not also looking at every possible item?
23:21amalloysets are hashtables
23:21amalloyit hashes the input, looks in the place it should be, and returns true if it was there
23:21hellofunkamalloy ah, there like an optimized tree behind the scenes and handled thusly rather than sequentially
23:21amalloy(the algorithm is more complicated than that because of persistent data structures, but that's an idea)
23:21Frozenlock(time (some #{1000000} (range 1000000))) ---> 166ms
23:22Frozenlock(time ((set (range 1000000)) 2)) ----> 1109ms
23:22amalloyFrozenlock: you're timing the wrong thing
23:22Frozenlockthe time to make the set?
23:22hellofunkshould time something late in the sequence, not early
23:22amalloyyes
23:22amalloytake the two functions i defined above
23:22amalloydef them to via-set and via-vec
23:22amalloyand time them on looking up (dec 1e6)
23:23Frozenlockokay... but why would we already have the set ready?
23:24amalloyFrozenlock: because you're planning to compare against it often, in some app that loves to check whether x is either 1 or 5 or 22 or whatever
23:24amalloythe original example was (or (= t 2) (= t 33) (= t 56))
23:24amalloyit you want to look up against that often, of course you'll define a set #{2 33 56} once, and then use it over and over
23:24ddellacosta_,(println "test")
23:24clojurebottest\n
23:24amalloyand of course if you only want to look up once, who cares what's fast
23:25FrozenlockMakes sense.
23:25ddellacosta,(println "test")
23:25clojureboteval service is offline
23:25ddellacostaFrozenlock: you can't use clojurebot either?
23:25amalloy,1
23:25clojurebot1
23:26FrozenlockTho I might have taken for granted that (#{...} x) is faster than 'some' for all cases, but it really depends if you are always doing the same comparison.
23:26Frozenlockddellacosta: no. Clojurebot hates us I suppose.
23:26ddellacostaFrozenlock: well, for me it rather seems that hiredman hates me: https://github.com/hiredman/clojurebot/blob/master/clojurebot-facts/src/clojurebot/facts.clj#L72
23:26amalloyFrozenlock: using a literal set is never going to be fast
23:27ddellacostaFrozenlock: but not sure why that's true for you. Maybe he has blocked you too randomly and hasn't committed it. Ridiculous.
23:27amalloybecause you have to build the set before using it each time, which takes linear time
23:27Frozenlockddellacosta: loool
23:27hellofunkamalloy unless you build it just once
23:27amalloyhellofunk: right, i meant a literal set inline
23:27amalloyobviously if you let it, as in my example, and use it often, that's fast
23:28hellofunkthere's nothing like a good let over lambda
23:29hellofunkddellacosta aren't you getting hit by a major typhoon like right now?
23:29ddellacostahellofunk: yeah, supposedly...we'll see!
23:29hellofunksaw it on the news
23:30hellofunkseems like every year they say "the biggest one yet!"
23:31hellofunkamalloy where did you find your prowess, were you born programming?
23:35hellofunki suppose that sounded rhetorical yet it was not.
23:37hellofunkif there was an equivalent to practicing musical scales for programming, i'd think a few of you did it for many hours a day for many years, from the insight that's shared in here
23:38ShayanjmNo kidding
23:40amalloyhanging out in irc and on stackoverflow and answering questions is a big help. even if you get all the answers wrong for months, doing the research to formulate a plausible answer, and then being corrected by someone who knows more, is a great way to expand your knowledge
23:40arrdemTL;DR while getting corrected by amalloy may be bad for the ego, it's good for the code :P
23:40hellofunkamalloy it's hard for me to imagine you getting all the answers wrong for months :)
23:42amalloyhere's a short article about eric lippert - the advice made a big impact on me: http://www.informit.com/articles/article.aspx?p=1919436
23:42amalloyarrdem: the tldr is actually that i started learning clojure by: learning the absolute basics, then hanging out in #clojure and listening, and trying to repeat answers i'd heard already
23:42technomancyhanging out on IRC you just get exposed to ambient information
23:43amalloythere's nothing magical about it
23:43technomancyfor instance I've never done cljs but I can still tell when people make certain common mistakes
23:43technomancysame with vim
23:43amalloyright, same here
23:43arrdemamalloy: funny to hear you say that. I'd say the same with you, technomancy and the rest of the lurkers as primary sources
23:44amalloysure. technomancy has been around longer than i have, of course - i was learning especially from him, hiredman, and chouser, iirc
23:44hellofunkinspiring
23:45amalloyplus i learned some fun tricks by reading others' 4clojure solutions
23:45technomancytrue fact: when we hired hiredman there was some reluctance because we were afraid he'd have less time to help people on IRC
23:45hellofunk4clojure is amazing stuff man. i think it's the single best tool in becoming good at clojure (and I have a long way to go)
23:46amalloyi'm glad it's still finding new people to help
23:46hellofunkamalloy i hope that site doesn't go anywhere (and its database of answers)
23:46amalloyhellofunk: i don't have any plans to take it down
23:47hellofunkamalloy i'd love to see just an athology of sorts of all the questions and the answers by the top 100 users for each question. that is better than any book.
23:48technomancysomeone should do machine learning on the logs
23:48amalloyhmmm
23:48technomancymaybe ... someone who is looking to learn clojure
23:48amalloytechnomancy: devn did that, or something like it
23:48technomancyoh, that's right
23:48amalloyhttp://getclojure.com/
23:48technomancydid it classify the questions and rank them?
23:48hellofunkas I've gone through the site, i've taken pdf exports of certain questions answers that were thought provoking, but it's time-consuming to do that for all of them
23:48arrdem(inc technomancy) ;; I had the link to getclojure months ago and lost it
23:48lazybot⇒ 118
23:49technomancyappears to be borked
23:49arrdemhork and bork.. totally technical terms
23:49hellofunki cannot tell what getclojure is supposed to be/do
23:49amalloyhuh, that's a shame. he should have written it in a more stable language, like php
23:49arrdemamalloy: but then his immutable dates would have a modify method...
23:50amalloyhellofunk: you were supposed to enter functions you're interested in, and it would search the #clojure logs for example uses of it
23:50hellofunkah