#clojure log - Jan 12 2015

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

0:19 cfleming: hellofunk: Another (very funky) use of eval in clojure.core is definline

3:06 joshnz: Is anyone here an expert on how Java works on OSX? Trying to figure out all the bits I require for clojure. I'm on 10.9, and have installed the standard java package when prompted to do so for some past app. I believe this gives me system java, 1.7.0_45 as per java -version, which is in /usr/bin/java. However, Oracle's docs states the JRE used is in a different location, and that reports version 1.7.0_51, as does the Sys P

3:06 ref panel. I think I did an update at one stage - presumably the update installs in to a different location that the initial system install? Oracle's docs state the JRE will not replace java -version syslinks or add java to the path. Need to install JDK for that. So I'm confused as to what the update really did, if nothing will use it other than internet plug ins?

3:07 Secondly, do I need a jdk for clojure dev? The docs just say jre, but surely I'd need a jdk if I'm wanting to call in to java libraries, correct?

3:11 Kneiva: joshnz: my javas are here: /System/Library/Frameworks/JavaVM.framework/Versions/

3:13 joshnz: yup, that's what /usr/bin/java sylinks to (rather to a folder in there). I only have only folder called 'A'

3:14 The 'Current' folder is an alias to 'A'

3:14 However, Oracle says to determine the installed JRE version: /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version

3:14 stammi: hi. can someone recommend an article/documentation about the basics of the implementation of the clojure compiler?

3:14 Kneiva: joshnz: hmm, I've installed JDK 7, but I use that to program Java, so I don't know about Clojure dependency

3:15 joshnz: Totally different location

3:16 I assume I just install JDK 7 then, which sounds like it will update the java symlink for the runtime...

3:21 I assume the runtimes are backwards compatible? Ie, I can use a 1.6 or 1.7 java app on the 1.8 runtime, but not the other way around?

3:27 Kneiva: should be

3:30 joshnz: ah, my jdk is here: /Library/Java/JavaVirtualMachines/

3:31 joshnz: There can be multiple JDKs installed on a system – as many as you wish.

3:31 When launching a Java application through the command line, the system uses the default JDK. It is possible for the version of the JRE to be different than the version of the JDK.

3:31 You can determine which version of the JDK is the default by typing java -version in a Terminal window.

3:31 I don't understand Oracle's docs, as above

3:31 I thought java -version was for the JRE?

3:31 JDK is just code...?

3:32 Kneiva: JDK has compiler and other tools as well

3:32 joshnz: Ah yes, of course.

3:33 arossouw: trying to make sense of frequencies from clojure/core

3:35 joshnz: Right, I get it now. Apps (not via terminal) will use the JRE version. Calling java from terminal will use the JDK (with it's own JRE version)

3:35 krat0sprakhar: arossouw: where are you stuck?

3:36 arossouw: know how to use the library, just trying to understand (reading the source), how (assoc! counts x (inc (get counts x 0)))) works

3:36 joshnz: So it sounds like I should just install JRE 8 (newest), then whatever JDKs I need. This will keep JRE 8 since the JDK won't install a JRE older than the current system one. Does this sound like a reasonable plan?

3:44 dysfun: what's the binary edn format called again? i think it begins with f and has something to do with cows

3:45 ah fressian, which is like freesian, a type of cow

3:46 Kneiva: joshnz: You might be able to just go with the JDK 8 and its JRE since you can target older versions when compiling.

3:47 joshnz: Ah ok, good to know. So you can say, target JDK7? I'm sort of juggling a few things here, since I'd like to do Android dev also soon, and that uses JDK6 or 7 depending on Android version, so far as I can tell.

3:56 kenrestivo: it's been a while since i did android stuff, but i think the latest android sdk works with jdk7

3:57 the limitation to java 6 was, again AFAIR, not because of clojure but with the android toolkit itself.

3:57 Kneiva: joshnz: yep, eg. http://stackoverflow.com/questions/15492948/javac-source-and-target-options

4:02 joshnz: Handy link, bookmarked, thanks. I've installed the JDK 8, and interestingly enough, in addition to adding the JDK to /Library/Java/JavaVirtualMachines it's also updated (not symlinked) the system java in /System/Library/Frameworks/JavaVM.framework/Versions/

4:02 No symlink or path changes so far as I can tell. Just overwrote the files directly.

4:03 arossouw: i was thinking that clojure might be well suited to data-mining from database resultsets

4:03 joshnz: I'll deal with the Android stuff another day though, in the Android channel. Thanks for your help everyone, I understand things a pinch better now

4:44 espinho: can anyone point me a good beginner web development tutorial please?

4:45 found this book https://pragprog.com/book/dswdcloj/web-development-with-clojure but im unsure if it is a good investment

4:46 mavbozo: espinho: have you any previous experience in web development?

4:47 espinho: I have no previous programming experience. I only know html and css

4:49 did a couple short clojure tuts and this http://adambard.com/blog/clojure-in-15-minutes/

4:49 also before i choose clojure I tried some ruby, python and php tutorias

4:50 but then i found clojure by pure chance, and the syntax made more sense to me than the other languages

4:50 luxbock: espinho: I'd first start with www.4clojure.com first to get a better feel for the language

4:51 espinho: for web dev, this might be the easiest thing to get started with: https://github.com/reagent-project/reagent-cookbook

4:53 espinho: luxbock: i alread made it to half of clojure koans tutorial

4:54 luxbock: if I have the namespace object, and a source for an expresson from that namespace that contains symbols used in that namespace, but not defined in it (i.e. they are referred), can I find out from which namespace those symbols come from without looking up the source for the namepsace declaration?

4:54 espinho: but i learn by building stuff. It's hard for me to follow tuts and son't see results

4:54 if that makes any sense

4:54 luxbock: espinho: I'd start with Reagent then, there's also #clojurescript in case you have questions

4:55 clgv: luxbock:

4:55 yes

4:55 ,(apropos "ns-")

4:55 luxbock: clgv: how?

4:55 clojurebot: (clojure.core/ns-aliases clojure.core/ns-imports clojure.core/ns-interns clojure.core/ns-map clojure.core/ns-name ...)

4:56 luxbock: ns-refers?

4:56 mavbozo: espinho: in my workplace, we use "web development with clojure" book to teach web development to our clojure newbies who don't have any previous experience with programming or web development

4:56 espinho: the results are quite good

4:56 espinho: luxbock: thank you

4:57 luxbock: clgv: thanks

4:57 mavbozo: espinho: especially for people who learns easily by doing projets

4:58 clgv: luxbock: yep. I just needed to check

4:59 mavbozo: I'd add either "Programming Clojure" or "Clojure Programming" to that book ;)

4:59 mavbozo: clgv: agree, we use that book too.

5:00 luxbock: clgv: if I require something :as something, then those symbols don't seem to appear in the map returned by ns-refers

5:00 any idea how I'd access those?

5:00 espinho: mavbozo: thank you. I will also try that one

5:00 clgv: luxbock: no they wont. you have that namespace in (ns-alias *ns*) then

5:00 ,(require '[clojure.string :as str])

5:00 clojurebot: nil

5:01 clgv: ,(ns-alias *ns*)

5:01 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: ns-alias in this context, compiling:(NO_SOURCE_PATH:0:0)>

5:01 clgv: ,(ns-aliases *ns*)

5:01 clojurebot: {str #<Namespace clojure.string>}

5:01 clgv: luxbock: ^^

5:01 luxbock: clgv: great

5:19 CookedGryphon: Hi all, I've asked this question before but never found a satisfactory solution: it feels like I should be able to trivially test timeouts in core.async reproducibly and without actually being dependent on time

5:19 any suggestions? gists where people have redeffed the timeout function?

5:27 quizme: (nth (sorted-set 3 4) 1) ; UnsupportedOperationException nth not supported on this type: PersistentTreeSet clojure.lang.RT.nthFrom (RT.java:798

5:27 clgv: CookedGryphon: why do you need to test timeouts?

5:27 quizme: why isn't nth supported for a sorted set?

5:28 CookedGryphon: I have a state machine whose definition is based on timeouts for various things happening interleaved with user interactions

5:28 quizme: if there is an ordering, it seems like a well-defined operation... getting the nth element.

5:29 CookedGryphon: clgv: and it's using core.async to do the coordination

5:30 clgv: CookedGryphon: so you mean there is concurrency/parallelism that you want to test?

5:32 CookedGryphon: sort of, but not really

5:32 so I have a stream of events coming in

5:32 and a stream of events going out

5:33 and depending on the order and timing of the events coming in, I emit different events

5:33 so it's fairly straightforward in that sense

5:34 it's just how do I test that if i send in event a, then wait 2000ms, events b and c are emitted, and so on

5:34 because if I actually wait 2000ms, 1) my tests take ages and 2) there's a chance that it might not fire exactly on 2000ms, so I have to put in some leeway, but then how much leeway do I give? And that leaves me with really fragile tests

5:35 so I want a way to say to core async's timeout "pretend that exactly 2000ms have elapsed and fire all the channels that you would fire in that situation"

5:48 justin_smith: espinho: clojure does not need the jdk to do interop, it has its own byte code compiler

5:51 espinho: in fact, vlojure has no interpreter, all clj is compiled

5:51 *clojure that is

5:51 hellofunk: i thought you were talking about another clojure dialect i haven't heard about

5:52 "visual clojure", the next step in microsoft's evolution

5:52 vlojure

5:55 justin_smith: I just have fat fingers, and am using a touch screen

5:55 hellofunk: i thought you had that bluetooth keybd going

5:56 justin_smith: not atm

6:21 clgv: CookedGryphon: what exactly is the goal of the test? which properties do you want to verify?

6:33 CookedGryphon: I want to verify that my state machine transitions states after the appropriate amount of time has passed

6:35 clgv: CookedGryphon: well in general testing with timing properties is pretty hard. In this concrete case, can't you just scale the timeouts?

6:35 CookedGryphon: if anything that makes the problem worse

6:35 the smaller the timeouts the more fragile the tests

6:36 and there's nothing worse than nondeterministic tests

6:37 clgv: CookedGryphon: are the conrete durations really the important thing to test? if you want to test if "causality" of your state machine works correctly you could probably discretize the whole system into "time steps" where each time step is a set of fired events as input

6:37 CookedGryphon: given that timeout doesn't actually block for a time, but returns a channel, it's technically totally doable and fine to override the timeout method to return a channel which I can coordinate from the test instead

6:38 clgv: aren't you test cases more like: "if I fire that set of event in this order, I expect the following events in that order/unordered as result"?

6:39 checking concrete timeouts in the test seems so level for a meaningful test property

6:41 emauton: clgv: The timing of the input events affects the output events in this case, if I understand correctly.

6:41 mavbozo: hellofunk: "vlojure" name makes me interested, so I searched and found vsClojure https://github.com/vsClojure/vsClojure

6:42 too bad vsClojure doesn't have any maintainer

6:42 clgv: mavbozo: is that what ClojureCLR folks use?

6:43 mavbozo: clgv: i have no idea

6:43 clgv: mavbozo: humm a google search suggests so

6:44 CookedGryphon: emauton: correct, clgv: in fact *most* of the state transitions are when timing boundaries are crossed. In that sense the time passing is another one of my input events

6:44 however the amount of time elapsing depends on the state I'm in

6:44 so it can't actually be fed in as an event

6:45 clgv: CookedGryphon: and you are sure you can't discretize this to aggregated steps to get rid of the time?

6:45 CookedGryphon: well, yes

6:45 clgv: good luck then ;)

6:46 luxbock: say I have an arglist such as '[f a b & xs] and a vector such as '[inc 1 2 3 4 5] (completely made up example), I'd like to end up with a map of '{f inc, a 1, b 2, xs '(4 5)} but I can't figure out how

6:47 mavbozo: clgv: it's in a really bad state. "But as of right now the vsClojure Community on Github is dead and nobody is home to answer the door. That is just the hard facts." -https://plus.google.com/communities/106235975067046753407

6:47 delihiros: hi, is there any way to call class literal such as s = String.class in Clojure? what I really want to do is look up implementation by passing interface to openide.util.Lookup/lookup.

6:47 luxbock: there's ##(destructure '[[f a b & xs] [inc 1 2 3 4 5]])

6:47 lazybot: ⇒ [vec__12213 [inc 1 2 3 4 5] f (clojure.core/nth vec__12213 0 nil) a (clojure.core/nth vec__12213 1 nil) b (clojure.core/nth vec__12213 2 nil) xs (clojure.core/nthnext vec__12213 3)]

6:47 luxbock: but I haven't figured out how I could use its output

6:48 is there something I can do that doesn't involve re-writing Clojure's destructuring logic?

6:48 clgv: mavbozo: I guess more reusable libs to develop IDE support are needed. afaik there are some for certain tasks like auto completion or similar....

6:49 mavbozo: clgv: and of course, cooler name like vlojure that justin_smith suggested :)

6:50 clgv: mavbozo: yeah thats the most important step which we should debate for at least a month full time

6:54 the-kenny: ,(type String)

6:54 clojurebot: java.lang.Class

6:54 the-kenny: delihiros: ^

6:56 clgv: ,(= (class "abc") String)

6:56 clojurebot: true

6:56 clgv: also there is `instance?`

7:01 hyPiRion: ,(string? "hey")

7:01 clojurebot: true

7:01 delihiros: clgv: thanks for your reply. what I really want to do is this snippet : ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);

7:02 hyPiRion: delihiros: Assuming you have them imported: (.lookup (Lookup/getDefault) ProjectController)

7:02 clgv: delihiros: (.lookup (Lookup/getDefault) ProjectController)

7:02 hyPiRion: zing

7:02 clgv: :D

7:05 the-kenny: or (.. (Lookup/getDefault) (lookup ProjectController)) :)

7:06 clgv: the-kenny: I wouldn't do that for just one chained call. minimum of two ;)

7:06 the-kenny: Yeah, me neither. I just wanted to offer another option

7:10 delihiros: thank you for your reply. Unfortunately it didn't work for me. I have imported ProjectController class and Lookup class, and I get CompilerException java.lang.NoSuchMethodError: org.openide.util.Lookup.lookupAll(Ljava/lang/Class;)Ljava/util/Collection;,

7:10 I believe I'm doing something wrong...

7:12 clgv: delihiros: looks like the method does not expect a single class. check the javadoc

7:13 the-kenny: clgv: no, it does. See http://bits.netbeans.org/7.4/javadoc/org-openide-util-lookup/org/openide/util/Lookup.html

7:13 It expects a Class<T>

7:13 clgv: that should be lost on JVM level

7:13 the-kenny: yeah I know

7:17 delihiros: what I'm trying to do is to use Gephi from Clojure, and according to Javadoc and tutorial here http://www.slideshare.net/gephi/gephi-toolkit-tutorialtoolkit , it should work...

7:19 clgv: delihiros: which slide?

7:19 ah. 5

7:20 delihiros: do you have your project.clj handy?

7:21 delihiros: clgv: I have put gephi-toolkit.jar and openide.jar in lib/ directory, and added resource-paths ["lib/*"] to project.clj

7:22 clgv: delihiros: why not use them as usual dependencies?

7:28 delihiros: just add them as direct dependencies and then you can skip the lookup

7:29 delihiros: clgv: oh really... I'll try that

7:33 clgv: delihiros: according to its readme, gephi uses its own maven repository, so you have to add that to your project.clj

7:33 delihiros: cf. https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L78

7:39 delihiros: clgv: adding maven repo didn't work :: Warning : Cookie rejected [rememberMe="deleteMe", version:0, domain:bits.netbeans.org, path:/nexus, expiry:Mon Jan 12 21:36:56 JST 2015] Illegal path attribute "/nexus". Path of origin: "/maven2/org/gephi/gephi-parent/0.9-SNAPSHOT/gephi-parent-0.9-SNAPSHOT.pom"

7:40 clgv: delihiros: post your project.clj on refheap.com

7:41 delihiros: clgv: https://gist.github.com/8550435fd7f74136ce1a

7:43 clgv: delihiros: looks about right

7:46 delihiros: pretty weird

7:47 woth an issue on the leiningen project

7:48 hyPiRion: delihiros: yeah, post it as an issue there

7:52 clgv: hyPiRion: delihiros: on it

7:52 hyPiRion: delihiros: yeah, that's definitely a bug =( I tried it out and it goes looping

7:54 delihiros: hmm

7:55 where should I post an issue? gephi?

7:56 clgv: hyPiRion: delihiros: https://github.com/technomancy/leiningen/issues/1796

7:57 delihiros: thank you so much

7:57 clgv: delihiros: yeah, maybe report it to gephi as well. the pom.xml generated by leiningen can not be use to retrieve the deps via maven

8:12 delihiros: clgv: hyPiRion: https://github.com/gephi/gephi-toolkit/issues/11

8:13 hyPiRion: delihiros: you tried to fetch with maven, yes?

8:13 clgv: hyPiRion: I tried that as well

8:13 didnt work

8:14 hyPiRion: alright, then it's likely upstream. Either Aether or an issue on their side

8:15 delihiros: mvn install didn't work, could be a problem of checksum?

8:15 clgv: "mvn package" failed for me with the pom.xml generated from leiningen

8:18 hyPiRion: yeah, tried as well

8:47 whodidthis: how do i create a random email with test.check

8:48 clgv: whodidthis: three random strings concatenated by @ and .

8:54 hyPiRion: ish

8:55 gfredericks: whodidthis: if you can find a decent regex for it you can use test.chuck's string-from-regex

8:56 Glenjamin: depending on what you want to test, i'd just do random string @example.com

8:56 no danger of emailing by accident :D

9:00 whodidthis: many nice, thanks al

10:37 svinjo68: 16:35 *** NAMES @ChanServ 7YUAAAADG [Blake] [Neurotic] _5kg _jimrthy _kardan _trev `brian abaker abh acagle actionshrimp adamhill adamhill_ adammh addisonj AdmiralBumbleBee Adr1 AeroNotix ag0rex agarman agumonkey ajhager aka- akhudek akkad aksatac akurilin2 alandipert alejandro2 alexbaranosky alexherbo2 alexyakushev algernon Alina-malina alloyed alxlit amalloy_ amano-- ambrosebs amoe amontalenti andrei_ andrewstewar

10:37 t andreypopp__ anekos anildigital annapawlicka anon-7589 aperiodic apetresc arekinath arenz arianvp arkh aroemers arohner arrdem asaleh asonge aspotashev_ Atlanis audaxion auganov augustl avdi averell AWizzArd awwaiid azizur babilen Bahman banjiewen bcarrell bdamos beawesomeinstead BeLucid_ ben-o ben_vulpes bencryption bendlas` benizi benregn bertrandk bigkevmcd Biohazard bjeanes_ bkearns Blkt bobpoekert bodie_ bood

10:37 le bool_ borkdude boyscared bozhidar brackets brainproxy brettweavnet brianwong brixen Bronsa broquaint bruceadams bsansouci bwreilly byaruhaf canassa cantsin carc cascada-io catonano cdombroski cemerick certainty cespare cfleming charliekilo Chasm chavezgu chenglou cherwin ChiralSym choas ChongLi choprocker chouser chouser_log Chousuke chridal chriswk_____ cichli ckarlsen clauswitt cldwalker clgv clojurebot cmbntr_

10:37 cmiles74 cobakobodob codeberg codelahoma coffeejunk conan ConstantineXVI CookedGryphon cprice404 Cr8 crash_ep crazysim cromney cross ctrlrsf cursork cYmen d4gg4d dabradley daemian dagda1_ dakrone damethos daniel` danielglauser danlarkin danlucraft danneu datura David daviid dbohdan ddellacosta ddima deadghost dean|away defrang demolithion dene14 Deraen DerGuteMoritz devn devth dhruvasagar divyanshu dj_ryan djcoin d

10:37 kua dm3 dmi3y dogonthehorizon dominiclobue DomKM donbonifacio donmullen_ doritostains drbobbeaty dsantiag_ dselph_____ Duke- dyad dyreshark dysfun dzimm_ eagleflo edlothiol edoloughlin edw eigenlicht ekroon elarson elfenlaid ellinokon elsen emacsnw emauton Empperi enebo engblom enn ephemeron erdic ered eristic exaptic Excureo expez falafel FAMAS farhaven ffwacom fijimunkii fikusz filabrazilska finishingmove Floyd_ f

10:37 m75 FMJaggy fmu Foxboron franco frkout Frozenlock fryguy fuziontech fvt gazarsgo georgej162___ geremih gf3 gfredericks ggherdov ggreer gideonite gigasquid gignosko gko Glenjamin glitch100 gluegadget govg grandy_ gratimax grauwulf gregburd gregf_ greghendershott gridaphobe grilix grim_radical groot Guest68766 Guest99870 guilleiguaran_ gunn gws gyim_ H4ns hakvroot halorgium Hamled haroldwu hash havenwood hellome heuri

10:37 st hex6 hexxfury hguux_ hipsterslapfight hiredman hive-mind hodlr honkfestival honza hooptw howard hugod hyPiRion IamDrowsy iamdustan iamedu iamjarvo ibdknox icedp ieure igorw ikitommi ikitommi_ imanc insamniac instilled Integral1st Integral2st Integralist ipolyzos ipostelnik iref itruslove_ ivan ivan\ ivan` iwilcox j0ni jabbslad jabroney jackhill jackjames jakebasile jakecraige jakesyl_insomnia jamiei_ janne Jaood

10:37 jareddba jarjar_prime jave jayne jchochli jcidaho jcrossley3 jcsims jdaggett je_ jeffcarp Jellydog jeregrine jerseykx jespada jetlag jez0990 jfojtl jgdavey jgmize jimduey jimt jinks_ jjmalina jjmojojjmojo jjttjj jlewis jlewis_ jlf jlouis jlpeters jlyndon jmccune jml jmolet jodaro joegallo joelkuiper jonasen jonathanj joshbamboo1 joshhead_ joshskidmore js1 JStoker jswanson jsys juhani julienXX justin_smith justinmcp_

10:37 justizin jweiss jwm_ jxport jzelinskie k-dawg ka2u kandinski kapil__ karls katratxo kbidarka keelerm keen__________31 kenrestivo kephale kerneis_ khmer kitallis kiwitobes klobucar Klumben kmicu Kneiva knyppeldynan Kohelet koreth korpse kraft kreg_ kristian_ Kruppe kryft kschrader ktsuji kungi kylo kzar l1x L235 l2x l3dx l_ch_nm_y_r lancepantz larhat larme lasers_in_the_ju lazybot LBRapid leathekd leifw lenstr lepto

10:37 nix lfranchi_ lhdc_ Licenser lifenoodles lijnen_ littleli llasram lnostdal lobotomy lodin_ log0ymxm lokydor looper lordB8r lotia lpaste lucian__ Lugoues luigy LukeWinikates___ luxbock Luyt__ lvh lwang lyddonb m1dnight_ m_3 machty machuga MadFunk madscientist` magnars magopian majoh malyn Mandus marce808 marienz mariorz martinklepsch martintrojer matt_c matt_d matthavener matthoffman mattrepl mattyw maxigas maxmartin

10:37 mcav_ mccraig mcescher mdallastella mdeboard meandi mearnsh Meeh mekaj Mendor|s1r merlinsbrain metadaddy metellus mfikes mgaare michaniskin_ micrypt MightyJoe mikko mishok13 misv mj-0 mjz mlb- mmitchell mnemnion mnomitch_ Monika__ moquist morganastra Morgawr mp mpenet`` mpereira mrb_bk mrBliss mrLite mrmargolis mrowe_away msassak msgodf mtd mthvedt myguidingstar mynomoto n0n3such n1ftyn8 naga` Nahra Natch nathan7 n

10:37 drei necronian newgnus nexysno NhanH nicholasf2 nighty^ nighty^_ nikola nilern Ninerian ninjudd nkoza nmashton_ nmontecc noidi nseger_ nullptr`` numberten nuwanda_ nw nwjsmith obobo octane--_ octe okic olauzon OlegYch onthesta1rs onthestairs ontoillogical opqdonut ordnungswidrig orkaa Orva oscar_toro OscarZ oskarth owenb____ oyvinrob ozzloy p_l paulweb515 pavlicek pcn pdlug pdoherty PeakCode peeja pepijndevos Peregr

10:37 cherwin: wtf

10:37 AeroNotix: /ignore add svinjo68

10:37 svinjo68: sorry !!

10:37 I fuck up with Emacs

10:37 FAMAS: svinjo68: greetings

10:37 ivan: another satisfied rcirc user

10:38 ddellacosta: hahaha

10:38 Ninerian: cthulu?

10:38 FAMAS: AeroNotix: he said sorry and that he fucked up with emacs

10:38 gratimax: .-.

10:38 matthavener: svinjo68: good morning to you too :)

10:38 FAMAS: ivan: rcirc does this mass flash?

10:38 svinjo68: Hi everybody

10:38 lordB8r: morning @svinjo68

10:38 catonano: svinjo68: hello !

10:38 AeroNotix: happens far too often, use a better client

10:38 gratimax: tbh I forgot I was in this channel... nice reminder, I guess

10:38 svinjo68: Well I am stick to Emacs

10:38 ddellacosta: alright, let's call this meeting to order. First, who brought the donuts?

10:38 mattyw: svinjo68, no problem - and morning, we're ready and waiting in #vim if you need help ;)

10:39 ddellacosta: I call dibs on the cruller

10:39 annapawlicka: and here i thought someone wanted to talk to me

10:39 svinjo68: Vim ----> is just my Mutt editor

10:39 AeroNotix: annapawlicka: haha

10:39 svinjo68: only dor emails

10:39 n1ftyn8: annapawlicka: samesies

10:39 svinjo68: ok no flame wars

10:40 mattyw: svinjo68, :)

10:41 annapawlicka: ddellacosta: i do wish there were donuts

10:41 ddellacosta: annapawlicka: I mean, they're not good for you, but they would remove the sting

10:41 sveri: Hi, when I run lein new luminus foo, how does leiningen know which jar to call? How do I register a leiningen plugin with leiningen?

10:41 ddellacosta: or something. I should go to bed.

10:42 moquist: svinjo68: emacs can happen to anyone. No hard feelings!

10:42 ddellacosta: sveri: take a look here: https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md

10:43 svinjo68: is justs the Evil-mode--Emacs transition

10:43 ddellacosta: and on that note, 'night all

10:44 dnolen_: thheller: https://gist.github.com/swannodette/0eaf17815d49b7b77a95 updated, seems much closer to what shadow-build does now

10:44 cemerick: annapawlicka: well, 'hi', didn't even know you were here, really. I have your conj talk queued, I hope your first was pleasant. :-)

10:45 imanc: are there any UK/euro clojure conferences ?

10:46 annapawlicka: cemerick: i’m a lurker :) giving the talk was stressful, but being at conj was truly awesome

10:46 thheller: @dnolen_ : I would recommend using a "global" output-dir and putting modules relative to it, seems less repetetive

10:46 dnolen_: imanc: UK - Clojure eXchange, EuroClojure

10:46 thheller: don't care about that :)

10:46 thheller: don't want to make assumptions about where modules will go

10:46 thheller: sugar can be provided up higher by cljsbuild if people care about such things

10:46 annapawlicka: imanc: there is :clojureD http://www.clojured.de/

10:47 imanc: great cheers

10:47 cemerick: annapawlicka: imposter syndrome never goes away, at least for me

10:48 tbaldrid_: cemerick: yeah, I don't think it ever does.

10:48 elarson: svinjo68: I'm not sure how emacs caused the spam, but I can recommend circe as a client over rcirc and erc. again, no clue how that could prevent listing all the names in the channel, but at least it is something fun to try out ;)

10:48 moquist: I think it does for some people (not me!), but then there's an arrogance problem that's probably just as bad.

10:49 cemerick: tbaldrid_: it gets better once you learn to not care :-)

10:49 annapawlicka: cemerick tbaldrid_ that’s very comforting ;-)

10:49 elarson: annapawlicka: what was the talk you gave at the conj? got a link?

10:50 dnolen_: thheller: btw, I'm assuming Google Closure produces a separate source map file for each of these and they must be individually merge

10:50 d

10:50 moquist: elarson: https://www.youtube.com/watch?v=4-oyZpLRQ20

10:50 elarson: thanks!

10:50 thheller: @dnolen_ : as for module dependencies, if you find a way to make that automatic that would be awesome. but I had many false positives and it never produced what I intended.

10:52 and you are right, google seems to have given up on that as well

10:52 there are still some goodies in Closure but most of it is private or otherwise unreachable

10:54 mdeboard: How/why are people so commonly blasting the names of everyone in channel lately

10:54 I've been using rcirc for years and have literally never had that happen

10:55 but have noticed it semi-regularly of late

10:55 svinjo68: I am trying to find how to reproduce it

10:55 thheller: @dnolen_ : can't comment on source maps, never used them with closure optimized builds. I'd be very surprised if they work the way I tried to implement them.

10:55 svinjo68: still no clue

10:55 hyPiRion: annapawlicka: oh wow, I had no idea about http://www.clojured.de/ – thanks for the pointers to that one

10:55 thheller: but you get a source map per module,

10:55 annapawlicka: hyPiRion: np :-)

10:56 hyPiRion: I thought Twitter would automatically inform me of Clojure conferences, but that one went unnoticed until now

10:56 stuartsierra: mdeboard: I haven't seen that (Adium client)

10:56 annapawlicka: hyPiRion: i don’t think it was advertised enough

10:57 svinjo68: \EXIT

10:58 dnolen_: thheller: ah I saw that a bit of logic in shadow-build around them assumed you had it working

10:59 nathan7: W/aw

10:59 welp.

10:59 dnolen_: thheller: good to know

10:59 thheller: well they load, but line mappings don't match sometimes

10:59 enricopirani: now on circe

11:00 hyPiRion: annapawlicka: Yeah, sounds likely. It's sad though, I would've probably gone if I had known earlier =(

11:01 dnolen_: thheller: heh well that's true anyway w/ advanced optimizations, the merge is pretty lossy but better than nothing

11:03 myguidingstar: thheller, does shadow-build allow specifying :libs and :preamble compiler options for each module?

11:04 annapawlicka: hyPiRion: are the tickets sold out? euroclojure will be in a few months so you have plenty of time to plan this one

11:05 thheller: @myguidingstar : :libs is not supported at all, preamble is called :prepend and yes, it is per module

11:08 hyPiRion: annapawlicka: Not for :clojureD, no, but unfortunately I have to handle some personal matters that weekend. I will definitely go to EuroClojure though!

11:12 seangrove: dnolen_: Sorry for noise on the PR, I wrote the macro and got it working a bit, and then realized I'm not sure what the final js output should even be :P

11:13 dnolen_: seangrove: I think better to enumerate your plan on that ticket first

11:18 mrb_bk: dnolen_: so bummed I don't live in NY right now

11:18 Would be dragging you to the bar to argue

11:19 elarson: annapawlicka: great talk!

11:21 annapawlicka: elarson: thanks :)

11:23 AeroNotix: Where is EuroClojure this year?

11:25 hipsterslapfight: ^^^ also interested, i see there's no word yet

11:25 but i need to start convincing the company i work for to send me there, where-ever there is :v

11:26 AeroNotix: last year was in Krakow, where I live. Hoping for near-Poland again :)

11:26 stuartsierra: There may not be a chosen location yet.

11:26 Feels like Krakow was yesterday … :)

11:26 dnolen_: mrb_bk: lol :)

11:26 Glenjamin: oh wow, that was june

11:27 AeroNotix: I had to run after the last talk. Really wanted to stay for the beers

11:50 thheller: dnolen_: anything I can do to help CLJS-948 along? Been using it for a bit and really don't want to go back. :)

11:56 puredanger: AeroNotix: no date/loc for EuroClojure yet, work is ongoing to nail that down!

11:56 AeroNotix: puredanger: thanks for reply!

11:56 hopefully it's nearby me

11:57 annapawlicka: AeroNotix: it may be in Spain or Italy this year

11:57 AeroNotix: annapawlicka: ah interesting

11:57 annapawlicka: ah wait

11:58 AeroNotix: i forgot things have changed and it’s now puredanger who’s in charge

11:58 puredanger: I'm not in charge of anything :)

11:59 AeroNotix: fine I'll be in charge

11:59 annapawlicka: there was a poll a few months ago and most voted locations were Spain/Italy

11:59 puredanger: Spain is high on the consideration list

11:59 daniel`: have it in romania

12:02 chouser: I didn't realize EuroClojure was an Alex & Co. conf.

12:02 puredanger: It's not

12:02 hyPiRion: It's not

12:02 chouser: oh

12:03 puredanger: However, Cognitect will be running EuroClojure with Marco's assistance this year

12:03 chouser: Ah, interesting.

12:03 annapawlicka: so it’s Alex, Marco & Co. ;-)

12:03 puredanger: Well you're forgetting Lynn who does all the work :)

12:04 I'm just a figurehead :)

12:04 I just stand around saying "yep, sounds good" a lot

12:05 JaredR: do you ever say “umm, yeah… sounds crap.” too?

12:05 puredanger: fortunately, Lynn is awesome and that never really comes up :)

12:05 annapawlicka: Lynn is great, i could never forget her help

12:06 JaredR: nice, so it’s all neatly filtered by the time it gets to you so you get to be Mr. Positive!

12:06 annapawlicka: it’s amazing how she can be in multiple places at the same time

12:06 puredanger: you have no idea

12:06 she may some kind of collective

12:07 annapawlicka: i had a theory that Cognitect did some massive progress in cloning and never told anyone

12:07 puredanger: no comment

12:07 annapawlicka: :-)

12:07 clgv: puredanger: you were supposed to say that ;)

12:07 JaredR: I am stymied by functional programming… I went from pure procedural hell to nearly to years of OOP and this new paradigm is presenting an intellectual obstacle of previously unencountered propportions

12:08 * clgv searches his tin foil hat

12:08 JaredR: I am told that once you manage to wrap your head around it… it’s a new kind of blis and entirely worth the effort. Consensus?

12:08 puredanger: JaredR: what's baking your noodle?

12:08 annapawlicka: JaredR: it will pass

12:09 JaredR: “everything is immutable” ..?

12:09 dnolen_: thheller: not really that patch just needs review from me, I'll get to it when I have time - the module stuff is my main focus at the moment.

12:10 JaredR: how can you move data thru a system if everything is immutable? or is it that paramters/arguments are where the datum is inserted and inside the function it can’t be changed, only a new value calculated and returned?

12:11 brb

12:13 back… anyway, I tend to get my head around a concept and then run off to write examples and samples and such to test my understanding, but I’m struggling to even get that far…

12:15 thheller: @dnolen_ : while you are at it, maybe you can look it closure CrossModuleCodeMotion. I wonder if it is possible to let the compiler move stuff out of cljs.core to get a less monolithic core.

12:16 dnolen_: thheller: ah good point! I was wondering what that was all about, will dig deeper!

12:16 thheller: thanks for all the feedback and insight, much appreciated

12:16 thheller: happy to help

12:17 justin_smith: JaredR: yeah - data comes in via new bindings (function args, loop bindings, etc.) and is then passed along ( after 0 or more recurdions as needed for intrrmediate values)

12:17 *recursions

12:20 JaredR: justin_smith: cool… thank you. :)

12:20 justin_smith: JaredR: a common pattern in trsnslating from stateful to functional code is an intermediate step where all updated bindings are entries in a hash map that every funvtion takrd as an arg

12:20 naty135: hey guys, I'm looking for some social channels, can anyone point me some?

12:22 swedishfish: naty135: #emacs?

12:25 seangrove: seancorfield: Super cool that you run your tests against clojure master, and were able to track down a problem so quickly because of it

12:27 seancorfield: Yeah, we'd have noticed at start of business today that master was broken for us, even if I hadn't been playing with Alpha 5 over the weekend.

12:27 The tricky part is going to be figuring out which part of that fix for 979 is actually breaking our system!

12:28 Bronsa: seancorfield: the gist of that commit is that now clojure prefers the in-memory version of a class to the in-disk one

12:29 seancorfield: Yeah, I was just going over it now...

12:29 seangrove: seancorfield: Just wanted to compliment/send some appreciation your way for a cool setup that helps everyone, including yourselves :)

12:29 mavbozo: (inc seancorfield)

12:29 lazybot: ⇒ 16

12:29 andyf: I have also narrowed down a change in Eastwood behavior to the 979 change. Just about to reply to the email discussion with details

12:30 seancorfield: Cool. Sounds like we should all be able to nail it down pretty quickly.

12:32 puredanger: (inc seancorfield) ;; thanks for testing!

12:32 lazybot: ⇒ 17

12:33 seangrove: (inc seancorfield)

12:33 lazybot: ⇒ 18

12:44 dnolen_: reiddraper: btw anything hold up a test.check release? CLJS people probably won't touch until we have something that's non-SNAPSHOT

12:44 arohner: does anyone have a working example of lein cljsbuild + lein ring uberwar?

12:45 dnolen_: cfleming: ping

12:46 * andyf Is it normal for Clojure builds with 'mvn install' to fail if you have not done 'mvn clean' first? Or maven projects in general?

12:47 andyf: I mean if a successful build has been done recently, so many class files in target due

12:47 *dir

12:48 reiddraper: dnolen_: nope, I can do one this week

12:48 dnolen_: reiddraper: sweet!

12:49 reiddraper: dnolen_: might be helpful if we add some 'usage/installation' instructions specific to CLJS on the readme?

12:54 dnolen_: reiddraper: sure I can do that later today if you like

12:55 reiddraper: dnolen_: much appreciated

13:01 dnolen_: seangrove: did a quick experiment w/ mori, there's a new bonsai namespace

13:01 seangrove: the release artifact is 24K, Immutable.js 3.5.0 is 20K

13:02 seancorfield: andyf: what failure are you seeing with the mvn build?

13:02 dnolen_: DCE ftw as usual

13:02 chouser: Is there such a thing as adding rules to a core.logic db, or are they exclusively a query-time thing?

13:02 seancorfield: the only thing I hit was the port used for the java.io socket server test is already in use on Mac OS X so I changed it to 6543 instead of 65321

13:05 andyf: seancorfield: ExceptionInitializerError very early in compile-clojure step. Now that I look at the details it may be related to CLJ-1638

13:06 dnolen_: chouser: no support for rules far as I know, would be nice

13:07 andyf: A mvn clean fixed things up, so no long term worries. Just a bit surprised to see it as I was building 4 or 5 slightly different versions of Clojure source

13:15 dnolen_: thheller: poked around, cross module code motion is already enabled for advanced optimization, only applies to functions & vars but might be good enough

13:20 seancorfield: andyf: I hadn't seen that but good to know mvn clean fixed it... I should get into the habit of running that myself

13:34 Bronsa: andyf: yeah when ABI changes ExceptionInInitializerExceptions are normals (see CLJ-1638)

13:37 dnolen_: seangrove: trimming a bit more, 21K + 2K for transducers.js, not bad and everything just works w/ ES6 iteration based code

13:40 seangrove: dnolen_: Ah, that's beautiful

13:40 No idea about ES6 really, iterators/classes/otherwise, but I suspect I'll have to figure it all out pretty quickly

13:41 dnolen_: seangrove: so this would be a new minimal build which is only persistent data structures

13:42 TimMc: (inc eastwood) ; it just discovered a set of tests that weren't being run due to a namespace mismatch

13:42 lazybot: ⇒ 7

13:42 seangrove: dnolen_: The idea is to have it work under an ES6 facade like normal-ish js data structures?

13:43 dnolen_: seangrove: no, the idea is that if people just want the data structures we can cut the payload in half

13:43 seangrove: dnolen_: Ok, got it

13:44 andyf: TimMc: Cool. I had no idea how useful the namespace / file name mismatch checks would be when I added them. It is so easy to get such mismatches by accident.

13:44 brainproxy: dnolen_: nice work re: bonsai

13:45 dnolen_: brainproxy: if by work you mean letting Closure do it's thing, OK :)

13:45 brainproxy: well i meant your insight for putting together a minimal build, good idea :-)

13:47 seangrove: dnolen_: Just looked at bonsai, very nice. Nice being able to have different builds so easily.

13:47 brainproxy: dnolen_: are you considering a bonsai Chainable?

13:47 dnolen_: brainproxy: no

13:48 TimMc: andyf: I'm looking at adding eastwood to our build pipeline (at least as a side thing, not a blocker.)

13:48 dnolen_: brainproxy: maybe later but at the moment just interested in explorable how viable a minimal lib is w/ ES6 iterator support

13:48 s/explorable/exploring

13:48 brainproxy: gotcha

13:48 yeah, chainable is really sugar anyway

13:49 andyf: TimMc: Yeah, I wouldn't recommend as a blocker yet. *maybe* after selective disabling of known-ok warnings with source annotations feature is added that would become reasonable.

13:51 TimMc: andyf: There are a few bug reports I need to file first as well (not necessarily with eastwood).

13:51 chouser: dnolen_: Ok, thanks for your rules answer.

13:51 TimMc: midje and eastwood disagree on how many arguments midje.sweet/just takes, for instance. I haven't investigated yet.

13:51 seangrove: brainproxy: Chainable is kind of necessary from a marketing perspective IMO, but it's also totally crazy compared to -> or ->>

13:52 TimMc: There's also some weird bug that *looks* as if eastwood is trying to lint a compiler error.

13:52 brainproxy: seangrove: agreed

13:53 dnolen_: seangrove: I don't think Chainable is all that important, Bonsai isn't for people happy with Underscore or Lo-dash

13:53 seangrove: and even more importantly those libs will one day support ES6 iterators so it's moot point

13:53 andyf: TimMc: That may be known a Eastwood issue with some libs that tweak :arglists on their fns or macros. Feel free to file Eastood Github issue if you want me to look at it some time

13:53 amalloy: TimMc: isn't the issue that midje fabricates its own arglists, and eastwood expects the arglists in the style generated by defn/defmacro? i think eastwood has a flag you can set to tell it to ignore certain arglists

13:53 seangrove: dnolen_: Sorry, meant Chainable is necessary for tutorials, etc. Bonsai has a target

13:53 * seangrove goes off and reads about ES6 iterators

13:55 andyf: TimMc: amalloy: yes latest Eastwood can be configured to give correct :arglists for linting purposes.

14:01 Tritlo: really bad question about macros: aren't they basically just compiler checked evals?

14:03 amalloy: Tritlo: kinda, although it's not clear what you mean by "compiler checked"

14:03 TimMc: amalloy: But then midje still needs a patch.

14:03 andyf: Tritlo: macros are functions executed during compile time, transforming some code to other code

14:03 hellofunk: Tritlo: not a bad question. but the do happen compile time, not runtime, like eval

14:04 amalloy: TimMc: i think you can configure eastwood separate from midje

14:04 but andyf would know better, of course

14:04 TimMc: Yeah. No rush, though, so I'm happy to be lazy and see if midje can be fixed first. :-P

14:05 hellofunk: yesterday it was pointed out that clojure.inline and Eastwood are good examples of valid use of eval. can anyone suggest other appropraite uses of eval?

14:05 Tritlo: ok, thanks

14:05 andyf: TimMc: I have put some of those configs into Eastwood itself, and Midje is used widely enough I don't mind adding more if I have missed some

14:05 Tritlo: macros are one of these things that, like monads, seem to be really glorified, but not that complex when used

14:05 amalloy: Tritlo: well, things don't have to be complex to be glorious

14:06 Tritlo: amalloy: true :)

14:07 TimMc: For example, juxt.

14:08 seangrove: ~juxt

14:08 clojurebot: juxt is pretty metal

14:08 andyf: TimMc: See here for midje-specific config in latest eastwood (0.2.1): https://github.com/jonase/eastwood/blob/master/resource/eastwood/config/third-party-libs.clj#L269

14:09 justin_smith: Tritlo: macros can get complex pretty fast, especially when misused, or when used to create a mini language like for or core.async/go

14:11 seancorfield: andyf: surprised you haven't added config for java.jdbc :) I do have a ticket open there to fix the :arglists

14:12 andyf: seancorfield: It is there, but in a different config file for clojure contrib libs

14:15 arrdem: 'morning

14:19 andyf: arrdem: G'day. Hey, I didn't mean to blow off your questions a couple days ago. Guests stayed longer than I thought.

14:19 arrdem: andyf: I'll file for a refund later :P

14:20 seancorfield: cool andyf I need to upgrade to a newer Eastwood then :)

14:22 andyf: arrdem: You were asking for thoughts on picking between fully qualified names when they existed in more than one of clj cljs cljclr I think?

14:22 arrdem: andyf: yeah that's the one

14:23 * andyf Were you considering an overall "mode" for Grimoire browsing that was one of those 3 at a time, perhaps?

14:24 * andyf Seems likely that most people would only be interested in results for one of those at a time

14:25 seancorfield: andyf: I see Alex asking for a JIRA ticket for this issue in alpha5 - before I go open one, did you already do that?

14:25 andyf: I did not

14:25 seancorfield: ok, i'll jump on that....

14:25 arrdem: The issue isn't browsing Grimoire itself. That I've got set, and those changes got done last night. The issue is my "namespace lookup" search feature. At present, I have a mapping from namespaces to the newest (version wise) documented artifact containing that logical namespace

14:26 puredanger: thx

14:26 arrdem: as logical namespaces aren't unique by platform/dialect/whatever this is now an API fault. the proposed behavior is that the existing search will cover only clojure and the "next" version will have a platform specifier.

14:26 so you have to explicitly look up the newest version of a namespace in Clojure vs in ClojureScript.

14:27 this being your "one at a time" qualification.

14:27 andyf: Yeah, adding such a qualifier to searches sounds good.

14:28 Bronsa: andyf: fwiw I don't think the exception we're now getting in eastwood analyzing clojure.reflect indicates a bug in clojure

14:29 supersym: oi ... I hadn't even learned of conj.io yet. Sweet

14:29 Bronsa: andyf: the previous (bugged) behaviour of clojure when mixing AOT & JIT is what was making eastwood "work" before but reloading c.reflect should cause that exception IHMO

14:29 andyf: arrdem: If you wanted to get fancy you could perhaps allow "any" for the search API for the arg that specifies clj cljs or cljclr, but not sure if anyone would want that

14:30 Bronsa: andyf: but I'm not the one to make the call that the new breaking behaviour is not a regression :) puredanger will have to have a say on this

14:30 arrdem: andyf: the results for that will be nonsensical as it's a single result search system. for multiple results that'd be ok, but as that's not a logically atomic backend operation I'm going to force people to go through my api or lib-grimoire or whatever to do stuff like that.

14:31 andyf: Bronsa: Ok. I was pretty much just noticing the similarity of symptoms to what Sean was seeing. Hadn't dig for cause yet.

14:31 *dug

14:32 seancorfield: http://dev.clojure.org/jira/browse/CLJ-1639

14:37 andyf: Bronsa: I may have done it incorrectly, but I tried to get an exception reloading clojure.reflect namespace and didn't find a way

14:37 Bronsa: andyf: with -alpha5?

14:37 andyf: it's not just reloading c.reflect

14:38 andyf: I'll put together a POC in a minute that will be useful to puredanger too

14:39 andyf: With -alpha5 I can do (required 'clojure.reflect :reload-all :verbose) with no exceptions

14:40 Bronsa: andyf: yeah, that's not going to throw

14:40 andyf: But yes, 2nd and later don't do much, ok. Trying -alpha4

14:41 Similar there, so my mental model is incomplete here

14:43 That is a fancy way of saying "I don't know" :)

14:50 sveri: Hi, is it common to include dependencies in the project.clj for a leiningen plugin?

14:51 TimMc: sveri: Just to make sure I'm not mis-parsing your question, you're asking about the project.clj that describes a leiningen plugin, and you're aksing if the runtime dependencies of the plugin's code should be listed in the :dependencies of the project.clj?

14:51 arrdem: if it's a utility plugin like eastwood or lein-typed not really, if it's something like cljx that's part of your build system then yes it's common.

14:52 andyf: When writing a plugin? Or using one?

14:53 noonian: if its a build process like one like arrdem mentioned then you would usually put it in the :dev profile of your project.clj

14:54 sveri: TimMc: yea, that question sounds worse when I reread it again. I was looking at https://github.com/yogthos/luminus-template/blob/master/project.clj and there is no dependency to leiningen itself included, but in https://github.com/yogthos/luminus-template/blob/master/src/leiningen/new/luminus.clj are references to leiningen so I was wondering if that is common or not. I may reask that question if it is common to include leiningen as a

14:56 TimMc: sveri: Oh, I think leiningen itself as a dependency is omitted, yeah.

14:57 https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md

14:57 sveri: TimMc: but there is no harm in adding it I guess? Cursive looks better if it can resolve the dependencies

14:58 Bronsa: andyf: puredanger http://sprunge.us/GSVP?clj this explains the eastwood exception

15:03 arrdem: does Ring not have a moved permanently response built in?

15:05 Glenjamin: (assoc (redirect "whatever") :status 301) i guesS?

15:06 andyf: Bronsa: Reading ... I assume you mean CLJ-979 ?

15:07 Bronsa: andyf: ... yeah thanks :)

15:07 arrdem: Glenjamin: https://github.com/ring-clojure/ring/pull/181 yeah basically

15:17 Kristien: TIL slurp works with HTTP.

15:18 arrdem: yep! it makes a great quick and dirty HTTP client when you need one :P

15:18 just don't load-file "http:..."

15:18 Kristien: :P

15:18 Doesn't return status code though

15:19 arrdem: also doesn't let you set headers or anything

15:20 Kristien: I wrote a little crawling tool today that printed URLs and their status code.

15:20 about 36 lines of horrific clojure code with global variables and everything in the wrong place, but the tool is very helpful for finding 404s and 500s. :)

15:20 gonna tidy it tomorrow

15:21 TimMc: slurp also doesn't let you specify timeout, fallback, retry, threadpools...

15:22 mbac: is there a way to serialize clojure objects to disk and write them out as human readable/modifiable s-expressions?

15:22 Kristien: here it is btw: https://gist.github.com/rightfold/806b816eeb73b7ecc474

15:23 TEttinger: $title google.com

15:23 lazybot: "Google"

15:23 Kristien: mbac: yeah, but not all objects will be writable

15:23 mbac: sure. which ones won't be writabl? java objects? fine by me :)

15:23 Kristien: yeah

15:23 TEttinger: mbac: you can make custom writers though for objects that aren't writable, but most pure clojure stuff is written in a readable way

15:24 Kristien: mbac see http://stackoverflow.com/questions/3301439/clojure-data-structure-serialization

15:24 TEttinger: ,(pr (sorted-map :a 1 :n 2))

15:24 clojurebot: {:a 1, :n 2}

15:24 TEttinger: that's one of the issues

15:25 arrdem: Kristien: https://groups.google.com/d/msg/clojure-dev/gdip7Oy5s-w/3EL0F36OqicJ

15:25 Kristien: ah right

15:25 I even used clojure.edn _today_ lol :P

15:34 * brucehauman so so weak at system programming

15:35 mbac: i understand the entire stackoverflow except for... what does setting *print-dup* true achieve?

15:38 puredanger: http://clojurewest.org has been updated - returning to Portland, OR Apr 20-22

15:38 CFP open now!

15:38 tickets next week

15:41 arrdem: ballin. thanks Alex!

15:44 andyf: clojurewest.org is non-blank page for others? I may have web proxy issues

15:44 arrdem: non-blank here

15:45 puredanger: dns changed and it's certainly possible you can see old results

15:46 The Internet: caches all the way down

15:46 andyf: Maybe if you change it to a better name, two hard CS problems will be solved simultaneously? ;)

15:47 puredanger: I could make it clojurewest1.org and hit all three

15:47 arrdem: now that's just mean

15:49 andyf: Shoot. I was goon for amusing.

15:49 *goin'

15:51 justin_smith: puredanger: wow, bold move opening it on 4/20, sadly too soon for legal pot (that's another year or so away I think?)

15:52 andyf: justin_smith: What is bold about that date?

15:52 TEttinger: there's going to be some fun times when people walk in expecting a different kind of convention

15:52 csd_: Would someone mind taking a look at the attached code? I'm messing around with the Java crypto libs, trying to implement CBC using the existing ECB cipher. I can decrypt the first chunk of the ciphertext but nothing subsequent. I'm working whether perhaps this is an issue with how Java handles unsigned integers, or something else entirely https://www.refheap.com/96033

15:52 justin_smith: andyf: bad joke about 4:20, "universal" code for smoking weed

15:52 csd_:

15:52 puredanger: justin_smith: heh

15:53 TEttinger: (inc justin_smith)

15:53 lazybot: ⇒ 169

15:53 * arrdem poker face

15:56 TEttinger: csd_: chunk fetches only bytes 0 to 16

15:57 csd_: TEttinger: it's a recursive function. each 16 byte block has to XOR itself against the previous block

15:58 TEttinger: I just don't see where you're changing the plaintext that it calls current-chunk on

15:58 csd_: line 10

15:58 calls helper function again, with a new array 16 bytes shorter

16:00 TEttinger: I see now

16:00 well the right way to do this in clojure is to use loop and recur, so you don't blow the stack

16:01 csd_: SICP has given me bad habits

16:02 andyf: csd_: Looks like tail recursion, which can be changed to 'recur' in Clojure to avoid blowing the stack

16:02 csd_: yeah

16:03 i'm more wondering why my code only decrypts the first block and none others. even if i'm trying to do it manually i cannot. i'm wondering whether it's something to do with java's lack of unsigned ints perhaps

16:05 * andyf Do you have a working Java version to compare code and results with here?

16:05 dagda1_: I have a nested vector like this [[1 2] [2 3] [3 4] [4 1]] and I am assigning metadata to each element like this (map #(with-meta % (zipmap % [:free :free])) xs). I want to "update" the metadata when conditions are met

16:05 csd_: andyf: i've never written java before :)

16:05 i have a buddy next to me working in ruby though

16:05 dagda1_: what is the best way to "update" or how best can I add new metadata to the elements, do I have to recreate the whole sequence again with the new metadata?

16:06 * andyf Did you write decrypt-AES-ECB, or that is from a lib someone else wrote?

16:06 csd_: andyf: I wrote it. It's basically a wrapper for the Java lib. I'll put that on refheap too

16:07 andyf: https://www.refheap.com/96034

16:09 noonian: dagda1_: you usually grab the meta data on the collection, do your transformation to get another collection, and then add the metadata back using with-meta

16:09 tomjack: dagda1_: you've got the right idea, you can't update except by creating a new sequence, because you can't update metadata in place (with-meta always returns a new object)

16:09 andyf: Key and plaintext args are intended to be what types?

16:10 dagda1_: noonian: tomjack I thought that might be the case

16:10 csd_: andyf: key is string. plaintext is a byte[]

16:12 TEttinger: ,(.getBytes "ABC")

16:12 clojurebot: #<byte[] [B@3b40cc0f>

16:12 TEttinger: ,(vec (.getBytes "ABC"))

16:12 clojurebot: [65 66 67]

16:12 TEttinger: ,(vec (.getBytes (String. "ABC")))

16:12 clojurebot: [65 66 67]

16:12 TEttinger: ok, so that isn't the problem I hope

16:12 csd_: what's that

16:13 TEttinger: (. Cipher getInstance "AES/ECB/NoPadding")

16:13 I think you might want (Cipher/getInstance)

16:13 if .getInstance is static

16:14 andyf: csd_: Have you tried adding debug prints to see what is going on at each step?

16:16 csd_: andyf: a little but honestly I think the problem is one related to Java. I should hypothetically be able to take bytes 16 - 32, decrypt, and XOR with bytes 0 - 16 and receive the decrypted text. ive tried doing this manually and that i cannot makes me think that perhaps there's a java related problem

16:16 andyf: csd_: E.g. When you say it decrypts the first block but no others, do you mean it returns only 16 bytes, but no others?

16:16 csd_: no, it returns garbage

16:16 peppered with negative numbers

16:17 andyf: csd_: Or does it return an array of expected length, but only first 16 bytes have expected value and rest look like random garbage?

16:17 csd_: the latter

16:18 TEttinger: on line 19, it looks like you're just getting 16 bytes out of coll https://www.refheap.com/96034

16:18 andyf: If you can show the manual steps in a paste, with a pointer to first step that looks to have incorrect results, that might make it easier to see what is going wrong

16:18 csd_: ok give me a sec

16:19 TEttinger: that's just resizing what the new array should be

16:19 TEttinger: right but don't you need the next 16 bytes each time?

16:19 amalloy: dagda1_: well, there's also vary-meta. but why is this in metadata, instead of being inside a map like {:value [1 2] :free [1 2]} or something? metadata is a powerful trick but it's often not the cleanest solution

16:19 csd_: TEttinger: it takes the existing size of coll and increases by 16, because each block is 16 bytes

16:21 dagda1_: amalloy: the original data is in the nested vector format. It seemed like less work to keep the fromat and use metadata

16:21 amalloy: seems like more code to create and work with the new map

16:22 TEttinger: ,(vec (byte-array 16 (map bit-xor 255 (.getBytes "ABCDABCDABCDABCD"))))

16:22 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>

16:22 andyf: csd_: Why return a string from your decrypt function? Note that strings of N chars are not the sane as byte arrays of N bytes

16:22 TEttinger: ,(vec (byte-array 16 (map bit-xor (range 16)(.getBytes "ABCDABCDABCDABCD"))))

16:22 clojurebot: [65 67 65 71 69 ...]

16:22 amalloy: dagda1_: you're mapping over it anyway, and metadata/map are both equally easy to create, so i'm not super convinced by the first argument. the second could be a good reason, depending on how often you work with the metadata vs the numbers, and on whether you need to pass it back to old code that expects just numbers

16:23 csd_: andyf: honestly i had been struggling to figure out how to get the lib working so i lifted that code from someone's blog

16:23 TEttinger: &(vec (byte-array 16 (map bit-xor (range 16)(.getBytes "ABCDABCDABCDABCD"))))

16:23 lazybot: ⇒ [65 67 65 71 69 71 69 67 73 75 73 79 77 79 77 75]

16:23 TEttinger: &(vec (byte-array 16 (map bit-xor (map - (range 16))(.getBytes "ABCDABCDABCDABCD"))))

16:23 lazybot: ⇒ [65 -67 -67 -71 -67 -71 -71 -67 -71 -75 -75 -79 -75 -79 -79 -75]

16:24 TEttinger: you may see some subtle differencesthere

16:24 andyf: csd_: If the cipher doFinal call returns an array of bytes, looks like changing it to string could only garble things

16:25 csd_: sorry why is that?

16:25 amalloy: (.getBytes (String. key)) looks super weird, csd_. that might explode for some inputs, if key is a byte[]

16:25 csd_: key is string. i only learned today that you dont need to cast to String. to run .getBytes

16:25 dagda1_: amalloy: the numbers are like edges of a graph

16:25 lodin: Meh. I scrolled up just to find svinjo68's name list paste ...

16:26 csd_: andyf: https://www.refheap.com/96037

16:26 line 26 is successful decrypt of block 1

16:27 line 28 is failed decrypt of block 2

16:27 omg

16:28 you're right

16:28 it was casting to string that was killing it

16:28 amalloy: csd_: you're using the word "cast", which is a very different thing than what you are doing

16:28 csd_: amalloy: what's the appropriate word in this case?

16:29 amalloy: "convert" would be reasonable. "transform"

16:29 TEttinger: ,(String. (.getBytes "ABCD\n"))

16:29 clojurebot: "ABCD\n"

16:29 amalloy: a cast reinterprets a pointer as a different type; you are creating a new object based on an old object

16:29 csd_: this is the second time in two days where i've wasted a shitload of time because of string issues. the last was because i was trying to do frequency analysis and unknowingly was dealing with a list of chars instead of a string. who would have thought that would significantly distort the results

16:29 :-/

16:29 andyf: csd_: Java docs for calling String constructor on a byte array says it decodes the byte array from system default encoding, which could be UTF-8. That converts variabke number of bytes to 1 char, depending on byte vals

16:30 csd_: andyf: i.e. out of luck when the byte value is > 128?

16:31 andyf: Just completely not what you want in the middle of decryption or encryption

16:31 csd_: yeah

16:31 TEttinger: ,(String. (byte-array (range 128 144)))

16:31 clojurebot: "����������������"

16:31 TEttinger: ,(String. (byte-array (range 166 188)))

16:31 clojurebot: "����������������������"

16:31 TEttinger: that seems wrong

16:32 ,(vec (.getBytes (String. (byte-array (range 166 188)))))

16:32 clojurebot: [-17 -65 -67 -17 -65 ...]

16:32 justin_smith: ,(int (char (byte 188)))

16:32 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for byte: 188>

16:32 TEttinger: &vec (.getBytes (String. (byte-array (range 166 188)))))

16:32 lazybot: ⇒ #<core$vec clojure.core$vec@377d4a92>

16:32 justin_smith: hrmph

16:32 TEttinger: &(ec (.getBytes (String. (byte-array (range 166 188)))))

16:32 lazybot: java.lang.RuntimeException: Unable to resolve symbol: ec in this context

16:32 TEttinger: &(vec (.getBytes (String. (byte-array (range 166 188)))))

16:32 lazybot: ⇒ [-17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67 -17 -65 -67]

16:32 justin_smith: ,(int (char (first (byte-array [188]))))

16:32 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for char: -68>

16:32 justin_smith: hrmph

16:33 TEttinger: that's weird as heck though

16:33 &(map char (vec (.getBytes (String. (byte-array (range 166 188))))))

16:33 lazybot: java.lang.IllegalArgumentException: Value out of range for char: -17

16:33 amalloy: justin_smith: unchecked-byte

16:34 hyPiRion_: yeah, map over unchecked-byte first

16:34 &(map char (vec (.getBytes (String. (byte-array (map unchecked-byte (range 166 188)))))))

16:34 lazybot: java.lang.IllegalArgumentException: Value out of range for char: -17

16:34 hyPiRion_: oh wait

16:36 andyf: csd_: I would even be suspicious of what you are doing with the key, as amalloy mentioned. If it is a byte array, that is what I would expect the crypto calls to need, and doing .getBytes will depend on char encoding, e.g. UTF-8 or UTF-16

16:36 csd_: andyf: how would you read the key in instead?

16:36 amalloy: andyf: well, as it turns out the key there is a string, and csd_ just intended (String. x) to be some kind of cast, so it's probably fine although pointless

16:36 TEttinger: &(.getEncoding (String. (byte-array (range 166 188))))

16:36 lazybot: java.lang.IllegalArgumentException: No matching field found: getEncoding for class java.lang.String

16:37 andyf: csd_: Where are you getting the plaintext or ciphertext as byte arrays?

16:38 csd_: amalloy is correct, i assumed i couldn't use a java method on the clojure string

16:38 andyf: exercise; predefined. cryptopals.com

16:38 amalloy: csd_: strings are strings. there's no such thing as a clojure string

16:38 &(class "test")

16:38 lazybot: ⇒ java.lang.String

16:41 andyf: csd_: If all you are dealing with are strings with chars in ASCII subset, then 1char can be encoded in 1byte in UTF-8, but there are other ways to encode chars into bytes, and non-ASCII chars to deal with in many places. Not saying you always need to deal with that in a learning exercise, though

16:43 Crypto functions usually deal in bytes, not chars

16:43 justin_smith: yeah, that actually simplifies things

16:43 (as long as you convert back to the right encoding, of course)

16:43 andyf: Because bytes (aka octets) are always same # of bits

16:48 amalloy: andyf: i wonder if computer scientists from the 50s would be thrilled or horrified that that's become true

16:49 andyf: For bytes, maybe horrified. For octets, maybe not, but maybe horrified at the name :)

16:50 It definitely helps software portability that hardware has standardized on powers of 2 bits in things

16:50 arrdem: Standardized on C's assumptions..

16:51 andyf: I don't know the history well enough to know whether C was a driver there.

16:52 justin_smith: goes all the way back to FORTRAN that everything would be power-of-two-sized (before that we're just talking various machine code impls)

16:53 eriktjacobsen: Does anyone have experience with java.jdbc performance on mysql? I am using latest libraries, I create an empty lein project with only jdbc / mysql as deps, and a single select averages 1000ms. On php the same select query takes average of 96ms, and locally on mysql server takes 40ms… so it isn’t the query.

16:54 Really at a loss on what to do differently… anyone know other mature mysql drivers besides java.jdbc or some secret code to unlock reasonable performance?

16:54 andyf: But there were Fortran compilers for computers with non power-of-2 word sizes, weren't there?

16:54 justin_smith: andyf: hmm...

16:54 arrdem: yeah there were PDP fortran compilers

16:54 good ol' 23 bit words

16:54 iirc

16:55 justin_smith: andyf: yeah, you are right - even the very first version "The IBM 704 had a 38-bit accumulator, a 36-bit multiplier quotient register, and three 15-bit index registers."

16:55 mea culpa

16:55 andyf: Wikipedia page on word has lots o' history

16:55 arrdem: andyf: link pls <3

16:56 justizin: amalloy: that's a good question (about the 50s), wish my grandfather was still around to ask stuff like that too. one of the last conversations i remember having, he said in his day, they designed hardware for the software, and now (in the 90s) the software is designed for the hardware.

16:56 zilti: eriktjacobsen: Well it isn't java.jdbc either - java.jdbc is the battletested standard since over a decade. Are you using the latest driver? A connection pool? How do you access it from Clojure?

16:57 arrdem: justizin: yeah that's one thing that Alan Kay reiterates in his various talks

16:57 justizin: now actual 2015 present day, i would say both software and hardware are relatively commoditized, we run a lot of software on ARM that was written for x86, and maybe x86 itself is the last hurrah of trying to make the hardware better for the software

16:57 andyf: This one: http://en.m.wikipedia.org/wiki/Word_(computer_architecture)

16:57 mbac: eriktjacobsen, strace? :P

16:57 justizin: since basically x86 has tried to shove RISC and every other interesting architectural idea into what is essentially a hardware emulated 386 or whatever ;d

16:58 eriktjacobsen: zilti: yes latest version. no connection pool, trying to keep test to minimal deps. I connect by making a DB connection map and then calling “query” with a simple select statement (“SELECT id from table where id = ?” 234)

16:59 mbac: I hope you are joking.

16:59 mbac: not particularly. is the clojure output going to be nothing but futex calls?

16:59 amalloy: eriktjacobsen: you are probably recreating the db connection as part of every query, instead of saving it

16:59 eriktjacobsen: If I call it in a loop, its 1000ms every single time.

17:00 justin_smith: yeah, you want a connection pool of some sort

17:00 eriktjacobsen: when I test with a single query, it still takes commandline ~60ms, php ~100ms, and clojure 1000ms. I realize connection pooling will help with repeated queries, I’m trying to strip down to the minimal case to figure why its 10x slower

17:00 amalloy: justin_smith: or just saving the connection yourself. a pool is a lot of extra fiddly bits to learn, if you just want to verify you can do stuff quickly

17:01 justin_smith: amalloy: fair enough - I would call that a degree 0 pool :)

17:01 eriktjacobsen: is c3p0 still the frontrunner connection pooling library

17:01 hiredman: eriktjacobsen: how are you timing the tests?

17:02 justin_smith: I do think so, but as amalloy says you can just save the connection. The config map is instructions for creating a connection, and not a connection itself.

17:02 eriktjacobsen: commandline - time, php - microtime, clojure (time) for minimal test, but have done timbre profiling in main code.

17:02 hiredman: (not, you know, using the time command or whatever, right?)

17:02 zilti: eriktjacobsen: Last I checked, apparently, yes. There's btw. a nice short manual on how to set it up on clojure-doc.org

17:03 hiredman: I just mean, you aren't timing clojure using "time lein run" or something similar, which it sounds like you aren't

17:03 eriktjacobsen: right

17:03 that would include jvm startup

17:04 tbaldrid_: eriktjacobsen: are you preparing the statement outside of your benchmark loop?

17:04 hiredman: (as an aside, I would not recommend whatever it is timbre calls a "profiler")

17:05 there are real profilers like yourkit or visualvm

17:05 eriktjacobsen: amalloy: any link to reusing the db connection? wont help for the single query test but I can at least see if it speed up repeats (using get-connection and with-connection?)

17:05 hiredman: I would try breaking down what the code actually does to determine where the 1000ms is going, what percentage is connection setup, what is running the query

17:06 eriktjacobsen: I know hiredman, but for getting an average / min / max breakdown over calls at microsecond level… it seems fine for just testing things.

17:06 justin_smith: eriktjacobsen: more importantly than jvm startup, it would include clojure and nrepl startup, which are the real lags in clj startup

17:06 eriktjacobsen: Yeah, throwing stuff into forked java.jdbc is my next step hiredman, didnt want to go there

17:06 hiredman: you shouldn't need to do that

17:06 justin_smith: you can use yourkit or jvisualvm to see where the time is being spent

17:07 hiredman: I mean, I don't know the new jdbc stuff all that well, but you definitely don't need to do that for the old jdbc stuff, and I would hope you would not need to for the new stuff

17:07 amalloy: it's really as easy as calling get-connection once and then passing that to jdbc/query. or at least, it was - i'm not sure what is up with the new jdbc

17:08 eriktjacobsen: is there any reason you can think of why a bare java.jdbc “query” function would take 10x as long as php or commandline to make a connection and run the query? it seems kinda crazy, is this working as intended? I can try testing on another machine

17:08 hiredman: what are you doing with the results?

17:08 tbaldrid_: there's several things that could be different. Not the least of which is a cold JIT, or connections that are not pooled, etc.

17:09 eriktjacobsen: nothing =\ have tried assigning them to variable, running inside a dorun, and just throwing them away… does seem to matter since the result is just a 30 char long string

17:09 hiredman: eriktjacobsen: the query function by default realizes the entire result set in memory if I recall

17:10 I haven't touched php in years, but if I recall you get a result set and have to page through it or something

17:10 so that could be the difference?

17:10 eriktjacobsen: its a single column from single row, so its just 30 bytes… no paging in any language

17:11 regardless of a language… 80ms-150ms should be pretty standard for a simple indexed select. 1000ms is obviously something wrong. I’m writing up the get-connection stuff now

17:11 hiredman: you can go through query's options and turn them off

17:11 like use :as-array or whatever it is, etc

17:12 stuartsierra: Or compare with the Java JDBC interop code directly, checking for reflection warnings.

17:15 arrdem: Philisophical/design question - given that andyf's cheatsheet (which I keep updated) is ~70% of Grimoire's referral traffic and maintaining old link validity adds a lot of complexity should I .

17:16 amalloy: yes you should .

17:18 arrdem: Okie doke.

17:19 amalloy: arrdem: i hope you're not taking my advice to . very seriously, since you didn't actually say what you're considering doing

17:20 Bronsa: (inc amalloy)

17:20 lazybot: ⇒ 212

17:21 * justin_smith will brb, have to .

17:21 arrdem: Previous URL structure: /store/group/artifact/version/ns/def

17:21 New URL structure: /store/group/artifact/version/platform/ns/def

17:21 amalloy: Bronsa: i'd make some joke about making my blood boil or something, but it would just mark me as a parochial american who thinks water boils at 212°

17:22 * arrdem chuckles

17:23 eriktjacobsen: amalloy / hiredman: heh, just changed code to use (with-db-connection [connect db-spec] (query connect …), and it took average update from 1600ms to 9300ms.

17:24 justin_smith: weird

17:25 eriktjacobsen: oh even weirder, ran it a second time to confirm, got errored out: MySQLNonTransientConnectionException Can't call rollback when autocommit=true sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)

17:27 mavbozo: i just tried it in repl to table with 7 records, (j/query mysql-db ["select * from user"])

17:28 15 - 30 ms

17:28 arrdem: clearly eriktjacobsen's SQL server is outside lunar orbit

17:30 mavbozo: i'm using mysql

17:30 eriktjacobsen: I would start to question that if other languages (python, php, perl, ruby) weren’t connecting easily from same machine. The weird thing is we are seeing same timing on every company laptop and production server. Outside of some really bizzare maven situation with a bad library or cross dependency, I cant wrap my head around this. mavbozo was that mysql table hosted locally?

17:31 mavbozo: for comparison with php command line, PHP pdo->fetchAll(), 10ms

17:31 justin_smith: really, you should profile (yourkit is free for open source, jvisualvm comes with the jdk), find out what the time is being spent on

17:31 mavbozo: yes, mysql table is hosted locally

17:32 justin_smith: eriktjacobsen: I have a bunch of software in production that would not be viable if every select of a single item was taking ~1000 ms, I think something is up with your setup, and profiling may help narrow that down

17:32 (all using clojure.java.jdbc w/ mysql)

17:33 with remote servers

17:33 amalloy: same here but with postgres

17:34 eriktjacobsen: justin_smith: we use dynamo db for high volume stuff, luckily mysql is only around 1k-50k records so it isn’t yet causing problems. I agree though. Again I’ve replicated the timings on a bare project with ONLY jdbc / mysql connector as dependencies

17:34 justin_smith: eriktjacobsen: like I said, use a profiler

17:34 something is fishy

17:40 Frozenlock: Is there any tutorial for Cylon? https://github.com/juxt/cylon

17:45 Deepu: when running "lein uberjar" I'm getting "Couldn't find project.clj, which is needed for uberjar". Can someone please tell me how to fix this?

17:45 eriktjacobsen: what directory are you running from? where in relation is your project.clj stored?

17:45 Frozenlock: Deepu: You need to be inside your project path

17:46 hyPiRion_: Deepu: what are you trying to accomplish? You need to be inside your project directory, but it doesn't matter where specifically.

17:47 Deepu: I'm trying to follow these steps https://github.com/pyr/cyanite

17:48 eriktjacobsen: Deepu: Your commandline has to be inside the project directory. use the cd command to navigate to the project

17:48 Deepu: I guess I have to create a project first

17:49 the steps doesn't say to do that ...

17:50 Thank you all

17:52 puredanger: Bronsa: weirdly, while working on something else, I am now reproducing http://dev.clojure.org/jira/browse/CLJ-1636 on Clojure itself and cannot build locally. https://gist.github.com/puredanger/f56e3253f0668a515ec5

17:54 cfleming: dnolen_: pong

17:54 Bronsa: puredanger: i honestly am boggled by that bug

17:56 puredanger: all suggests a race condition but all the code that invokes SeqIterator is sequential & I don't see how what happens can actually happen :/ maybe there's some details about java/jvm that I'm not aware of

18:00 dnolen_: cfleming: is there any special I need to do to avoid resolution errors w/ Clojure Maven projects?

18:00 s/any/anything

18:02 cfleming: dnolen_: I don't think so, I've used them with no problems.

18:03 dnolen_: Do you see libs being added correctly to your modules when you look in project structure? (cmd-;)

18:18 solussd: anyone know what happens to namespaced keywords in transit-js when you call mapToObject on a transit map?[

18:18 (I’m reluctantly not writing an app to find out)

18:27 the-kenny: solussd: give me a minute

18:29 oh, transit-js. Sorry :/ Don't have that ready

18:30 solussd: :)

18:34 justin_smith: solussd: the readme for transit-js implies it comes back as a clojurescript.core keyword object

18:35 https://github.com/cognitect/transit-cljs#default-type-mapping

18:35 solussd: that’s transit-cljs

18:36 I just tried it— looks like it blows up. It’s too bad it doesn’t just truncate the namespace and give me string keys

18:36 the-kenny: how would duplicated be handled in that case?

18:36 *duplicates

18:37 solussd: oh.. yeah, .. that’s probably why it isn’t supported

18:37 can object keys in javascript not have forward slashes in them?

18:37 seancorfield: I opened an issue against core.typed for that code.cache AOT-compilation issue http://dev.clojure.org/jira/browse/CTYP-193

18:40 amalloy: object keys in js are just strings afaik: they can have any character

18:40 yeah, definitely. x = {}; x['abc/def'] = 1; runs fine

19:00 solussd: amalloy: interoping with an angularjs app- the dev is ok with just using transit maps throughout the app, so I’m in good shape (and he will be, too, bc they’re much more powerful)

19:01 amalloy: property access doesn’t work though (e.g. x.abc/def), but that’s a nonissue now

19:01 amalloy: sure, of course it doesn't

19:01 solussd: that’s enough javascript in the #clojure chan. :D

19:26 koreth_: Is there a setting somewhere to get ClojureScript to retry a REPL connection periodically, or should I be writing my own timer function for that? It seems like the default is to try to connect one time when (clojure.browser.repl/connect) is called, and never again after that connection fails. Or am I wrong about that?

19:45 mercwithamouth: would you say light table is preferable to emacs right now?

19:45 arrdem: no

19:46 mercwithamouth: i keep flip flopping between the two

19:48 meh..i'm comfortable enough with emacs...no need to make a simple choice hard. procrastination

20:16 dnolen_: lazy contracts for ClojureScript ~30 lines http://swannodette.github.io/2015/01/12/lazy-contracts/

20:16 uses specify

20:18 [blake|: Ha! I was just reading that.

20:34 How does one reference a ClojureScript function in HTML (e.g. an onKeyPress)? Or does one?

20:36 dnolen_: [blake|: ClojureScript uses Google Closure namespaces

20:36 so whatever your namespace is, foo.bar.baz

20:37 under advanced optimizations you need to exporrt

20:37 export

20:40 [blake|: dnolen_: So...if I have project 'foo', with a "core" namespace 'bar' containing a function 'baz', my html would be 'onkeypress="foo.bar.baz"'?

20:42 (inc dnolen_)

20:42 lazybot: ⇒ 11

20:42 [blake|: Aha...it worked!

20:46 mercwithamouth: lol

21:04 gfredericks: $karma dnolen

21:04 lazybot: dnolen has karma 19.

21:04 gfredericks: $karma dnolen_

21:04 lazybot: dnolen_ has karma 11.

21:04 gfredericks: pretty impressive

21:11 dopamean_: ive got a macro question

21:11 seeing as im learning clojure and haven't written any macros before it may be kind of a dumb question

21:11 either way

21:11 the offending code is here: https://gist.github.com/nickmcdonnough/d72e30f42def74c99698

21:12 its for an exercism.io solution. it should define a bunch of functions: monteenth, tuesteenth...

21:12 amalloy: that's not a macro

21:12 dopamean_: oh ait

21:12 wait*

21:12 my mistake

21:13 updated to have it look like what ive got in my editor

21:13 which is basically just changing that defn to defmacro

21:13 is it still incorrect?

21:14 amalloy: see also http://stackoverflow.com/q/7852351/625403

21:14 dopamean_: alright

21:14 amalloy: yes, there are a lot of things wrong with that. the definition of the macro looks good, but the way you're calling it is no good

21:14 i think that that SO Q/A should help

21:15 dopamean_: interesting. thanks.

21:19 do you think it would be better to have the macro take the list of weeknames and have the list comprehension in the macro?

21:19 it kinda seems like that is part of what youre saying on SO

21:21 amalloy: dopamean_: the point is that you simply cannot pass (keys x) to a macro, because x doesn't exist. the macro just sees a list with two elements, keys and x

21:22 dopamean_: hmm

21:22 amalloy: you have to write (mymacro a b c) or something. or you can make the macro look that value up itself, like (defmacro make-teenths [] (cons `do (for [name (keys day-num)] `(...))))

21:24 dopamean_: ill try that. thank you.

21:31 amalloy: i got it to work. thanks a lot for the help. tbh im not fully sure why it worked this time so im gonna spend a lot more time reading up on it. this is my first attempt at writing a macro and it seems like i tried kind of a tough task

Logging service provided by n01se.net