#clojure logs

2015-12-13

00:44domokatoif i have one macro that needs to generate a new symbol based on a passed-in symbol (gensym passed-in-sym), and i have a separate macro that needs to refer to this generated symbol, what's the best way to do that?
00:44domokatothe same symbol will be passed in to the second macro
00:45domokatoso i basically need a mapping of symbols to their generated symbols
00:46domokatobut only during compile time. is there a way to do that?
01:05jeayeHow would I parse 20151212T134758Z into a simpler format?
01:18domokatojeaye: probably with regexes
01:18jeayeTrying to use clj-time, currently.
01:19jeayeAh, got it.
01:20jeaye(parse (formatters :basic-date-time-no-ms) "20151212T134758Z") ; works
01:21domokatojeaye: nice
01:30jeayeAny idea why clojure.java.shell/sh would return quickly but make the program take a very long time to exit?
01:30jeayeIt quickly returns, runs my main, and then takes ~1m before it fully quits.
01:30jeaye(no errors)
01:56lambda-11235Is it bad practice to attach :forms metadata to your own macros?
01:58lambda-11235or :arglists?
03:16BRODUScan anyone recommend any good exercises to get familiar with the metaprogramming aspects of clojure?
03:18amalloyBRODUS: try implementing let (without destructuring) yourself
03:18amalloy(as a macro over fn)
03:19BRODUScool, i'll try that.
03:23opqdonutI think something like locking or with-open might be a good exercise too
03:24opqdonutamalloy: what would you implement let with? let?-)
03:24amalloyopqdonut: like i said, a macro over fn
03:24opqdonutoh
03:24opqdonutreading comprehension 0/5
04:39wickedshellI was reading the docs on last, and it promises linear time, is there a variant or a function that can find the last element in constant time on a vector?
04:41MJB47_wickedshell: peek?
04:42MJB47_http://clojuredocs.org/clojure.core/peek
04:42wickedshellMJB47_, hey that will do quite nicely, thanks :)
05:11kungiIs there a way to debug ring middlewares with cider? I really would like to be dropped into the debugger on loading a page.
05:19shiranaihitopffft.. i wish i could only write Clojure and wouldn't have to deal with the mad proliferation of front-end tools that plagues the world today
05:21kungishiranaihito: such as?
05:22shiranaihitokungi .. everything, pretty much.. i want to use redux.. then there's react-redux, react-router, redux-router or whatever..
05:23kungishiranaihito: yes the javascript world churns libraries pretty fast
05:23shiranaihitoand they tell me to use npm and webpack and whatever the hell.. and each of those projects lies in a heap of Node-centric config files etc, aaand no one seems to care because obviously everyone in the world is a Node-developer and doesn't mind doing everything based on Node
05:24shiranaihitoit's insane
05:24kungishiranaihito: this is madness??? NO THIS IS JAVASCRIPT:-)
05:24shiranaihitoand all the sources for JS libs are wrapped in some strange "module" incantations that i don't know if i'm supposed to get rid of somehow (like by running them through webpack or something) .. or if they'll just magically work by including them with script tags etc
05:24shiranaihitoyeah.. :p
05:25shiranaihitoaaand these days they're writing example code in the ES6(or 7?) module style that browsers don't support yet .. even though everything still depends on all that other crazy module shit
05:25shiranaihitooh and i'm using Babel too, because React..
05:26shiranaihito.. and because ES6 ofc
05:26shiranaihitobut all in all it's just deranged
05:27kungiI work in a clojure only place. We use python for sysadmin stuff and clojure / clojurescript for the rest.
05:27shiranaihitooh? well, i tried to use CLJS but figured it was still a bit too scary after all
05:28kungishiranaihito: when did you try it the last time? It got much better since I started two years ago
05:28shiranaihitothere's another proliferation of silly little libs in the CLJ/CLJS ecosystem of course.. all hanging off of Leiningen and ancient Apache Commons libs from 1998 or whatever the hell..
05:28shiranaihitokungi: i was faffing about with CLJS earlier this year
05:29shiranaihitoactually i guess my main problem was that debugging the resultant JS code felt impossible
05:29kungishiranaihito: it probably is ... I don't "debug" CLJS
05:29shiranaihito.. no clue what was happening basically anywhere, because everything is done through the CLJS implementation code etc
05:30MJB47_there is proper sourmapping support now
05:30MJB47_but personally i find the compiled js to be relatively easy to read
05:30MJB47_i use node at work though :(
05:30shiranaihitoMJB47_ oh :p well, you must be made of sterner stuff then :p
05:31MJB47_compared to coffeescript or something
05:31shiranaihitoso with a source map i could theoretically see exactly where there's a problem in my own CLJS sources?
05:31MJB47_the compiled js code is waaaaaaay better
05:31MJB47_but yer exactly
05:31shiranaihitooh, weird
05:31MJB47_you debug clojurescript, never nee dot look at the js
05:31MJB47_need to*
05:32shiranaihitowell, i seem to recall encountering plenty of cryptic error messages that happened somewhere in JS
05:32shiranaihitonot sure if they'd even map to my CLJS sources
05:32MJB47_error messages have always been lackluster in cljs :(
05:32MJB47_i believe they are getting better though
05:33shiranaihitoi spent too much time scraping together something like my own version of Reagent.. but eventually gave up on it because i had no idea what the hell was wrong with the way i was calling React from it
05:34shiranaihitoi found the compiled CLJS code too hefty too.. yeah sure, that could be mitigated (to an extent) through google-clojure-minimizing the shit out of it, but still.. it felt problematic
05:35shiranaihitoMJB47_ yeah i guess i encountered some of those
05:36kungiHmm cider inspect does not seem to work in the debugger :-(
05:36shiranaihitomaybe i'll end up using CLJS someday.. i liked the idea of writing all my front-end stuff with it
05:52BRODUSsay you have function with an inner recursive that does all the work, whats a good convention for naming that inner function?
05:54MJB47_i typically do -outer-function
05:54MJB47_but i doubt thats a standard practise
05:55BRODUSwould 'f' be frowned upon?
05:55MJB47_no
05:56schauehoI usually use <outer>-helper
05:56schauehomatter of personal preference or company-wide coding conventions
08:06lxsameer what's so special about datomic ?
08:09ridcullywhat do you mean?
08:10ridcullyspecial compared to other dbs?
08:15BRODUSis there any difference between returning (cons x (lazy-seq ....)) and (lazy-seq (cons x ...))
08:16BRODUSI see them equally as much so I'm wondering if its for a reason or just preference.
08:18lxsameerridcully, I can't understand the noble thing behind it
08:34Bronsa,(def a (lazy-seq (cons (println "foo") ())))
08:35clojurebot#'sandbox/a
08:35Bronsa,(def a (cons (println "foo") (lazy-seq ()))))
08:35clojurebotfoo\n#'sandbox/a
08:35BronsaBRODUS: ^
08:36BRODUSso the second version the head is already 'realized'
08:37Bronsayes
08:38BRODUSbut when would you want that? seems like the first is better generally speaking since an element should only be realized unless its needed
08:45oraclehow to convert [1 2 [3 4] 5] to [1 2 3 4 5]? just want to have something like mapcat.
08:45MJB47_,(vec (flatten [1 2 [3 4] 5]))
08:45clojurebot[1 2 3 4 5]
08:47hyPiRionWell, you have mapcat
08:47hyPiRion,flatten
08:47clojurebot#object[clojure.core$flatten 0x26a4e79a "clojure.core$flatten@26a4e79a"]
08:47hyPiRion~flatten
08:47clojurebotflatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
08:49oraclegreat. I have thought only scala has flatten, just found clojure also have it.
09:40MorgawrHello, I am using prismatic schema in clojurescript and I want to validate atoms. I've seen in their changelog that they added an s/atom validator but when I try to use s/atom in my code it says it's an undefined var. Does anybody know anything about it? Is this the right place or is there a better place to ask?
11:20RedNfireheya. what's the situation on android these days?
11:23RedNfireFor Android, I just swiched from Java to Kotlin (less verbose Java with some neat extras), but I had great fun on nodejs with CoffeeScript (less verbose JavaScript with some neat extras) and an FP library so I now wonder if a dynamic FP language like Clojure would work well for Android. My understanding is that it basically works but the interop with the Android API is awkward because that API is very java-centric. Is that correct?
11:45MorgawrWhy is it that I am getting different regex matches/results when using (.match text my-regex) and text.match(my-regex) between clojurescript and javascript? It's the same text and it's the same regex (created with js/RegExp.)
11:51harjaHi all, any core.logic people awake? I'm having problems with https://gist.github.com/mharju/9b21e68969994bb151ec
11:51harjaThe one in line 33 stops as expected, but the larger version just keeps on going without ever stopping
11:51harjaWhat are the best practises in debugging these kinds of programs?
11:54harjaThis is literally my first stab at core.logic, so bear with me :)
12:03xyhhow can I use mutable vector in clojure ?
12:04justin_smithxyh: first you find a mutable vector - what lib provides one?
12:04justin_smithafter that, you use it
12:05xyhI come from scheme. so no built-in mutable vector ? I have to import mutable vector from java lib ?
12:05MJB47_you can use java arrays
12:05justin_smithxyh: clojure doesn't define a mutable vector
12:06justin_smiththere are arrays, but unlike vectors, arrays do not resize
12:06justin_smiththere is also java.util.ArrayList - that's probably closest
12:07justin_smith,(let [al (java.util.ArrayList.)] (.add al :a) (.add al :b) (into [] al))
12:07clojurebot[:a :b]
12:08kungiThanks everyone for the cider debugger \o/
12:08justin_smith,(let [al (java.util.ArrayList.)] (.add al :a) (.add al :b) al)
12:08clojurebot[:a :b]
12:08justin_smithcool - it prints nicely even without putting it in a vector at the end
12:08MJB47_you can also (vec al)
12:09MJB47_though idk which is more efficient
12:09justin_smithyou don't really need to do either though
12:09MJB47_indeed
12:09justin_smithxyh: arraylists are 100% non-thread-safe
12:09justin_smithxyh: if used with multiple threads, you need locks etc. or your data will be garbage
12:12xyhI am writing a vm [an interpreter] of another language, the image of the vm is a byte-array, and the vm load the image and interpret it.
12:13justin_smiththen why not use a byte array?
12:13justin_smith,(java.util.ByteArray. 1024)
12:13clojurebot#error {\n :cause "java.util.ByteArray"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.ClassNotFoundException: java.util.ByteArray, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyzeSeq "Compiler.java" 6891]}\n {:type java.lang.ClassNotFoundException\n :message "java.util.ByteArray"\n :at [java.net.URLClassLoader$1 run "URLClassLoader.java...
12:14justin_smitherr...
12:14irctcHi everyone. :)
12:14justin_smith,(byte-array 1024) ; that's the one
12:14clojurebot#object["[B" 0x5d794897 "[B@5d794897"]
12:14xyhcool
12:14justin_smiththat's a non-resizable actual contiguous array of primitive bytes
12:14xyhthx
12:15justin_smithxyh: you can use aget and aset to manipulates the elements of a byte array
12:15xyhwhen I know the word 'byte-array', where can I find the docs about it ?
12:16justin_smithxyh: a byte-array is one of the primitive array types
12:16MJB47_http://clojuredocs.org/clojure.core/byte-array
12:16irctcI am trying to save in a local variable a list of two functions to be executed if a condition is not met and if it is then it will execute some other function. Now when the condition is true the right function executes but when the condition is false I don't know how to pass more than one function to the variable wich will then be inserted into a threaded list of functions for execution. Does anyone know how this can be done?
12:17xyhthanks MJB47_
12:17justin_smithMJB47_: that's a doc for the constructor, but not the type created
12:17MJB47_http://clojure.org/cheatsheet <- always useful
12:17MJB47_oh
12:17MJB47_that is true
12:20irctcFor example I have (-> function1 function2 variable-that-holds-a-function-based-on-met-condition function4) Now how do I pass more than one function to variable-that-holds-a-function-based-on-met-condition that will then execute those functions in sequence?
12:21justin_smithxyh: I'm not finding any really good intro for java arrays right now. The important things are that the size cannot change, they hold only one type (either some class or one of the primitive types, in your case byte), and they don't really have methods - you use static methods on other classes to work with them.
12:22justin_smithxyh: in particular the java.util.Arrays class has a bunch of useful methods for doing things with an array
12:24harjaSorry for repeating my question but I'd need pointers on how to debug core.logic-based code. https://gist.github.com/mharju/9b21e68969994bb151ec The "smaller" version of the problem starting on line 32 halts with a correct solution but the bigger one just keeps on grinding when I start it.
12:24xyhthanks justin_smith, I only need basic primitive functions about byte-array, I can implement the functions I need on the way to my vm :)
12:25justin_smithxyh: then aget and aset should suffice
12:25xyhjustin_smith: indeed
12:25justin_smithxyh: the other gotcha! bytes in the jvm are all signed
12:25justin_smithbut there's some simple math to work with signed bytes as if unsigned (inconvenient though it is)
12:25xyhoh! that is not cool
12:26justin_smithxyh: it's the same bits, so all you need is to make sure the right bits are in there before your other program sees the data
12:26justin_smithbut yes, inconvenient
12:27xyhthe idea of the macro '->' is learned from forth the language right ?
12:29justin_smithxyh: umm... I would doubt it -> is a syntax transform and forth doesn't have syntax per se
12:32lambda-11235Is it bad practice to attach :arglists metadata to your own macros after definition?
12:33justin_smithlambda-11235: it will annoy the folks who make code analyzing tools
12:35irctcDoesanyone know how I can put several functions into one variable and then insert that variable in -> macro to have those functions executed?
12:37justin_smiththe easy way is with comp
12:37justin_smith,(-> 1 ((apply comp [inc inc inc])) vec)
12:37clojurebot#error {\n :cause "Unable to convert: class java.lang.Long to Object[]"\n :via\n [{:type java.lang.RuntimeException\n :message "Unable to convert: class java.lang.Long to Object[]"\n :at [clojure.lang.Util runtimeException "Util.java" 221]}]\n :trace\n [[clojure.lang.Util runtimeException "Util.java" 221]\n [clojure.lang.RT toArray "RT.java" 1671]\n [clojure.lang.LazilyPersistentVector creat...
12:37justin_smithergh
12:38justin_smith,(-> 1 ((apply comp [inc inc inc])) vector)
12:38clojurebot[4]
12:39lambda-11235justin_smith: My reasoning is for cases when macros have a complicated syntax, and their arg lists is [& form].
12:39irctcThanks justin_smith.
12:40lambda-11235In which case the argument lists provide very little information about the macro.
12:41justin_smithlambda-11235: I wish I could describe the issue in more detail, maybe Bronsa is around to explain why this is a problem for his work
12:45Bronsajustin_smith: lambda-11235 the issue is more with changing arglists on functions than on macros
12:46justin_smithwhat exactly is the issue anyway? I remembered it being a problem but not why.
12:46Bronsa:arglists is used both for documentation purposes and to guide the compiler on some optimizations + it's the only way tools have to get the arities of a function
12:46lambda-11235Bronsa: I can get how that would effect arity checking.
12:47Bronsathere were a bunch of proposals for having both a :arglists and a :doc-arglists but never went anywhere
12:48pvinisyou know `take-while`? i want to make a `take-while-coll`, which works as `take-while`, but instead it would return a collection of the subcollections passing the test. for example
12:48Bronsajustin_smith: Compiler.java uses :arglists to figure out whether it can compile calls using primInvoke for example
12:48pvinis(take-while pos? '(1 2 3 -5)) would return '(1 2 3)
12:48Bronsaeastwood uses it to warn on mismatching arities
12:49pvinis(take-while-coll pos? '(1 2 3 -5)) would return '((1) (1 2) (1 2 3))
12:49pvinishow would i do that?
12:50alive876hi, whats the best way to load a clojar file into a repl?
12:50Bronsapvinis: look at reductions
12:56pvinisBronsa: hmm.. interesting
12:56pvinisnow to find how to combine it..
12:57justin_smithI did a lame version - reductions would be better:
12:57justin_smith,(defn take-while-coll ([pred coll] (take-while-coll pred coll [])) ([pred coll so-far] (let [e (first coll) with (conj so-far e)] (when (seq coll) (if (pred e) (lazy-seq (cons with (take-while-coll pred (rest coll) with))) (take-while-coll pred (rest coll) []))))))
12:57clojurebot#'sandbox/take-while-coll
12:57justin_smith,(take-while-coll even? [2 2 4 1])
12:57clojurebot([2] [2 2] [2 2 4])
12:57justin_smith,(take-while-coll even? [2 2 4 1 42 44 100])
12:57clojurebot([2] [2 2] [2 2 4] [42] [42 44] ...)
12:58Bronsa,(rest (reductions (fn [acc x] (if (pos? x) (conj acc x) (reduced acc))) [] '(1 2 3 -4)))
12:58clojurebot([1] [1 2] [1 2 3] [1 2 3])
12:58pvinisaha..
12:59Bronsajustin_smith: I think you reimplemented reductions :)
12:59justin_smithalmost - mine doesn't stop
12:59Bronsaah, right
12:59justin_smithit does another take-while after the first non-matching item
13:00pvinisright
13:01pvinishm, ok give my brain a minute to process :)
13:01pvinisthank you both
13:01pvinis,(defn keep-taking-while
13:01pvinis ([pred coll] (keep-taking-while pred [] coll))
13:01pvinis ([pred old coll]
13:01clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
13:01pvinis (if (not (empty? coll))
13:01pvinis (let [new (first coll)
13:01pvinis rest-of-new (rest coll)
13:01pvinis old-and-new (conj old new)
13:01pvinis result (pred old-and-new)]
13:01pvinis (if result
13:01pvinis (recur pred old-and-new rest-of-new)
13:01pvinis old))
13:01pvinis [])))
13:01justin_smithpvinis: don't do that
13:02pvinisthis is what i had so far.. i think an accumulator was missing somewhere..
13:02pvinissorry
13:02justin_smiththe bot doesn't accept multi line input, and multi line pastes are rude
13:02pvinisi didnt know it will go multiline
13:02pvinislet me try again
13:03pvinis,(defn keep-taking-while ([pred coll] (keep-taking-while pred [] coll)) ([pred old coll] (if (not (empty? coll)) (let [new (first coll) rest-of-new (rest coll) old-and-new (conj old new) result (pred old-and-new)] (if result (recur pred old-and-new rest-of-new) old)) [])))
13:03clojurebot#'sandbox/keep-taking-while
13:04pvinis,(keep-taking-while even? [2 4 24 5 25])
13:04clojurebot#error {\n :cause "Argument must be an integer: [2]"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "Argument must be an integer: [2]"\n :at [clojure.core$even_QMARK_ invokeStatic "core.clj" 1359]}]\n :trace\n [[clojure.core$even_QMARK_ invokeStatic "core.clj" 1359]\n [clojure.core$even_QMARK_ invoke "core.clj" -1]\n [sandbox$keep_taking_while invokeStatic "NO_SOURCE_FILE" 0]...
13:04pvinisops..
13:04justin_smithpvinis: you need to check for the collection being empty
13:04justin_smithoh wait, that's another issue
13:04justin_smithn/m
13:05pvinisanyway. i will look at your and Bronsa's solutions
13:05pvinisand try to understand them
13:05justin_smithyours is almost exactly mine - except for a couple of simple to fix bugs, and mine is lazy
13:16l1x'(apply str (concat (apply concat (interpose ["_"] (partition 1 '("x" "y" "z")))) ".json"))
13:17ridcully,(str (clojure.string/join "_" '("x" "y" "z")) ".json")
13:18clojurebot"x_y_z.json"
13:18l1xthx!
15:35ghost__Hello! I have an if condition, and if it satisfies the predicate, I want to print something and recur that function. How do I do that? ((println "something")(function param)) gives a NPE
15:35__ior(do (thing1) (thing2))
15:35bluezoneyeah you need to use the do statement
15:36ghost__thanks, I love you guys
15:36MJB47_if you dont need the else part
15:36MJB47_you can use when
15:36__iorhe probably needs an else for the base case of the recursion
15:37ghost__I kind of need else for debugging, it's my first "serious" program (tic tac toe)
15:37ghost__and I want to know if my awful hacks work or not
15:38ghost__anyway, will someone be my code friend? I'm so lonely
15:39bluezonehaha
15:39pontikihaving a code buddy would be awesome. i might actually spend time on learning clojure :/ . sadly, i have no time now. :((
15:40ghost__me neither, so I gave up on school a bit, it's not that important
15:47pviniscan i use parition to split a colleciton into two collections, one has the 1st, 3rd, 5th etc, and the other has the 2nd, 4th, 6th etc item
15:48ridcully,(apply map vector (partition 2 (range 10)))
15:48clojurebot([0 2 4 6 8] [1 3 5 7 9])
15:49ridcully(only works for even length)
15:50pvinisyea but i guess partition-all works for odd
15:50amalloyprobly not
15:50ridcullynope
15:50amalloybecause of the apply map
15:50ridcullybecause map will choke on it then
15:50ridcully,(apply map vector (partition-all 2 (range 9)))
15:50clojurebot([0 2 4 6 8])
15:51pvinishow can i make odds work then?
15:51amalloywell, start by deciding what you want the result to be
15:52pvinislike if its [1 2 3 4 5], the result will be [1 3 5] and [2 4]
15:56amalloyyou probably can't do a lot better than something like (map #(take-nth 2 %) [xs (rest xs)])
15:57pvinismm.. do you think it would be better if is just Start iterating over the list, and depending on the index, add it in one list or another?
15:59amalloythat's not very lazy
15:59pvinisno..
15:59justin_smith,,((fn two-parts ([coll] (two-parts coll [] [])) ([coll a b] (if (empty? coll) [a b] (recur (rest coll) (conj b (first coll)) a)))) (range 10))
15:59clojurebot[[1 3 5 7 9] [0 2 4 6 8]]
16:00justin_smithalso not lazy
16:01justin_smithpvinis: in my example above, instead of alternating which coll it adds to, it always adds to the second, but flips their order also
16:04pvinislet me try that
16:11MJB47_you can do it with keep-indexed
16:11MJB47_,[(keep-indexed (fn [idx item] (if (even? idx) item)) (range 9)) (keep-indexed (fn [idx item] (if (odd? idx) item)) (range 9))]
16:12clojurebot[(0 2 4 6 8) (1 3 5 7)]
16:12MJB47_it can probably be written more cleanly
16:15lambda-calculus,((fn [xs] [(take-nth 2 xs) (take-nth 2 (rest xs))]) (range 10))
16:15clojurebot[(0 2 4 6 8) (1 3 5 7 9)]
16:18pvinislambda-calculus: thats nice
16:21lambda-calculusIt's also lazy.
16:22MJB47_and it makes me look bad
16:22MJB47_trifecta of good code :P
16:30amalloyisn't that the longhand version of what i suggested?
16:30justin_smithyes
16:31lambda-calculusamalloy: Sorry, didn't see your comment.
17:09orznDoes anyone know the "proper" way to generate an API key?
18:10domgetterIs there something like doseq but that doesn't run the cartesian product of its bindings?
18:12domgetterso like (dothese [x (range 10) y (range 10)] (println [x y])) --> [0 0] [1 1] [2 2] [3 3] [4 4] ... [9 9]
18:13MJB47_dont think so
18:14MJB47_how would tha work with unequally sized bindings?
18:16domgetterMJB47_: I might have an XY problem here
18:17lambda-calculus,(dorun (map (fn [x y] (println [x y])) (range 10) (range 10)))
18:17clojurebot[0 0]\n[1 1]\n[2 2]\n[3 3]\n[4 4]\n[5 5]\n[6 6]\n[7 7]\n[8 8]\n[9 9]\n
18:17domgetterThe reason I ask is I'm doing something like this: (doseq [color (-> pixels transform palette)] (aset array index color)) but by the time I get to the aset, I don't have an index to refer to anymore
18:18justin_smithdomgetter: (doseq [[index color] (map list (range) (-> pixels transform palette))] ...)
18:19domgetterI think I have to go back to the drawing board. Thanks for your input :)
18:21TEttingerif you're doing lots of aset consider amap
18:21TEttinger(or areduce)
18:22justin_smithTEttinger: it's as if they did (map (fn [f] (defn (cons 'a def) ...) clojure.core)
18:22TEttingerha
18:22TEttingerexcept amap has a totally insane signature
18:22TEttinger,(doc amap)
18:22clojurebot"([a idx ret expr]); Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new array ret."
18:23justin_smithright, and my map above is totally nonsense
21:39jjttjjI set up an emacs copying these config files: https://github.com/flyingmachine/emacs-for-clojure everything's great except in the cider repl, matching curly braces are not correclty inserted when I type an opening curly brace
21:40jjttjjWhen I manually enable clojure-mode on this buffer the closing brace is correctly created, but pressing enter no longer causes the repl input to be evaluated, it just adds a new line
21:41jjttjjAnyone know what might be going wrong here?
21:46amalloyjjttjj: you kinda have to either not have paredit-mode on in your repl buffer, or use C-RET (maybe it's shift-RET?) to send expressions
21:46amalloybecause paredit-mode expects you to be pressing enter in the middle of unfinished expressions all the time
21:47amalloyso you can either live with the default (which is what i do, as someone who doesn't write big expressions in the repl), or add a (paredit-mode 1) hook to your cider repl hook and then use a different key to send expressions
21:49jjttjjamalloy: thanks!