#clojure logs

2014-08-18

02:01shafirehi, does someone has clojure performance benchmarks of openjdk/oracle jvm?
02:05TEttingershafire, what benchmarks do you have in mind?
02:06shafirejust the same code runned on the openjdk/oracle jvm (same version)
02:17TEttingershafire, I think with JDK 7 onward they basically use the same code
02:18TEttingerthere's some options for opts with custom OpenJDK builds that aren't possible for legal reasons with the closed oracle JDK
02:18shafireTEttinger: that's what I read too, over 96 % the same code.
02:21TEttingershafire, in my experience with Packr (useful for bundling JREs with applications to distribute to users who might not have recent java), there's a lot of the JRE that is completely unneeded for most apps
02:21TEttingerbut you can't legally modify JDK 7 if you got it from oracle
02:22TEttingeran interesting thing is that on 32-bit windows, openjdk will smoke oracle
02:22TEttingerbecause 32-bit windows doesn't have a --server flag implemented on oracle and does on openjdk
02:23TEttinger(although it may use a ton of RAM)
02:24JaoodI hear that with java 8 you can streamline the jre
02:24TEttingerJaood, I heard that too, though I don't know if you can redistribute it?
02:25Jaoodno idea
02:37andyfshafire: There are some micro-benchmarks, i.e. of small Clojure expressions executed many times, on many different versions of Clojure and several different JDKs, here: http://jafingerhut.github.io/clojure-benchmarks-results/Clojure-expression-benchmarks.html
02:39TEttingerJaood, just found it, it's a total joke http://www.oracle.com/technetwork/java/embedded/resources/tech/compact-profiles-overview-2157132.html
02:39TEttingeronly in the embedded jre, and you have better control under OpenJDK
02:51sm0keif i am trying to do lein repl and i get https://www.refheap.com/89241, how do i go about debugging this
02:52sm0kelein install works otoh
02:52sm0keoooooio: hey stop spamming
02:53TEttingerpretty sure that's a bot
02:53sm0keyep
02:54TEttingersm0ke, you probably have a toplevel form being run when it loads a namespace
02:58sm0kehurm how do i find that rat
03:00sm0kei just upgraded lein today
03:00sm0kelet me switch back to 2.4.2
03:02sm0kewow! seems to work find with a lein from a repo once if forked from git
03:02sm0kefine
03:03TEttingersm0ke: /me head explode
03:04sm0keyou not taking it seriously, but on the old version I could not get deps :tree working
03:05sm0keso i clone lein at some point of time, I gave up when the calls for :tree went into aether
03:06sm0kei think there is some circular dep bug in way aether resolves dep
03:06sm0kelet me see if i can reproduce this in a small project
03:07sm0keCan i get back 2.4.2 for time being
03:07sm0kethere should be a lein degrade too
03:10TEttingersm0ke, yeah, uh delete the jars in the lein folder, I think ~/.lein
03:10TEttingerI could be wrong here easily
03:10sm0keTEttinger: Ok i am able to reproduce it
03:10sm0keTEttinger: filing an issue on git
03:11TEttinger~/.lein/self-installs
03:11clojurebotTitim gan éirí ort.
03:11TEttingergood good, technomancy I hope can fix it like lightning
03:12sm0ke:P not so easily..let me first check it on some other machine to make sure i am not fooling around
03:15TEttingerDID YOU KNOW THAT Phil Hagelberg is an anagram of Bagel Pile Grhh?
03:19phillordNo, but now I do, I feel that my life has been changed for ever
03:27amalloyi imagine "Hrgh, bagel pile" could be something he says when he wants breakfast
03:29lvhTEttinger: my passport name is an anagram of "Unshaven Aunt Lover"
03:29lvhTEttinger: You understand why I don't use it often.
03:29TEttingerthat's uh, a lot of vowels
03:29TEttingerand v's
03:33mskoudHow can we handle sessions in webapps in a clean functional manner? Using noir's session/put! will add side-effects to an othervice nice function. Is there a good solution?
03:39sm0keWho do you find that anagram?
03:39amalloysm0ke: there are anagram generators online
03:39sm0kewhich is the funny one?
03:47TEttingerhttp://wordsmith.org/anagram/ sm0ke
03:47sm0keTEttinger: #1647
03:47TEttingerin lein?
03:48sm0keyes
03:54hyPiRionsm0ke: Is the hbase sources proprietary? because I get a "Could not find artifact org.apache.hbase:hbase-common:jar:0.98.4" error for them
03:55sm0keoh crap! could you please suffix hbase sources with "-hadoop2"
03:55sm0kei will update the isssue description
03:55sm0kei mean versions
03:55sm0ke"0.98.4-hadoop2"
03:56hyPiRionoh, alright
03:56sm0kemy names anagram is "Labored Puke"
03:56sm0kehaha "Bad Leek Pour"
03:58sm0keHey! is TEttinger and hyPiRion the same person?
03:59hyPiRionsm0ke: yeah, I can reproduce that. Dang, thought we solved that issue :/
03:59sm0kehyPiRion: what is it?
03:59hyPiRionsm0ke: no, I am not TEttinger
03:59hyPiRionsm0ke: Oh, there was a stackoverflow issue we just fixed on master, I was hoping this was the same.
04:00sm0kei actually tried to figure this but gave up, actually the call to pomergenade library is rouge
04:00hyPiRiontechnomancy/leiningen#1491 <-
04:00lazybotRunning `lein deps :tree` may overflow the stack -- https://github.com/technomancy/leiningen/issues/1491 is closed
04:00sm0keyes yes, i mentioned this in the issue too
04:01hyPiRionhrm
04:03TEttingerthe hyPiRion can be distinguished from the TEttinger in the wild by its extensive use of non-alphanumeric calls and stable, largely diurnal sleep cycle
04:05TEttingerI've been watching a lot of nature documentaries lately
04:05TEttingernature is a fantastic thing
04:07sm0kenature is not a thing!
04:07hyPiRionsm0ke: the hyPiRion can be distinguished from the TEttinger through /whois calls as well
04:09sm0kethe confusion was caused, because i was talking to TEttinger but suddenly hyPiRion started asking questions as if he was aware of the context
04:09sm0kemay be he was eaves droping earlier
04:10hyPiRionsm0ke: oh, sorry. :p I looked through the logs, and saw something about lein, stackoverflows and dependencies. Since we just fixed something similar, I was wondering if this was the same issue
04:10hyPiRionunfortunately it wasn't =/
04:12sm0kehyPiRion: could you please add "P1" label too
04:14sm0keif you agree that is
04:14hyPiRionWell, I don't think we have a P1 label, but I'll forward it to the rest
04:15sm0kebut i get a feeling this is going to be pushed to to pomegranate
04:15hyPiRionright, I am not sure where the problem resides yet
04:15hyPiRionseems pretty critical to not be able to use dependencies due to stack overflows
04:15sm0keyep its a dealbreaker
04:16sm0keand pomegrante for sure will push this to aether
04:16hyPiRionIf it's an aether issue then we have a serious issue
04:17hyPiRionwould be strange if it was though, as Aether is quite heavily used.
04:18sm0keleiningen/core/classpath.clj dependency-hierarchy
04:18sm0kethat is the culprit
04:18sm0keit never returns
04:18sm0keaether/dependency-hierarchy to be precise
04:20sm0kethis was when i was checking it for deps :tree, not sure if repl command also has same code path
04:21hyPiRionlein runs deps beforehand, which uses dependency-hierarchy
04:26TEttingerhttp://www.infoworld.com/print/247823 heehee clojure can work away from the JVM, but Java not so much...
04:36sm0keis anyone running openjdk on production machines
04:37sm0kepeople still seem to stick to oracle's jdk
04:40TEttingersm0ke, I don't think Oracle JDK 8 was immediately available for linux
04:40TEttingerat least OpenJDK wasn't
04:40sm0kejdk8 is brand new who cares
04:41TEttinger(I still haven't seen a jdk 8 build for 32-bit windows)
04:41TEttingerbut yeah there's a definite gap in when these things are available
04:42TEttingerI don't think openjdk has any of the old problems with stability it used to
04:43schmirCan anyone explain to me why openjdk exists and what's the relation to oracle's jdk?
04:44vijaykiranschmir: http://stackoverflow.com/questions/11547458/what-is-the-difference-between-jvm-jdk-jre-openjdk
04:44sm0kesome part of sun jdk was closed source and remaining was donated as open jdk i guess
04:44winkthe best reason why it exists: because there's no harm in having alternatives
04:45TEttingerthey're mostly the same code, JDK 7 was largely imported from OpenJDK work
04:45TEttingerpeople can contribute to OpenJDK without being Sun/Oracle employees
04:45hyPiRionalso http://www.oracle.com/us/products/export/export-regulations-345813.html – which OpenJDK isn't affected by.
04:58lintomaas
04:58TEttingerhyPiRion, woah
04:58TEttingerI guess siemens isn't using java
05:00TEttingerhttps://en.wikipedia.org/wiki/Stuxnet the nuclear centrifuges that iran used (and got wrecked by stuxnet) were made by siemens
05:05sm0keno way
05:05sm0kemade for rather
05:08hyPiRionTEttinger: they can use OpenJDK without any issues
05:09TEttingerhyPiRion, true!
05:10TEttingerseems odd though, hyPiRion
05:11TEttingerwhy would there be any real danger from allowing a java implementation to be used in, say, Cuba?
05:11winkwebscale is not for commies!
05:12TEttingerwouldn't having large homogeneous installations be beneficial for cyberwarfare against those countries?
05:13winkthere used to be a huge difference in quality though
05:13hyPiRionIt's a strange thing. I guess it is an overly broad export regulation rule
05:13winkback at java 5 or maybe even 6
05:14winksome pieces ran flawlessly only on sun/oracle jdk and some on openjdk
05:14TEttingerwink, yeah i remember
05:14winkor if they ran correct, the speed diff was many 100 %
05:15TEttingerI've run all my latest clojure stuff on openjdk without issue though
05:15TEttingerI think I had one issue related to memory usage maybe, it didn't read the correct total RAM on this computer
06:02sm0keis there any plans for https on conjars?
06:12TEttingerconjars?
06:13lvhclojars probably :)
06:15sm0keugh..there is a conjar too!
06:15sm0kehttp://conjars.org/
06:16sm0kehurm why would they pick such name
06:16sm0kecon jars ?
06:16sm0keits so obviously farud
06:16staindon't download that conjar!
06:16karlssm0ke: the company behind it is concurrent inc. probably a play on words con-current, con-jars.
07:04sveriHi, I have a somewhat architectural question. Let's say I have a web application, receive a request and then that request should do two things, start a job of some kind and persist data in the database. Would it be ok to call the database function and let this one add the job (request -> database -> job)? Or should the request handler kick off both, the job and the database function (request -> database & job)? This is some kind of a
07:05ucbsveri: your question got truncated, however, have you considered (in the latter) option, what happens if either the database or the job runner can't perform the update?
07:06skratl0x1Chow would I merge maps so that I end up with a map where each value endsup in a list, and when two input maps share a key, the value would be list of these two values?
07:06ucbskratl0x1C: look for merge-with
07:07ucbe.g. (merge-with conj map1 map2 map3 ... mapn)
07:07sveriThis is the second part of my question: This is some kind of a common problem I guess where one could ask, when is the right time / place to trigger a question. I am open for any input / thoughts on this (as well as recommended links / books of course).
07:07sveriucb: Good point, but I guess this can be solved independet of the place where things get started
07:08shafiresveri: first question: do the processes depend on each other?
07:09ucbsveri: absolutely. But with your latter approach, you need to keep both the job runner and the db in sync. By having the request just update the DB, and then having a daemon monitor this, you're effectively using it as a queue which is how I've seen this things done in general.
07:09sverishafire: no, however, both should complete successfully
07:09shafiresveri: should complete successfully, so when one fails, the other should be reversed?
07:09sverishafire: yea
07:10sveriucb: That sounds nice too, so you have a single source of truth (database) and some listeners that act whenever that source changes
07:10shafirecan you rollback the job, sveri?
07:10ucbsveri: right. And the request handler only cares about updating the db.
07:11shafiredo you have rollback support in the db/for the job?
07:11sverishafire: yea, I could do that, I can roll back both
07:11shafirethen start both at the same time
07:13sverishafire: ucb Thank you both for your time, I will look into the listener approach first :-)
07:14ucbnw
07:25skratl0x1Cucb: thanks, I ended up with these http://bit.ly/1n13Dif , further simplification welcome
07:27ucblook good
07:27ucblooks*
07:29martinklepschI'm running into an error with cider-nrepl that I can't figure out on my own: https://github.com/clojure-emacs/cider-nrepl/issues/110 — if anyone has some ideas, they'd be welcome! :)
07:36karlsmartinklepsch: have you tried upgrading cider-nrepl to 0.8.0-SNAPSHOT? i had a similar problem yesterday and upgrading worked for me.
07:37karlsmartinklepsch: also, i've not specified any repl-options in ~/.lein/profiles.clj
07:39martinklepschkarls: seems to stay the same
07:39martinklepschkarls: but thanks :)
07:41karlsmartinklepsch: wait, does this happen when you do `lein repl`, or in emacs?
07:41martinklepschkarls: lein repl
07:41karls:-/
07:42martinklepschstarting from emacs with cider-jack-in shouldn't really make a difference, should it?
07:44karlsnot sure, the problem i had was with cider in emacs. the cider and cider-nrepl versions were not the same. after updating both to 0.8.0-SNAPSHOT everything worked.
07:44karlsthere's also a problem with running lein repl in a directory without project.clj, in leiningen 2.4.3, but i think it's a different issue.
07:46martinklepschkarls: but at that point in time emacs isn't even interacting with that repl session at all so I don't see how cider itself could interfere here
07:48karlsmartinklepsch: i think it was a case of upgrading cider from quite an old version to latest, then discovering it's not working, then installing cider-nrepl 0.7.0 and then 0.8.0.
07:49karlsanyway, it was a similar issue. i thought it might help you get towards a solution :)
07:52martinklepschkarls: It's appreciated :)
08:39sveriucb: I was thinking about that notifier concept instead of direct function calls (see my question two hours ago). Would it make sense to use core.async here and publish that change through a channel
08:39ucbsveri: it really depends on the semantics for your jobs and db updates
08:40ucbsveri: if you can fire-and-forget, then it doesn't really matter
08:40carrumbayella: how does it feel in freedom?
08:40birdspiderhello, what is the corresponding char name for "empty" (like \newline \b \_ )
08:41sveriucb: ok, I guess that's the case here, thank you again
08:42ucbnw
08:43carrumbawoops! wrong window!
10:06TimMcI'm having trouble imagining what birdspider was asking about. NUL?
10:07clgvTimMc: probably space?
10:07TimMcah
10:12clgvTimMc: though nil is the next best guess ;)
11:06martinklepschis amazonica the go-to option for S3 stuff? https://github.com/mcohen01/amazonica
11:10TimMcI've used clj-aws-s3.
11:14justin_smithI also use clj-aws-s3
11:14justin_smithwill someone please kickban oooooio already? technomancy ???
11:14lazybotjustin_smith: How could that be wrong?
11:15Bronsajustin_smith: what is he doing?
11:15justin_smithspam links in private messages, repleatedly
11:15justin_smithit's a bot I am sure
11:16justin_smithif you go up the logs you will see other complaints from last night
11:16Bronsajustin_smith: ask a freenode staff member to kline it
11:16justin_smithok
11:19agocsI have a question about this gist: https://gist.github.com/agocs/8916127a42312a65a990 What are the '#' characters decorating f, x, and e called, and what are they doing?
11:20clgvagocs: gensyms
11:20TimMcgensyms
11:20agocsThanks
11:20agocsI'll look that up
11:20TimMc,`[foo# foo# bar#]
11:20gtrak,`#f
11:20clojurebot[foo__25__auto__ foo__25__auto__ bar__26__auto__]
11:20clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
11:20TimMcgtrak: Wrong side. :-P
11:20gtrak,`f# ;-)
11:20clojurebotf__73__auto__
11:23agocsInteresting. So, f# ensures that f will have a unique name to avoid conflicts with the function I'm passing to the macro, correct?
11:23ToxicFrogYes.
11:23tanzoniteblackagocs: correct
11:24agocsNice. Thanks, all!
11:25TimMcagocs: All f# in the same syntax-quote will get the same name. Note that nested syntax-quotes do not provide this.
11:26TimMc,`[f# ~`f#]
11:26clojurebot[f__99__auto__ f__98__auto__]
11:26agocsThat makes sense
11:27agocsI got got by oooooio too
11:28gtrakme too
11:29acagle1ooooooio
11:35TimMcFolks in #freenode say we need to ban the spammer ourselves.
11:35TimMcI don't quite understand this -- they already have the list of nicks, and they don't need to be in the channel in order to privmsg...
11:50CookedGryphonis there a nice way to do a structural-sharing-aware diff of two vectors?
11:51aaelonyCookedGryphon: can you use clojure.set/difference?
11:53justin_smithaaelony: that would be value based, so it would ignore sharing entirely
11:53justin_smithalso it would ignore ordering
11:53CookedGryphonthis is potentially simplified by the fact that I'm only really interested in appends to the list
11:53aaelonyyes, depends what is required
11:54justin_smithaaelony: given that he specifically is interested in something that is aware of structural sharing, using set/diff, which would require using not the original structure, but a set initialized with its contents, would defeat the point
11:55aaelonyjustin_smith: i see your point
11:56TimMcCookedGryphon: I'd probably annotate the two vectors with the memory locations of their content values (hashCode from Object) and their position in the vector (map-indexed) and remove all that were shared.
11:56TimMcI don't know if that qualifies as nice. :-P
11:57justin_smithTimMc: so would that involve casting to Object and calling .hashCode?
11:57TimMcNah, can't do that.
11:57justin_smithso what *can* you do?
11:59TimMc&(let [v1 [0 1] v2 (conj v1 2) hashes (partial map #(if (nil? %) % (System/identityHashCode %)))] [(hashes v1) (hashes v2)])
11:59lazybot⇒ [(709070580 1781789391) (709070580 1781789391 1477515494)]
11:59TimMc&(System/identityHashCode nil)
11:59lazybot⇒ 0
11:59TimMcOK, that makes it even easier. :-)
11:59hyPiRionis that structural-sharing-aware though?
12:00hyPiRionI can't see a way to do that without inspecting the nodes themselves.
12:00TimMcMaybe I don't understand the question...
12:01hyPiRionTimMc: Maybe I don't
12:01justin_smithhyPiRion: if the structures are shared, the object identity of the values always will be
12:01TimMcEh, and I'm wrong anyway -- Object.hashCode isn't guaranteed unique. Obviously.
12:01justin_smithhyPiRion: problem being, the values could be shared but not the structure
12:01hyPiRionjustin_smith: but not necessarily the inverse
12:01hyPiRionyeah
12:01justin_smithexactly
12:01TimMcCookedGryphon: Give an example.
12:02justin_smithso maybe you want the object identity of the underlying datastructures of the vector
12:02CookedGryphonso my example is:
12:02CookedGryphonI'm collecting touches [x,y] in a persistent vector [[x,y],[x1,y1].....]
12:03CookedGryphonand because it's persistent I can neatly send touchDown, touchMove and touchUp events all with the entire persistent history for that touch
12:03CookedGryphonand I want to be able to drop touchMove events if i can't process them quickly enough
12:03CookedGryphonso I need to be able to efficiently work out what subvector I have yet to process since last I saw it
12:03CookedGryphon(it being this persistent vector)
12:04justin_smithCookedGryphon: what about [x, y, synthetic-id] where that synthetic ID is guaranteed unique, and added to a vector of "gesture sequence"
12:05hyPiRionCookedGryphon: well, you would only need the index of the last processed gesture, wouldn't you?
12:05CookedGryphonfair point
12:06CookedGryphonif I include a synthetic id with each vector that is
12:06CookedGryphonit should work fine, as I can guarantee it's only been added to
12:07hyPiRionRegardless, I don't think there are functions for vector diffs based upon structural sharing
12:11sm0keumm what exactly is :native-path in lein for?
12:12justin_smithsm0ke: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L287
12:12justin_smiththat document reveals (almost) all
12:15sm0kedoes it?
12:15justin_smithabout lein project.clj options, yeah
12:16justin_smithif I want to know what some key in project.clj does, I just go to that page and search for the key
12:17sm0keso i would like to pack some native deps into my final uberjar, how do i pack it such that those are available at runtime
12:17technomancysm0ke: lein doesn't work with native-deps in uberjars
12:19technomancyI mean, you can do it, but you're on your own
12:20sm0ke:p i dont like to be on my own
12:20TimMctechnomancy: Because they're not portable?
12:20sm0kenah i think it would need some custom code at least
12:21technomancyTimMc: because lein doesn't want to be invasive in your uberjars
12:21justin_smithsm0ke: put it in your resources, then extract it to disk at runtime?
12:22sm0kejustin_smith: sounds hip
12:22sm0keis that the only way?
12:22technomancyI think so
12:22technomancyyou should see what overtone does
12:22justin_smiththis is clojure, there are infinite ways! (and most all will consist of getting the file out of the jar and onto disk)
12:23justin_smith(or at least something the OS knows how to use as if it were a filesystem)
12:24technomancysm0ke: basically none of the regular lein devs use native deps, so the docs are pretty bad
12:24TimMcsm0ke: At work we generally deploy a tarball containing the uberjar and some startup scripts; it's not too much effort to also include random other jars to add to the classpath.
12:25JaoodTimMc: are the scripts for jre args?
12:38justin_smithJaood: not sure of his case, but I have used a script to store the process ID of the running server, and do clean shutdowns / restarts etc. based on that info, and to create log files from stdout
12:39justin_smithand specifying jvm args was part of that too, yeah
12:42rkneufeldAnyone else ever had trouble with clojure.java.jdbc setting UUID parameters correctly? I'm getting 'operator does not exist: uuid = character varying' on insert! even though it seems like ISQLParameter should be calling .setObject correctly.
12:53Jaoodjustin_smith: I see, you know if the jvm args can be included in the jar?
12:53TimMcjustin_smith: That's about the extent of it, yeah.
12:54justin_smithJaood: some Os's allow shebang inside a jar to make it executable, dunno all the details though
12:54TimMcSometimes we also specify the environment the service is running in.
12:54TEttingerJaood, if you bundle a JRE or use webstart you can specify jvm args
12:58JaoodTEttinger: yeah, its for server side, was hoping to just do java -jar my.jar
12:59greghendershottChecking if I understand correctly: Is the `for` comprehension seq -> list? i.e. It can consume any seq, but always produces a list?
12:59hiredmanno
13:00greghendershotthiredman: OK, thanks. Back to studying it, then.
13:00hiredman,(type (for [a (range 10)] a))
13:00Jaoodgreghendershott: it produces a lazyseq
13:00clojurebotclojure.lang.LazySeq
13:00greghendershottJaood: Thanks.
13:02technomancygreghendershott: any coll function that is lazy must return a seq
13:34martinklepschShould I use multipart upload when uploading a large chunk of text to S3 using clj-aws-s3 or is that explicitly meant for files?
13:35justin_smithmartinklepsch: how can anything on s3 not be a file?
13:35martinklepschjustin_smith: files on my local disk I meant
13:35martinklepschhttp://weavejester.github.io/clj-aws-s3/aws.sdk.s3.html#var-put-multipart-object
13:36martinklepsch"Do a multipart upload of a file into a S3 bucket at the specified key. The value must be a java.io.File object."
13:36justin_smithmartinklepsch: I have used s3 to upload resized images from a buffer, without persisting to disk. I needed to fork clj-aws-s3 to make it work though
13:36justin_smith(the upload was multi-part because I did not know the actual size until done)
13:39justin_smithhttps://github.com/caribou/clj-aws-s3 this version has a stream upload option (I occasionally merge in upstream changes)
13:39martinklepschI have a huge string, lets say 10mb but could be more, and I'm not sure if I should use multipart uploading or regular pu
13:39justin_smithI guess they don't like how I implemented the multi-part non-file-based uploads, because they haven't merged
13:39martinklepschput
13:40justin_smithif you know the size, why not a regular put?
13:40justin_smithfor reliability reasons maybe/
13:41justin_smithmy fork has put-multipart-stream https://github.com/caribou/clj-aws-s3/blob/master/src/aws/sdk/s3.clj#L280
13:41justin_smithif you decide multipart is really the right option (it is on clojars as caribou/clj-aws-s3)
13:41justin_smithputtin 10 megs on disk just so you can upload it is silly, of course
13:42justin_smith*putting
13:43martinklepschI looked at amazonica earlier which seems to do stream stuff btw.
13:43justin_smithoh, interesting
13:43justin_smiththey have a really weird codebase iirc
13:44martinklepschI thought I might be able to "fake" the File part about it so I can upload multipart without putting it on disk
13:44justin_smiththey use macros to populate namespaces https://github.com/mcohen01/amazonica/tree/master/src/amazonica/aws
13:45justin_smithit's really weird
13:45martinklepschyeah, tried reading the code but didn't get it so I went for the seemingly simpler clj-aws-s3
13:46justin_smithlike I said, my fork is up to date, and can do multi-part upload from a stream
13:49hiredmanhttps://github.com/hiredman/propS3t
13:49justin_smithhiredman: wow, looks very nice
13:49justin_smithI may just switch to that
13:50hiredmanit is not very full featured
13:50justin_smithsure, but it has the features I actually use
13:51justin_smithexcept maybe the access permissions, hmm, not seeing that
13:51hiredmanyeah, I don't think that is there
13:51hiredmanprs welcome :)
13:58starlord,(System/setProperty "datomic.txTimeoutMsec" "60000")
13:58clojurebot#<AccessControlException java.security.AccessControlException: access denied (java.util.PropertyPermission datomic.txTimeoutMsec write)>
13:58starlord:/
13:58Rayneslol
14:00TEttingerwell I think he's still messaging clojurebot, he only left not quit
14:57justin_smithweird software design question: I need to share some sensitive information with family. The family is technophobic (I can't make them use gpg). Feasability of making a server with an encrypted document, and serving the decrypted message if the right decryption key is present in an ssl protected post request - is this a dumbass scheme, or is it feasible? am I overlooking something here?
14:57johnwalkerhi, i've run into a weird issue
14:57johnwalkerhttps://github.com/xsc/lein-ancient/issues/37
14:57johnwalkeris there some way to...not have the dependencies of lein tasks interfere with one another ?
14:58TEttingerjustin_smith, how sensitive, like nuclear launch codes?
14:58TEttingerdoes it need to be long-term persistent?
14:59TEttingeror like a one-time thing?
14:59justin_smithTEttinger: more like "data that could be used to confiscate my entire savings and steal my identity and ruin my credit rating"
14:59justin_smithit can be one time
14:59TEttingerheh
14:59TEttingerpiece of paper
14:59justin_smithyeah, that is probably best
14:59justin_smithprobably better not to be 'clever' about it
15:00TEttingerdon't let it get on a computer if you don't trust computers, maybe is best
15:00justin_smithheh, right
15:00justin_smithmore I don't trust what they do with something once they have it on their computer, but yeah, definitely
15:00teslanickTo go a step further, I recommend a blind drop in a public place with emplaced spotters to ensure safe delivery.
15:00justin_smithhaha
15:00teslanickGet all cold war on it.
15:00justin_smithone time pad?
15:01justin_smithanyway, thanks for that bit of sanity, TEttinger
15:01justin_smith(inc TEttinger)
15:01lazybot⇒ 21
15:01TEttingerheehee
15:02justin_smithnow you have enough karma to legally drink on this channel
15:02TEttinger$karma justin_smith
15:02lazybotjustin_smith has karma 59.
15:02TEttingeryou can enter karma aarp
15:02justin_smithheh
15:02TEttinger$karma technomancy
15:02lazybottechnomancy has karma 131.
15:03justin_smithme retire from this channel? you wish
15:03justin_smith$karma amalloy
15:03lazybotamalloy has karma 158.
15:03clojurebotGabh mo leithscéal?
15:03TEttinger$karma clojure
15:03lazybotclojure has karma 17.
15:03justin_smith$karma so
15:03lazybotso has karma -32.
15:03TEttingerwhy is so so low?
15:03TEttingerstack overflow?
15:03johnwalkerLOL
15:03schmeecan someone help me figure out how to use the `alt!` macro in core.async correctly? https://gist.github.com/schmee/3f438ebf69998545e2ec
15:04schmeeI can't figure out the syntax
15:04justin_smithTEttinger: because it's a commonly used word, and got highlighted as a nick in our clients, which many of us found annoying
15:04johnwalkerthats hilarious
15:05justin_smiththat's internet mob justice for you
15:07johnwalkerping hyPiRion
15:07hyPiRionjohnwalker: pong
15:07johnwalkerdo you have a recommendation for resolving this issue?
15:07johnwalkerhttps://github.com/xsc/lein-ancient/issues/37
15:08johnwalkerit's near the bottom
15:08johnwalkerwe both have plugins that share dependencies, but are on different versions
15:08johnwalkerand it appears that the plugin that appears earlier in the profiles.clj picks the version
15:11hyPiRionoh crap, that issue. Well, the only thing for now is `lein deps :plugin-tree` which emits warnings, or [lein-plugin :exclusions [[shared/dependency]]]
15:12johnwalkerahh, i see
15:13johnwalkerok, i'll add a note to my readme
15:13johnwalkerthanks
15:13johnwalker(inc hyPiRion)
15:13lazybot⇒ 43
15:13hyPiRionnp
15:28gmac_Anyone found it difficult to work with OOP after discovering Clojure, FP and immutable data?
15:28mdeboardgmac_: it takes awhile to context switch back
15:28justin_smithI find it sort of distasteful to be sure - it often leaves me feeling a bit dirty
15:28gmac_When I see things like class << self in Ruby I just want to wretch :)
15:28milos_cohagenschmee: wrap the println .. in parens
15:29TEttingergmac_, I haven't had any issue switching back and forth
15:29justin_smith(inc milos_cohagen)
15:29lazybot⇒ 1
15:29justin_smith(facepalm, I should have seen that)
15:29TEttingermy clojure was fairly imperative though
15:30mthvedtgmac_: i find it easier. design patterns are boilerplate to the functional mind
15:30milos_cohagenschmee: eg.. (alt! ch ([v] (println "val: " v)))
15:31gmac_mthvedt: I was never that sold on OOP but now "this", "self" and introspection like "method_missing?" just seem alien.
15:33gmac_mthvedt: Maybe I just need to take something medicinal before dealing with the entanglement of OOP code. Different code for differnt minds I guess.
15:37teslanickgmac_: It changes the way you think. I write a lot more pure functions in JS and Java since learning Clojure.
15:37schmeemilos_cohagen: thanks, that worked perfectly!
15:38milos_cohagenschmee: no probs!
15:48amalloymthvedt: "design patterns are unnecessary in a sufficiently-good language" is just a way to feel superior. the design patterns used in OOP will naturally be different and many don't apply (and are indeed "just functions"), but stuff like middleware is a pattern in clojure that's *not* captured by the language
15:48gmac_teslanick: I think it depends how detached you are about programming. I have to feel passionate, intellectually, about the language I'm using and it seems a passion for Clojure, FP and immutability, at least for me, goes hand in hand with an aversion to OOP and mutability.
15:48mthvedtamalloy: that would be a good response to what i had said, if that’s what i had said
15:49amalloy"design patterns are boilerplate to the functional mind"
15:49mthvedtcorrect
15:49amalloysounds to me like another way of saying the same thing, but i'm not going to argue about it if that's not what you meant
15:50gmac_teslanick: Clojure is quite radically opposite to mainstream programming practices and that can lead to a kind of "conversion".
15:51teslanickgmac_: I think that's a false dichotomy. Someone can be passionate about programming and still be happy programming in different languages. The lessons that Clojure has to teach can be partially applied (har-har!) to other languages.
15:53teslanickMy primary language is JS, professionally, and a lot of what Clojure can do, JS can do as well. There are gnarly bits, but I'm solving real problems in applications where clojure would be inappropriate for non-programming-language reasons.
15:54gmac_teslanick: Not sure about that. Ruby is all pure OO under the hood so if you have to read source code Clojure ain't gonna help.
15:54teslanickI don't understand.
15:56gmac_teslanick: Ruby gems are pretty heavily OOP so you're wading through lost of "class << self" and "method_missing?" contortions most of the time. Just feels very ugly after Cloure.
15:59gmac_teslanick: Anyway it probably boils down to mindset in the end. I'm more the passionate advocate than the detached professional, hence my experience is different.
15:59gfredericksI did a lot of ruby prior to clojure, and my experience now (which may just be ruby rustiness) is that it is several orders of magnitude more difficult to figure out what a ruby library does by reading the source, compared to clojure
15:59gfredericksmight be not just rustiness but also not knowing the ruby lib conventions very well
15:59gmac_gfredericks: So I'm not alone :)
16:00teslanickgmac_: It's a problem that ruby uses a lot of mutability and statefulness, but it's not like good software didn't exist before clojure. It's likely that imported library code is well-tested and relatively reliable. The goal is to minimize problems in your own code, which will probably be far less-tested and requires your time to maintain.
16:00gmac_gfredericks: I find the context-switch grates these days.
16:00teslanickAnd don't assume I'm not a passionate advocate, but we all gotta get paid.
16:00gmac_teslanick: Agreed, Ruby does what it sets out to do very well. Not knocking it per se.
16:01gmac_teslanick: Just that I experience it very differently after Clojure if I have to work with it.
16:01teslanickgmac_: Not disagreeing with you there.
16:03johnwalkerpart of is it that ruby has been around for 20 years
16:03teslanickMy point is that understanding clojure (or principles of functional programming and immutability) make you a better programmer in any language.
16:04gmac_teslanick: Yes, but beware it may make working with OOP more distasteful :) That's my point really.
16:04gmac_teslanick: In other words, there's a potential cost.
16:06johncashHow do I compare two functions? e.g. (== foo/bar foo/baz)
16:07amalloyjohncash: you gotta send technomancy an email
16:07amalloyor hiredman. they love comparing functions
16:07johncashok
16:08amalloythe tldr is basically: functions are really hard to compare, and even in the specific case that you have two pointers to the same function it's not actually that rewarding to compare them and discover they're the same
16:09johnwalkercan you sort functions ?
16:12mdrogalis,(sort [identity str])
16:12clojurebot#<ClassCastException java.lang.ClassCastException: clojure.core$identity cannot be cast to java.lang.Comparable>
16:16TEttinger$google serializable-fn clojure
16:16lazybot[technomancy/serializable-fn · GitHub] https://github.com/technomancy/serializable-fn
16:38technomancy(inc amalloy)
16:38lazybot⇒ 159
16:47danielszmulewiczIs a :plugins key in Leiningen's production profile allowed? I can't get it to work...
17:11gfredericksdanielszmulewicz: what are you doing, what do you expect to happen, what actually happens?
17:13arohner_is there a JVM-based http client that returns an nio ReadableByteChannel for the response body?
17:14amalloy~helpme
17:14clojurebotA bug report (or other request for help) has three parts: What you did; what you expected to happen; what happened instead. If any of those three are missing, it's awfully hard to help you.
17:14amalloygfredericks: ^ is handy
17:17gfredericksI knew there was something like that but no way was I going to remember that key off the top of my head
17:18amalloygfredericks: i tried to wangle it into ~help but that key is irretrievably overloaded
17:20gfredericks~help
17:20clojurebotNobody can help with "X doesn't work". Please provide context: what you did, what you hoped would happen, and what happened instead. A stack trace is especially helpful, if applicable.
17:20gfrederickshey look at that
17:21gfredericks~help
17:21clojurebothttp://www.khanacademy.org/
17:21gfredericksclojurebot: forget help is http://www.khanacademy.org/
17:21clojurebotRoger.
17:21gfredericks~help
17:21clojurebothttp://www.khanacademy.org/
17:21gfredericksclojurebot: forget that help is http://www.khanacademy.org/
17:21clojurebotAck. Ack.
17:21gfredericks~help
17:22gfredericks~help
17:22amalloygfredericks: you're just making it worse
17:22clojurebotNobody can help with "X doesn't work". Please provide context: what you did, what you hoped would happen, and what happened instead. A stack trace is especially helpful, if applicable.
17:22gfredericks~forget
17:22clojurebotyou need to put the verb in pipes
17:22gfredericksforget help |is| http://www.khanacademy.org/
17:22gfredericksthis is a disaster
17:22gfredericksclojurebot: forget help |is| http://www.khanacademy.org/
17:22clojurebotI forgot that help is http://www.khanacademy.org/
17:22gfredericksclojurebot: forget forget help |is| http://www.khanacademy.org/
17:22clojurebotI forgot that forget help is http://www.khanacademy.org/
17:22gfredericksclojurebot: forget forget that help |is| http://www.khanacademy.org/
17:22clojurebotI forgot that forget that help is http://www.khanacademy.org/
17:23gfredericks~help
17:23gfredericksclojurebot: help?
17:23gfredericksclojurebot is eventually available
17:23gfredericksCAP: pick eventually two
17:24hiredmanclojurebot throttles you after some number of requests in a minute or something, I forget
17:24hiredmanhttps://github.com/hiredman/clojurebot/blob/master/clojurebot-facts/src/clojurebot/facts.clj#L49-L54
17:26gfredericksI don't see any time limits on that; is this written assuming the bot gets auto-restarted?
17:28hiredmanhttps://github.com/hiredman/clojurebot/blob/master/clojurebot-facts/src/clojurebot/facts.clj#L38-L42
17:31gfrederickswell look at that.
17:33hiredmanobviously what it should be doing is mapping nicks to some kind of entities(via some kind of classification process) and throttling based on those
17:42hiredmanmaybe some kind of clustering in an 256^n dimensional space where n is some max nick length, treating each letter in the nick as an ordinate
17:43hiredmanah
17:43hiredmanno I guess it would be n dimensional
17:43hiredmanthe value is just the value
17:45hiredmanobviously not the best since it precludes using what is said for determining which entity a nick belongs to, which I guess is sort of how people do it, not just relying on nicks
17:46aperiodicyeah, with that scheme, wouldn't it be pretty easy to deny somebody clojurebot access by changing your nick to something similar to theirs and then getting throttled?
17:46hiredmanaperiodic: sure
17:47hiredmanaperiodic: but for example if I changed my nick to aperiodic1 and acted like a jerk, people might associate that behaviour with you
17:48aperiodicsure. I don't see why that's an argument for making clojurebot work in the same way. seems just worse than just naive nick throttling.
17:49hiredmanworse, but way cooler
17:49aperiodicah, ok
17:49aperiodiccarry on then
17:50hiredmanmaybe you would want two systems, an immediate one that clusters nicks to entities when a new nick is encountered once, and then a long term system based on content that would split and merge entities and nicks as required
17:51TEttingerwhat's happening with clojurebot?
17:52TEttingerwas this a starlord thing?
17:52hiredmannothing and no
17:53johnwalkerhiredman: how often does that happen ?
17:53hiredmanstarlord like the movie?
17:54TEttingerhiredman, oh someone with the nick starlord came in, entered a datomic cmd to clojurebot, got an error, and left (not quit)
17:54hiredman*shrug*
17:54TimMchiredman: I often get throttled while checking to see if a factoid went through properly.
17:55TEttinger$seen starlord
17:55lazybotstarlord was last seen talking on #clojure 3 hours and 56 minutes ago.
17:55hiredmanTimMc: ok
18:29justin_smithTEttinger: re starlord, sdegutis has switched back and forth with the starlord nick in the past iirc
18:29TEttingeroh phew
18:29justin_smiththere is a marker for a bot to track "foo is now known as bar" type messages
18:30justin_smiththough of course anyone can poison that by switching to the same unregistered nick you once did...
18:36TEttingerwhat's the problem with nick changes all of a sudden?
18:38justin_smithoh, relating that to the throttling conversation
18:38justin_smithsince both are about the mutability of nicks
18:41technomancybut what if someone uses nicks as a designation of title or office?
18:41technomancylike the Dread Pirate Roberts
18:42technomancythen you have another layer of indirection between nicks and true identities
18:43hiredmantechnomancy: my hypothetical 2 part system would in theory notice a change in speach leading it change ownership of the nick to a new entity
18:43technomancy...unless part of becoming the new Dread Pirate involved training in speech habits and quirks
18:43mdeboardI don't know what's going on in here, but I like it
18:44hiredmansure, I dunno, I am not trying to come with a perfect system, just one as good as me :)
18:44technomancyI'm not even sure if you'd *want* to track changes in ownership behind a persona
18:45technomancywhat if instead of disappearing, the guy behind _why the lucky stiff just appointed a successor?=
18:45technomancyor it could be like the way they do things on Gallifrey
18:54gtrakanyone have issues with maven not seeing clojars correctly?
18:54justin_smithtechnomancy: I am suprised nobody has been motivated to go around raiding various web forums and communities under the name "anonymous", but acting in such a moronic and tedious manner that all the sexiness and credibility of that collective moniker / image disappears
18:54gtrakeg, classlojure:classlojure:0.5.2:jar is totally not missing from clojars, maven thinks it is
18:55justin_smith"we are anonimuss, the earth if flat, we believe in leprechauns, we don't forgivve and we donut forget"
18:55gtrakjust noticed that clojars is redirecting to https...
18:55gtrakbut maven says http
18:55gtrakgodammit..
18:55technomancycrowdfund that sucka
18:56justin_smithlol - if I hated anonymous enough I would totally do it
18:56justin_smithI am just noting how easy it would be to poison the name, but I have no motivation to do it
18:56TimMcOK, given a fn such that (find-in {:a {:b 5}} [:a :b]) => [[:a :b] 5], what should be the result of (find-in nil [])?
18:57gtrakthere's some stale clojars URLs in the wild
18:57TimMcNote that (find-in {} []) should return [[] {}]
18:58gtrakin maven central and dependencies
18:59amalloyTimMc: i would expect [[] nil]
18:59cbp(find-in x []) -> x ?
18:59cbper [[] x]
18:59amalloyfind-in with an empty keylist is weird enough that anything would be reasonable, but given that behavior for {} i would expect it to act correspondingly for nil
19:03johnwalkertechnomancy: do you know if anyone has tried clojurescript for trivial lein tasks ?
19:05TimMcamalloy: With nil punning as empty map?
19:08gtrakhugod: I think there's a bunch of breakage related to clojure-maven/zi and friends in the maven repos
19:08technomancyjohnwalker: I doubt it. that sounds like a pain in the neck.
19:08turbofaildoh. i can't seem to use clojure.java.api.Clojure.var(...) from scala because var is a reserved keyword
19:08gtrakhad to manually use https://clojars.org/repo, I think http is no longer valid.
19:09gtrakthe URL i found in the poms was http://clojars.org/repos with an 's'
19:09johnwalkeri bet it would sort of work
19:10gtrakwe're using the buildversion-plugin in a java project, and it's hitting it.
19:15turbofailah looks like i just need some backticks
19:15turbofailyumanki is msg spamming
19:16johnwalker ._.
19:16amalloyTimMc: you keep using the phrase "nil punning" in contexts where it doesn't really make any sense to me
19:16johnwalkerconfirmed that yumanki is spamming
19:18amalloyand, weirdly, when i search for "nil punning" the results are overwhelmingly about clojure, and not about scheme or cl or whatever
19:19justin_smithamalloy: those fish don't know what water is!
19:19Bronsaamalloy: targetted results from google maybe?
19:20justin_smithBronsa: https://duckduckgo.com/?q=nil+punning
19:21Bronsaoh well then
19:21justin_smithyou won't see any targetting with ddg, and we still see clojure mostly
19:21amalloyBronsa: i guessed as much, but don't really know how to (dis)prove it. even if i search for "nil punning scheme" i get mostly clojure results
19:25akhudekimplementing a delayed change behaviour in core.async seems more difficult than using a standard timer :-/
19:26TimMcamalloy: What percent of it is me bitching?
19:26johnwalkeri thought a nil pun was just the absence of a pun
19:27technomancyamalloy: maybe because "punning" has negative connotations, and CLers would rather embrace it?
19:28technomancyplus in CL it's less punny--there's no laziness or actual booleans
19:28amalloytechnomancy: doesn't have any such connotations to me
19:28amalloyeverybody loves puns, after all
19:29technomancywell I love a pun as much as the next humanoid, but puns are a form of cleverness, and cleverness is best avoided in production code.
19:30amalloyin my search for knowledge about nil punning, i found https://github.com/saniv/text/tree/master/criticism, which seems to be someone's collected criticisms of every programming language
19:31johnwalkerrofl
19:31technomancythis can't be... his entry for java is only one line
19:32johnwalkeri wonder why people make these things
19:32justin_smithamalloy: cool, but so hard to read from within github
19:32technomancyjohnwalker: repeating yourself gets old after a while =)
19:32justin_smithtechnomancy: but the lines are so long
19:32amalloyyes, quite unpleasant, justin_smith
19:32technomancyhttps://github.com/technomancy/dotfiles/blob/master/.gripes.org <- mine
19:33technomancybut it's not just for languages
19:33amalloyyou should fork it, rename all the files to .md, and send him a pull request
19:33justin_smithexcellent idea
19:33johnwalkerlal
19:33amalloyalso, add a markdown.md file complaining about its formatting rules
19:34technomancyamalloy: srs
19:34johnwalkerhttp://www.cs.uky.edu/~keen/other/foot.txt
19:40johnwalkerahh shit a redditor http://www.cs.uky.edu/~keen/pics/cats/cats.html
19:41CaptainLexI'm getting an issue where (str "Hello" {:foo bar}), where bar is a hash map, is actually printing
19:41amalloyi was just reading http://cr.openjdk.java.net/~jrose/values/values.html, and i saw something that made me laugh, in the context of "this is a feature that should be added in java 9": "Methods should be able to return values."
19:41CaptainLexOhhh nevermind
19:42CaptainLexI'm a dummy
19:42CaptainLexamalloy: Is there a context that justifies this?
19:42amalloyCaptainLex: he's really talking about value types, as opposed to pointer types
19:43CaptainLexamalloy: Aha! Yeah, Java just needs to be able to robustly clone an arbitrary object
19:43justin_smitharen't value types helpful for cache coherency?
19:44justin_smithor maybe I am using the term cache coherency wrong - keeping things close together in memory in a way that is friendly to pre-fetch caching
19:47amalloyvalue types are useful for a lot of things. better cache performance is one, i'm sure
19:58justin_smiththinking more about it, it seems like a value type only makes sense if the storage is contiguous (like a C struct with no pointer fields), which is inherently cache friendly
19:59justin_smithI was watching those "mechanical sympathy" videos recently, so that kind of stuff is on my mind
20:15danielcomptonjustin_smith: Put a turk on it
20:17justin_smithheh
20:18kenrestivoamalloy_: after reading #9 of PHP, it is clear to me that whomever wrote that repo is insane: https://github.com/saniv/text/blob/master/criticism/php.txt ... yuck.
20:19justin_smithkenrestivo: woah, yuck indeed
20:23llasramI missed the specific call-out to #9, and skimmed up to that point thinking "these aren't *that* off base, if at all"
20:23llasramThen -- #9; wow
20:23kenrestivo(also, it's not only vile, it's inaccurate: PHP was "designed" by a greenlandic/canadian guy. but i guess a greenladic/canadian conspiracy maybe wouldn't generate the right kind of hysteria)
20:24justin_smithit's like someone inserted a few pages of Mein Kampf into a cogent text on programming
20:24akhudekwe conspire to hoard the maple syrup
20:25kenrestivoakhudek: don't forget the beer!
20:26justin_smithakhudek: your syrup cartel may win the day now, but when the syrup wells run dry, get ready for some "freedom" from across the border
20:50andrewchambersYo
20:50andrewchambersDoes clojurescript output all dependencies into the output javascript file?
20:51andrewchambersI installed om, and noticed that leiningen pulls in a jar file called react
20:52andrewchambersbut then it still requires me to manually include react in my html
20:52andrewchambers\join #clojurescript
20:52andrewchamberswhoops
20:53justin_smithwhat lein brings in isn't neccessarily all going to go into your served pages (for obvious reasons)
20:53andrewchambersyeah, but what is it even dowloading?
20:53justin_smithbut #clojurescript will probably be more helpful about the particulars
20:53justin_smithyou need the js in order to serve it
20:53andrewchambersok
20:53andrewchambersyeah, but I had to download the javascript myself from facebook
20:54andrewchambersill switch to clojurescript
20:54justin_smithoh, the react dep didn't include react? that's weird
20:54andrewchambersI dont think so.
20:55justin_smitha jar is a zip file, you can find out what's in there pretty easily
20:55andrewchamberswhere does it download them to?
20:55justin_smith~/.m2/repositories
20:55clojurebotexcusez-moi
20:55justin_smithor maybe repository? something like that
20:55andrewchambersok ill have a look
20:56justin_smithand then follow the qualified name of the artifact ie. ~/.m2/repository/org/clojure/...
20:56akhudekthe react clojar dep can be used as a resource
20:57andrewchambersoh
20:57justin_smiththat's what I figured yeah, via (clojure.java.io/resource "classpath/relative/location")
20:57andrewchambersmy server is in go
20:57andrewchambersok
20:58akhudekandrewchambers: look on the om github page for “Your production markup should look something like this:”
20:58akhudekand right above it it shows how to use the react.js from the deps
20:58akhudekleiningen will just add it as a preamble to your clojurescript source
20:58akhudekI think you still need to manually include it for dev though, not sure
20:59andrewchambers :preamble ["react/react.min.js"] does not work
20:59andrewchambersleiningen just throws and exception
20:59andrewchambersBut yeah
20:59akhudekhmm, that’s odd
20:59akhudekworks for me, and it’s actually quite important to use the included externs
20:59andrewchambersI understand now, that it downloaded the resource for use from a clojure server
20:59akhudekyou can get funny errors if you don’t
21:00andrewchambersugh
21:00andrewchambersI need to manually extract this each time i want to update i guess
21:00akhudekI mean, you can probably just go pull them from the github too
21:00andrewchambersalso
21:00andrewchambersare :advanced optimizations possible using react?
21:00akhudekfor sure
21:01andrewchambersis that what the externs is for?
21:01akhudekadvanced optimizations
21:01akhudekyes
21:01andrewchambersI've had problems with name mangling before when I tried to use clojurescript for a node application
21:01akhudekexterns are not so hard to use once you get the hang of them
21:02akhudekI’ve written some for a few 3rd party libraries
21:02akhudeknot sure about node though
21:02andrewchambersclojurescript is awesome, but its not the easiest thing to setup
21:03lpvbwhy is this recur not in tail position and how do I fix it? https://gist.github.com/anonymous/2ae999b3fd0f103e6655
21:03akhudekthere are certainly a few pain points
21:03andrewchambersfor example. the om documentation mentions cursors everywhere, but doesn't say how to create one
21:03akhudekyeah, those are automatically created for the most part
21:03Bronsalpvb: it is, what exception are you getting?
21:04lpvbjava.lang.UnsupportedOperationException: Can only recur from tail position,
21:04lpvband then my line number
21:04Bronsalpvb: well that's not the relevant piece of code
21:04Bronsathat recur is fine
21:05lpvbthis is the only recur in my whole program
21:06Bronsamaybe you have some macro that expands to a recur or something, all I can tell you is that the loop you pasted is fine and definitely isn't the cause of your exception
21:06justin_smith,(loop [] (let [read-bytes (rand)] (if (< read-bytes 0.3) nil (do (print \.) (recur))))) ; yeah that recur is fine
21:06clojurebotnil
21:07justin_smith,(loop [] (let [read-bytes (rand)] (if (< read-bytes 0.3) nil (do (print \.) (recur)))))
21:07clojurebot.
21:07justin_smith,(loop [] (let [read-bytes (rand)] (if (< read-bytes 0.3) nil (do (print \.) (recur)))))
21:07clojurebot...
21:07andrewchambersit could be a bug
21:07andrewchambersbut maybe not likely
21:07lpvbit's a compilerexception
21:08lpvblet me isolate it and get back to you guys
21:08Bronsait's highly unlikely that's a compiler bug
21:08justin_smithandrewchambers: well, it's clearly a bug, but in whose code :)
21:08andrewchambers:P
21:10TimMcamalloy_: So what does nil punning mean to you?
21:14justin_smithTimMc: reminds me of the song "P U N N I N G, find out what it means to me"
21:14justin_smith(just a little bit, just a little bit)
21:20gfredericks,(sort '(just a little bit, just a little bit))
21:20clojurebot(a a bit bit just ...)
21:25hugodamalloy_: re my strange exception the other day - turns out it was my namespace discover code not handling .class files correctly
21:26lpvbhttps://gist.github.com/anonymous/ef919ea2b636d40b5efc
21:27lpvbthis gives me the recur not in tail position exception on 1.6.0
21:27joshuafcole_Hey folks. Any advice on tracking down a memory leak in a relatively small running application?
21:28andrewchamberswork out how to dump jvm heap
21:28justin_smithlpvb: as I showed above, the structure is fine (I just replace .write with a print, and .read with a random number etc.)
21:28joshuafcole_If it's relevant, it's a play-clj app I'm throwing together to brush up on my clojure, using a really tiny CES I've thrown together.
21:28joshuafcole_I'll look into that, thanks.
21:29Bronsalpvb: you have loop as an arg
21:29Bronsayou're not using the loop macro
21:29Bronsait gets shadowed
21:29justin_smithoh shit - there it is
21:30justin_smith(inc Bronsa)
21:30lazybot⇒ 39
21:30justin_smithI was gonna say, I saw the same error evaluating that defun
21:30Bronsayeah, no way that'd throw with c.c/loop
21:32andrewchambers(+ 1 2)
21:32clojurebot3
21:33lpvbokay it's really silly and I feel stupid now, but I had an argument called loop that shadowed the loop form
21:33andrewchambers:P
21:33justin_smithlpvb: yeah, as Bronsa pointed out
21:33lpvbwhich bronsa told me just now lol
21:45lpvbis there a lint tool for clojure that would have warned me for this
21:46Bronsalpvb: give me 2 minutes
21:49Bronsalpvb: https://github.com/jonase/eastwood/commit/eddd570eb5ad7356a87de31d0a4500567f48c898
21:49Bronsashould be available in the next eastwood release
21:49lpvb(inc Bronsa)
21:49lazybot⇒ 40
21:49lpvbthanks!
21:50Bronsahttp://sprunge.us/GPcF here's the warning it produces
21:50Bronsalpvb: np, I've wasted hours myself because of that issue
21:51ambrosebs(inc Bronsa)
21:51lazybot⇒ 41
21:51ambrosebsamazing service
21:52ambrosebsI was showing off tools.analyzer to a few people at International Lisp Conf
21:52BronsaI'm just doing it for the incs
21:52TEttinger(inc Bronsa) ;; while we're at it
21:52lazybot⇒ 42
21:53Bronsaheh
21:53TEttingerI don't even know what you did
21:53ambrosebsTEttinger: claimed to deliver a linter in 2 minutes
21:53ambrosebsthen did it
21:53TEttingernice work
21:56danielcomptonlpvb: we've all done it
21:57TEttingerthe inc Bronsa?
22:02kenrestivothere's kibit too, but i guess eastwood is the newer one
22:02clojurebotIn Ordnung
22:07andrewchambers()
22:07andrewchambers'()
22:07justin_smith,()
22:07andrewchambers(+ 1 2 3)
22:07clojurebot()
22:07clojurebot*suffusion of yellow*
22:07andrewchamberswhat the difference between clojurebot and lazy bot
22:07brehautandrewchambers: everything but being written in clojure :P
22:07justin_smith,"I am clojurebot" ##"I am lazybot"
22:07clojurebot"I am clojurebot"
22:08justin_smithI guess lazybot ignores things that mention clojurebot ##*clojure-version*
22:08justin_smith,*clojure-version*
22:08clojurebot{:interim true, :major 1, :minor 7, :incremental 0, :qualifier "master"}
22:08justin_smith&*clojure-version*
22:08lazybot⇒ {:major 1, :minor 4, :incremental 0, :qualifier nil}
22:08andrewchambersso by two different people?
22:09justin_smithtwo different clojure versions, different non-clojure command sets, run by two different owners, yeah
22:09brehautyes
22:09andrewchambers,(+ 1 2 3)
22:09clojurebot6
22:09andrewchambers(+ 1 2 3)
22:09clojurebot*suffusion of yellow*
22:09brehauthttps://github.com/hiredman/clojurebot https://github.com/flatland/lazybot
22:09andrewchambers'()
22:09andrewchambers,'()
22:09clojurebot()
22:09andrewchambers:)
22:09brehautclojurebot does a whole lot of factoid stuff
22:10justin_smithand lazybot does $karma
22:10andrewchambers'(do (println "hello") (println "world"))
22:10andrewchambers,(do (println "hello") (println "world"))
22:10clojurebothello\nworld\n
22:11andrewchambershow do we get his factoids
22:11andrewchambers>_>
22:11brehautclojurebot is also implemented as a couple of services behind an IRC gateway / dispatcher
22:11brehaut,help
22:11clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: help in this context, compiling:(NO_SOURCE_PATH:0:0)>
22:11brehauterr
22:11brehaut~help
22:11clojurebothttp://www.khanacademy.org/
22:11justin_smithlol
22:12joshuafcole_Hey folks, I'm trying to retrieve the arglist of a built in fn in a macro, but I'm getting the wrong meta back.
22:12joshuafcole_I can get it working by hand with (meta #'identity)
22:12brehautyou address it (~ is shorthand) and if it knows anything, it might respond
22:12andrewchambers~google
22:12clojurebotPardon?
22:12andrewchambersclojurebot: tell me something funny
22:12clojurebotexcusez-moi
22:12andrewchamberscool
22:12joshuafcole_but when I try to pull it out in my macro (it's stored in the var ctor#) I get useless meta back since I'm referring to it wrong
22:13brehautclojurebot also does inference if it doesnt know what you mean, and will sometimes respond to things not addressed to it
22:13joshuafcole_(:arglist (meta ctor#))
22:13justin_smithjoshuafcole_: does ctor# point to the var, or what the var resolves to?
22:13joshuafcole_ctor should be holding the symbol identity at that point I _think_
22:13joshuafcole_I'm relatively new to macro programming
22:14joshuafcole_I can pastebin the whole macro if it would help
22:14andrewchambers~core.async
22:14clojurebotcore.async is not Go
22:14andrewchambers~golang
22:14justin_smithjoshuafcole_: so you want (meta #'ctor#) in that case
22:14justin_smithor maybe (meta (var ctor#)) is more readable
22:15Clariceandrewchambers: You should make ~golang point to #go-nuts
22:15joshuafcole_hmm, when I try that I get an interesting error
22:15andrewchambershow do we store facts in him?
22:15ClariceWho knows.
22:15joshuafcole_I've confirmed ctor# holds clojure.core/identity w/ a watch in Light Table, but I get the error:
22:16andrewchambersI think i killed it
22:16andrewchambersnot responding anymore
22:16joshuafcole_welp, can't copy error results in LT *files into the todo list*
22:16justin_smithandrewchambers: this works: (defmacro get-meta [ctor] `(meta (var ~ctor)))
22:16andrewchamberswrong person
22:16justin_smithoh, sorry
22:16justin_smithjoshuafcole_: this works: (defmacro get-meta [ctor] `(meta (var ~ctor)))
22:17joshuafcole_I'll give that a go.
22:17TEttingerclojurebot: golang |is| #go-nuts
22:17clojurebotc'est bon!
22:17TEttinger~golang
22:17clojurebotgolang is #go-nuts
22:18andrewchambersawesome
22:18andrewchambers~prolog
22:18andrewchambers~haskell
22:18andrewchambershe must have a rate limiter or something
22:18andrewchambersor just lagging
22:18justin_smithyeah, rate limiting
22:18justin_smithalso you can use msg
22:18TEttinger~core.async
22:18clojurebotcore.async is not Go
22:19andrewchambers~haskell
22:19justin_smithunless it is really important that we all see what clojurebot has to say, of course
22:19TEttingerlazybot is un-rate-limited but has no factoids
22:19andrewchambersHmm
22:20andrewchambersI wonder what features could be given to him to make him more useufl
22:20joshuafcole_justin_smith: unfortunately, I need to resolve it at macro compile time, since I'm trying to pull out the arglist to build a new fn.
22:20joshuafcole_Although, introspecting into my result, I may have found the weird error from trying to do it unquoted
22:21joshuafcole_wrapping it in a watch in LT wrapped it in the watch cb, sot the meta was invalid
22:21joshuafcole_:P
22:21joshuafcole_alas it's still unable to resolve the var pre-compile (or whatever the appropriate term is) with the line
22:21joshuafcole_ args# (:arglist (meta (var ctor#)))
22:22justin_smithcan you paste the code?
22:23joshuafcole_Here's the whole macro http://pastebin.com/UnAeXxnE
22:23joshuafcole_sorry it's a bit gnarly, and thanks for all the help so far
22:23joshuafcole_relevant line is 9
22:24justin_smithdo you know that ctor# is a symbol? also the usage of foo# outside ` looks really weird to me
22:25justin_smiththough it is of course valid
22:25joshuafcole_whoops. Downgrading myself from macro novice to macro newb
22:26joshuafcole_didn't even consider that I'd only need gensym if I were embedding it
22:26joshuafcole_and according to LT's watch, it looks like a symbol. I'll wrap it in (symbol? to be sure
22:26justin_smithalso :arglist will be nil
22:26justin_smithyou want :arglists
22:27justin_smiththere are multiple arglist possibilities for an fn in clojure
22:27joshuafcole_gotcha, thanks
22:27justin_smiththat last one may be your actual problem
22:27justin_smith(at the very least it will be one of them :) )
22:27joshuafcole_alas not, the meta is the meta just file position meta
22:27joshuafcole_doesn't contain any fn meta
22:27joshuafcole_but it certainly was one
22:28justin_smithwell remember that's not fn meta either - it's var meta
22:28justin_smithwith some keys that vars for fns have
22:28joshuafcole_my wording was bad, I meant it as meta associated with function vars.
22:29justin_smithwhat happens if you just check the meta? you could add '_ (println (meta (var ctor#)))' to the let bindings after binding ctor#
22:31joshuafcole_I get an error when I try
22:31joshuafcole_unable to resolve var ctor#
22:31justin_smithahh, because var is a macro
22:31justin_smithright
22:32joshuafcole__ (println (type ctor)) does return symbol though
22:32joshuafcole_as hoped
22:32joshuafcole_(dropped the autogensym since it wasn't necessary -- thanks)
22:32joshuafcole_oh?
22:32joshuafcole_are macros in macros not possible then?
22:32justin_smiththey are possible
22:33justin_smithbut (var foo) always gets #'foo - it doesn't resolve foo locally first
22:33justin_smithsince it is a macro and all
22:34joshuafcole_oh, so since it's not resolved
22:34joshuafcole_we get the literal instead of the value?
22:34justin_smithaha!
22:34justin_smith,(let [foo 'identity] (resolve foo))
22:34clojurebot#'clojure.core/identity
22:34justin_smithyou just uttered the magic word
22:34justin_smithsorry it took me so long to remember :)
22:34joshuafcole_sweet! trying now!
22:35joshuafcole_haha, I never would have figured it out without you
22:35justin_smithbut you used the word, it jogged my memory
22:35joshuafcole_I count myself as a decent programmer, but clojure feels in many ways like another level
22:35joshuafcole_let alone diving into macros
22:35joshuafcole_and trying to keep track of what's happening when. :) It's a very fun puzzle
22:36joshuafcole_eeeeee!
22:36joshuafcole_It worked! :) Thanks a ton justin
22:36justin_smithnp
23:08danielcomptonDoes anyone know why emacs autocomplete makes all of the other buffers pause when you type a completable word?
23:09justin_smithdanielcompton: emacs has no concurrency whatsoever
23:10danielcomptonjustin_smith: :(
23:10danielcomptonmutable state is a con's currency
23:11kenrestivosshfs in emacs is barrels of fun, especially with magit. lockus-emacus for 10 minutes at at ime.
23:11justin_smithemacs would be so much better if elisp had threading
23:12justin_smithbut it would also need the other stuff that makes threading usable too
23:12justin_smithI know, let's rewrite emacs in clojure
23:12justin_smith:P
23:12kenrestivoi think someone here was talking about doing that some years ago
23:12justin_smith"rewrite emacs in foo" is basically a running joke
23:12justin_smithattempted many times
23:12brehautwasnt guile written to be a scheme for reimplementing emacs in?
23:13Jaoodyeah, I though guilemacs was reals
23:13justin_smithand some day we may even see a usable guilemacs
23:13justin_smithhttp://www.emacswiki.org/emacs/GuileEmacs
23:13brehautyou’d have to convince someone to port orgmode to guileemacs before the faithful would look though ;)
23:14kenrestivoorg mode, and 30 years worth of other cruft
23:15Jaoodwill never happen
23:15brehautif you can figure out how to monetize it and prove it to jetbrains, it’ll be done in 6 months, otherwise never
23:16Jaood"Emacs for non-GNU extremists"
23:16Jaoodwill that sell?
23:17kenrestivoi think that was called "lemacs". and see where that went.
23:18justin_smithsome people still use xemacs
23:18justin_smithwhich is what lemacs become
23:18justin_smith*became
23:18andrewchambersrewrite emacs in clojure if you don't mind your text editor taking a few seconds to startup
23:19andrewchambers>_>
23:19brehautandrewchambers: thats different to emacs how?
23:19justin_smithand there is efuns, written in ocaml, and climacs in lisp
23:19joshuafcole_There is Light Table, but it needs a lot more work to be a daily driver for most people.
23:19andrewchambersI don't use emacs, does it take a long time to start? I just know on my laptop clojure takes 5 seconds to print hello world :P
23:19joshuafcole_the emacs mode is passable for a light user of emacs, but it's got a couple weird flaws and doesn't support any of the existing stuff
23:20andrewchambersjust from the runtime init
23:20joshuafcole_Well, vanilla emacs doesn't, but who runs vanilla emacs?
23:20andrewchambersclojurescript might be ok
23:20brehautandrewchambers: its well known that most people writing software close their editor after every line they type
23:20justin_smithandrewchambers: it's not concurrent at all, so long running elisp scripts lock up the whole app
23:20andrewchambersbrehaut: it depends, if its your ide, or your text editor
23:20justin_smithandrewchambers: think back when bad js would lock up your entire browser
23:21andrewchambersI think clojure is an awesome language, but the startup is so painful
23:21andrewchambersI would hesitate to use it for anything that isn't a server
23:21brehautthats why nobody who is serious about clojure restarts their process often
23:21joshuafcole_a lot of things can be run in daemon mode, andrew
23:22joshuafcole_Emacs has that built in as well
23:22andrewchambersclojurescript trades startup speed for runtime speed
23:22justin_smithandrewchambers: our friends Bronsa and arrdem are working on the startup time issue
23:22andrewchambersyeah
23:22andrewchambersI think background daemon is fine
23:22andrewchambersit just depends on the application
23:22joshuafcole_When I used that primarily I had it set up to start when I logged in and then just connect clients, which was lightning fast and also had the benefit of keeping state
23:23danielcomptonHas Lighttable been deprecated? The LT table team seem to have moved on to creating their own language and framework
23:23joshuafcole_but if I wanted to write a tool like ls or grep, yeah, it'd be pretty weird to need an "ls-daemon" ;P
23:23andrewchambersdanielcompton: where did you hear that?
23:23joshuafcole_danielcompton: Not really, they just aren't doing a lot of dev on it now. As I understand it they intend to embed the editor for their new lang in LT
23:23brehautdanielcompton: if you start building a brand new editor chances are you are already at olympic grade yak shaving levels; a new language and framework is the obvious next step
23:24andrewchambersthey dont like clojurescript anymore?
23:24joshuafcole_the community is taking decent care of it, though it's suffering a bit from not having a central voice on things or much (*cough* any) documentation right now
23:24justin_smithfinally: an email client and server
23:24joshuafcole_I don't think it's that they don't like clojurescript, I think it's that they're trying to take it to the logical extreme
23:24danielcomptonandrewchambers: andrewchambers http://podcasts.thoughtbot.com/giantrobots/111 talks about what they're doing
23:25joshuafcole_their new lang is going to be hosted, and if I had to guess the lang it was hosted on I'd bet a shiny nickel it's clojure/script
23:25danielcomptonbrehaut: I think there's a new database too
23:25danielcomptonjoshuafcole_: think it's plain JS
23:25brehautdanielcompton: i would be disappointed if there wasnt
23:25joshuafcole_Well, the database and the lang are one in the same :P
23:25joshuafcole_According to the talk anyway
23:25danielcomptonjoshuafcole_: maybe they're writing a js compiler too?
23:25danielcomptonI'm interested to see where it lands
23:26joshuafcole_Eh, I'm sure many common lispers scoffed at clojure when it was first incubating
23:26joshuafcole_I have no idea if their new language will hold water
23:26joshuafcole_but I'm not ruling it out
23:26joshuafcole_They seem to be taking the sane approach of vastly limiting it's scope and hosting it in a more mature lang
23:27JaoodOne problem with LT is that it offload all of its editor work to that web editor communitty thing
23:27kenrestivoi dunno about scoffing, but one of the most entertaining talks i've watched is rich defending it like a doctoral thesis at the NYC lisp meetup very early on in clojure's life.
23:27Jaoodwhich is bad
23:27joshuafcole_CodeMirror, yeah
23:27brehautcodemirror
23:27danielcomptonkenrestivo: do you have a link?
23:27joshuafcole_well, CodeMirror isn't bad, but them not contributing back to fix it's missing features is
23:27Jaoodatom creating their own which I hear is still pretty slow
23:27kenrestivodanielcompton: long since lost track of it, bet it's up on youtube.
23:28joshuafcole_as far as an editor goes, CM is _shockingly_ good for being a web editor written in JS
23:28joshuafcole_handles giant files with ease, passable emacs and vim modes
23:28joshuafcole_pretty good API
23:28danielcomptonkenrestivo: looks like this one maybe? http://lists.gnu.org/archive/html/help-gnu-emacs/2007-11/msg00213.html
23:28joshuafcole_and I really like the maintainer, I've worked with him to diagnose a few issues and he's been unfailingly helpful
23:29Jaoodjoshuafcole_: I guess it was the integration with LT then
23:29joshuafcole_that said, it hasn't had 30 years of aging to improve it the way emacs or vim has
23:29kenrestivodanielcompton: what i remember is the cameraperson had misframed the thing so it was like half of rich's face and half of the slide, couldn't see either very well, but you could hear the dialogue, again IIRC, it's been a while
23:29Jaoodor web editors still can't compete
23:29joshuafcole_when did you last test it, Jaood? If your problem is performance, 6.0 and newer has been a huge improvement thanks to the upgrade to CM4
23:30kenrestivothe funniest bit was the blunt way he'd answer questions. like Q: "do you intend to implement call/cc?" A: no.
23:30Jaoodyeah, before 0.6.0
23:30kenrestivothen there was laughter, uncomfortable silence, and then Q: "do you care to explain why not?"
23:30joshuafcole_That said, even if it's silky smooth for you now, it's probably not feature complete or documented enough to really convince most people to jump ship
23:31joshuafcole_haha
23:32Jaoodjoshuafcole_: I guess the concept is very cool but the implementation/making it practical was very hard
23:32joshuafcole_Yeah, you've got me there
23:32joshuafcole_I jumped in pre 5.0, before there was a plugin API
23:33joshuafcole_and dove in to the compiled output to write a few plugins for missing features
23:33joshuafcole_I'm convinced that if I didn't have a dayjob I could whip it into shape in a reasonable amount of time
23:33joshuafcole_but as it stands I still stumble into a lot of rough edges I don't have the time to polish away
23:33Jaoodthe sublimetext guy deserves huge credit for making it succesful alone, I wonder if that guy burn out and that's why everyone complains about updates
23:34andrewchambersi think he just swaps to newer version of sublime text
23:34andrewchambersisnt there version 4 now? :P
23:35joshuafcole_yeah. The biggest reason I dropped that was that it was closed source. Not being able to see how things tick is frustrating to me when I'm trying to figure out if a bug is me or the editor or a plugin. :p
23:51greenzncwhat's the problem with this code https://gist.github.com/anonymous/4aa37273936d39e57c99
23:52greenzncI expect three alerts but actually got six
23:52greenznctwice for each endpoint