#clojure logs

2015-01-12

00:19cfleminghellofunk: Another (very funky) use of eval in clojure.core is definline
03:06joshnzIs 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
03:06joshnzref 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?
03:07joshnzSecondly, 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?
03:11Kneivajoshnz: my javas are here: /System/Library/Frameworks/JavaVM.framework/Versions/
03:13joshnzyup, that's what /usr/bin/java sylinks to (rather to a folder in there). I only have only folder called 'A'
03:14joshnzThe 'Current' folder is an alias to 'A'
03:14joshnzHowever, Oracle says to determine the installed JRE version: /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
03:14stammihi. can someone recommend an article/documentation about the basics of the implementation of the clojure compiler?
03:14Kneivajoshnz: hmm, I've installed JDK 7, but I use that to program Java, so I don't know about Clojure dependency
03:15joshnzTotally different location
03:16joshnzI assume I just install JDK 7 then, which sounds like it will update the java symlink for the runtime...
03:21joshnzI 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?
03:27Kneivashould be
03:30Kneivajoshnz: ah, my jdk is here: /Library/Java/JavaVirtualMachines/
03:31joshnzThere can be multiple JDKs installed on a system – as many as you wish.
03:31joshnzWhen 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.
03:31joshnzYou can determine which version of the JDK is the default by typing java -version in a Terminal window.
03:31joshnzI don't understand Oracle's docs, as above
03:31joshnzI thought java -version was for the JRE?
03:31joshnzJDK is just code...?
03:32KneivaJDK has compiler and other tools as well
03:32joshnzAh yes, of course.
03:33arossouwtrying to make sense of frequencies from clojure/core
03:35joshnzRight, 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)
03:35krat0sprakhararossouw: where are you stuck?
03:36arossouwknow how to use the library, just trying to understand (reading the source), how (assoc! counts x (inc (get counts x 0)))) works
03:36joshnzSo 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?
03:44dysfunwhat's the binary edn format called again? i think it begins with f and has something to do with cows
03:45dysfunah fressian, which is like freesian, a type of cow
03:46Kneivajoshnz: You might be able to just go with the JDK 8 and its JRE since you can target older versions when compiling.
03:47joshnzAh 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.
03:56kenrestivoit's been a while since i did android stuff, but i think the latest android sdk works with jdk7
03:57kenrestivothe limitation to java 6 was, again AFAIR, not because of clojure but with the android toolkit itself.
03:57Kneivajoshnz: yep, eg. http://stackoverflow.com/questions/15492948/javac-source-and-target-options
04:02joshnzHandy 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/
04:02joshnzNo symlink or path changes so far as I can tell. Just overwrote the files directly.
04:03arossouwi was thinking that clojure might be well suited to data-mining from database resultsets
04:03joshnzI'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
04:44espinhocan anyone point me a good beginner web development tutorial please?
04:45espinho found this book https://pragprog.com/book/dswdcloj/web-development-with-clojure but im unsure if it is a good investment
04:46mavbozoespinho: have you any previous experience in web development?
04:47espinhoI have no previous programming experience. I only know html and css
04:49espinhodid a couple short clojure tuts and this http://adambard.com/blog/clojure-in-15-minutes/
04:49espinhoalso before i choose clojure I tried some ruby, python and php tutorias
04:50espinhobut then i found clojure by pure chance, and the syntax made more sense to me than the other languages
04:50luxbockespinho: I'd first start with www.4clojure.com first to get a better feel for the language
04:51luxbockespinho: for web dev, this might be the easiest thing to get started with: https://github.com/reagent-project/reagent-cookbook
04:53espinholuxbock: i alread made it to half of clojure koans tutorial
04:54luxbockif 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?
04:54espinhobut i learn by building stuff. It's hard for me to follow tuts and son't see results
04:54espinhoif that makes any sense
04:54luxbockespinho: I'd start with Reagent then, there's also #clojurescript in case you have questions
04:55clgvluxbock:
04:55clgvyes
04:55clgv,(apropos "ns-")
04:55luxbockclgv: how?
04:55clojurebot(clojure.core/ns-aliases clojure.core/ns-imports clojure.core/ns-interns clojure.core/ns-map clojure.core/ns-name ...)
04:56luxbockns-refers?
04:56mavbozoespinho: 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
04:56mavbozoespinho: the results are quite good
04:56espinholuxbock: thank you
04:57luxbockclgv: thanks
04:57mavbozoespinho: especially for people who learns easily by doing projets
04:58clgvluxbock: yep. I just needed to check
04:59clgvmavbozo: I'd add either "Programming Clojure" or "Clojure Programming" to that book ;)
04:59mavbozoclgv: agree, we use that book too.
05:00luxbockclgv: if I require something :as something, then those symbols don't seem to appear in the map returned by ns-refers
05:00luxbockany idea how I'd access those?
05:00espinhomavbozo: thank you. I will also try that one
05:00clgvluxbock: no they wont. you have that namespace in (ns-alias *ns*) then
05:00clgv,(require '[clojure.string :as str])
05:00clojurebotnil
05:01clgv,(ns-alias *ns*)
05:01clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: ns-alias in this context, compiling:(NO_SOURCE_PATH:0:0)>
05:01clgv,(ns-aliases *ns*)
05:01clojurebot{str #<Namespace clojure.string>}
05:01clgvluxbock: ^^
05:01luxbockclgv: great
05:19CookedGryphonHi 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
05:19CookedGryphonany suggestions? gists where people have redeffed the timeout function?
05:27quizme(nth (sorted-set 3 4) 1) ; UnsupportedOperationException nth not supported on this type: PersistentTreeSet clojure.lang.RT.nthFrom (RT.java:798
05:27clgvCookedGryphon: why do you need to test timeouts?
05:27quizmewhy isn't nth supported for a sorted set?
05:28CookedGryphonI have a state machine whose definition is based on timeouts for various things happening interleaved with user interactions
05:28quizmeif there is an ordering, it seems like a well-defined operation... getting the nth element.
05:29CookedGryphonclgv: and it's using core.async to do the coordination
05:30clgvCookedGryphon: so you mean there is concurrency/parallelism that you want to test?
05:32CookedGryphonsort of, but not really
05:32CookedGryphonso I have a stream of events coming in
05:32CookedGryphonand a stream of events going out
05:33CookedGryphonand depending on the order and timing of the events coming in, I emit different events
05:33CookedGryphonso it's fairly straightforward in that sense
05:34CookedGryphonit'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
05:34CookedGryphonbecause 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
05:35CookedGryphonso 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"
05:48justin_smithespinho: clojure does not need the jdk to do interop, it has its own byte code compiler
05:51justin_smithespinho: in fact, vlojure has no interpreter, all clj is compiled
05:51justin_smith*clojure that is
05:51hellofunki thought you were talking about another clojure dialect i haven't heard about
05:52hellofunk"visual clojure", the next step in microsoft's evolution
05:52hellofunkvlojure
05:55justin_smithI just have fat fingers, and am using a touch screen
05:55hellofunki thought you had that bluetooth keybd going
05:56justin_smithnot atm
06:21clgvCookedGryphon: what exactly is the goal of the test? which properties do you want to verify?
06:33CookedGryphonI want to verify that my state machine transitions states after the appropriate amount of time has passed
06:35clgvCookedGryphon: well in general testing with timing properties is pretty hard. In this concrete case, can't you just scale the timeouts?
06:35CookedGryphonif anything that makes the problem worse
06:35CookedGryphonthe smaller the timeouts the more fragile the tests
06:36CookedGryphonand there's nothing worse than nondeterministic tests
06:37clgvCookedGryphon: 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
06:37CookedGryphongiven 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
06:38clgvaren'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"?
06:39clgvchecking concrete timeouts in the test seems so level for a meaningful test property
06:41emautonclgv: The timing of the input events affects the output events in this case, if I understand correctly.
06:41mavbozohellofunk: "vlojure" name makes me interested, so I searched and found vsClojure https://github.com/vsClojure/vsClojure
06:42mavbozotoo bad vsClojure doesn't have any maintainer
06:42clgvmavbozo: is that what ClojureCLR folks use?
06:43mavbozoclgv: i have no idea
06:43clgvmavbozo: humm a google search suggests so
06:44CookedGryphonemauton: 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
06:44CookedGryphonhowever the amount of time elapsing depends on the state I'm in
06:44CookedGryphonso it can't actually be fed in as an event
06:45clgvCookedGryphon: and you are sure you can't discretize this to aggregated steps to get rid of the time?
06:45CookedGryphonwell, yes
06:45clgvgood luck then ;)
06:46luxbocksay 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
06:47mavbozoclgv: 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
06:47delihiroshi, 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.
06:47luxbockthere's ##(destructure '[[f a b & xs] [inc 1 2 3 4 5]])
06:47lazybot⇒ [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)]
06:47luxbockbut I haven't figured out how I could use its output
06:48luxbockis there something I can do that doesn't involve re-writing Clojure's destructuring logic?
06:48clgvmavbozo: I guess more reusable libs to develop IDE support are needed. afaik there are some for certain tasks like auto completion or similar....
06:49mavbozoclgv: and of course, cooler name like vlojure that justin_smith suggested :)
06:50clgvmavbozo: yeah thats the most important step which we should debate for at least a month full time
06:54the-kenny,(type String)
06:54clojurebotjava.lang.Class
06:54the-kennydelihiros: ^
06:56clgv,(= (class "abc") String)
06:56clojurebottrue
06:56clgvalso there is `instance?`
07:01hyPiRion,(string? "hey")
07:01clojurebottrue
07:01delihirosclgv: thanks for your reply. what I really want to do is this snippet : ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
07:02hyPiRiondelihiros: Assuming you have them imported: (.lookup (Lookup/getDefault) ProjectController)
07:02clgvdelihiros: (.lookup (Lookup/getDefault) ProjectController)
07:02hyPiRionzing
07:02clgv:D
07:05the-kennyor (.. (Lookup/getDefault) (lookup ProjectController)) :)
07:06clgvthe-kenny: I wouldn't do that for just one chained call. minimum of two ;)
07:06the-kennyYeah, me neither. I just wanted to offer another option
07:10delihirosthank 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;,
07:10delihirosI believe I'm doing something wrong...
07:12clgvdelihiros: looks like the method does not expect a single class. check the javadoc
07:13the-kennyclgv: no, it does. See http://bits.netbeans.org/7.4/javadoc/org-openide-util-lookup/org/openide/util/Lookup.html
07:13the-kennyIt expects a Class<T>
07:13clgvthat should be lost on JVM level
07:13the-kennyyeah I know
07:17delihiroswhat 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...
07:19clgvdelihiros: which slide?
07:19clgvah. 5
07:20clgvdelihiros: do you have your project.clj handy?
07:21delihirosclgv: I have put gephi-toolkit.jar and openide.jar in lib/ directory, and added resource-paths ["lib/*"] to project.clj
07:22clgvdelihiros: why not use them as usual dependencies?
07:28clgvdelihiros: just add them as direct dependencies and then you can skip the lookup
07:29delihirosclgv: oh really... I'll try that
07:33clgvdelihiros: according to its readme, gephi uses its own maven repository, so you have to add that to your project.clj
07:33clgvdelihiros: cf. https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L78
07:39delihirosclgv: 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"
07:40clgvdelihiros: post your project.clj on refheap.com
07:41delihirosclgv: https://gist.github.com/8550435fd7f74136ce1a
07:43clgvdelihiros: looks about right
07:46clgvdelihiros: pretty weird
07:47clgvwoth an issue on the leiningen project
07:48hyPiRiondelihiros: yeah, post it as an issue there
07:52clgvhyPiRion: delihiros: on it
07:52hyPiRiondelihiros: yeah, that's definitely a bug =( I tried it out and it goes looping
07:54delihiroshmm
07:55delihiroswhere should I post an issue? gephi?
07:56clgvhyPiRion: delihiros: https://github.com/technomancy/leiningen/issues/1796
07:57delihirosthank you so much
07:57clgvdelihiros: yeah, maybe report it to gephi as well. the pom.xml generated by leiningen can not be use to retrieve the deps via maven
08:12delihirosclgv: hyPiRion: https://github.com/gephi/gephi-toolkit/issues/11
08:13hyPiRiondelihiros: you tried to fetch with maven, yes?
08:13clgvhyPiRion: I tried that as well
08:13clgvdidnt work
08:14hyPiRionalright, then it's likely upstream. Either Aether or an issue on their side
08:15delihirosmvn install didn't work, could be a problem of checksum?
08:15clgv"mvn package" failed for me with the pom.xml generated from leiningen
08:18hyPiRionyeah, tried as well
08:47whodidthishow do i create a random email with test.check
08:48clgvwhodidthis: three random strings concatenated by @ and .
08:54hyPiRionish
08:55gfrederickswhodidthis: if you can find a decent regex for it you can use test.chuck's string-from-regex
08:56Glenjamindepending on what you want to test, i'd just do random string @example.com
08:56Glenjaminno danger of emailing by accident :D
09:00whodidthismany nice, thanks al
10:37svinjo6816: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:37svinjo68t 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:37svinjo68le 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:37svinjo68 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:37svinjo68kua 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:37svinjo68m75 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:37svinjo68st 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:37svinjo68jareddba 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:37svinjo68 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:37svinjo68nix 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:37svinjo68 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:37svinjo68drei 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:37cherwinwtf
10:37AeroNotix/ignore add svinjo68
10:37svinjo68sorry !!
10:37svinjo68I fuck up with Emacs
10:37FAMASsvinjo68: greetings
10:37ivananother satisfied rcirc user
10:38ddellacostahahaha
10:38Nineriancthulu?
10:38FAMASAeroNotix: he said sorry and that he fucked up with emacs
10:38gratimax.-.
10:38matthavenersvinjo68: good morning to you too :)
10:38FAMASivan: rcirc does this mass flash?
10:38svinjo68Hi everybody
10:38lordB8rmorning @svinjo68
10:38catonanosvinjo68: hello !
10:38AeroNotixhappens far too often, use a better client
10:38gratimaxtbh I forgot I was in this channel... nice reminder, I guess
10:38svinjo68Well I am stick to Emacs
10:38ddellacostaalright, let's call this meeting to order. First, who brought the donuts?
10:38mattywsvinjo68, no problem - and morning, we're ready and waiting in #vim if you need help ;)
10:39ddellacostaI call dibs on the cruller
10:39annapawlickaand here i thought someone wanted to talk to me
10:39svinjo68Vim ----> is just my Mutt editor
10:39AeroNotixannapawlicka: haha
10:39svinjo68only dor emails
10:39n1ftyn8annapawlicka: samesies
10:39svinjo68ok no flame wars
10:40mattywsvinjo68, :)
10:41annapawlickaddellacosta: i do wish there were donuts
10:41ddellacostaannapawlicka: I mean, they're not good for you, but they would remove the sting
10:41sveriHi, 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:41ddellacostaor something. I should go to bed.
10:42moquistsvinjo68: emacs can happen to anyone. No hard feelings!
10:42ddellacostasveri: take a look here: https://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md
10:43svinjo68is justs the Evil-mode--Emacs transition
10:43ddellacostaand on that note, 'night all
10:44dnolen_thheller: https://gist.github.com/swannodette/0eaf17815d49b7b77a95 updated, seems much closer to what shadow-build does now
10:44cemerickannapawlicka: well, 'hi', didn't even know you were here, really. I have your conj talk queued, I hope your first was pleasant. :-)
10:45imancare there any UK/euro clojure conferences ?
10:46annapawlickacemerick: i’m a lurker :) giving the talk was stressful, but being at conj was truly awesome
10:46thheller@dnolen_ : I would recommend using a "global" output-dir and putting modules relative to it, seems less repetetive
10:46dnolen_imanc: UK - Clojure eXchange, EuroClojure
10:46dnolen_thheller: don't care about that :)
10:46dnolen_thheller: don't want to make assumptions about where modules will go
10:46dnolen_thheller: sugar can be provided up higher by cljsbuild if people care about such things
10:46annapawlickaimanc: there is :clojureD http://www.clojured.de/
10:47imancgreat cheers
10:47cemerickannapawlicka: imposter syndrome never goes away, at least for me
10:48tbaldrid_cemerick: yeah, I don't think it ever does.
10:48elarsonsvinjo68: 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:48moquistI think it does for some people (not me!), but then there's an arrogance problem that's probably just as bad.
10:49cemericktbaldrid_: it gets better once you learn to not care :-)
10:49annapawlickacemerick tbaldrid_ that’s very comforting ;-)
10:49elarsonannapawlicka: what was the talk you gave at the conj? got a link?
10:50dnolen_thheller: btw, I'm assuming Google Closure produces a separate source map file for each of these and they must be individually merge
10:50dnolen_d
10:50moquistelarson: https://www.youtube.com/watch?v=4-oyZpLRQ20
10:50elarsonthanks!
10:50thheller@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:52thhellerand you are right, google seems to have given up on that as well
10:52thhellerthere are still some goodies in Closure but most of it is private or otherwise unreachable
10:54mdeboardHow/why are people so commonly blasting the names of everyone in channel lately
10:54mdeboardI've been using rcirc for years and have literally never had that happen
10:55mdeboardbut have noticed it semi-regularly of late
10:55svinjo68I am trying to find how to reproduce it
10:55thheller@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:55svinjo68still no clue
10:55hyPiRionannapawlicka: oh wow, I had no idea about http://www.clojured.de/ – thanks for the pointers to that one
10:55thhellerbut you get a source map per module,
10:55annapawlickahyPiRion: np :-)
10:56hyPiRionI thought Twitter would automatically inform me of Clojure conferences, but that one went unnoticed until now
10:56stuartsierramdeboard: I haven't seen that (Adium client)
10:56annapawlickahyPiRion: i don’t think it was advertised enough
10:57svinjo68\EXIT
10:58dnolen_thheller: ah I saw that a bit of logic in shadow-build around them assumed you had it working
10:59nathan7W/aw
10:59nathan7welp.
10:59dnolen_thheller: good to know
10:59thhellerwell they load, but line mappings don't match sometimes
10:59enricopiraninow on circe
11:00hyPiRionannapawlicka: Yeah, sounds likely. It's sad though, I would've probably gone if I had known earlier =(
11:01dnolen_thheller: heh well that's true anyway w/ advanced optimizations, the merge is pretty lossy but better than nothing
11:03myguidingstarthheller, does shadow-build allow specifying :libs and :preamble compiler options for each module?
11:04annapawlickahyPiRion: are the tickets sold out? euroclojure will be in a few months so you have plenty of time to plan this one
11:05thheller@myguidingstar : :libs is not supported at all, preamble is called :prepend and yes, it is per module
11:08hyPiRionannapawlicka: Not for :clojureD, no, but unfortunately I have to handle some personal matters that weekend. I will definitely go to EuroClojure though!
11:12seangrovednolen_: 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:13dnolen_seangrove: I think better to enumerate your plan on that ticket first
11:18mrb_bkdnolen_: so bummed I don't live in NY right now
11:18mrb_bkWould be dragging you to the bar to argue
11:19elarsonannapawlicka: great talk!
11:21annapawlickaelarson: thanks :)
11:23AeroNotixWhere is EuroClojure this year?
11:25hipsterslapfight^^^ also interested, i see there's no word yet
11:25hipsterslapfightbut i need to start convincing the company i work for to send me there, where-ever there is :v
11:26AeroNotixlast year was in Krakow, where I live. Hoping for near-Poland again :)
11:26stuartsierraThere may not be a chosen location yet.
11:26stuartsierraFeels like Krakow was yesterday … :)
11:26dnolen_mrb_bk: lol :)
11:26Glenjaminoh wow, that was june
11:27AeroNotixI had to run after the last talk. Really wanted to stay for the beers
11:50thhellerdnolen_: anything I can do to help CLJS-948 along? Been using it for a bit and really don't want to go back. :)
11:56puredangerAeroNotix: no date/loc for EuroClojure yet, work is ongoing to nail that down!
11:56AeroNotixpuredanger: thanks for reply!
11:56AeroNotixhopefully it's nearby me
11:57annapawlickaAeroNotix: it may be in Spain or Italy this year
11:57AeroNotixannapawlicka: ah interesting
11:57annapawlickaah wait
11:58annapawlickaAeroNotix: i forgot things have changed and it’s now puredanger who’s in charge
11:58puredangerI'm not in charge of anything :)
11:59AeroNotixfine I'll be in charge
11:59annapawlickathere was a poll a few months ago and most voted locations were Spain/Italy
11:59puredangerSpain is high on the consideration list
11:59daniel`have it in romania
12:02chouserI didn't realize EuroClojure was an Alex & Co. conf.
12:02puredangerIt's not
12:02hyPiRionIt's not
12:02chouseroh
12:03puredangerHowever, Cognitect will be running EuroClojure with Marco's assistance this year
12:03chouserAh, interesting.
12:03annapawlickaso it’s Alex, Marco & Co. ;-)
12:03puredangerWell you're forgetting Lynn who does all the work :)
12:04puredangerI'm just a figurehead :)
12:04puredangerI just stand around saying "yep, sounds good" a lot
12:05JaredRdo you ever say “umm, yeah… sounds crap.” too?
12:05puredangerfortunately, Lynn is awesome and that never really comes up :)
12:05annapawlickaLynn is great, i could never forget her help
12:06JaredRnice, so it’s all neatly filtered by the time it gets to you so you get to be Mr. Positive!
12:06annapawlickait’s amazing how she can be in multiple places at the same time
12:06puredangeryou have no idea
12:06puredangershe may some kind of collective
12:07annapawlickai had a theory that Cognitect did some massive progress in cloning and never told anyone
12:07puredangerno comment
12:07annapawlicka:-)
12:07clgvpuredanger: you were supposed to say that ;)
12:07JaredRI 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:08JaredRI 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:08puredangerJaredR: what's baking your noodle?
12:08annapawlickaJaredR: it will pass
12:09JaredR“everything is immutable” ..?
12:09dnolen_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:10JaredRhow 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:11JaredRbrb
12:13JaredRback… 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:15thheller@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:16dnolen_thheller: ah good point! I was wondering what that was all about, will dig deeper!
12:16dnolen_thheller: thanks for all the feedback and insight, much appreciated
12:16thhellerhappy to help
12:17justin_smithJaredR: 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:17justin_smith*recursions
12:20JaredRjustin_smith: cool… thank you. :)
12:20justin_smithJaredR: 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:20naty135hey guys, I'm looking for some social channels, can anyone point me some?
12:22swedishfishnaty135: #emacs?
12:25seangroveseancorfield: Super cool that you run your tests against clojure master, and were able to track down a problem so quickly because of it
12:27seancorfieldYeah, 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:27seancorfieldThe tricky part is going to be figuring out which part of that fix for 979 is actually breaking our system!
12:28Bronsaseancorfield: the gist of that commit is that now clojure prefers the in-memory version of a class to the in-disk one
12:29seancorfieldYeah, I was just going over it now...
12:29seangroveseancorfield: Just wanted to compliment/send some appreciation your way for a cool setup that helps everyone, including yourselves :)
12:29mavbozo(inc seancorfield)
12:29lazybot⇒ 16
12:29andyfI have also narrowed down a change in Eastwood behavior to the 979 change. Just about to reply to the email discussion with details
12:30seancorfieldCool. Sounds like we should all be able to nail it down pretty quickly.
12:32puredanger(inc seancorfield) ;; thanks for testing!
12:32lazybot⇒ 17
12:33seangrove(inc seancorfield)
12:33lazybot⇒ 18
12:44dnolen_reiddraper: btw anything hold up a test.check release? CLJS people probably won't touch until we have something that's non-SNAPSHOT
12:44arohnerdoes anyone have a working example of lein cljsbuild + lein ring uberwar?
12:45dnolen_cfleming: ping
12:47andyfI mean if a successful build has been done recently, so many class files in target due
12:47andyf*dir
12:48reiddraperdnolen_: nope, I can do one this week
12:48dnolen_reiddraper: sweet!
12:49reiddraperdnolen_: might be helpful if we add some 'usage/installation' instructions specific to CLJS on the readme?
12:54dnolen_reiddraper: sure I can do that later today if you like
12:55reiddraperdnolen_: much appreciated
13:01dnolen_seangrove: did a quick experiment w/ mori, there's a new bonsai namespace
13:01dnolen_seangrove: the release artifact is 24K, Immutable.js 3.5.0 is 20K
13:02seancorfieldandyf: what failure are you seeing with the mvn build?
13:02dnolen_DCE ftw as usual
13:02chouserIs there such a thing as adding rules to a core.logic db, or are they exclusively a query-time thing?
13:02seancorfieldthe 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:05andyfseancorfield: ExceptionInitializerError very early in compile-clojure step. Now that I look at the details it may be related to CLJ-1638
13:06dnolen_chouser: no support for rules far as I know, would be nice
13:07andyfA 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:15dnolen_thheller: poked around, cross module code motion is already enabled for advanced optimization, only applies to functions & vars but might be good enough
13:20seancorfieldandyf: I hadn't seen that but good to know mvn clean fixed it... I should get into the habit of running that myself
13:34Bronsaandyf: yeah when ABI changes ExceptionInInitializerExceptions are normals (see CLJ-1638)
13:37dnolen_seangrove: trimming a bit more, 21K + 2K for transducers.js, not bad and everything just works w/ ES6 iteration based code
13:40seangrovednolen_: Ah, that's beautiful
13:40seangroveNo idea about ES6 really, iterators/classes/otherwise, but I suspect I'll have to figure it all out pretty quickly
13:41dnolen_seangrove: so this would be a new minimal build which is only persistent data structures
13:42TimMc(inc eastwood) ; it just discovered a set of tests that weren't being run due to a namespace mismatch
13:42lazybot⇒ 7
13:42seangrovednolen_: The idea is to have it work under an ES6 facade like normal-ish js data structures?
13:43dnolen_seangrove: no, the idea is that if people just want the data structures we can cut the payload in half
13:43seangrovednolen_: Ok, got it
13:44andyfTimMc: 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:44brainproxydnolen_: nice work re: bonsai
13:45dnolen_brainproxy: if by work you mean letting Closure do it's thing, OK :)
13:45brainproxywell i meant your insight for putting together a minimal build, good idea :-)
13:47seangrovednolen_: Just looked at bonsai, very nice. Nice being able to have different builds so easily.
13:47brainproxydnolen_: are you considering a bonsai Chainable?
13:47dnolen_brainproxy: no
13:48TimMcandyf: I'm looking at adding eastwood to our build pipeline (at least as a side thing, not a blocker.)
13:48dnolen_brainproxy: maybe later but at the moment just interested in explorable how viable a minimal lib is w/ ES6 iterator support
13:48dnolen_s/explorable/exploring
13:48brainproxygotcha
13:48brainproxyyeah, chainable is really sugar anyway
13:49andyfTimMc: 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:51TimMcandyf: There are a few bug reports I need to file first as well (not necessarily with eastwood).
13:51chouserdnolen_: Ok, thanks for your rules answer.
13:51TimMcmidje and eastwood disagree on how many arguments midje.sweet/just takes, for instance. I haven't investigated yet.
13:51seangrovebrainproxy: Chainable is kind of necessary from a marketing perspective IMO, but it's also totally crazy compared to -> or ->>
13:52TimMcThere's also some weird bug that *looks* as if eastwood is trying to lint a compiler error.
13:52brainproxyseangrove: agreed
13:53dnolen_seangrove: I don't think Chainable is all that important, Bonsai isn't for people happy with Underscore or Lo-dash
13:53dnolen_seangrove: and even more importantly those libs will one day support ES6 iterators so it's moot point
13:53andyfTimMc: 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:53amalloyTimMc: 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:53seangrovednolen_: Sorry, meant Chainable is necessary for tutorials, etc. Bonsai has a target
13:55andyfTimMc: amalloy: yes latest Eastwood can be configured to give correct :arglists for linting purposes.
14:01Tritloreally bad question about macros: aren't they basically just compiler checked evals?
14:03amalloyTritlo: kinda, although it's not clear what you mean by "compiler checked"
14:03TimMcamalloy: But then midje still needs a patch.
14:03andyfTritlo: macros are functions executed during compile time, transforming some code to other code
14:03hellofunkTritlo: not a bad question. but the do happen compile time, not runtime, like eval
14:04amalloyTimMc: i think you can configure eastwood separate from midje
14:04amalloybut andyf would know better, of course
14:04TimMcYeah. No rush, though, so I'm happy to be lazy and see if midje can be fixed first. :-P
14:05hellofunkyesterday 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:05Tritlook, thanks
14:05andyfTimMc: 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:05Tritlomacros are one of these things that, like monads, seem to be really glorified, but not that complex when used
14:05amalloyTritlo: well, things don't have to be complex to be glorious
14:06Tritloamalloy: true :)
14:07TimMcFor example, juxt.
14:08seangrove~juxt
14:08clojurebotjuxt is pretty metal
14:08andyfTimMc: 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:09justin_smithTritlo: macros can get complex pretty fast, especially when misused, or when used to create a mini language like for or core.async/go
14:11seancorfieldandyf: surprised you haven't added config for java.jdbc :) I do have a ticket open there to fix the :arglists
14:12andyfseancorfield: It is there, but in a different config file for clojure contrib libs
14:15arrdem'morning
14:19andyfarrdem: G'day. Hey, I didn't mean to blow off your questions a couple days ago. Guests stayed longer than I thought.
14:19arrdemandyf: I'll file for a refund later :P
14:20seancorfieldcool andyf I need to upgrade to a newer Eastwood then :)
14:22andyfarrdem: 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:22arrdemandyf: yeah that's the one
14:25seancorfieldandyf: I see Alex asking for a JIRA ticket for this issue in alpha5 - before I go open one, did you already do that?
14:25andyfI did not
14:25seancorfieldok, i'll jump on that....
14:25arrdemThe 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:26puredangerthx
14:26arrdemas 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:26arrdemso you have to explicitly look up the newest version of a namespace in Clojure vs in ClojureScript.
14:27arrdemthis being your "one at a time" qualification.
14:27andyfYeah, adding such a qualifier to searches sounds good.
14:28Bronsaandyf: fwiw I don't think the exception we're now getting in eastwood analyzing clojure.reflect indicates a bug in clojure
14:29supersymoi ... I hadn't even learned of conj.io yet. Sweet
14:29Bronsaandyf: 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:29andyfarrdem: 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:30Bronsaandyf: 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:30arrdemandyf: 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:31andyfBronsa: Ok. I was pretty much just noticing the similarity of symptoms to what Sean was seeing. Hadn't dig for cause yet.
14:31andyf*dug
14:32seancorfieldhttp://dev.clojure.org/jira/browse/CLJ-1639
14:37andyfBronsa: I may have done it incorrectly, but I tried to get an exception reloading clojure.reflect namespace and didn't find a way
14:37Bronsaandyf: with -alpha5?
14:37Bronsaandyf: it's not just reloading c.reflect
14:38Bronsaandyf: I'll put together a POC in a minute that will be useful to puredanger too
14:39andyfWith -alpha5 I can do (required 'clojure.reflect :reload-all :verbose) with no exceptions
14:40Bronsaandyf: yeah, that's not going to throw
14:40andyfBut yes, 2nd and later don't do much, ok. Trying -alpha4
14:41andyfSimilar there, so my mental model is incomplete here
14:43andyfThat is a fancy way of saying "I don't know" :)
14:50sveriHi, is it common to include dependencies in the project.clj for a leiningen plugin?
14:51TimMcsveri: 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:51arrdemif 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:52andyfWhen writing a plugin? Or using one?
14:53noonianif its a build process like one like arrdem mentioned then you would usually put it in the :dev profile of your project.clj
14:54sveriTimMc: 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:56TimMcsveri: Oh, I think leiningen itself as a dependency is omitted, yeah.
14:57TimMchttps://github.com/technomancy/leiningen/blob/master/doc/PLUGINS.md
14:57sveriTimMc: but there is no harm in adding it I guess? Cursive looks better if it can resolve the dependencies
14:58Bronsaandyf: puredanger http://sprunge.us/GSVP?clj this explains the eastwood exception
15:03arrdemdoes Ring not have a moved permanently response built in?
15:05Glenjamin(assoc (redirect "whatever") :status 301) i guesS?
15:06andyfBronsa: Reading ... I assume you mean CLJ-979 ?
15:07Bronsaandyf: ... yeah thanks :)
15:07arrdemGlenjamin: https://github.com/ring-clojure/ring/pull/181 yeah basically
15:17KristienTIL slurp works with HTTP.
15:18arrdemyep! it makes a great quick and dirty HTTP client when you need one :P
15:18arrdemjust don't load-file "http:..."
15:18Kristien:P
15:18KristienDoesn't return status code though
15:19arrdemalso doesn't let you set headers or anything
15:20KristienI wrote a little crawling tool today that printed URLs and their status code.
15:20Kristienabout 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:20Kristiengonna tidy it tomorrow
15:21TimMcslurp also doesn't let you specify timeout, fallback, retry, threadpools...
15:22mbacis there a way to serialize clojure objects to disk and write them out as human readable/modifiable s-expressions?
15:22Kristienhere it is btw: https://gist.github.com/rightfold/806b816eeb73b7ecc474
15:23TEttinger$title google.com
15:23lazybot"Google"
15:23Kristienmbac: yeah, but not all objects will be writable
15:23mbacsure. which ones won't be writabl? java objects? fine by me :)
15:23Kristienyeah
15:23TEttingermbac: you can make custom writers though for objects that aren't writable, but most pure clojure stuff is written in a readable way
15:24Kristienmbac see http://stackoverflow.com/questions/3301439/clojure-data-structure-serialization
15:24TEttinger,(pr (sorted-map :a 1 :n 2))
15:24clojurebot{:a 1, :n 2}
15:24TEttingerthat's one of the issues
15:25arrdemKristien: https://groups.google.com/d/msg/clojure-dev/gdip7Oy5s-w/3EL0F36OqicJ
15:25Kristienah right
15:25KristienI even used clojure.edn _today_ lol :P
15:35mbaci understand the entire stackoverflow except for... what does setting *print-dup* true achieve?
15:38puredangerhttp://clojurewest.org has been updated - returning to Portland, OR Apr 20-22
15:38puredangerCFP open now!
15:38puredangertickets next week
15:41arrdemballin. thanks Alex!
15:44andyfclojurewest.org is non-blank page for others? I may have web proxy issues
15:44arrdemnon-blank here
15:45puredangerdns changed and it's certainly possible you can see old results
15:46puredangerThe Internet: caches all the way down
15:46andyfMaybe if you change it to a better name, two hard CS problems will be solved simultaneously? ;)
15:47puredangerI could make it clojurewest1.org and hit all three
15:47arrdemnow that's just mean
15:49andyfShoot. I was goon for amusing.
15:49andyf*goin'
15:51justin_smithpuredanger: wow, bold move opening it on 4/20, sadly too soon for legal pot (that's another year or so away I think?)
15:52andyfjustin_smith: What is bold about that date?
15:52TEttingerthere's going to be some fun times when people walk in expecting a different kind of convention
15:52csd_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:52justin_smithandyf: bad joke about 4:20, "universal" code for smoking weed
15:52csd_
15:52puredangerjustin_smith: heh
15:53TEttinger(inc justin_smith)
15:53lazybot⇒ 169
15:56TEttingercsd_: chunk fetches only bytes 0 to 16
15:57csd_TEttinger: it's a recursive function. each 16 byte block has to XOR itself against the previous block
15:58TEttingerI just don't see where you're changing the plaintext that it calls current-chunk on
15:58csd_line 10
15:58csd_calls helper function again, with a new array 16 bytes shorter
16:00TEttingerI see now
16:00TEttingerwell the right way to do this in clojure is to use loop and recur, so you don't blow the stack
16:01csd_SICP has given me bad habits
16:02andyfcsd_: Looks like tail recursion, which can be changed to 'recur' in Clojure to avoid blowing the stack
16:02csd_yeah
16:03csd_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:05dagda1_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:05csd_andyf: i've never written java before :)
16:05csd_i have a buddy next to me working in ruby though
16:05dagda1_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:06csd_andyf: I wrote it. It's basically a wrapper for the Java lib. I'll put that on refheap too
16:07csd_andyf: https://www.refheap.com/96034
16:09nooniandagda1_: 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:09tomjackdagda1_: 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:09andyfKey and plaintext args are intended to be what types?
16:10dagda1_noonian: tomjack I thought that might be the case
16:10csd_andyf: key is string. plaintext is a byte[]
16:12TEttinger,(.getBytes "ABC")
16:12clojurebot#<byte[] [B@3b40cc0f>
16:12TEttinger,(vec (.getBytes "ABC"))
16:12clojurebot[65 66 67]
16:12TEttinger,(vec (.getBytes (String. "ABC")))
16:12clojurebot[65 66 67]
16:12TEttingerok, so that isn't the problem I hope
16:12csd_what's that
16:13TEttinger(. Cipher getInstance "AES/ECB/NoPadding")
16:13TEttingerI think you might want (Cipher/getInstance)
16:13TEttingerif .getInstance is static
16:14andyfcsd_: Have you tried adding debug prints to see what is going on at each step?
16:16csd_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:16andyfcsd_: 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:16csd_no, it returns garbage
16:16csd_peppered with negative numbers
16:17andyfcsd_: Or does it return an array of expected length, but only first 16 bytes have expected value and rest look like random garbage?
16:17csd_the latter
16:18TEttingeron line 19, it looks like you're just getting 16 bytes out of coll https://www.refheap.com/96034
16:18andyfIf 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:18csd_ok give me a sec
16:19csd_TEttinger: that's just resizing what the new array should be
16:19TEttingerright but don't you need the next 16 bytes each time?
16:19amalloydagda1_: 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:19csd_TEttinger: it takes the existing size of coll and increases by 16, because each block is 16 bytes
16:21dagda1_amalloy: the original data is in the nested vector format. It seemed like less work to keep the fromat and use metadata
16:21dagda1_amalloy: seems like more code to create and work with the new map
16:22TEttinger,(vec (byte-array 16 (map bit-xor 255 (.getBytes "ABCDABCDABCDABCD"))))
16:22clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
16:22andyfcsd_: 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:22TEttinger,(vec (byte-array 16 (map bit-xor (range 16)(.getBytes "ABCDABCDABCDABCD"))))
16:22clojurebot[65 67 65 71 69 ...]
16:22amalloydagda1_: 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:23csd_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:23TEttinger&(vec (byte-array 16 (map bit-xor (range 16)(.getBytes "ABCDABCDABCDABCD"))))
16:23lazybot⇒ [65 67 65 71 69 71 69 67 73 75 73 79 77 79 77 75]
16:23TEttinger&(vec (byte-array 16 (map bit-xor (map - (range 16))(.getBytes "ABCDABCDABCDABCD"))))
16:23lazybot⇒ [65 -67 -67 -71 -67 -71 -71 -67 -71 -75 -75 -79 -75 -79 -79 -75]
16:24TEttingeryou may see some subtle differencesthere
16:24andyfcsd_: If the cipher doFinal call returns an array of bytes, looks like changing it to string could only garble things
16:25csd_sorry why is that?
16:25amalloy(.getBytes (String. key)) looks super weird, csd_. that might explode for some inputs, if key is a byte[]
16:25csd_ key is string. i only learned today that you dont need to cast to String. to run .getBytes
16:25dagda1_amalloy: the numbers are like edges of a graph
16:25lodinMeh. I scrolled up just to find svinjo68's name list paste ...
16:26csd_andyf: https://www.refheap.com/96037
16:26csd_line 26 is successful decrypt of block 1
16:27csd_line 28 is failed decrypt of block 2
16:27csd_omg
16:28csd_you're right
16:28csd_it was casting to string that was killing it
16:28amalloycsd_: you're using the word "cast", which is a very different thing than what you are doing
16:28csd_amalloy: what's the appropriate word in this case?
16:29amalloy"convert" would be reasonable. "transform"
16:29TEttinger,(String. (.getBytes "ABCD\n"))
16:29clojurebot"ABCD\n"
16:29amalloya cast reinterprets a pointer as a different type; you are creating a new object based on an old object
16:29csd_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:29csd_:-/
16:29andyfcsd_: 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:30csd_andyf: i.e. out of luck when the byte value is > 128?
16:31andyfJust completely not what you want in the middle of decryption or encryption
16:31csd_yeah
16:31TEttinger,(String. (byte-array (range 128 144)))
16:31clojurebot"����������������"
16:31TEttinger,(String. (byte-array (range 166 188)))
16:31clojurebot"����������������������"
16:31TEttingerthat seems wrong
16:32TEttinger,(vec (.getBytes (String. (byte-array (range 166 188)))))
16:32clojurebot[-17 -65 -67 -17 -65 ...]
16:32justin_smith,(int (char (byte 188)))
16:32clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for byte: 188>
16:32TEttinger&vec (.getBytes (String. (byte-array (range 166 188)))))
16:32lazybot⇒ #<core$vec clojure.core$vec@377d4a92>
16:32justin_smithhrmph
16:32TEttinger&(ec (.getBytes (String. (byte-array (range 166 188)))))
16:32lazybotjava.lang.RuntimeException: Unable to resolve symbol: ec in this context
16:32TEttinger&(vec (.getBytes (String. (byte-array (range 166 188)))))
16:32lazybot⇒ [-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:32justin_smith,(int (char (first (byte-array [188]))))
16:32clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for char: -68>
16:32justin_smithhrmph
16:33TEttingerthat's weird as heck though
16:33TEttinger&(map char (vec (.getBytes (String. (byte-array (range 166 188))))))
16:33lazybotjava.lang.IllegalArgumentException: Value out of range for char: -17
16:33amalloyjustin_smith: unchecked-byte
16:34hyPiRion_yeah, map over unchecked-byte first
16:34hyPiRion_&(map char (vec (.getBytes (String. (byte-array (map unchecked-byte (range 166 188)))))))
16:34lazybotjava.lang.IllegalArgumentException: Value out of range for char: -17
16:34hyPiRion_oh wait
16:36andyfcsd_: 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:36csd_andyf: how would you read the key in instead?
16:36amalloyandyf: 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:36TEttinger&(.getEncoding (String. (byte-array (range 166 188))))
16:36lazybotjava.lang.IllegalArgumentException: No matching field found: getEncoding for class java.lang.String
16:37andyfcsd_: Where are you getting the plaintext or ciphertext as byte arrays?
16:38csd_amalloy is correct, i assumed i couldn't use a java method on the clojure string
16:38csd_andyf: exercise; predefined. cryptopals.com
16:38amalloycsd_: strings are strings. there's no such thing as a clojure string
16:38amalloy&(class "test")
16:38lazybot⇒ java.lang.String
16:41andyfcsd_: 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:43andyfCrypto functions usually deal in bytes, not chars
16:43justin_smithyeah, that actually simplifies things
16:43justin_smith(as long as you convert back to the right encoding, of course)
16:43andyfBecause bytes (aka octets) are always same # of bits
16:48amalloyandyf: i wonder if computer scientists from the 50s would be thrilled or horrified that that's become true
16:49andyfFor bytes, maybe horrified. For octets, maybe not, but maybe horrified at the name :)
16:50andyfIt definitely helps software portability that hardware has standardized on powers of 2 bits in things
16:50arrdemStandardized on C's assumptions..
16:51andyfI don't know the history well enough to know whether C was a driver there.
16:52justin_smithgoes 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:53eriktjacobsenDoes 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:54eriktjacobsenReally 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:54andyfBut there were Fortran compilers for computers with non power-of-2 word sizes, weren't there?
16:54justin_smithandyf: hmm...
16:54arrdemyeah there were PDP fortran compilers
16:54arrdemgood ol' 23 bit words
16:54arrdemiirc
16:55justin_smithandyf: 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:55justin_smithmea culpa
16:55andyfWikipedia page on word has lots o' history
16:55arrdemandyf: link pls <3
16:56justizinamalloy: 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:56ziltieriktjacobsen: 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:57arrdemjustizin: yeah that's one thing that Alan Kay reiterates in his various talks
16:57justizinnow 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:57andyfThis one: http://en.m.wikipedia.org/wiki/Word_(computer_architecture)
16:57mbaceriktjacobsen, strace? :P
16:57justizinsince 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:58eriktjacobsenzilti: 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:59eriktjacobsenmbac: I hope you are joking.
16:59mbacnot particularly. is the clojure output going to be nothing but futex calls?
16:59amalloyeriktjacobsen: you are probably recreating the db connection as part of every query, instead of saving it
16:59eriktjacobsenIf I call it in a loop, its 1000ms every single time.
17:00justin_smithyeah, you want a connection pool of some sort
17:00eriktjacobsenwhen 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:00amalloyjustin_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:01justin_smithamalloy: fair enough - I would call that a degree 0 pool :)
17:01eriktjacobsenis c3p0 still the frontrunner connection pooling library
17:01hiredmaneriktjacobsen: how are you timing the tests?
17:02justin_smithI 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:02eriktjacobsencommandline - time, php - microtime, clojure (time) for minimal test, but have done timbre profiling in main code.
17:02hiredman(not, you know, using the time command or whatever, right?)
17:02ziltieriktjacobsen: Last I checked, apparently, yes. There's btw. a nice short manual on how to set it up on clojure-doc.org
17:03hiredmanI just mean, you aren't timing clojure using "time lein run" or something similar, which it sounds like you aren't
17:03eriktjacobsenright
17:03eriktjacobsenthat would include jvm startup
17:04tbaldrid_eriktjacobsen: are you preparing the statement outside of your benchmark loop?
17:04hiredman(as an aside, I would not recommend whatever it is timbre calls a "profiler")
17:05hiredmanthere are real profilers like yourkit or visualvm
17:05eriktjacobsenamalloy: 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:05hiredmanI 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:06eriktjacobsenI know hiredman, but for getting an average / min / max breakdown over calls at microsecond level… it seems fine for just testing things.
17:06justin_smitheriktjacobsen: more importantly than jvm startup, it would include clojure and nrepl startup, which are the real lags in clj startup
17:06eriktjacobsenYeah, throwing stuff into forked java.jdbc is my next step hiredman, didnt want to go there
17:06hiredmanyou shouldn't need to do that
17:06justin_smithyou can use yourkit or jvisualvm to see where the time is being spent
17:07hiredmanI 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:07amalloyit'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:08eriktjacobsenis 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:08hiredmanwhat are you doing with the results?
17:08tbaldrid_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:09eriktjacobsennothing =\ 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:09hiredmaneriktjacobsen: the query function by default realizes the entire result set in memory if I recall
17:10hiredmanI haven't touched php in years, but if I recall you get a result set and have to page through it or something
17:10hiredmanso that could be the difference?
17:10eriktjacobsenits a single column from single row, so its just 30 bytes… no paging in any language
17:11eriktjacobsenregardless 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:11hiredmanyou can go through query's options and turn them off
17:11hiredmanlike use :as-array or whatever it is, etc
17:12stuartsierraOr compare with the Java JDBC interop code directly, checking for reflection warnings.
17:15arrdemPhilisophical/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:16amalloyyes you should .
17:18arrdemOkie doke.
17:19amalloyarrdem: i hope you're not taking my advice to . very seriously, since you didn't actually say what you're considering doing
17:20Bronsa(inc amalloy)
17:20lazybot⇒ 212
17:21arrdemPrevious URL structure: /store/group/artifact/version/ns/def
17:21arrdemNew URL structure: /store/group/artifact/version/platform/ns/def
17:21amalloyBronsa: 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:23eriktjacobsenamalloy / 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:24justin_smithweird
17:25eriktjacobsenoh 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:27mavbozoi just tried it in repl to table with 7 records, (j/query mysql-db ["select * from user"])
17:28mavbozo15 - 30 ms
17:28arrdemclearly eriktjacobsen's SQL server is outside lunar orbit
17:30mavbozoi'm using mysql
17:30eriktjacobsenI 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:31mavbozofor comparison with php command line, PHP pdo->fetchAll(), 10ms
17:31justin_smithreally, you should profile (yourkit is free for open source, jvisualvm comes with the jdk), find out what the time is being spent on
17:31mavbozoyes, mysql table is hosted locally
17:32justin_smitheriktjacobsen: 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:32justin_smith(all using clojure.java.jdbc w/ mysql)
17:33justin_smithwith remote servers
17:33amalloysame here but with postgres
17:34eriktjacobsenjustin_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:34justin_smitheriktjacobsen: like I said, use a profiler
17:34justin_smithsomething is fishy
17:40FrozenlockIs there any tutorial for Cylon? https://github.com/juxt/cylon
17:45Deepuwhen 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:45eriktjacobsenwhat directory are you running from? where in relation is your project.clj stored?
17:45FrozenlockDeepu: You need to be inside your project path
17:46hyPiRion_Deepu: what are you trying to accomplish? You need to be inside your project directory, but it doesn't matter where specifically.
17:47DeepuI'm trying to follow these steps https://github.com/pyr/cyanite
17:48eriktjacobsenDeepu: Your commandline has to be inside the project directory. use the cd command to navigate to the project
17:48DeepuI guess I have to create a project first
17:49Deeputhe steps doesn't say to do that ...
17:50DeepuThank you all
17:52puredangerBronsa: 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:54cflemingdnolen_: pong
17:54Bronsapuredanger: i honestly am boggled by that bug
17:56Bronsapuredanger: 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:00dnolen_cfleming: is there any special I need to do to avoid resolution errors w/ Clojure Maven projects?
18:00dnolen_s/any/anything
18:02cflemingdnolen_: I don't think so, I've used them with no problems.
18:03cflemingdnolen_: Do you see libs being added correctly to your modules when you look in project structure? (cmd-;)
18:18solussdanyone know what happens to namespaced keywords in transit-js when you call mapToObject on a transit map?[
18:18solussd(I’m reluctantly not writing an app to find out)
18:27the-kennysolussd: give me a minute
18:29the-kennyoh, transit-js. Sorry :/ Don't have that ready
18:30solussd:)
18:34justin_smithsolussd: the readme for transit-js implies it comes back as a clojurescript.core keyword object
18:35justin_smithhttps://github.com/cognitect/transit-cljs#default-type-mapping
18:35solussdthat’s transit-cljs
18:36solussdI 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:36the-kennyhow would duplicated be handled in that case?
18:36the-kenny*duplicates
18:37solussdoh.. yeah, .. that’s probably why it isn’t supported
18:37solussdcan object keys in javascript not have forward slashes in them?
18:37seancorfieldI opened an issue against core.typed for that code.cache AOT-compilation issue http://dev.clojure.org/jira/browse/CTYP-193
18:40amalloyobject keys in js are just strings afaik: they can have any character
18:40amalloyyeah, definitely. x = {}; x['abc/def'] = 1; runs fine
19:00solussdamalloy: 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:01solussdamalloy: property access doesn’t work though (e.g. x.abc/def), but that’s a nonissue now
19:01amalloysure, of course it doesn't
19:01solussdthat’s enough javascript in the #clojure chan. :D
19:26koreth_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:45mercwithamouthwould you say light table is preferable to emacs right now?
19:45arrdemno
19:46mercwithamouthi keep flip flopping between the two
19:48mercwithamouthmeh..i'm comfortable enough with emacs...no need to make a simple choice hard. procrastination
20:16dnolen_ lazy contracts for ClojureScript ~30 lines http://swannodette.github.io/2015/01/12/lazy-contracts/
20:16dnolen_uses specify
20:18[blake|Ha! I was just reading that.
20:34[blake|How does one reference a ClojureScript function in HTML (e.g. an onKeyPress)? Or does one?
20:36dnolen_[blake|: ClojureScript uses Google Closure namespaces
20:36dnolen_so whatever your namespace is, foo.bar.baz
20:37dnolen_under advanced optimizations you need to exporrt
20:37dnolen_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[blake|(inc dnolen_)
20:42lazybot⇒ 11
20:42[blake|Aha...it worked!
20:46mercwithamouthlol
21:04gfredericks$karma dnolen
21:04lazybotdnolen has karma 19.
21:04gfredericks$karma dnolen_
21:04lazybotdnolen_ has karma 11.
21:04gfrederickspretty impressive
21:11dopamean_ive got a macro question
21:11dopamean_seeing as im learning clojure and haven't written any macros before it may be kind of a dumb question
21:11dopamean_either way
21:11dopamean_the offending code is here: https://gist.github.com/nickmcdonnough/d72e30f42def74c99698
21:12dopamean_its for an exercism.io solution. it should define a bunch of functions: monteenth, tuesteenth...
21:12amalloythat's not a macro
21:12dopamean_oh ait
21:12dopamean_wait*
21:12dopamean_my mistake
21:13dopamean_updated to have it look like what ive got in my editor
21:13dopamean_which is basically just changing that defn to defmacro
21:13dopamean_is it still incorrect?
21:14amalloysee also http://stackoverflow.com/q/7852351/625403
21:14dopamean_alright
21:14amalloyyes, 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:14amalloyi think that that SO Q/A should help
21:15dopamean_interesting. thanks.
21:19dopamean_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:19dopamean_it kinda seems like that is part of what youre saying on SO
21:21amalloydopamean_: 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:22dopamean_hmm
21:22amalloyyou 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:24dopamean_ill try that. thank you.
21:31dopamean_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