#clojure log - Sep 13 2015

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

0:19 Trioxin: lol @ this first paragraph http://www.braveclojure.com/java/

0:20 so, we've got to deal with the spear chuckers

0:21 btw does clojurescript just run in the browser after including a js library or something?

0:22 justin_smith: it's js

0:22 Trioxin: oh

0:22 justin_smith: clojure compiles to jvm byte code, cljs compile to js

0:22 Trioxin: oooooooh

0:28 and so I'm guessing while you're coding clojurescript you can use any js lib then

0:28 obviously but do you have to compile it first?

0:28 to test/debug or is it like how I'm testing Clojure right now in IDEA

0:28 justin_smith: Trioxin: you need to compile the cljs in order for the browser to use it, and yeah, the js interop is as easy as clojure java interop is

0:29 Trioxin: there's a nice setup called figwheel that auto-recompiles as you save files and pushes the new code into the browser

0:29 it's really sweet actually

0:29 Trioxin: i've worked with things like that for node-webkit and cordova so I can imagine it. all in good time. thx

0:30 justin_smith: it also gives you an interactive repl, which is like the javascript console, but for cljs

0:30 Trioxin: can you use regular js in the repl?

0:30 justin_smith: no, but you can in the browser console of course

0:31 but interop is easy enough

0:31 Trioxin: k

0:32 one more thing, what are the benefits? programming paradigms and more libs, maybe speed too? cause I already know js

0:34 i've read a few people comment on why they like it

0:35 i guess this pretty much covers it http://www.quora.com/Why-ClojureScript

0:35 kavkaz: I find myself using partial a lot when using the thread macro (->)

0:36 Is this normal? It's my first time using that macro so I'm not sure I'm doing it right

0:36 Trioxin: seems like Quora got popular out of nowhere doesn't it?

0:36 gcommer: kavkaz, could you give an example of how you're using it?

0:37 justin_smith: kavkaz: if you are using -> and partial, you should probably be using ->> instead

0:37 kavkaz: I do this because if the next form is something like (map f), since -> inserts the last form as the second item in the next expression, I use partial so the form becomes ((map f))

0:37 sorry

0:37 ((partial map f))

0:37 gcommer: I thought so

0:37 justin_smith: ,(-> [1 2 3] (->> (map inc)))

0:37 clojurebot: (2 3 4)

0:38 justin_smith: kavkaz: that's only if you need to mix positions, if you don't, just use ->> in the first place

0:38 kavkaz: haha, these macros take some time getting used to

0:38 justin_smith: ,(->> [1 2 3] (map inc))

0:38 clojurebot: (2 3 4)

0:38 kavkaz: justin_smith: Ah I see

0:39 gcommer: This library is cool: https://github.com/rplevy/swiss-arrows

0:39 kavkaz: I see (:

0:39 yeah ->> made my life easier just now

0:40 Ah that's pretty cool gcommer

0:40 I think however, that using such a library is pretty much using a new language now

0:40 Trioxin: eh, IDEA doesn't even want me to write my lisp like C and I'm really wanting to nest things similarly

0:41 kavkaz: because now you're introducing syntax into your code that will be unfamiliar to any Clojure programmer unaware of that library

0:42 gcommer: The same is true for any library.. I typically only use the basic -<> and -<>> anyways because they're so similar to the normal ->/->>

0:43 Trioxin: what's the difference between a macro and member macro was it? I remember that clojure cannot create them for some unknown reason

0:46 gcommer: Trioxin, I've never heard of a "member macro" and don't see the term used anywhere..

0:47 Trioxin: reader macros. sorry

0:47 let's you create new syntax or something?

0:48 gcommer: google is awesome: https://gist.github.com/chaitanyagupta/9324402

0:49 Trioxin: i suppose I'm more curious as to why it seems so important to Lisp but isn't in Clojure

0:50 gcommer: I think tagged literals can do the same thing, sortakinda

0:50 er no

0:52 awwaiid: Trioxin: I'm not completely sure, but I think avoiding reader macros keeps more consistency; it encourages fancy things to be defined in the language instead of per-project

0:53 Trioxin: if I pay the creator of Clojure will he add it?

0:53 awwaiid: maybe :)

0:53 Trioxin: lol

0:54 awwaiid: if it is something that would make the language better, and the trade-offs are in its favor, then I bet patches are welcome

0:54 Trioxin: some day my new friends, I'll bring you the gift

0:55 awwaiid: the most recent version introduced the first reader-macro-like-thing, which lets you put in clojure and clojurescript in the same file

0:55 gcommer: you mean reader conditionals

0:57 Trioxin: like if I wanted to create my own programming language though I see some example of that http://gigasquidsoftware.com/blog/2013/05/01/growing-a-language-with-clojure-and-instaparse/

0:57 so maybe I'm missing the point of it a bit as I haven't read all that other article yet

0:58 gcommer: So one issue with including reader macros is that they would almost certainly break (or need significant rejiggering of) clojure namespacing/:require'ing

1:00 awwaiid: yeah, reader conditionals. it's confusing that the docs talk about reader macros though they don't seem to be user-defined-reader-macros at all. (looking at http://clojure.org/reader)

1:00 gcommer: yep

1:01 justin_smith: awwaiid: if you make a file named readers.clj you can define your own

1:01 just has to be on the classpath

1:01 gcommer: it's a shame clojure syntax isn't strictly EDN

1:01 justin_smith: when you run defrecord it creates reader macros for you

1:02 Trioxin: hmm

1:02 gcommer: you mean data_readers.clj?

1:02 or something different

1:02 justin_smith: yeah

1:03 sorry, I had the name wrong

1:03 gcommer: k just wanted to make sure I found the right doc

1:03 justin_smith: but that's more limited than cl reader macros, iirc

1:03 Trioxin: I got excited reading that CL has some java interop but then further down the page read why it isn't nearly the same

1:04 https://www.reddit.com/r/lisp/comments/2um8qh/picolisp_java_interoperability_why_bother_with/

1:05 awwaiid: interesting

1:06 I guess these make sense to be called macros as I think of it. So like @foo is (deref foo). There is no expanded form of just "7".

1:06 (just thinking out loud)

1:07 gcommer: The docs for *data-readers* makes it seem like all data_readers.clj on the classpath are globally loaded.. does this mean they bypass typical namespacing? Like I can use them just by having a library on the classpath, regardless of require'ing them?

1:08 justin_smith: gcommer: yes

1:08 they are not namespaced

1:09 as the name hints, they should be used for constructing data literals

1:10 Trioxin: does EVERYONE close their functions and whatnot on the same line as the other ) or do some people nest as in C? isn't it more of a preference? It just seems like it would be more readable.

1:11 justin_smith: Trioxin: code that is bad and weird puts braces on their own line.

1:11 code that is by normal reasonably intelligent people has braces on the same line

1:12 Trioxin: it's a convention, the conventional thing is the more readable thing.

1:12 Trioxin: that isn't true of C style

1:12 justin_smith: Trioxin: OK, this isn't C

1:12 awwaiid: Trioxin: seems to be pretty universal in the lispses

1:12 Trioxin: j

1:12 k***

1:12 awwaiid: I resisted at first, but have succumb, and find that when I have two many of those icky closing things it is a strong hint that I should break my function up

1:13 justin_smith: Trioxin: if you go to England, drive on the left side of the road, if you write in a lisp, don't leave dangling braces on their own line

1:13 awwaiid: yeah

1:13 Trioxin: heh

1:13 they hate me over there

1:17 just as a lisp has been made for java, I will make one for PHP to facepalm the world

1:18 hah it's already been done

1:20 man there are so many lisps

1:20 awwaiid: Trioxin: here is some random code from the 80's -- no dangling parens. Long history. https://hanshuebner.github.io/lmman/fd-flo.xml#list-and-tree-section

1:20 Trioxin: this seems like the logical choice though for now having java behind it

1:21 justin_smith: Trioxin: a reasonably intelligent and determined programmer can make a lisp in a weekend or two

1:21 awwaiid: on purpose or on accident even :)

1:21 justin_smith: especially if gc is already provided by the platform

1:23 gcommer: I can rest easy knowing that clojure throws an exception if there are conflicing tags in different data_readers.clj (rather than some arbitrary precedence scheme)

1:23 Trioxin: well I like what i see so far. Lisp is on my roadmap to more capable and efficient AI programming and clojure has a lot at its disposal. I just watched a video of a girl who wrote a few lines and was controlling a robot

1:23 justin_smith: gcommer: oh, nice

1:24 gcommer: yeah, the data_readers implementation is nicely at the very end of clojure.core and is super simple

1:25 Trioxin: also facial recognition she was doing was easy

1:27 https://github.com/gigasquid

1:34 you guys should make a Slack room and link it to here

1:34 justin_smith: Trioxin: clojurians

1:34 Trioxin: it's very active

1:35 Trioxin: o

1:35 there's an IRC bridge

1:35 I run one in #Xamarin

1:35 justin_smith: I don't use slack when I'm not at work though :P

1:35 Trioxin: goes both ways

1:36 justin_smith: I am not at work when I'm not signed into slack?

1:36 Trioxin: no i meant the bridge goes both ways

1:37 ChatRelay is the slack bot on freenode. I op #xamarin

1:41 oh cs uses react

1:42 and is faster lol

2:03 well I see one familiar thing so far, lists

2:04 immutable

6:42 visof: hi guys

6:43 can i do this lazy thing in clojure if i have struct called person, (struct person (rest (iterate foo p1) x (rest (iterate bar p2)))) ?

6:43 foo and bar are methods should be applied to p1 and p2

6:43 how can i do this in lazy way in clojure?

7:28 anybody here?

7:28 mungojelly: visof: yeah

7:28 but i don't know the answer to your question, sorry

7:29 visof: is it that hard?

7:29 mungojelly: no i just don't know anything

7:29 visof: okay thanks man

7:30 mungojelly: the "lazy thing" in clojure is made out of sequences, right? are there other lazy things?

7:30 visof: i don't know

7:32 mungojelly: google says there's something called lazy-seq but i haven't tried it yet

7:32 there are some helpful people here often but i think they're probably asleep now

7:33 visof: yeah

7:33 mungojelly: i'm watching "The Language of the System" by Rich Hickey, it's brilliant, very sensible

7:33 Bronsa: visof: structs have been deprecated of years

7:34 Empperi: mungojelly: most of the talks given by Hickey are

7:34 mungojelly: ok yay so now i know that there's something called structs and that i shouldn't use them, good good, building knowledge, i guess :)

7:37 visof: Bronsa: so what is the alternative to do this in clojure?

7:37 Bronsa: i want to define my type which will consist of two infinte lists and one element

7:37 Bronsa: records

7:48 mungojelly: so what i'm thinking for my tile-toybox is like {:grid {[1 3] :a} :tiles {:a {:ascii-1x1 "a" :ascii-3x3 "****a****"}}} does that make sense

9:19 visof: hi guys

9:20 if i have list of lists with this ((true false false) (false false true) (false false false)) and want to print each list like this: f f t\nf f t\n f f f

9:20 in the terminal

9:20 how can i do this?

9:25 done

10:32 lodin_: visof: Using records is often good, if not to give things names, but you can also make do with just a map for a lot of things.

11:41 timothyw: Hey all

11:41 I'm trying to control an infinite sequence display in my “lein repl”

11:41 (lein 2.5.2 on (Java 1.8.0_45) / nREPL (Clojure 1.7.0, REPL-y 0.3.7, nREPL 0.2.10))

11:41 cider repl can truncate the below, but lein's repl hangs

11:41 (repeatedly (fn [] (rand 35))) ;; hangs in lein repl

11:41 (iterate inc 0) ;; also hangs in lein repl

11:42 And neither (set! *print-length* 103) nor (set! *print-level* 15) help with this lein repl (http://blog.n01se.net/blog-n01se-net-p-85.html)

11:42 Any ideas?

11:47 kwladyka_: timothyw, cider works with that? it is infinite, it shouldnt

11:47 timothyw: cider’s repl elide’s bother expressions, out of the box

11:48 kwladyka: only one way what i know is to use take

11:48 timothyw: … without the *print-length* or *print-level* settings

11:48 kwladyka: (take 10 (inifite-lazy-loop))

11:48 i am doing like that

11:49 timothyw: hmm… I’m digging into cider’s source to see if there’s something special it does

12:03 nooga: https://www.reddit.com/r/Clojure/comments/3ksasg/is_there_lisplookalike_overlay_for_clojure/

12:03 wow

12:13 lodin_: nooga: wow indeed.

12:48 expez: Yeah, the responses are shameful. Glad at least one guy took a stand.

12:48 I think his request is pretty unreasonable too, but there's no need to shit on the guy like that :/

12:53 bruno: timothyw: you need to add *print-length* in your .lein/profiles.clj check this out https://github.com/clojure-emacs/cider#limiting-printed-output-in-the-repl

12:54 once added in your profiles.clj will be available for all REPL sessions

13:42 mungojelly: obviously i'm saying this wrong (defn put-a-in-world [w x y] (update w :grid #(put-a-in-grid % x y))) how do i mean to put things through rather than that ugly inner anonymous function? :/

13:42 justin_smith: mungojelly: (update w :grind put-in-grid x y)

13:43 err s/grind/grid of course

13:43 ,(update 1 + 2)

13:43 clojurebot: #error {\n :cause "java.lang.Long cannot be cast to clojure.lang.IFn"\n :via\n [{:type java.lang.ClassCastException\n :message "java.lang.Long cannot be cast to clojure.lang.IFn"\n :at [clojure.core$update invokeStatic "core.clj" 5936]}]\n :trace\n [[clojure.core$update invokeStatic "core.clj" 5936]\n [clojure.core$update invoke "core.clj" -1]\n [sandbox$eval25 invokeStatic "NO_SOURCE_FILE" ...

13:43 justin_smith: oh wait

13:43 ,(update [1] 0 + 2)

13:43 clojurebot: [3]

13:44 mungojelly: oh i was wondering wtf [m k f x y z & more] meant in the update docs

13:44 justin_smith: it gets even more fun when you mix swap! and update

13:44 ,(def a (atom [1]))

13:44 clojurebot: #'sandbox/a

13:45 justin_smith: ,(swap! a update 0 + 41)

13:45 clojurebot: [42]

13:45 justin_smith: almost like forth or something

13:45 mungojelly: clojure is too convenient, your program just flows out of your hands like sand, then there's just a few golden words left and you're confused whether or not you wrote anything

13:46 justin_smith: haha

13:46 mungojelly: is there any 2d grid access, like should i write my own subsectioning

13:46 justin_smith: if you use the naiive approach (vector of vectors) just use (get-in field [x y])

13:47 or (update-in field [x y] op)

13:47 mungojelly: um no sorry that's useful thanks but actually what i have is {[0 0] :a} means an :a at 0,0 and there's just entries for the filled spaces

13:48 justin_smith: well, that's just simple get rather than get-in

13:48 mungojelly: but i'd happily rearrange if there's a different idiom than that for an infinite space like that

13:49 but like i'm going to want to say, give me everything from [0 0] to [10 10]

13:49 justin_smith: mungojelly: no, that representation, plus get / update, seems like it would work just fine

13:49 oh

13:49 mungojelly: which should give a vector of vectors that looks like [[:a nil nil nil nil...

13:49 justin_smith: then make sure it's a sorted-map and not just a map I guess...

13:49 lodin_: mungojelly: I will have to quote you now. :-)

13:49 mungojelly: lodin_: what? what did i say?

13:50 lodin_: mungojelly: "a few golden words", I will call it. :-)

13:50 mungojelly: i haven't actually used a sorted-map yet. that'd be fun to put enough tiles to have to worry about it being performant!

13:53 ok so maps and sorted-maps both look like {key val key val} and respond to the same interface and everything it's just you get different performance depending on which you ask for?

13:54 justin_smith: mungojelly: it's that if you are looking for all entries within some range, with a sorted map they are already sort of in order so faster to find all of them

13:54 mungojelly: how do i time things in a repl so i can feel the difference

13:55 justin_smith: as opposed to a map, where you would always need to walk the entire map to find out what is inside a given rectangle

13:56 first, you need to use an algorithm that actually uses the sorted-map's special properties to its advantage, then you can use criterium.core/bench for real results, or clojure.core/time for tea leaves

13:56 lodin_: haha

14:06 mungojelly: yeah ok i see, clojure.core/time just gives you the raw timing of one execution of something without warming the JIT or anything, i guess i'll learn criterium then :)

14:08 justin_smith: it's pretty simple to use, there's bench and quick-bench, I put it in my profiles.clj so it's always available

14:08 (half the time because someone asks "which of these is faster"? and I'm curious)

14:10 mungojelly: i don't know what profiles.clj is, is that something lein looks for?

14:11 justin_smith: mungojelly: every project.clj is merged with ~/.lein/profiles.clj

14:12 so you can use that file for dependencies that you want available at dev time regardless of project

14:12 (or other user local but not project specific settings)

14:12 mungojelly: ok great, thanks! lein is very slick and magical

14:47 Pupeno: I need to temporarily switch to another namespace, I was using in-ns, but with that I lose access to Clojure's core, what should I use instead?

14:47 justin_smith: Pupeno: in-ns creates a namespace but does not initialize it properly

14:48 lodin_: Pupeno: Just (ns foo)?

14:48 justin_smith: Pupeno: ns creates an ns

14:48 (and also initializes)

14:49 also if you are stuck in an uninitialized namespace created by in-ns, you can fix it with (clojure.core/refer-clojure)

14:51 Pupeno: lodin_: I don't think I can just use ns in my case: https://github.com/luminus-framework/conman/blob/master/src/conman/core.clj#L12-L24

14:52 justin_smith: good to know.

14:52 justin_smith: Pupeno: if you can't use ns, you can invoke clojure.core/refer-clojure in the new ns. But creating namespaces inside runtime code is suspicious to me

14:52 Pupeno: It seems when I return to the original namespace I lose the original requires and I have to do them again.

14:53 justin_smith: Pupeno: also, the create-ns call is redundant, in-ns already does that

14:54 Pupeno: is it a question of losing the require, or just a question of the clojure compiler throwing an error when compiling code that will use a function not-yet-required as of compile time? I think the latter is much more likely.

14:56 mungojelly: i just need to read a bunch of code to soak up idioms. any suggestions what i should read?

14:57 justin_smith: mungojelly: flatland/useful is a good lib

15:00 Pupeno: I'm having both problems now.

15:09 mungojelly: what is this character soup? (defn compare-bytes [^"[B" a ^"[B" b]

15:10 justin_smith: mungojelly: ^"[B" is a type hint for an java array of bytes

15:10 so it's saying "two args, a and b, and both are byte-arrays"

15:10 I think ^bytes would work there

15:11 (but maybe the author did not know that, or that annotation was not available when the code was written)

15:11 mungojelly: if i can't figure out what it means i'll just stew it up with carrots and tildes for lunch. oh ok thanks i guess! wait what? what is ^"[B]" is that a weird word or ^ + ""

15:11 justin_smith: mungojelly: ^ means add metadata

15:11 it often is used to indicate a type

15:11 "[B" means "byte-array"

15:11 mungojelly: i've gotten a vague sense everything has metadata somewhere which seems awesome

15:12 justin_smith: so ^"[B" means "add a metadata indicating that this thing is a byte array"

15:13 rhg135: Most things do

15:13 mungojelly: every {} has metadata :o and it doesn't affect the value for comparisons :o omg

15:14 justin_smith: mungojelly: any native clojure data type (and additionally, any other type that has the clojure.lang.IMeta interface implemented properly) can carry metadata

15:14 mungojelly: in practice that means, functions, vars, vectors, maps, hash-maps all carry metadata

15:15 mungojelly: that's fantastic

15:15 justin_smith: but not eg. numbers, strings, arrays

15:16 lodin_: or classes/types.

15:17 rhg135: Keywords don't ofc, since they couldn't be identical with differing metadata iirc

15:17 gfredericks: metadata is 95% about either communicating with the compiler or stashing away info about vars for fancy metaprogramming purposes

15:18 rhg135: yep

15:18 rhg135: But symbols do

15:18 justin_smith: ,^:OK 'OK

15:18 clojurebot: OK

15:18 gfredericks: ,(meta ^:OK 'OK)

15:18 clojurebot: nil

15:18 mungojelly: because otherwise you'd have to say all over the place, do these two annotated thingies have the same underlying base, and you'd have to tear them apart all the time to compare their fronts

15:18 justin_smith: that one is wrong because of the quote form, yeah

15:19 gfredericks: ,(meta '^:OK OK)

15:19 clojurebot: {:OK true}

15:19 justin_smith: (inc gfredericks)

15:19 that's the trick

15:20 ,(= '^:OK OK '^:this-works OK)

15:20 clojurebot: true

15:31 borkdude: I am using wrap-reload so I can interactively develop a ring application. But I am losing my session (in memory) also. Any way around that?

15:32 justin_smith: borkdude: use a defonce to define your session store?

15:32 borkdude: justin_smith I'm using the default session store from ring

15:32 justin_smith: you can provide a store as an optional arg to the middleware

15:32 it's just an atom

15:32 use defonce

15:32 borkdude: justin_smith cool, thanks

15:32 I love "just atoms"

15:32 justin_smith: :)

15:34 borkdude: https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/session.clj#L16 this is the optional arg

15:34 borkdude: thanks

15:34 justin_smith: with the source of memory-store showing what I meant https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/session/memory.clj#L20

15:39 borkdude: justin_smith works like a charm

15:40 justin_smith: awesome

15:49 wasamasa: what kind of data type is a clojure vector exactly?

15:49 justin_smith: ,(type [])

15:49 wasamasa: is it a growable array that does extend itself once it's needed or more than that?

15:49 clojurebot: clojure.lang.PersistentVector

15:50 justin_smith: wasamasa: persistent hashed trie - check out hyPiRion 's blog series on the implementation!

15:50 wasamasa: http://hypirion.com/musings/understanding-persistent-vector-pt-1

15:50 wasamasa: justin_smith: thanks!

15:52 justin_smith: wasamasa: I got the type wrong - not hashed (d'oh), but the hyPiRion article explains it well

15:53 wasamasa: "A more formal name for Clojure's persistent vector structure is persistent bit-partitioned vector trie"

15:53 justin_smith: there we go

15:54 mungojelly: both "tree" and "try" are other words it should be some other vowel

15:55 * justin_smith goes and invents some datastructures so he can call them the truy and the troy

15:55 justin_smith: just so talking about these things outloud will be as confusing as possible

15:56 mungojelly: truys and troys should be something that's applicable to either trees or tries so you can talk about the distinctions between truy tries vs troy trees

15:57 justin_smith: oh yes, good idea

17:12 xeno: hi, in intellij/cursive, when I run the application, the println's don't appear in the window

17:12 what's da problem?

17:14 cfleming: xeno: How are you running the app?

17:16 xeno: ctrl-shift-f10

17:16 shift-f10 is enough btw

17:16 but same result

17:17 it's the same as Run=>Run

17:17 hmm...

17:17 I'll add a sleep to the main method and see if it has effect

17:18 cfleming: Right, Cursive will execute your file like a script, it won't automatically invoke main

17:21 xeno: ok

17:23 gfredericks: help I'm about to reinvent finger trees

17:24 amalloy: gfredericks: you have so much to live for

17:25 gfredericks: I'm trying to use the actual finger trees but somehow it and clojure disagree about whether a certain deftype ought to be nthable

17:26 lodin_: I love the Wikipedia entry on Finger tree. The See also section just says "* Monoid".

17:26 * gfredericks sighs and opens up RT.java

17:27 gfredericks: I guess the problem is that clojure can't tell the deftype implements Sequential

17:27 which is exciting

17:29 this line appears to be ineffective: https://github.com/clojure/data.finger-tree/blob/master/src/main/clojure/clojure/data/finger_tree.clj#L319

17:31 re-evaling the finger-tree file fixed it. O_O

17:31 I bet this is related to dynamically loading the library

18:07 noncom|2: in clojurescript how do i load a resource from the resources/public folder?

18:07 say, a text file

18:17 justin_smith: noncom|2: you'll need to make a request to the server, unless you plan to embed it into the cljs itself

18:20 noncom|2: yeah, just realized that make it a cljs/edn is much simpler! :)

20:35 mathiasx: What are most people using for building up web apps with Postgres on Clojure? Manually building up a library of functions and queries on top of JDBC, or using a library?

20:40 I guess I'm more interested in existing libraries, since I don't know that I have time to really build and test something robust from scratch on just JDBC methods. I am not beholden to things like wanting to build up queries in Clojure, but I'd like some niceties like injection protection. And some sort of support to help with tests would be great, as well

20:40 as some sort of way to do migrations and manage schemas.

20:41 justin_smith: mathiasx: if you paramaterize your query, that will do something to prevent injection. Just be sure you are not using data sourced from the client to build the query string itself

21:04 Trioxin: I learned the syntax last night in like 6 mins lol. that was interesting

21:05 now to memorize the core functions

21:05 TEttinger: map reduce apply filter concat into <-- common

21:06 Trioxin: this whole immutability thing is weird. I've encountered it before of course but never to this extent

21:06 TEttinger: mapcat partition zipmap <-- less common, still useful

21:07 justin_smith: Trioxin: be sure to check out http://conj.io

21:07 Trioxin: k

21:07 TEttinger: ,(partition 2 "hello, world")

21:07 justin_smith: Trioxin: most of the basics are on that page

21:07 clojurebot: ((\h \e) (\l \l) (\o \,) (\space \w) (\o \r) ...)

21:07 Trioxin: learning of macro and reader data

21:08 TEttinger: ,(take-nth 2 "hello, world")

21:08 clojurebot: (\h \l \o \space \o ...)

21:08 Trioxin: macros

21:09 justin_smith: ~macros

21:09 clojurebot: Barking spiders!

21:10 justin_smith: haha

21:10 Trioxin: when this guy says "Evaluates from the outside in does he also mean right to left?

21:11 justin_smith: Trioxin: it means macros decide how the form is evaluated

21:11 Trioxin: as opposed to functions, where the arguments are evaluated before the function sees them

21:11 dbasch: ,(apply str (map #(char (bit-xor 1 (int %))) "idmmn-!vnsme"))

21:11 Trioxin: (def me (+ 1 2))

21:11 clojurebot: "hello, world"

21:11 TEttinger: for functions, that's left to right

21:12 justin_smith: for macros it's "whatever order the macro decides, including not at all, or four times in a row"

21:13 Trioxin: in this simple case I just posted am I creating a function or a variable? or both?

21:13 it's a variable right

21:13 justin_smith: Trioxin: a variable

21:13 Trioxin: k

21:13 justin_smith: or, to be more specific, you are adding a var to the namespace

21:14 Trioxin: right

21:14 TEttinger: right, Trioxin, for (def me (+ 1 2)), if def was a function it would try to evaluate "me" as soon as it saw it. def is a special form I think, but you can think of it like a macro because it doesn't evaluate "me" right away

21:14 justin_smith: ,(defmacro do3 [& body] (list 'do body body body))

21:14 clojurebot: #'sandbox/do3

21:15 justin_smith: ,(do3 (println "hello"))

21:15 clojurebot: hello\n#error {\n :cause nil\n :via\n [{:type java.lang.NullPointerException\n :message nil\n :at [sandbox$eval127 invokeStatic "NO_SOURCE_FILE" 0]}]\n :trace\n [[sandbox$eval127 invokeStatic "NO_SOURCE_FILE" 0]\n [sandbox$eval127 invoke "NO_SOURCE_FILE" -1]\n [clojure.lang.Compiler eval "Compiler.java" 6943]\n [clojure.lang.Compiler eval "Compiler.java" 6932]\n [clojure.lang.Compiler eval...

21:15 justin_smith: hmm

21:15 Trioxin: oh right there's fn

21:15 duh

21:16 justin_smith: ,(defmacro do3 [& body] (list 'do (cons 'do body) (cons 'do body) (cons 'do body)))

21:16 clojurebot: #'sandbox/do3

21:16 justin_smith: ,(do3 (println "hello"))

21:16 clojurebot: hello\nhello\nhello\n

21:16 justin_smith: that evaluates the println 3 times

21:16 TEttinger: now with syntax-quote!

21:16 justin_smith: with a function, the argument would just show up as nil, it could not control the evaluation

21:16 Trioxin: and I'd call those iterations...

21:16 justin_smith: TEttinger: that's 201 level stuff

21:16 clojurebot: I don't understand.

21:16 TEttinger: it just makes that line simpler

21:17 brave clojure has a good intro to macros that include syntax-quote

21:17 justin_smith: Trioxin: iterations? no function or data source was passed in. I'm just demonstrating that a macro has full power to how its args are used (including multiple evaluation, or not evaluating them at all)

21:17 Trioxin: ok

21:18 alright must get back to tutorials before being told more things

21:18 justin_smith: TEttinger: I have my own agenda with this stuff, which includes making it clear that all macros have to do is construct a form, and syntax-quote being a convenient way to construct forms, but not an aspect of defmacro

21:19 TEttinger: k

21:21 Trioxin: man this is so different. I'm getting the same feeling I got when I first started learning procedural programming some 17 years ago

21:22 and oop which wasn't bad. but I do get the feeling I will have new magic spells

21:23 lodin_: Trioxin: I would really recommend ignoring macros until you can write just about any program you like without using them.

21:24 Trioxin: i think this guy is just explaining how the code is interpreted

21:24 justin_smith: *compiled

21:24 Trioxin: right

21:25 i meant that in an abstract way

21:25 justin_smith: as in, evaluated maybe?

21:25 Trioxin: yeah lol

21:25 lodin_: Trioxin: Just treat any macros like a special keyword in another language. For all practical purposes when learning Clojure, existing macros = keywords.

21:25 justin_smith: if clojure were interpreted instead of compiled we could do some cool things with macros we can't actually do

21:26 well, not without using eval at least

21:26 Trioxin: isn't that part of what were talking about last night with the difference between clojure and CL?

21:27 justin_smith: CL is usually compiled too (but that can vary with implementations)

21:27 Trioxin: you have to use an eval function to execute data as code?

21:28 just about every language has an eval

21:28 i thought lisp was special in its ability to treat data as code and vise versa

21:28 justin_smith: Trioxin: sure, the E in rEpl stands for eval, it runs eval on everything you type in

21:29 Trioxin: it's more that our code has a higher level representation - I mean every language can treat a string / array of bytes as code

21:29 but the extra power with lisp is being able to use lists as code

21:30 lodin_: Trioxin: The point about data and code is that the AST in Clojure is defined with Clojure data structures.

21:30 justin_smith: because you can do cool things with list transforms (and that is what macros are for) but really most of the really good macros are there already, don't expect to make new macros very often (at least not really useful ones)

21:33 lodin_: Trioxin: And the AST being Clojure data means that all Clojure functions can operate on it, so that makes macros easier to write.

21:33 Trioxin: well let's say I wanted to create some kind of code optimization program using this functionality with some fitness function. I was thinking of doing cool things like defining some code/functions and then running searches on that code space

21:34 justin_smith: yeah, in that case you'll probably be using eval rather than macros I'd think

21:34 macros are for things humans make

21:35 Trioxin: this is something the twitter bot @tweegeemee does (where the fitness function is twitter likes and retweets of the images the code generates)

21:35 it has various methods for manipulating the image creating code (splicing in parts of other successful image code, randomly mutating parts of the syntax tree)

21:36 Trioxin: i remember ray kursweil or however you spell him saying he could write a superintelligence in 50 lines of lisp. of course the computational power to search an entire programming space would be out of the question but I was thinking of doing something similar with predefined functions (Not creating a superintelligence but experimenting with what I could get to come out)

21:40 nvm all that I just want to learn all this first. I'm just a bit paranoid as someone last night told me that if I learn clojure and then decide I want to use CL it will be easy to do so but that I'd be more likely to write bad CL

21:43 lodin_: Trioxin: Why do you want to learn Clojure, btw?

21:47 Trioxin: lodin_ to enhance my abilities as a coder, write more efficient code, learn a new paradigm (Mostly pure functional which I've never done). I also write a lot of ML code and have read that a lot of people do so in Lisp. Then there's the fact that you can use all that is java in Clojure and there's also Clojurescript and I write most my mobile and GUI code in HTML5 for nw.js and cordova.

21:49 I was also impressed by the comparisons to Java and Clojure by the creator of Clojure

21:49 contrasts rather

21:49 lodin_: Trioxin: When you said "write a lot of ML code" I thought you meant ML the programming language and I was like "what?". :-)

21:50 Trioxin: sorry, machine learning. deep learning, etc.

21:50 lodin_: Yes, I realized.

21:51 Trioxin: Good reasons. Why do you also consider CL?

21:51 (I don't know CL, btw.)

21:53 Trioxin: lodin, mostly because I hear people argue about the non-existence of custom reader macros in Clojure

21:53 lodin_: Trioxin: And these people are CL people, I presume? :-)

21:53 Trioxin: no, usually people trying to decide which Lisp to go with

21:54 http://stackoverflow.com/questions/5746801/what-advantage-does-common-lisp-reader-macros-have-that-clojure-does-not-have

21:55 that's not my thread btw

21:57 i mean reading through that whole thread you do get a sense of it being useful

21:57 the last answer for instance

21:58 lodin_: It's a feature, so it can be useful. And I think that reader conditionals proved that for clj/cljs libraries.

22:00 Trioxin: too bad dotlisp is no longer maintained

22:00 I know C#

22:01 lodin_: I don't think I would choose a language based off it though. Or rather, I'm sure.

22:02 Trioxin: based off the whole reader macro thing?

22:02 lodin_: Yeah. Perl has source filters which is akin to reader macros but a nightmare to implement properly (because you need to parse Perl!). Don't see people use that feature as an argument for Perl. Ever. ;-)

22:03 Trioxin: right but in ML the tendency is to attempt to push boundaries

22:04 i do that in any language really

22:04 justin_smith: they are doing reader-macro like things in boot - for example a syntax for multi line strings

22:06 Trioxin: no multi line strings in Lisp?

22:06 justin_smith: not in the specific style they are doing (that is, with leading whitespace trimmed so your indentation looks nice)

22:07 Trioxin: yeah that's what I meant

22:07 justin_smith: yeah - that doesn't exist in clojure itself, but you can get it via a boot module

22:08 Trioxin: what was clojure coded in?

22:08 justin_smith: a mix of java and clojure

22:08 Trioxin: o

22:08 lodin_: Something I do miss is alternative string syntax, actually.

22:09 Like Python's """ or Perl's qq operator.

22:09 justin_smith: lodin_: you might just have a reason to try boot now :)

22:10 Trioxin: python will come after clojure for me since it's so popular in acedamia, prototyping

22:10 lodin_: Mostly it's for docstrings, really. Having to quote your strings in code examples in docstrings is really not pretty.

22:11 Trioxin: another reason for me wanting to learn Clojure is that I've used Java before on a pretty big project and from the videos it looks like I could have saved myself a lot of time

22:12 my c# is fun but i don't like dealing in mono and you kind of have to

22:14 i like reusable code as in my html5 development and for that there's clojurescript

22:15 and I'm sure Clojure can do heavy lifting for clojurescript on the backend

22:16 so I imagine having node-webkit, using clojurescript in my apps, then using Clojure for any system level heavy lifting or to expose more native API functionality

22:17 lodin_: justin_smith: I've been glancing at boot before. It's just too convenient to default to leiningen. Like when I wanted to try devcards. Leiningen template, of course.

22:18 Trioxin: that's another thing I wanted to ask. When I started out last night in IDEA you guys had me start with a leiningen project. Is there a difference between doing that and starting with a traditional clojure project?

22:18 any downside?

22:18 justin_smith: Trioxin: clojure is a java library

22:19 Trioxin: leiningen is a dependency and project management tool

22:19 cfleming: Not sure if this came through, I was disconnected: Once someone has done something like (alter-var-root #'my-var memoize), there's no way to access the original unmemoized function, right?

22:19 Trioxin: oh ok. so it doesn't matter it's the same code

22:19 justin_smith: a "traditional clojure project" is any java project that uses the clojure library to evaluate .clj files

22:20 cfleming: not unless you hold your own copy of the original I guess

22:20 cfleming: justin_smith: That's what I thought. Sadly I can't do that - this is in the lein code, and they use defn and then immediately memoize it

22:20 Damn

22:20 justin_smith: Trioxin: right, the difference with using leiningen vs. boot vs. maven vs. doing everything yourself by hand is a difference of convenience and tooling, it's still clojure

22:21 cfleming: Looks like it's cut and paste for me

22:21 justin_smith: ouch!

22:21 Trioxin: ok

22:23 justin_smith: cfleming: I still find it funny that alter-var-root doesn't have like three exclamation points at the end of the name

22:23 Trioxin: oic just by reading the github

22:23 http://screencast.com/t/WgxTdq2yl

22:24 justin_smith: yup, leiningen is very well documented

22:24 Trioxin: the leiningen wiki, and the example project.clj, are also very informative

22:25 Trioxin: well I'm up and running with it in IDEA and it seems simple

22:25 justin_smith: yeah, it's a well integrated tool

22:26 cfleming: justin_smith: Yeah, that would be great. Those who say that Haskell's type system can't help should look at lein's use of memoization.

22:26 Trioxin: what about the "Fetching dependencies for your project" aspect. Is there a package manager like npm where I can install libs to my project?

22:26 justin_smith: alter-var-root!!!-no-really-I-want-to-do-this!!!!

22:26 cfleming: In this case, it's a function which only exists to print a message, which is memoized so the message is only printed once.

22:27 justin_smith: Trioxin: lein figures out what deps your project needs, and caches them in a local directory (~/.m2/)

22:27 lodin_: Haha. Great use for memoization!

22:27 justin_smith: Trioxin: when it starts up, it tells your vm where all the libs it needs are

22:27 cfleming: lodin_: For some definition of "great", yes :)

22:28 Trioxin: oic it even makes reference to npm

22:28 justin_smith: Trioxin: we call it a cache because it's not quite an install, we know where to get exactly the same artifact again later if you need to clear the cache eg. for disk space reasons, and always gets it automatically if it is needed and not present

22:29 cfleming: I've used delay for that, using memoization for at-most-once behavior feels hacky

22:30 cfleming: justin_smith: No doubt.

22:31 justin_smith: I mean delay has exactly the semantics we want here - by default it doesn't run, if forced once the code is run, if forced again it just uses the same return value as the first time without running the code

22:32 lodin_: I guess it wouldn't help cfleming though, since a delay would also hide away the code.

22:32 justin_smith: lodin_: fair point

22:34 lodin_: that's a question of reusability I guess, while I am talking about the separate issue of parsimony (I prefer the solution that does the least irrelevant stuff if possible, and delay is as easy to use as memoize (if not easier))

22:35 Trioxin: justin_smith, I seem to be missing something in IDEA, the command prompt where I would normally run npm (Im this case leiningen) commands

22:35 In*

22:35 lodin_: justin_smith: I'm just happy memoize is being used. ;-) I figured it was getting lonely, only getting mentioned in blogs about how easy it is to do memoization in Clojure.

22:35 justin_smith: Trioxin: sadly lein doesn't have an interactive console mode any more (it once did but it was taken out with 2.0)

22:36 lodin_: haha

22:36 lodin_: Anyway, I'm off.

22:36 Trioxin: so what I use my system's CLI from the project dir?

22:36 powershell

22:36 justin_smith: lodin_: nothing stops you from wrapping all your non-returning statements in memoize

22:36 ,(memoize nil)

22:36 clojurebot: #object[clojure.core$memoize$fn__5467 0x1bb0c7f6 "clojure.core$memoize$fn__5467@1bb0c7f6"]

22:37 justin_smith: Trioxin: I think cursive might have a menu for common lein tasks (like compile, check, test, jar, uberjar, run, deploy)

22:39 Trioxin: justin_smith, nothing to do with the REPL window right?

22:40 justin_smith: no

22:40 cfleming: Code cut and pasted, now I just need a shower

22:40 justin_smith: haha

22:41 cfleming: Trioxin: You can open a command line prompt via View->Tool Windows->Terminal

22:41 talios: 'lo cfleming

22:41 cfleming: Hey talios

22:42 gganley: hail talos

22:42 Trioxin: oh right, my brain didn't notice it as I was just in there

22:42 cfleming: Trioxin: If you want to run lein commands from within IntelliJ then View->Tool Windows->Leiningen will show some common commands under the project

22:42 But the command line is generally easier if you have everything installed and working

22:42 mcktrtl: What's the standard way to map over a hash-map? The equivalent in python would be to use a list comprehension with .items().

22:43 justin_smith: mcktrtl: do you want the results, or is this just for side-effects?

22:43 Trioxin: cfleming, the command is "leiningen" right? in that case I don't think I have the env var setup or something

22:43 justin_smith: mcktrtl: all the standard clojure collection ops work on hash-maps (filter, map, reduce, doseq, for, ...)

22:43 mcktrtl: no side effects. Specifically, I used clojure.set/index to index a hash map, and now I want to project a specific field based on that index

22:44 cfleming: Trioxin: 'lein' is what you want, i.e. you need "lein version" to show you something

22:44 Trioxin: no it's not setup. must locate and add path

22:44 justin_smith: mcktrtl: sounds like you might want reduce-kv

22:44 (doc reduce-kv)

22:44 clojurebot: "([f init coll]); Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, where the keys will be the ordinals."

22:45 justin_smith: mcktrtl: that lets you pass a new hash-map along as an accumultor, and do a new transform on that accumulator for each k/v pair in the input

22:45 mcktrtl: that indeed is exactly what I needed, thanks :)

22:45 Trioxin: cfleming, i also ready that if I add a dependency and refresh the project from the lein window or whatever it will then add it from a repo I think? So it will fetch any dep I define for the project or no?

22:45 justin_smith: mcktrtl: just be aware you need to return the next version of the hash-map at every iteration of the function

22:45 cfleming: Trioxin: yes, that's right.

22:46 mcktrtl: right... thanks again, i'm failing at google foo hard today

22:46 cfleming: Trioxin: So you add it to your project.clj, hit refresh, and it will be downloaded and added

22:46 Trioxin: i'd rather use the CLI though. if I use the CLI will it add the dep to my project file?

22:46 justin_smith: mcktrtl: also check out http://conj.io for a great overview of the clojure core stuff

22:46 Trioxin: in that case I need to add lein's location to path

22:47 wherever that is

22:47 cfleming: Trioxin: No, you generally have to add the dep to your project file, although I'll shortly be adding a command to add a dep to the project file and refresh automatically.

22:47 Trioxin: ok. yeah that would be nice.

22:49 * Trioxin searches C: for "lein"

22:50 justin_smith: Trioxin: on your platform it might be named "lein.bat"

22:53 TEttinger: check out this awesome article http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/

22:53 TEttinger: for example, TIL there is an "astral plane" in unicode

22:53 TEttinger: ha

22:54 justin_smith: now I am convinced that the unicode consortium must have been a D&D group in their off hours

22:55 "everything is uniquely terrible; welcome to computers"

22:56 Trioxin: justin_smith, here are all the results. that folder is empty http://screencast.com/t/oUP5GSPhSCc

22:57 justin, should I create a .bat file that calls one of those jars?

22:58 justin_smith: Trioxin: the default is that lein.bat would invoke one of those jars. And cursive must already be doing the equivalent.

22:58 Trioxin: justin_smith, well there is no such .bat file on my computer

22:58 justin_smith: Trioxin: there's a lein.bat you can download that will use those jars (or install them itself in its own cache)

22:58 Trioxin: but I haven't had any problems with REPL

22:58 justin_smith: interesting, I assumed cursive would use lein.bat, but maybe it is using the jars directly

23:00 Trioxin: must find this bat file in github I guess

23:01 justin_smith: Trioxin: http://leiningen.org

23:01 or from github, yeah

23:02 Trioxin: https://github.com/technomancy/leiningen/search?utf8=%E2%9C%93&q=lein.bat

23:02 i mean I already have lein. I wouldn't want to break IDEA

23:02 justin_smith: yup, here's the raw file https://raw.githubusercontent.com/technomancy/leiningen/35aef5832bec8b8daed20400b6acf9fc9fb0a7a0/bin/lein.bat

23:02 Trioxin: it wouldn't break idea

23:02 and it's good to make sure you can use it from the terminal

23:03 Trioxin: or cursive. so I should put it in the same dir as. well see in that pic. there's lein in the temp dir so I'm assuming put it with the .jar in the .idea plugins dir?

23:03 not in temp of course

23:04 justin_smith: Trioxin: it doesn't matter where lein.bat is, as long as it's on your executable path

23:04 Trioxin: it will self-install the jars it needs into ~/.lein/

23:04 Trioxin: k, I guess I'll just put it in C:\Users\root\.IntelliJIdea14\config\plugins\clojure-plugin\lib

23:05 cfleming: justin_smith: Trioxin: Yes, Cursive uses the jars directly.

23:05 justin_smith: cfleming: that would explain it then! so yeah, good to have lein.bat too

23:05 TEttinger: justin_smith:

23:05 ,(reduce - [3 2 1])

23:05 clojurebot: 0

23:06 cfleming: Clearly I need a lein console in IntelliJ so people can enter lein commands directly

23:06 justin_smith: LOL that's great

23:06 Trioxin: then i'll add that dir to path

23:06 TEttinger: ,"\u1680"

23:06 clojurebot: " "

23:06 justin_smith: cfleming: I miss lein interactive (which can't exist with lein 2 for reasons I guess?)

23:07 Trioxin: will I be calling the .bat each time or some lein file it grabs?

23:07 cfleming: justin_smith: I have no idea. I'm actually developing a deep hatred of lein after embedding it.

23:07 justin_smith: Trioxin: you call the .bat, and it does the rest for you

23:07 Trioxin: ok thx

23:07 justin_smith: clojurebot: :( maybe boot?

23:07 clojurebot: I don't understand.

23:07 justin_smith: err

23:07 cfleming: I mean, it's great but it's definitely painful to embed.

23:08 justin_smith: yeah, I think that how friendly lein is to contributors and added features is probably a double edged thing

23:16 Trioxin: cfleming | justin_smith, http://screencast.com/t/5kbymHPL

23:16 C:\Users\root\.IntelliJIdea14\config\plugins\clojure-plugin\lib\ is in PATH

23:17 the bat is in the same dir

23:17 cfleming: Trioxin: You only need lein.bat on your path

23:17 Trioxin: right but as you can see I ran the ban

23:17 bat

23:17 cfleming: If you run lein self-install, it should then download the latest version and put it in ~/.lein/self-installs

23:18 Trioxin: ok it won't junk up the lib dir?

23:18 cfleming: Nope

23:18 In fact you don't need that jar file in there, lein will never use it.

23:18 justin_smith: Trioxin: as the tool mentions (and cfleming), you should run "lein self-install"

23:19 cfleming: I'm surprised it doesn't do that itself to be honest, I thought it did

23:19 justin_smith: weird that the self-install command is not automatic with lein.bat (with the *nix version it is assumed)

23:19 yeah

23:19 Trioxin: problem: http://screencast.com/t/RMOkk3Er0Dy

23:20 justin_smith: hmm

23:20 that's a bug in lein.bat, maybe it isn't compatible with your system or the specific shell you are using?

23:20 #leiningen might be more helpful at this point

23:20 Trioxin: im on 8.1 in powershell. i could go to cmd

23:21 justin_smith: yeah, see if cmd is any better

23:21 Trioxin: same

23:22 justin_smith: yeah, I'd check the lein bug tracker for similar errors and ask on #leiningen at this point

23:22 Trioxin: line 145 of the bat

23:23 oh wait maybe I need to install wget

23:24 it should work in powershell though from what I can see in this script

23:24 justin_smith: https://i.imgur.com/nsf6vy7.png

23:27 Trioxin: https://github.com/technomancy/leiningen/releases/download

23:27 shouldn't that have a dir listing?

23:28 set LEIN_JAR_URL=https://github.com/technomancy/leiningen/releases/download/%LEIN_VERSION%/leiningen-%LEIN_VERSION%-standalone.zip

23:28 that's from the bat

23:28 cfleming: FWIW I'm now totally convinced I need a lein interactive type thing in Cursive

23:28 justin_smith: sometimes directory listings are not allowed, sometimes there isn't a true directory to list and things are actually being generated on the fly

23:29 cfleming: justin_smith: How did that work? Just a console where you typed lein commands but without the leading "lein"?

23:29 Trioxin: I'm going to mod the .bat to echo the url

23:29 justin_smith: cfleming: right, it shouldn't be hard to find in the 1.x source - it was ditched because of bugs caused by lein code that expects to run once and die

23:30 cfleming: which to me sounds a lot like "it was easier to remove this feature than fix N bugs that break that feature"

23:30 cfleming: justin_smith: Interesting. I can solve that now with ShimDandy, which is what I'm moving my lein integration to anyway.

23:30 justin_smith: oh, very cool!

23:34 cfleming: justin_smith: Looks like that was actually a plugin: https://github.com/ujihisa/lein-interactive

23:36 justin_smith: aha

23:37 Trioxin: the bat file doesn't work because the file it's trying to download doesn't exist. I printed it to the console: https://github.com/technomancy/leiningen/releases/download/2.5.3-SNAPSHOT/leiningen-2.5.3-SNAPSHOT-standalone.zip

23:38 TEttinger: that's what it tries to download?

23:38 Trioxin: yeah

23:39 TEttinger: ah!

23:39 you didn't get the bat from the stable branch

23:39 https://github.com/technomancy/leiningen#installation

23:39 Trioxin: uh oh

23:39 justin_smith: (inc TEttinger)

23:39 TEttinger: (dec lazybot)

23:39 justin_smith: Trioxin: just use the stable version, it should work just fine

23:40 TEttinger: it's not even... that old. latest update was last month

23:40 cfleming: lazybot has been out of action for a while I think, I just tried to look at the logs and they're 5 days out of date

23:40 4 days, sorry lazybot, I slander you

23:41 Trioxin: ill just use the installer

23:44 do you guys use the 64bit jdk mostly or 32?

23:45 TEttinger: I haven't found much difference for desktop usage. 64-bit probably only matters when you need one process to use more than... what is it, 4 GB RAM?

23:45 justin_smith: Trioxin: there's not much reason to use a 32 big jdk I don't think

23:46 TEttinger: 64 bit will be a faster for a bunch of stuff (especially considering clj uses doubles and longs by default)

23:46 Trioxin: i installed jdk1.8.0_60 and now it shows me in IDEA 2 versions of jdk1.8.0_45 in the list to choose from

23:46 TEttinger: there's better floating point arithmetic behavior with 64-bit than 32-bit, can't think of any other differences. oh yeah, longs are the hardware word size on 64, yeah use 64

23:46 idea comes with its own jdk as well

23:46 justin_smith: TEttinger: right, floats are doubles by default in clj, and doubles are faster with a 64 bit process

23:46 Trioxin: oh so it's not even listing jdk1.8.0_45

23:46 TEttinger: ask cfleming, he's the intellijent one here :)

23:47 Trioxin: because I have both SDKs in my program files dir

23:47 i mean not listing _60

23:47 TEttinger: it could be in program files (x86)

23:48 which would mean that's a 32-bit _60 jdk

23:48 not sure how this all works on windos 8 and newer

23:48 Trioxin: no it's in program files it's the x64

23:48 cfleming: TEttinger: Idea comes with its own JDK, but you can't use it for running application code

23:48 AFAIK

23:49 Trioxin: i was just using the one it comes with for REPL

23:49 I'm restarting IDEA though and going to try to add the newest 64bit jdk though

23:50 TEttinger: might need to restart windows if it's a PATH mixup gone bad

23:52 Trioxin: that worked

23:52 now to get lein using the same

23:53 oops, did the stupid uppercase project name thing again

Logging service provided by n01se.net