#clojure log - May 12 2012

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

0:01 TimMc: _KY_: Emacs or vim. Do it.

0:01 Although apparently Eclipse support is getting pretty good?

0:01 _KY_: I need to do some GUI stuff...

0:02 echo-area: amalloy: I think there is a difference between `sieve' and what I pasted, though they all use lazy sequences. While without `doall', `sieve' recurs (perhaps very heavy) layered lazy sequences, what I post is only one-layer lazy sequence, recuring itself but not to another layer of lazy sequence.

0:03 amalloy: no, you (swap! inputs read-inputs), which is setting inputs to (keep f read-inputs)

0:05 Raynes: _KY_: What have you tried that you found 'unusable'?

0:06 _KY_: IntelliJ won't let you resize panels...

0:06 Enclojure won't let me run hello world

0:06 Raynes: You made two wrong choices. If you need a big fat button-laden IDE, Eclipse is your best bet.

0:07 Given recent developments in counterclockwise, I'd feel good saying that Eclipse makes a fine development environment for Clojure.

0:08 PeregrinePDX: I keep having issues with Eclipse but I haven't bothered to look enough to know it's not me

0:08 Raynes: Post issues to the issue tracker and/or ping lpetit, as he is often in here.

0:09 I'm pretty sure Enclojure is pretty much dead, but they seem to keep a lovely site up just to mislead new Clojurians or something.

0:10 echo-area: amalloy: http://pastebin.com/t8b3H4s9 <-- Okay atom removed, but stack overflow still there.

0:10 amalloy: you're still calling (keep (keep (keep ...)))

0:10 because sq is the result of a (keep) call, and you're calling (keep sq)

0:11 echo-area: Hmm, let me see..

0:34 Before passing the last line, all lines of the input file is consumed and the corresponding items in `sq' are already realized. This part should not occupy stack frames. Problem arises at the last time realizing the lazy seq returned by `read-inputs', in this iteration `read-line-or-nil' returns nil, making `read-inputs' realize the rest of inputs, which is an empty sequence. What I can't explain is why this depends on the number of

0:34 lines of the first file.

0:49 antares_: travis-ci.org now runs leiningen2 preview 4. Give it a try.

0:55 ivan: _KY_: which panels can't you resize in IntelliJ?

1:01 technomancy: enclojure has a really good icon

2:20 gaffo: So I've got a list of maps and I just want to get a list of the values for one key, say [{:k "v1"} {:k "v2"}], and I want ["v1" "v2"]. Any help would be appreciated

2:20 amalloy: (map :k ms)

2:21 gaffo: really? that seems backwards

2:22 since it's normally ({:k "v"} :k) => "v"

2:22 amalloy: nope. :k is a function that takes a map and returns its value for the :k key

2:22 what you pasted just now is acceptable, but not really "normal"

2:23 gaffo: so normally I should write (:k map-var) when I want key from map map-var?

2:23 if I'm writing proper form?

2:24 amalloy: that's more normal. the guideline is to write (:k m) if you're getting a key from a "struct" or "object" sort of map, ie one with fixed/known keys, and (m k) or (get m k) if you're getting from a "real" map that could have any number of keys

2:25 gaffo: huh

2:25 any reason for that?

2:25 to treat maps and struct maps different?

2:26 amalloy: http://stackoverflow.com/questions/7034803/idiomatic-clojure-map-lookup-by-keyword

2:27 gaffo: amalloy, thanks

2:30 so if (k m) is faster on struct maps, why not use it on normal maps as well? I see that it's from the library coding standards. Any other reason?

2:31 amalloy: note i'm not talking about actual struct-map objects, here. just maps that you "treat" like structs

2:32 if ti's a collection where you don't know what the keys are ahead of time, then you usually can't call (k m), because the key doesn't implement ILookup

2:32 &(let [k "test", m {"test" 5, "data" 10"}] (k m)) ;; eg, this doesn't work

2:32 lazybot: java.lang.RuntimeException: EOF while reading string

2:33 amalloy: &(let [k "test", m {"test" 5, "data" 10}] (k m)) ;; eg, this doesn't work

2:33 lazybot: java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn

2:33 gaffo: aah

2:33 but if I'm using :'s for everything that doesn't matter?

2:33 amalloy: mmmm

2:33 gaffo: (not sure what the term for those is, in ruby, symbols)

2:34 amalloy: if you're using keywords for everything, it's pretty likely that your map is conceptually a struct

2:34 clojure keywords are basically ruby symbols

2:34 gaffo: keywords, thanks

2:34 terminology gets confused when you hit language 4 or 5

2:35 amalloy: clojure has symbols too, but they're not quite the same thing

2:35 gaffo: I read that maps with less than around 10 keys are basically struct maps in implementation

2:35 amalloy: well, they're basically arrays

2:36 gaffo: aah, so N < 10 is pretty fast to just walk it and find the right item?

2:36 amalloy: yes, faster than hashing and looking up in buckets, etc

2:36 gaffo: kk, makes sense.

2:36 yeah, currently I'm extracting some stuff from json into 4 item hashes

2:37 with keywords as keys

2:37 this makes a lot more sense now

2:38 amalloy: great

2:38 now go write a blog post about it, and then you'll really understand it

2:38 gaffo: or just be dead wrong. can I blame you for all errors :)

2:39 "all errors are me not undestanding amalloy correctly"

2:39 amalloy: *nod*

2:40 gaffo: sweet

3:18 rbxbx: To bed with me, g'night #clojure.

3:18 Raynes: Thanks for the announcement, sir.

3:19 Goodnight to you as well, my excitable friend.

3:20 rbxbx: Quite easy to obtain friendship and excitability around here, apparently ;)

3:20 Cheers Raynes, good night.

4:19 kral: namaste

5:40 bobry: uh, this is confusing -- there's lein-cljsbuild, lein-cljs and lein-clojurescript

5:40 which one should I use?

7:31 hyPiRion: Question: Will (= (zipmap (keys m) (vals m)) m) for all maps?

7:50 raek: hyPiRion: yes.

7:50 keys and vals are guaranteed to use the same order

8:01 mduerksen: in clojure.core.logic i'm currently stating this: (fresh [c s d] (membero [c q s d 'Zebra] z)) - i would rather write this: (membero [_ q _ _ 'Zebra] z), but it doesnt work. is there something like this in core.logic?

8:09 hyPiRion: raek: Thanks.

8:09 I couldn't find anything in the doc saying that maps have to deliver them in the same order.

8:43 ikitat: I've been spinning in circles trying to wrap my brain around a concept rhickey spoke about in two of his recorded "simplicity" talks.

8:44 He talks about data and recommends not building domain objects, but instead choose sets, maps, lists, json, xml, etc.

8:45 Now, I realize that lists, maps, sets are a very natural way of representation in clojure, but how could one apply this same concept when they need to work in a language like Java

8:45 jonaskoelker: ikitat: awkwardly :-P

8:45 ikitat: right?

8:45 clojurebot: flatten |is| rarely the right answer. What if your "base type" is a list

8:46 jonaskoelker: ikitat: yes. Java doesn't seem to have much in the way of handling those simple data structures, and to the extent it does it's hard to remember

8:46 ikitat: the best I can come up with is continue to build the domain objects, but maybe just implement them in terms of map

8:46 jonaskoelker: ikitat: well, you could just pass that map around to the data users

8:47 then have Util.mangleMap, Util.frobMap, Util.twiddleMap, etc.

8:47 rod: ikitat: i think the message to take away is don't *assume* you need to wrap everything up in domain objects. you're going to need to apply the principle on a language to language basis where it makes sense.

8:48 ikitat: well, it was interesting because he referenced not needing to create a new class every time, which seems to imply a Java-like language

8:49 gfredericks: ruby might be a language where it makes sense to say that and is easier to apply

8:49 jonaskoelker: python as well

8:49 ikitat: true, any dynamic language really

8:49 gfredericks: the rubyists like making new classes just for the sake of configging something

8:49 ikitat: so, that still leaves me to wonder if there is anything I can take from that concept and use it in Java

8:50 rod: yeah sure. but i think the point is don't start with the assumption "right lets create a class then munge my problem into it". if an array and a function will do then just use that, ya know?

8:50 jonaskoelker: ikitat: you _could_, though I think it's a lose-lose proposition

8:50 :P

8:50 then again, that would me my anti-java bias

8:51 ikitat: if anything, it sure will be fun to wait around for java to gain an ample amount of expressiveness

8:51 jonaskoelker: =)

8:52 "Oh look, I'm typing boilerplate code again. This must be java"

8:52 gfredericks: isn't that what scala is?

8:52 jonaskoelker: ^^ +1 like

9:02 do you guys have any experience with haskell? If so, what do you make of it?

9:03 = f a b c

9:03 oops, nvm

9:04 cark: haskelll is lovely but it takes a whille to learn it

9:05 i like how the type system is actually helping in creating stuff, rather than just being a "check your program" thing

9:05 ikitat: some, it has a fascinating set of features... my favorite is actually how the type system represents code with side effects

9:06 jonaskoelker: agreed, ikitat; how so, cark?

9:06 ikitat: quickcheck is a very cool idea too

9:06 cark: well

9:07 for instance

9:07 ikitat: and type inference keeps you from longing for a dynamic language to some extent

9:07 cark: data Exp e = Val e | Sum e e

9:08 that single type says a lot

9:08 jonaskoelker: yeah, type inferencing is a near-must in any self-respecting language

9:08 cark: data Exp e = Val e | Sum (Exp e) (Exp e)

9:08 jonaskoelker: scala's is decent, I find---I'm not cluttering my code with type annotations, but get the benefits

9:08 cark: i knew i shouldn't try without a compiler =)

9:09 in a single type declaration you define a recursive type, that will direct your way of thinking at the problem, thats far and beyond mere type checking

9:10 jonaskoelker: yeah, agreed

9:10 cark: and btw i'd love to find a good way to emulate that in clojure, along with typeclasses

9:10 jonaskoelker: aren't typeclasses basically vtables?

9:11 cark: right you can do all sort of things, but to make it so it integrates well with the rest of your clojure code ...that's harder i think

9:11 jonaskoelker: dat be true

9:12 cark: particulary the dinstinction between a type and its constructors, i've been stumped on that

9:12 jonaskoelker: however, for tree-ish types, you can just represent your data as sexps?

9:12 cark: sure or maps

9:12 drguildo: does anyone here use clooj?

9:14 matessim: Light table is going to be HUGEEE for clojure :P

9:15 cark: matessim: depends on how it scales to large projects

9:15 matessim: not only, if clojure had a easy go-to IDE that's shiny

9:16 it would serve as a giant attractor to the clojure community.

9:16 for*

9:16 cark: true, and "easy to install on windows" tooling

9:18 jonaskoelker: emacs not shiny enough? :)

9:19 cark: good enough for me, but not everyone is ready to spend a week learning emacs, and setting it up for clojure

9:20 considering that's only for testing that strange language with all the parens

9:20 drguildo: only a week?

9:21 cark: right i may be understating a bit =)

9:22 jonaskoelker: what---all you do is press escape meta alt control shift, then you're ready to go :D

9:22 cark: haha indeed

9:23 jonaskoelker: fun thing to do: set up your caps lock key to be all those mods at the same time :-)

9:23 then it'd be the emacs key

9:25 cark: to go back to haskell, what i really like about it is all those nice concepts originating there

9:25 monads, arrows and so on

9:26 i'd love to see a good implementation fo arrows in clojure

9:26 with some kind of clojuresque port of the arrow notation

9:27 which looks like non-trivial to me

9:40 jasonjckn: cark: there's an implementation of monads in clojure

9:40 cark: yes =)

9:51 beffbernard: How would you go about validating a sexp against a BNF like grammar?

9:53 cark: use a parser ? one that's abstract enough to take any kind of state instead of just sequences of character

9:54 bobry: is it possible to make cljsbuild report errors in a human readable way? currently all I see is a Java stack trace ending with 'Caused by: java.lang.RuntimeException: Unmatched delimiter: )'

9:55 having a filename and a line number would help :)

9:55 beffbernard: cark: I technically don't need a parser.. It's already in a lisp datastructure.. I just want to validate my sexp is valid against a grammar

9:55 jasonjckn: beffbernard: convert the SEXP to string, then use BNF grammar is used to parse any string

9:56 beffbernard: jasonjckn: antlr?

9:56 jasonjckn: beffbernard: is that a parser? there's plenty to choose from

9:56 beffbernard: if you want a clojure parser I can list a few

9:56 beffbernard: yes, thanks

9:57 cark: beffbernard: validating some kind of state with a grammer is what a parser does

9:57 grammar =/

9:57 parsing is not about strings and characters

9:58 jasonjckn: beffbernard: i've always wanted to use this, I think it would be my favorite one: https://github.com/cgrand/parsley

9:59 beffbernard: i've used this a lot, it matches haskell's parsec api quite closely https://github.com/jasonjckn/clarsec

9:59 beffbernard: but it's not documented, and wouldn't be as fast as parsley, it's a combinator parser

10:00 however, at least you don't get grammar conflicts

10:00 beffbernard: jasonjckn: cool.. not being fast is ok.. correctness is what I'm after

10:01 I'm actually interoping with a haskell data type declarations

10:01 with Haskel*

10:01 Haskell*

10:02 jasonjckn: if I had to guess both libraries are about the same in terms of correctness and interop (whch I haven't a clue how to do)

10:02 beffbernard: if you think in terms of BNF parsley is probably better

10:02 it's an lr1 parser ish

10:03 clarsec's code will probably be a bit shorter, and reads more like english

10:03 beffbernard: what are you doing?

10:03 beffbernard: what's the language like

10:04 beffbernard: if you need to interop with haskell, why not just write the parser in haskell?

10:05 beffbernard: I don't know if i'm allowed to tell you the details, but it's a DSL for a particular domain to interact with an engine we're writing

10:05 jasonjckn: haskell parsers are more mature than clojure's

10:05 beffbernard: vague I know

10:05 The engine is written in Haskell and the webapp is clojure

10:05 and they communicate through this DSL language

10:06 jasonjckn: so you're sending ascii over the wire?

10:06 beffbernard: sort of

10:07 jasonjckn: I think you can parse sexp directly with clarsec

10:07 but you might have to change the code a little bit, i've never tried to do that

10:08 cark: beffbernard: here is a very simple parser combinator library that should work for parsing just about anything, should be useable as a base for parsing sexp https://gist.github.com/2666682

10:08 jasonjckn: do you know how combinator parsers work?

10:08 beffbernard: Not so much

10:09 jasonjckn: beffbernard: do you know how monads work?

10:09 cark: monads are not necessary to make a parsor combinator, but they sure help =)

10:09 beffbernard: Low-level no.. but I use them day to day

10:10 gfredericks: didn't flatland/useful have an unpartial function?

10:12 hyPiRion: So, while on the topic of parsers - Have anyone found a good lexer for Clojure?

10:13 jasonjckn: beffbernard: well, if I were in your position with an sexp, i'd use combinator parsers

10:13 beffbernard: jasonjckn: ok

10:13 jasonjckn: beffbernard: the only library i've seen with documentation is http://brehaut.net/blog/2011/fnparse_introduction

10:14 beffbernard: i'm very familiar with clarsec, but there's no documentation, i can get you started if you'd like, but i can't write a tutorial for you :)

10:14 beffbernard: if you send something to parse, i'll try to write a parser

10:15 beffbernard: Want to talk through some other venue?

10:15 jasonjckn: can you PM?

10:15 beffbernard: Yup

10:42 wkmanire: Good morning.

11:17 _KY_: What's an efficient way to store a tree with arbitrary number of children at each node?

11:20 tmciver: _KY_: how about just use a map as a node with key :children whose value is a collection of nodes?

11:21 _KY_: I thought of that...

11:22 But what if some nodes are huge sub-trees?

11:22 Can the map handle that?

11:23 tmciver: _KY_: Sure, especially if you can construct it lazily.

11:26 _KY_: But then how can I store say a number in each node?

11:27 Oh maybe store it at index 0 of the collection of children

11:27 progo: umm, {:value 4 :children [...]} ?

11:28 _KY_: progo: but then each node must have a list of children... even if null

11:29 progo: 'I have zero children, their names are []'.

11:29 empty seq is a valid seq.

11:29 _KY_: Yes but it doubles the map size....

11:30 tmciver: _KY_: here's a function that builds up a tree with key children:

11:30 https://www.refheap.com/paste/2696

11:30 xeqi: &(:children {:value 3})

11:30 lazybot: ⇒ nil

11:30 tmciver: the get-children method should create nodes in whatever fashion you want.

11:31 marmae_: anyone knows why the swank repl inside emacs keeps telling me that it doesn't know the doc function?

11:32 tmciver: marmae_: unfortunately, you must (use 'clojure.repl) first.

11:33 _KY_: What is the key of that map?

11:33 marmae_: tmciver: thanks!

11:33 _KY_: :Children ?

11:33 tmciver: marmae_: no problem

11:35 _KY_: in the build-tree function? It's :children

11:36 _KY_: &(:children {:value 3}) <--- the outer layer is just a list Ision't it?

11:36 lazybot: ⇒ nil

11:37 _KY_: So that map is already addressable by children

11:37 tmciver: _KY_: that was just an example what happens when you try to get the children from a map that doesn't have any.

11:39 _KY_: I see...

11:40 But I thought a map must be a sequence of key-value pairs?

11:41 tmciver: _KY_: a tree structure using maps might look something like: {:value 3 :children [{:value 2} {:value 1}]}

11:42 _KY_: it's tree of three nodes; one root node that has two child nodes.

11:42 _KY_: I see...

11:42 Does it matter if some values are very big in size?

11:43 They would be heavily nested... right?

11:43 tmciver: _KY_: The child nodes do not have children of their own but they could have had children keys with an empty collection.

11:43 _KY_: Right...

11:45 tmciver: _KY_: heavily nested? It depends upon your data.

11:45 _KY_: The tree may grow in size...

11:45 wtetzner: _KY_: yes, if you add more stuff to the tree, it will get bigger

11:46 _KY_: Then you'd have a map where certain values are particularly big in size...

11:46 I was wondering if that'd be a problem

11:46 tmciver: _KY_: no more a problem than building a tree data structure in some other way.

11:47 _KY_: But how can the map be addressed in constant time?

11:47 If its element sizes are uneven?

11:47 wtetzner: the value stored in the map is just a pointer

11:48 _KY_: I see...

11:48 Ok, thanks a lot of, ... it's getting more like C++ talk...

11:48 =)

11:48 wtetzner: all java types that are not primitives (int, long, boolean, etc.) are reference types

11:49 meaning you don't copy them when passing them around

11:49 you always refer to the one instance of it

11:49 tmciver: _KY_: you can never access nodes of a tree data structure in constant time; it's a function of how many levels you have.

11:50 wtetzner: but you can access the keys in a given node in constant time

11:50 _KY_: Yeah... I mean for a single map

11:50 wtetzner: well, near-constant

11:54 _KY_: So the maps have 2 keys, :value and :children?

11:55 That is double the size of a map with a single key I think

11:56 metellus: yeah, but the size of that particular map will be the same regardless of how many children it has

12:00 _KY_: I see...

12:00 Is it inefficient to grow the size of a vector, as opposed to a list?

12:03 technomancy: growing vectors is fine as long as you add at the end

12:03 _KY_: That's good...

12:03 What's the reason behind that? =)

12:04 They are allocated blocks of memory in advance I guess

12:05 matessim: Did you guys know Steven Spielberg directed Pinky and the brain?

12:09 tmciver: matessim: Ha! Really? I knew there was a reason I liked that show.

12:10 matessim: Yep, i found it fascinating too lol.

12:10 (This fact and the show)

12:10 gfredericks: _KY_: it's because of the fixed-size array chunks that make up the underlying trees

12:11 _KY_: it's a performance tradeoff; this video discusses why I believe: http://blip.tv/clojure/daniel-spiewak-extreme-cleverness-functional-data-structures-in-scala-5970151

12:14 _KY_: Steven Spielberg's daddy was one of the early developers of UNIX

12:23 twhume: aloha. Is there a really good tutorial for dummies on making lazy sequences? All the ones I've seen concentrate on the fibonacci sequence as an example, but it's a little different to what I'm after. I'd like to create a sequence of the form "A", "B", "C", "AA", "AB", "AC", "BA", "BB", "BC", "CA", "CB", "CC", "AAA" ... (i.e. breadth-first traversal of a tree)

12:35 wolkefm: I'm attempting to set up clojure mode for emacs - however I'm slightly confused about placing clojure-mode.el in ~/.emacs.d/

12:36 how is this a directory? I see no record of it anywhere - and I can't create it due to begining with period

12:38 rlb: wolkefm: I'm not certain that it's OK to put arbitrary files in .emacs.d. You can put your own code in .emacs.d/init.el, but emacs itself uses other files in that directory (i.e. .gtkrc, backup files, etc.).

12:38 wolkefm: what OS?

12:39 wolkefm: windows

12:39 xp

12:39 rlb: via cygwin, or native emacs?

12:40 wolkefm: I simply used add folder via the desktop envrioment

12:40 bobry: does anyone here have clojurescript in *production*?

12:40 wolkefm: well, fialed to rather

12:40 rlb: I mean are you running cygwin emacs or a native emacs?

12:40 wolkefm: native

12:42 rlb: I'm not really sure how that works. If it helps, in linux, you'd normally just edit your ~/.emacs file (wherever that is for windows), and add a directory to the load-path, and then put clojure-mode.el (and whatever else you like) in there.

12:42 s/linux/most other emacs flavors/

12:43 i.e. (push "/home/rlb/lib/emacs" load-path) or whatever.

12:47 wolkefm: check out the emacs info pages appendix G (wrt windows). Looks like ".emacs" should work fine (though the windows gui itself might not let you create it).

12:48 (and it says emacs also supports _ as an alternative to . on windows -- since .foo files are sometimes hard to create)

12:49 wolkefm: googling now. I think I ran across this earlier, supposedly a default file instead of .emacs - however I couldn't find one (or the init file that was also mentioned - though could be totally seperate docs - lemme check)

12:50 rlb: wolkefm: .emacs won't exist until you create it.

12:51 wolkefm: if you just fire up emacs and ask it to edit (via C-x C-f) ~/.emacs, I suspect you'll get the right thing.

12:51 and emacs will probably let you create the file, even if the windows gui won't.

12:51 Alternately, create ~/_emacs.

12:52 wolkefm: thank you - I'll let you know how it goes

13:17 michaelr525: hello

13:18 eggsby: hello michaelr525

13:19 michaelr525: what's up?

13:20 eggsby: working on some toy problem for practice, you?

13:23 michaelr525: i'm working on a pinterest clone of sorts

13:23 not my day job of course, just a clojure project for fun and profit\

13:34 muhoo: $seen cemerick

13:34 lazybot: cemerick was last seen quitting 3 days and 23 hours ago.

13:34 fliebel: How do I run cKanren? More specifically, once in the petit repl, how do I load/import/require it?

13:35 Licenser: what once has been seen can nevrer been unseen! http://chicksontheright.com/wp-content/uploads/2010/09/what-has-been-seen-cannot-be-unseen.jpg

13:39 robertstuttaford: is this worth grabbing? https://peepcode.com/products/functional-programming-with-clojure

13:43 tomoj: that's what I started with, and I liked it, but the video is presumably very out of date, though the code is only somewhat out of date

13:43 robertstuttaford: thanks

13:45 uvtc: The lein2 preview 4 announcement says that it now uses Clojure 1.4.0 internally, but here's my output from running lein the first time: <https://www.refheap.com/paste/2697>. It's grabbing Clojure 1.3.0.

13:45 In fact, the Clojure 1.2.1 pom is mentioned in there as well, but the jar for it does not appear to be downloaded.

13:49 Whoops. Ran out of time. Will post to the ML about it.

14:08 wolkefm: I've installed leiningen via .bat file downloading the corresponding .jar. Is there any way to get this to work without placing it in my $PATH?

14:09 I'm working off my portable hard drive on a university computer at the moment and I can't edit the $PATH

14:12 the wording 'place it in your $path (I like to use ~/bin/lein/) make me think that adding it as an enviroment varible (something I only vaugely remember) isn't the correct interpertation. idk thoughts anyone

14:12 https://github.com/technomancy/leiningen - also link.

14:17 nevermind - Need to get some sleep and pick this up when I get up

14:26 fliebel: Does anyone know how to compute the sum of a list in cKanren?

14:38 ibdknox: Anyone got a cool algorithm that has a naive (slow) implementation and a fast one that might be fun to visualize? I have a neat idea for a Light Table demo

14:39 matessim: ibdknox=Chris Granger?

14:39 :O

14:39 ibdknox: it does :)

14:40 matessim: I was totally awe-inspired by you're Kickstarter, + I discovered Bret Victor through it

14:40 pushp0p: ooh light table demo?

14:40 matessim: And by you, lol.

14:40 ibdknox: haha thanks :)

14:40 blastura: hi, I'm looking for a nice way to loop through all the number in an int, ex: 2345 -> (map myfunc [2 3 4 5]), how can I split an int to a sequence of every number?

14:41 ibdknox: pushp0p: yeah, gotta try to get up to 300k ;) It's going to be a really cool demo

14:41 xeqi: already implemented or just looking for ideas?

14:42 ibdknox: xeqi: a lot of it is implemented. I came up with this algorithm thing late last night though, so looking for ideas on that :)

14:42 raek: blastura: one way is to turn the number into a string and then turn each character into a number

14:43 matessim: shuffling algorithms perhaps?

14:43 naive one and Knuth-fisher?

14:43 -Yates*

14:43 to ibdknox

14:44 ibdknox: that could work :)

14:44 raek: ,(for [d (str 2345)] (Character/digit d 10)])

14:44 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: ]>

14:44 beffbernard: I would visualize a sort.. O(n^2) vs O(log n)

14:44 raek: ,(for [d (str 2345)] (Character/digit d 10))

14:44 clojurebot: (2 3 4 5)

14:44 ibdknox: beffbernard: yeah I was thinking something like that as well

14:44 raek: then you can map over that sequence

14:44 blastura: raek: yea but that seems a bit ugly

14:45 ibdknox: though the point is less the algorithm itself and more of what if you could see a graph of performance characteristics in real-time between two different implementations :)

14:45 blastura: raek: thanks anyway I'll use that for now

14:45 raek: blastura: what is ugly about it?

14:45 ibdknox: actually

14:45 blastura: reak: just though there might be another way without converting to a string

14:45 ibdknox: showing the difference between map and pmap would work really well for that

14:46 as the advantage is based on the size of the operation

14:46 raek: blastura: well, digits is a formatting concept

14:47 matessim: ibdknox, is the IDE meant to be full screen, or are you just filming like that? If it isn't it would be nice if you'd enable such a feature, immersive coding is a pretty important addition IMO.

14:47 beffbernard: $491 until 200k.. sweet

14:47 ibdknox: matessim: it's all fullscreen

14:47 seems like a waste otherwise

14:47 matessim: 591$

14:47 ^ +1

14:47 ibdknox: though it doesn't *have* to be

14:47 beffbernard: hhehe typo

14:48 ibdknox: I'll give you guys a hint

14:48 matessim: how does Kickstarter work exactly? do they release all the money immidietly or do they need to be given progress reports etc and follow up on these things?

14:48 (to you)

14:49 ibdknox: in Clojure, macros make it very easy to create DSLs. What if there was a platform that made it trivially simple to build domain specific tools? :)

14:49 matessim: once the time runs out all the money is transfered

14:49 matessim: okay :)

14:49 thanks.

14:49 beffbernard: ibdknox: in clojure or any supported language?

14:49 ibdknox: beffbernard: any :)

14:50 beffbernard: to prove my point, I'll be using python

14:50 beffbernard: that would be sweet

14:51 weavejester: ibdknox: Did you notice I added a make-route function in Compojure 1.1.0-SNAPSHOT ?

14:51 ibdknox: weavejester: oo, I did not

14:51 weavejester: ibdknox: If that removes your need to eval in Noir, I can release 1.1.0 fairly soon.

14:52 ibdknox: weavejester: I think it does

14:53 weavejester: ibdknox: When you have some code up in Noir, let me know and I'll push out 1.1.0 :)

14:53 And for now, I need to do some shopping...

14:53 ibdknox: enjoy :)

14:58 mtkoan: how can i transform this: [1 ([2 3] [4 5])] into this: [1 [2 3] [4 5]] ?

14:59 jasonjckn: mtkoan (juxt first (comp first second))

14:59 Raynes: That's pretty specific.

15:00 mtkoan: jasonjckn: thanks

15:00 Raynes: yes it is?

15:02 dnolen: ibdknox: $91 away

15:02 ibdknox: that was quick

15:02 lol

15:03 ah someone kicked in $500 :)

15:03 Raynes: ibdknox: No way it'll ever hit $300k.

15:03 ibdknox: watch me ;)

15:03 Raynes: You're a dirty greedy skank.

15:04 mtkoan: oh I see what you mean, too specific.. yes I need [1 ([2 3] [4 5] ... [n n+1])]

15:04 ibdknox: Raynes: haha

15:04 Raynes: :p

15:05 jasonjckn: ,(apply vector [1 ([2 3] [4 5])] )

15:05 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Key must be integer>

15:05 jasonjckn: ,(apply vector [1 '([2 3] [4 5])] )

15:05 clojurebot: [1 ([2 3] [4 5])]

15:06 alexbaranosky: seems like there is every reason in the world to imagine it would get to $300k

15:06 jasonjckn: ,(apply #(apply vector %) [1 '([2 3] [4 5])] )

15:06 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: sandbox$eval80$fn>

15:06 Raynes: alexbaranosky: I guess if he can get a bunch of people to throw 10ks into the mix.

15:07 I don't see it getting there otherwise.

15:07 ibdknox: Raynes: I haven't hit the python crowd yet

15:07 jasonjckn: ,(apply #(apply vector %&) [1 '([2 3] [4 5])] )

15:07 clojurebot: [1 ([2 3] [4 5])]

15:07 Raynes: But Jesus, it hit its goal.

15:07 Can we be happy about that?

15:07 lynaghk: ibdknox: High five!

15:07 Raynes: Well, hasn't *quite* hit its goal.

15:07 Give it 30 minutes.

15:07 lynaghk: Raynes: Anti-high five!

15:08 alexbaranosky: yeah congrats ... meeting the goal is eminent

15:08 ibdknox: :)

15:08 jasonjckn: mtkoan: (let [[a [& b]] [1 '([2 3] [4 5])]] (cons a b)) good enough

15:08 ibdknox: how many people are you working with?

15:08 Raynes: Done.

15:08 yawnt: LIGHTTABLE IS NOT GOING TO HAPPEN

15:08 ibdknox: jasonjckn: right now, it's just me. My co-founder is finishing school

15:08 Raynes: Goal is met on kickstarter.

15:09 jonasen: ibdknox: congrats!

15:09 yawnt: just kiddin

15:09 looks promising

15:09 :D

15:09 lynaghk: Raynes: I'm using tentacles to figure out who I should grab coffee with while I'm in Palo Alto next week. Nice library, thanks.

15:09 Raynes: lynaghk: Bahaha, man, that's all I ever wrote it for.

15:09 jasonjckn: ibdknox: pretty sweet deal then :-P 200k to found a company

15:09 congrats

15:10 alexbaranosky: lynaghk, did it say me Kevin?

15:10 Raynes: You're no fun.

15:10 lynaghk: alexbaranosky: yes, it does list you as in the Bay Area. Want to grab coffee?

15:10 mtkoan: jasonjckn: thank you much.. have to look at this abit ;)

15:10 Raynes: alexbaranosky: Didn't we spend like a hour arguing with you about the merits of for vs map at the Conj party?

15:11 alexbaranosky: I work right next to Palo Alto... I think my motel right now might actually be technically in Palo Alto

15:11 Raynes, yes

15:11 * Raynes chuckles

15:12 alexbaranosky: my heuristic for when to use 'for' is as soon as the funny symbols becomes more than you'd get with 'for' hehe

15:12 ibdknox: jasonjckn: it'll certainly be more than that :)

15:12 jasonjckn: hopefully 3-4 more

15:12 jasonjckn: ibdknox: 3-400k?

15:12 ibdknox: or people?

15:12 ibdknox: jasonjckn: people

15:12 alexbaranosky: oops, meant to say use for when too many funny symbols with map

15:12 dnolen: ibdknox: congrats!

15:13 ibdknox: dnolen: thanks :)

15:13 alexbaranosky: lynaghk, I just moved out here a week ago to work at Runa

15:13 ibdknox: dnolen: thanks for helping spread the word

15:13 jasonjckn: ibdknox: ah that's more dollar value then :)

15:13 ibdknox: jasonjckn: yeah, that runs out quick ;)

15:14 fliebel: What? whoa! congrats, ibdknox! If I ever get a credit card...

15:15 ibdknox: haha

15:17 I'm just excited that hopefully I'll get to realize all of the potential here

15:17 there's so much room for our tools to grow

15:19 lynaghk: ibdknox: I'm definitely excited to see what you guys come up with. "Bad Relationship" isn't the best way to describe me & emacs, but it's the first way that comes to mind.

15:19 ibdknox: haha

15:19 actually for the kind of work you do, I think it's especially well-suited

15:19 jasonjckn: i actually have no qualms with emacs for clojure development

15:19 lynaghk: Light Table re: visualization, you mean?

15:19 ibdknox: lynaghk: yeah

15:20 sorry that was really ambiguous lol

15:20 jasonjckn: Sometimes when interactive developing, even after running C-c C-k it either falsely fails to compile, or falsely succeeds in compiling

15:21 lynaghk: ibdknox: yep. A year or two back I integrated ProtoVis with Ymacs, but it was just a little hack. An extensible editor on the web platform would be boss (assuming I can jack it into my brain as directly as emacs)

15:21 Madsy: Meta-question: How long does it usually take to get a post accepted to the Google Group? It's gone 2 hours, so I wonder if I triggered the spam filter or whatnot :)

15:21 jasonjckn: That issue would be nice to solve, but it's very tricky

15:21 Madsy: been*

15:21 dnolen: Madsy: have you posted before?

15:21 Madsy: dnolen: No, this is my first post.

15:22 dnolen: Madsy: first posts are moderated, it's the weekend so don't expect it to appear soon.

15:22 Madsy: Okay, thanks.

15:22 Raynes: ibdknox: Fly me out to San Francisco.

15:23 ibdknox: lol you're just moving to LA aren't you :p

15:23 scottj: ibdknox: are you quitting day job?

15:23 Raynes: ibdknox: Well, yeah, but not right now. I can come to SF. :p

15:23 ibdknox: scottj: did that a couple months ago

15:23 Raynes: scottj: He quit that ages ago.

15:27 scottj: ibdknox: http://appjs.org/ maybe just in time for light table

15:29 ibdknox: scottj: yeah, I saw thought. Unfortunately it requires node to already be installed

15:30 scottj: right now I'm just messing around in my little mac-only wrapper :)

15:30 scottj: ibdknox: btw there is macgap but don't think it ever became crossplatform

15:31 ibdknox: scottj: huh, hadn't seen that

15:33 lynaghk: Raynes: Can I ask tentacles to abstract away the pagination within a lazy seq?

15:35 franks: ibdknox: congrats with getting the funding!!!

15:35 ibdknox: franks: thanks :)

15:40 Raynes: lynaghk: Yeah, someone added it a few days ago.

15:41 lynaghk: I haven't documented it yet, look at the last few commits.

15:41 lynaghk: Should be an :all-pages option.

15:43 lynaghk: Raynes: cool, thanks.

15:48 jasonjckn: 200k on the money

15:49 progo: :)

15:50 feeling compelled to switch my backing to $50 for early access

15:54 Borkdude: I would like to know how the t-shirt is going to look ;)

15:55 Raynes: A lamp sitting on a coffee table.

15:55 Obviously.

15:57 TimMc: Didn't g-somebody come up with a neat design?

16:00 muhoo: ibdknox: congratulations, hope you can ship soon :-)

16:01 Borkdude: Raynes: maybe a t-shirt with lamp built in (batteries included)

16:07 ibdknox: sssSSSsss noises… you're going to program a snake game as a first demo… cool :P

16:07 ibdknox: haha

16:07 :D

16:09 * fliebel wonders how many people know what a light table is, and what it;s used for.

16:12 marmae_: did anyone of you read "land of lisp"?

16:12 is it a good book?

16:13 Madsy: It's been a few days, so I'll ask again. What is the best approach to get third-party libraries exposed to Clojure and leiningen? I have a more recent library than what's available at Clojars and Maven. Also the library is jOGL, and it uses JNI and hence depend on platform-speciic libraries.

16:13 Borkdude: madsy: you could use a local jar?

16:13 fliebel: marmae_: I don't know, but I imagine 0x10c will look like the video :)

16:14 zanes: ,expt

16:14 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: expt in this context, compiling:(NO_SOURCE_PATH:0)>

16:14 zanes: What's the correct way to get access to expt in 1.4.0?

16:14 Madsy: Borkdude: Although that would make distribution a bit harder, yes I could. But how do I prepend the paths to the classpath of my leiningen project?

16:14 Borkdude: Madsy: https://github.com/kumarshantanu/lein-localrepo

16:15 Madsy: Borkdude: And lein-localrepo works with JNI-libraries?

16:16 dreish: zanes: Are you referring to exponentiation? That would be (Math/pow x y)

16:16 marmae_: fliebel: har har ;)

16:16 zanes: dreish: I was indeed. It looks like there are clojure-specific implementations in contrib / other places, so I was confused.

16:16 devn: Raynes: what's the deal with your jerk response to the URI lib announcement?

16:17 zanes: dreish: Thanks!

16:17 marmae_: first time i heard of it, tbh.

16:17 Borkdude: Madsy: I don't know, is it a normal jar? I never used JNI, never needed to

16:17 Raynes: devn: Eh?

16:18 devn: Raynes: exactly what i said. I think your response is nasty. asking "how on earth" and so on. it's just a jerk response.

16:18 Madsy: Borkdude: I have different jars for different platforms. jogl.all.x86.linux.jar etc

16:18 Raynes: devn: I gave him suggestions after reading his code. I'm not going to apologize for that. Also, if you're here to berate me, can you do it in PM so as to not bother the channel? :\

16:18 Borkdude: Madsy: you could also try #leiningen for more suggestions

16:18 Madsy: Borkdude: Thanks

16:18 devn: Random Person: "Hello I created a library." Raynes: "Your codes are disgusting. I will rant about them publicly instead of submitting a pull request."

16:19 Raynes: You berated him publicly.

16:19 So you deserve the same.

16:19 Raynes: ...

16:19 I didn't say a single thing that sounded like "Your code is disgusting."

16:19 Given his code, I thought he was relatively new to the language, so I figured a few suggestions would be helpful. I'd happily send a pull request if he asked me to. I was honestly curious about his usage of association lists.

16:20 devn: Raynes: your phrasing on a few things did not translate well to email.

16:20 Raynes: Also, wtetzner is in this channel, so if I offended him, I'd kindly ask him personally to tell me so and I will certainly apologize for anything that actually did offend him.

16:20 devn: "How on earth", "never (use) without :only"

16:20 ive seen people (use) without :only on plenty of occassions, yourself included

16:21 Raynes: And that makes it okay?

16:21 devn: i dont disagree with what you were saying, but i disagree with how public it was, and how you presented it

16:21 ibdknox: eh

16:21 Raynes: Whatever.

16:21 Leave me alone, please.

16:21 :\

16:21 ibdknox: he posted on a public list

16:22 it's bound to be public

16:22 devn: So submit a pull request and don't be a dick.

16:22 It's simple.

16:22 Raynes: I also disagree that I worded anything in a degrading tone.

16:22 devn: agree to disagree then

16:22 technomancy: ~gentlemen

16:22 clojurebot: You can't fight in here. This is the war room.

16:22 devn: lol

16:22 fliebel: devn: Try reading it again while imagining Raynes smiling and looking cherfull. See if it still sounds ugly.

16:23 ivan: note the lack of "How on earth"

16:23 oh, "Why"

16:24 ibdknox: eh, if he has a solid position then he should be unfazed either way

16:24 Borkdude: I read the post just now and it seems like good suggestions to me, I wouldn't be offended by it

16:24 ibdknox: yeah

16:25 devn: ibdknox: nerds are temperamental. take care on the list of not scaring new people off. that's where i'm coming from.

16:25 dreish: Being newbie-friendly is a good thing to be mindful of. Perhaps a *friendly* reminder would be in order once in a while. Probably not an attack like "How could you be so rude!", though.

16:25 Raynes: I honestly thought he was relatively new to the language and would benefit from suggestions rather than just a pull request. As a matter of fact, I told him his library was awesome a few minutes before I wrote that post here in this channel.

16:25 But I've been known to be a dick by accident before, so *shrug*. Sorry if so.

16:25 ibdknox: devn: sure, but berating without context is just as bad

16:26 rlb: ===(((tahtwasfairlyimpressive)))===

16:26 ibdknox: wat

16:26 rlb: oops

16:26 wrong window

16:26 devn: lol

16:26 fliebel: can't. resist. http://xkcd.com/481/

16:26 ibdknox: http://i.imgur.com/04937.png

16:26 Raynes: devn: Also, if you happen across a piece of code in a library of mine that people use or code that I've recently written, by all means, alert me immediately so I can fix that crap!

16:26 zanes: dreish: Ah, I was hoping for something like expt from http://richhickey.github.com/clojure-contrib/math-api.html -- i.e. returns exact number if the base is exact and the power is an integer?

16:26 lazybot: Nooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/math-api.html and try to stop linking to rich's repo.

16:26 devn: "Faps_Into_Socks"

16:27 * devn facepalms

16:27 dreish: zanes: There must be something like that out there, but I don't know where. I've written it a few times just for fun.

16:27 devn: Raynes: im not trying to attack you, im just trying to defend the realm. i care too much sometimes. sorry about that.

16:28 * devn shakes your hand

16:28 Madsy: Borkdude: I think I have an idea what to do now, thank you. I can either make poms for the individual platforms, or repackage jOGL and find the correct libraries at runtime.

16:29 wtetzner: Raynes: no problem dude

16:29 i didn't have a problem with your post

16:30 Raynes: devn: I didn't take the :use stuff as an attack. technomancy is certainly not shy about telling me when I use :use without :only. He is a freak about that stuff. :p

16:30 wtetzner: except for the fact that you were wrong about my use of association lists :)

16:30 ivan: wtetzner: way to chill a flamewar, man

16:30 devn: hahaha

16:31 zanes: dreish: It's apparently in https://github.com/clojure/math.numeric-tower

16:31 Raynes: wtetzner: I was curious about that!

16:31 zanes: dreish: But I couldn't find that library with lein search. Hm.

16:31 Raynes: wtetzner: Got time to walk me through how you're using them?

16:31 Borkdude: devn: I have found the clojure community friendlier than others for newcomers, it's good to keep that etiquette, agree

16:31 wtetzner: Raynes: sure

16:32 devn: Borkdude: we gotta be careful or people will just start posting: "I DISLIKE THE WAY YOU INDENTED YOUR FUNCTION. GO DIE IN A FIRE."

16:32 </slippery-slope-fallacy>

16:32 wtetzner: often query strings are used in ways that aren't map-like

16:32 dreish: zanes: That looks nice, but a little dated.

16:32 wtetzner: for example, sometimes people use them as a mini-language

16:32 Borkdude: devn: I have found people in CL sometimes be grumpy or just showing off without really helping

16:32 wtetzner: which means keys can appear multiple times

16:32 devn: Borkdude: yeah. that's why i left CL.

16:32 Raynes: Ah!

16:32 wtetzner: and the order in which they appear has an effect

16:32 Raynes: That's a good point.

16:33 dreish: zanes: Though it uses protocols and datatypes, so that's probably modern enough. Just the fact that it hasn't been touched in 7 months is a little worrying.

16:33 wtetzner: i was also careful to make sure that when turning a query string into an alist and turning it back into a query string

16:33 you'd get the same query string back

16:33 so x=y&x&&x=&=&=y

16:33 could safely be passed through unchanged

16:34 zanes: dreish: 'src' was touched a month ago? Anyway, I can't figure out how to install it with lein.

16:34 wtetzner: since a lot of sites rely on poorly constructed urls

16:34 Raynes: wtetzner: Okay, that makes total sense.

16:34 :)

16:35 technomancy: HTTP headers are the same way; it's super annoying

16:35 devn: (inc wtetzner)

16:35 lazybot: ⇒ 1

16:35 devn: (inc Raynes)

16:35 lazybot: ⇒ 13

16:35 technomancy: except HTTP headers have extra facepalminess in that they're case-insensitive

16:35 devn: "facepalminess"

16:35 (inc technomancy)

16:35 lazybot: ⇒ 24

16:37 Raynes: wtetzner: You'll have to forgive me for freaking out about the association lists. I've literally never seen anybody with a real reasonable use for them in Clojure, so without knowledge of query string nuttiness, it really does look strange. I'll probably send you a pull request shortly with suggestions for your (ns ..) declarations and some comments for the query-string code to explain it a bit more.

16:37 wtetzner: If you had ordered maps, could they perhaps be represented as that? Just curious.

16:38 technomancy: Raynes: they still need to be multimaps

16:38 Raynes: technomancy: Not really. Multiple keys could be represented with vectors, no?

16:38 wtetzner: Raynes: but order matters

16:39 Raynes: "foo=bar&foo=baz" -> {:foo ["bar" "baz"]} or something.

16:39 technomancy: Raynes: yeah, but that causes them to be collapsed

16:39 wtetzner: x=1&x=2&y=2 is different from x=1&y=2&x=2

16:39 technomancy: you couldn't represent "foo=bar&baz=y&foo=no"

16:39 Raynes: Yeah, you've got me.

16:39 You win! Okay!!?!?!

16:39 technomancy: hehe

16:40 I agree that my first reaction upon seeing alists is "oh, someone came from CL and assumes Clojure's maps are similarly useless" =)

16:40 or elisp

16:42 Raynes: wtetzner: In that case, your code is exceedingly thoughtful and clever and I've written a URI library myself that didn't even account for this stuff.

16:42 wtetzner: Also, what does the name mean? It's killing me inside.

16:42 wtetzner: Raynes: haha

16:42 Raynes: the name doesn't mean anything

16:42 Raynes: but it's memorable

16:43 Raynes: and not likely to be confused with something else

16:43 Raynes: That's for sure!

16:46 * elliottw

16:46 TimMc: "Some people when faced with a problem think, I know, I'll use distributed computing. Now they have n^2 problems."

16:47 https://twitter.com/#!/jamesiry

16:47 Raynes: wtetzner: Is there a reason user-info couldn't also be split automatically into the user/pass portions for easier retrieval?

16:47 TimMc: ^ this is my new favorite version of that

16:47 Raynes: Wondering because other libraries avoid doing that as well.

16:51 Borkdude: lol! https://twitter.com/#!/fakerichhickey/status/200963481565011969

16:52 ianbarber: is there anything anywhere about the relative sizes of the thread pools for agents using send/send-off. I am guessing send uses one ~= to the number of cores?

16:53 looks like, based on this stack overflow: http://stackoverflow.com/questions/1646351/what-is-the-difference-between-clojures-send-and-send-off-functions-with-re

16:54 so that answers that, sorry for the needless chatter :)

16:56 Borkdude: so what's the deal with "wat"… it's just a the Dutch word for "what"

16:56 mmarczyk: I for one don't get what's people's problem with prefix lists *at all*; I rather think they should be used whenever possible as a matter of style

16:57 Licenser: yay I backed light table 1000th backer in the category

16:57 mmarczyk: conversion to the (:require [foo.bar.baz ...] [foo.bar.quux ...]) style is < 10 lines of code (which I've written), so it's not as if this really makes anything more difficult for any sort of tooling

16:57 beffbernard: TimMC: N^2 or N! problems? ;)

16:57 mmarczyk: at least as long as it's written in Clojure, but if it isn't, that's hardly the biggest problem.

16:58 ok, so much for my rant. :-P

17:02 Borkdude: (in fact U literaly means you, and lol means fun in Dutch… it's just slang)

17:09 wtetzner: Raynes: no reason

17:09 Raynes: I just didn't think of it

17:09 Raynes: although i'd have to double check what the rules are for it

17:09 Raynes: Right

17:10 It isn't a big deal either way (it's not like I lose anything because of it, nobody else does it either). :)

17:11 wtetzner: Refheap has been fish'd: https://github.com/Raynes/refheap/commit/23750209ff9c9df84f4c3b31ce8aeee2317b08dc

17:11 :D

17:12 wtetzner: Raynes: awesome

17:12 Raynes: i'm sure you'll let me know if you find any bugs :)

17:13 zxtx: hey anybody around who had success to calling scala code from clojure?

17:13 Raynes: Yeah, publicly and with strong words. :P

17:13 technomancy: zxtx: I was able to invoke the scala compiler

17:13 but that was through ant, so it might not count

17:13 zxtx: technomancy, I am trying to wrap a scala library that makes heavy use of traits

17:14 how are traits expressed in the jvm

17:14 i know this is more of a scala question, but I want to wrap clojure so figure here works better to ask

17:18 gfredericks: if trace-lvars reveals that the value of a logic variable is a lazy seq, does that mean I did something wrong?

17:18 mmarczyk: zxtx: http://www.codecommit.com/blog/java/interop-between-java-and-scala

17:18 technomancy: hm; I don't know what traits are

17:19 gfredericks: mixins?

17:19 zxtx: mmarczyk, yep just found that page now

17:20 ok now, this is definitely going to be painful :)

17:21 Bronsa: è

17:21 ops

17:23 TimMc: zxtx: I sense macros in your future.

17:24 zxtx: TimMc, yep

17:28 hopefully I can see if someone did some of this legwork already

17:38 al-maisan: what's the easiest way to define a bunch of tasks that are independent of each other and have them executed in parallel?

17:40 I am looking for something like the "go" construct in golang

17:40 mrakana: Often I wish I could remove the state I've accumulated inside the repl. How can I just "clear everything" and start from scratch, but without restarting the entire java environment?

17:43 arohner: al-maisan: there's not anything directly like that, but you could use future or pmap

17:44 mrakana: recent versions of swank clear the NS if you use C-c C-l

17:45 al-maisan: arohner: when using futures: will they be executed w/o any further interaction or do I need to deref them in order to trigger execution?

17:46 arohner: al-maisan: they start executing immediately. Deref only blocks until the future is done

17:46 mrakana: arohner: Thanks, I'll try that out.

17:46 al-maisan: arohner: I see .. will try them .. thanks!

17:46 arohner: al-maisan: one tricky aspect is that future uses the IO thread pool, rather than the CPU threadpool

17:46 so be careful about starting large numbers of CPU bound tasks that way

17:47 al-maisan: what is the difference between these pools?

17:47 arohner: the CPU pool is set to N+2 threads, where N is the number of cores you have

17:47 the IO pool is unlimited

17:47 al-maisan: ah .. I see.

17:47 thanks for the advice!

17:56 arohner: someone really needs to write future-cpu. I've wanted that before...

18:20 Borkdude: how about this for a macro? (inspired by if-let only taking one binding) https://www.refheap.com/paste/2699

18:20 lynaghk: mmarczyk: just tidied up my cljs benchmark runner---I saw you had some stuff in cljs core on the topic, so you might want to check it out: https://github.com/lynaghk/profile-cljs

18:20 al-maisan: arohner: hmm .. I am running 50k tasks using futures on a 4-core CPU machine but see only 2 cores being used

18:21 arohner: here's the source if you'd like to take a look: http://bit.ly/KdrU48

18:22 all the action is in the main function, lines 48-62

18:23 arohner: al-maisan: seqs are lazy, so you might not be forcing the evaluation

18:24 see what happens if you put a doall around the map that creates the futures

18:24 (for [sexp (doall (map vector...))

18:24 LauJensen: Good evening gents

18:24 * al-maisan tries that

18:25 Borkdude: LauJensen: good evening

18:26 jasonjckn: amalloy: did you figure out what rich wanted?

18:26 amalloy: jasonjckn: i haven't done anything since his response this morning

18:26 jasonjckn: amalloy: do you know what to do? I can take a look if that helps

18:27 al-maisan: arohner: the "doall" is doing the trick .. thanks again!!

18:27 amalloy: sorta. i realize my current patch is basically a flamethrower approach, but he implies it's possible to use something a lot more delicate than i think is possible

18:27 arohner: np

18:28 jasonjckn: amalloy: *nods* I haven't a clue yet, but i'll give it some time, see what I come up with

18:29 amalloy: specifically, ISeq is not a four-method interface, it is at least nine methods, because it extends IPersistentCollection

18:29 the other twenty or so are necessary only for java interop, which i was under the impression was an important design requirement for seqs, but perhaps isn't. i need to ask him about that

18:30 al-maisan: Wow! The load on my linux box is 300 and growing .. so much for using futures (IO thread pool) for CPU-bound tasks :P

18:31 jasonjckn: amalloy: Is there no way to inherit from LazySeq and extend reducer protocols?

18:31 Borkdude: what is the place to issue something which is not correct in the docstring of a function in clojure.core?

18:31 amalloy: not in clojure, only in java

18:32 jasonjckn: hm, yah dunno what rich had in mind

18:33 arohner: al-maisan: since you're already using for, pmap might be a better solution

18:33 al-maisan: maybe

18:34 jasonjckn: amalloy: rich says 7 methods, as oppose to 9

18:34 arohner: well, pmap won't give you load of 300 :-)

18:34 jasonjckn: amalloy: eitherway, he acknowledges a lot of methods, and he says to farm out implementation

18:34 amalloy: jasonjckn: i don't understand "farm out implementation"

18:35 jasonjckn: amalloy: Just take the implementation of LazySeq and put it inside its own function that you can call when implementing ISeq (?)

18:35 al-maisan: arohner: I tried pmap .. wasn't quite happy with the execution time (golang binary 20 seconds, erlang implementation 5 minutes, clojure/pmap 12 minutes)

18:36 arohner: see http://bit.ly/IWSgZI

18:36 jasonjckn: amalloy: maybe i'm being naive, i haven't looked at LazySeq code

18:36 amalloy: jasonjckn: okay, i reread his comment - last time i read it i was still sleepy

18:36 jasonjckn: kk

18:37 amalloy: and i think i understand what he's suggesting

18:37 arohner: al-maisan: again, laziness. try (doall (pmap..))

18:37 al-maisan: ok

18:37 PeregrinePDX: http://stackoverflow.com/questions/2103599/better-alternative-to-pmap-in-clojure-for-parallelizing-moderately-inexpensive-f

18:38 amalloy: jasonjckn: btw, if you don't mind my asking...should i know who you are? a week ago i'd never heard of you, and suddenly you're doing some cool work on this reducers stuff, and explaining core.logic in irc

18:38 jasonjckn: amalloy: hah well I use to go under the name Null-A

18:38 amalloy: but that won't help you much either

18:38 amalloy: oh, okay

18:39 sure it will. you hang out in irc all the time

18:39 jasonjckn: amalloy: IRL i worked at backtype before it was bought by twitter

18:39 amalloy: and will be starting at twitter very shortly

18:39 amalloy: i've worked a lot with nathanmarz

18:39 contributed a bit to storm

18:40 amalloy: interesting. i wonder if we met in SF

18:40 jasonjckn: probably not yet, but if you live there, it will happen

18:40 i just graduated, so i'll be moving out there shortly

18:40 (I was back and forth before)

18:40 amalloy: nah, i lived there a year ago and went to some meetups, including nathanmarz's presentation

18:40 in LA now

18:41 jasonjckn: Ah, maybe we did, i went to a few bay area lisp meetups

18:42 i went to one on "kludge" another one about a DSL for writing contracts

18:42 and a cascalog one, i'm sure if that was bay area lisp meetup though

18:45 amalloy: right, i was at the clojure meetup on cascalog

18:45 in like...last april or so

18:46 jasonjckn: probably met then :)

18:54 Raynes: He was the guy with the ponytail and eyes that melt your heart.

18:55 amalloy: jasonjckn: i just commented again on the issue, if you'd like to keep up to date

18:55 jasonjckn: i'm watching

18:57 TEttinger: how do I call a function on each member of a sequence? is it apply, or map, or what?

18:57 I can never tell all these docs apart

18:57 jasonjckn: map

18:57 TEttinger: thanks

18:57 jasonjckn: clojuredocs.org may be more useful

18:57 amalloy: TEttinger: you can ask lazybot, too

18:57 jasonjckn: or there's many great books

18:57 amalloy: $findfn inc [1 2 3 4] [2 3 4 5]

18:57 lazybot: [clojure.core/mapv clojure.core/map clojure.core/keep]

18:58 TEttinger: ,(map #(inc %) [1 2 3])

18:58 clojurebot: (2 3 4)

18:58 jasonjckn: ,(map inc [1 2 3])

18:58 clojurebot: (2 3 4)

18:58 TEttinger: oh :-)

18:59 ivan: $findfn (1 2 3) (1 3 2)

18:59 lazybot: java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn

18:59 ivan: $findfn '(1 2 3) '(1 3 2)

18:59 lazybot: []

19:00 jasonjckn: unfortunately it's not a strong AI

19:01 gfredericks: $findfn [1 2 3] [1 2 3]

19:01 lazybot: [clojure.set/union clojure.set/intersection clojure.set/difference clojure.core/list* clojure.core/time clojure.core/dosync clojure.core/distinct clojure.core/lazy-cat clojure.core/sequence clojure.core/with-loading-context clojure.core/vec clojure.core/concat c... https://www.refheap.com/paste/2702

19:04 al-maisan: arohner: FYI: the "doall" made no real difference:

19:04 real 11m59.194s

19:04 user 33m19.577s

19:04 sys 0m7.740s

19:05 BTW, the version with the futures (that caused the high load) fared as follows:

19:05 real 12m17.674s

19:05 user 43m32.027s

19:05 sys 0m9.077s

19:05 * al-maisan calls it a day

19:05 al-maisan: thanks for all your help!

19:05 PeregrinePDX: try partitioning your seq if you can

19:05 and pmap on each partition.

19:05 al-maisan: aha

19:06 OK

19:06 will try that

19:06 thanks!

19:08 jasonjckn: amalloy: never heard of range-list (?)

19:08 amalloy: jasonjckn: i just made it up

19:08 the point is that it would work currently, and break if i don't implement the java interop interfaces

19:09 jasonjckn: amalloy: ArrayList accepts Collection interface, implement that?

19:09 ArrayList ctor*

19:09 amalloy: exactly. that's the other 20 methods i was objecting to

19:09 jasonjckn: ah

19:09 amalloy: (i think it's more like 10, and another 10 to implement List)

19:11 jasonjckn: maybe worse, because one of them is Iterator<E> iterator()

19:11 amalloy: meh, that's not a problem

19:11 if you look at my patch, i did implement all of those interfaces, in a macro

19:12 dnolen: the beginnings of some proper Mori documentation, http://swannodette.github.com/mori/

19:12 if anybody wants to help with logo, copy, code, examples, typography, etc, fork away.

19:12 jasonjckn: amalloy: ArrayList ctor might not call all those methods though, particularly the description in java doc says "Constructs a list containing the elements of the specified collection, in the order they are returned by the collection's iterator."

19:13 amalloy: although i guess it's bad karma to not implement everything

19:13 amalloy: doesn't matter, the arraylist constructor is just one example

19:15 jasonjckn: if ISeq was a protocol that would solve this right?

19:15 amalloy: uhhhh. i don't see how, but i'm not willing to commit to a "no"

19:17 jasonjckn: i need to look at code more

19:18 michaelr525: hiccup automatically htmlencodes everything, is there a way to tell it not to encode part of the content?

19:19 lynaghk: dnolen: just spent some time with my cljs profiling kit. It's now "ugly and usable" instead of "ugly and useless". Comparisons between simple/advanced mode compilation. Also buttons.

19:21 dnolen: lynaghk: yeah just saw that! will check it out later

19:21 lynaghk: dnolen: let me know if there are any features you want.

19:23 michaelr525: I thought hiccup explicitly does NOT htmlencode everything so that you can nest

19:24 michaelr525: https://github.com/weavejester/hiccup/issues/5

19:24 michaelr525: lynaghk: well probably not everything. my use case is when I create html templates for use on the client side

19:25 weavejester: I've been considering having Hiccup convert into a DOM first, then have different HTML renders you could use.

19:25 lynaghk: michaelr525: are you actually using hiccup, or are you using crate or c2?

19:26 michaelr525: i'm using noir, isn't it using hiccup?

19:26 weavejester: But as it stands, direct serializing HTML into strings is, while fast, not really compatible with encoding everything.

19:26 lynaghk: weavejester: would that be a continuation of the "refactor" branch where you process everything into maps of {:elem :attr :children} ?

19:26 weavejester: lynaghk: Yep

19:27 michaelr525: i write [:a {:src "<%= url %>"}] for example and it encode the <>

19:27 lynaghk: weavejester: ah. Yeah. For what it's worth, I've cleaned that up a bit as part of the cljs hiccup compiler in C2

19:27 michaelr525: encodes

19:27 weavejester: lynaghk: Could you give me a link?

19:28 lynaghk: weavejester: https://github.com/lynaghk/c2/blob/master/src/cljs/c2/dom.cljs#L231

19:28 it's not that much cleaner; I just replaced some of the crazier nested conditionals with core.match.

19:29 weavejester: having a DOM with some special nodes is something I've been thinking about lately as part of a knockout.js-like DOM/data binding library. Especially mapping collections to the DOM.

19:30 weavejester: lynaghk: Yeah, I was meaning on using core.match too.

19:31 lynaghk: weavejester: it's a great library, though there are some outstanding issues with AOT compilation at the moment.

19:31 jasonjckn: glad i'm not the only one

19:32 weavejester: Hiccup's design is not that elegant currently, but it is fast. The problem is that using a DOM and renderer would slow it down, unless the renderer precompiles, too.

19:32 Although, I wonder in practise how important it is to render quickly. I guess it depends on the project.

19:32 lynaghk: weavejester: yeah.

19:34 anyway, gotta run before the pastry store closes. back later.

19:59 mittchel: Hello everyone :)

20:00 Is anyone able to help me out on a function? It's not returning what I expected :P

20:00 brehaut: ~anyone

20:00 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

20:01 brehaut: if its a short function just paste it in, if its larger, use a paste site

20:01 mittchel: @brehaut thanks for your feedback:)

20:02 I'm trying to develop a function with takes an X amount of variables. It should check the type of the parameter and when it's a string it should print it out.

20:02 brehaut: mittchel: no worries. whats the function, and what is it doing wrong?

20:02 mittchel: (defn returnString [& y]

20:02 (if (next y)

20:02 ((fn [x] (if(= (type x) "java.lang.String")(print x)))y)

20:02 (recur (next y))))

20:02 That's my code, but unfortunately it's printing nothing

20:02 brehaut: mittchel: next time its a multiliner, use refheap.com or a gist or similar

20:03 amalloy: y is always a list, never an item of a list

20:03 seancorfield: &(type "string")

20:03 lazybot: ⇒ java.lang.String

20:03 mittchel: @brehaut Alright, thanks. Thought this was relatively small haha

20:03 brehaut: one line is small ;)

20:03 amalloy: so it's never a string

20:03 brehaut: also you should probably prefer class to type

20:03 mittchel: hmm sounds logical

20:03 brehaut: but in this case string? is more useful

20:04 mittchel: But I have to give you guys a heads up. I'm very new at Clojure. I'm basically a java programmer so it's much different for me haha.

20:04 brehaut: ,(map string? ["ab" ()])

20:04 clojurebot: (true false)

20:04 mittchel: Could you use the: ? on every type?

20:04 so lets say int?

20:04 brehaut: nope

20:05 ,(apropos '?)

20:05 clojurebot: (keyword? chunked-seq? instance? sequential? fn? ...)

20:05 seancorfield: and you know it'll print the string and return nil mittchel ?

20:05 amalloy: it's not a magical syntactic thing, it's just a normal function with a ? in the name

20:05 brehaut: theres also instance?

20:05 ,(instance? Integer 1)

20:05 clojurebot: false

20:05 mittchel: hm let me try to get it working with string?

20:06 brehaut: lol

20:06 seancorfield: &(sort (apropos "?"))

20:06 lazybot: java.lang.RuntimeException: Unable to resolve symbol: apropos in this context

20:06 seancorfield: no repl in lazybot?

20:06 mittchel: Should I use filter for this though?

20:06 Raynes: &(use 'clojure.repl)

20:06 lazybot: java.lang.ClassNotFoundException: clojure.repl

20:06 mittchel: Or is my function completely wrong haha

20:07 Raynes: Apparentlyn ot./

20:07 seancorfield: ,(sort (apropos "?"))

20:07 clojurebot: (associative? blank? bound? char? chunked-seq? ...)

20:07 seancorfield: does clojurebot limit by *print-length* ?

20:07 ,*print-length

20:07 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: *print-length in this context, compiling:(NO_SOURCE_PATH:0)>

20:07 seancorfield: ,*print-length*

20:07 clojurebot: 5

20:08 brehaut: &(binding [*print-length* 60] (apropos '?))

20:08 lazybot: java.lang.SecurityException: You tripped the alarm! pop-thread-bindings is bad!

20:08 seancorfield: ,(binding [*print-length* 100] (sort (apropos "?")))

20:08 clojurebot: (associative? blank? bound? char? chunked-seq? ...)

20:08 seancorfield: bah...

20:08 amalloy: ,(binding [*print-length* 100] (prn (sort (apropos "?"))))

20:08 clojurebot: (associative? blank? bound? char? chunked-seq? class? coll? contains? counted? decimal? delay? distinct? empty? even? every? extends? false? float? fn? future-cancelled? future-done? future? identical? ifn? instance? integer? isa? keyword? list? map? neg? nil? not-any? not-every? number? odd? pos? ratio? rational? realized? reversible? satisfies? seq? sequential? set? sorted? special-symbol? strin...

20:09 seancorfield: thanx amalloy

20:09 mittchel: @ammaloy how am I able to check if that 'list item' is indeed a string? Like I said, I'm very new at this and I can't seem to get it working with (if(string? y)) either.

20:10 amalloy*

20:10 sorry for that.

20:10 seancorfield: you want to test the first element of the sequence?

20:10 (if (string? (first y)) ...)

20:11 mittchel: What I want is to check for every element which is passed threw the function

20:11 seancorfield: also, watch out for the difference between ##(next ()) and ##(rest ())

20:11 lazybot: (next ()) ⇒ nil

20:11 (rest ()) ⇒ ()

20:12 brehaut: ,(every? string? ["a" 1])

20:12 clojurebot: false

20:12 brehaut: ,(every? string? ["a" "b"])

20:12 clojurebot: true

20:12 seancorfield: ,(filter string? ["a" 1])

20:12 clojurebot: ("a")

20:13 mittchel: Arggg this is frustrating

20:13 brehaut: mittchel: tell us what you want the function to do

20:13 in

20:13 english

20:13 (sorry about the spurious return)

20:13 mittchel: No problem I understand

20:13 Fact of the mather is I do understand what you mean, but I'm not able to implement it due the lack of knowledge currently

20:14 seancorfield: btw, the reason i've been absent from #clojure for a couple of weeks is due to work pressures... we migrated all our legacy sites to our new cfml / clojure platform at the end of april so i've been a tad busy with that... we added about 2.5M users to the new platform in april as we migrated sites over... so it's been... a little hectic at times :)

20:14 mittchel: I have to create a function which accepts X amount of variables. I have to filter the arguments which are of type String and return this as a result.

20:15 seancorfield: so you're writing a filter function for string? elements of a collection

20:15 mittchel: Yes

20:16 brehaut: (def only-strings (partial apply filter string?))

20:16 mittchel: discard any notion of camel case being good style btw

20:16 seancorfield: is this for a course exercise? are there any restrictions on what functions you're allowed to use in the solution? (e.g., 4clojure doesn't let you use the function it is trying to encourage you to implement directly)

20:16 mittchel: It indeed is a course exercise.. it actually gives me a hint to use: type

20:17 seancorfield: so they don't want the simple, obvious solution: (defn return-strings [& args] (filter string? args))

20:17 mittchel: It's for a school assignment. It's the last exercise which I'm having trouble with haha

20:17 Maybe my teacher hasn't thought of the simple and obvious one

20:18 seancorfield: 'k ... so you're on the right track with [& y] to allow return-string to accept any number of arguments

20:19 mittchel: Actually when I compile your code seancorfield, it gives me an error.

20:19 seancorfield: but (recur (next y)) is going to call it with a single argument - the rest of the collection - rather than all the remaining arguments

20:19 mittchel: ahh

20:19 amalloy: seancorfield: not true

20:19 mittchel: Unable to resolve symbol: return-string in this context,

20:19 It's giving me a hard time haha

20:20 amalloy: when you recur to a vararg function, you pass it a collection, not a bunch of args

20:21 seancorfield: amalloy: really? oh, learn something new every day... what about (defn f [x & y] ... (recur y)) ?

20:21 amalloy: complains because you're passing it x and not y

20:21 mittchel: But basically this should do what I want right: (defn return-strings [& args] (filter string? args))

20:23 amalloy: assuming that what you want is to return a list of all the strings in your arglist

20:23 mittchel: Yea that's even better, but why does it give me a runtimeexception?

20:24 amalloy: i assume because you're doing something else wrong

20:24 mittchel: Maybe when I'm calling the function?

20:25 Cause I'm trying like this: (return-string ["test" 1 "test2"])

20:25 seancorfield: return-string vs return-strings

20:26 mittchel: holy cow that scared me haha lol

20:26 seancorfield: and you'd call it like this: (return-strings "test" 1 "test2")

20:26 mittchel: brackets ([ ]) are only with collections right?

20:27 seancorfield: in (return-string ["test" 1 "test2"]) you're passing a single argument, a vector...

20:27 (which is why i was confused about recur - thanx amalloy for setting me straight)

20:27 mittchel: Alright, thanks a lot :)

20:28 Is it also possible to use this function but with type? Or do you have to work recur with that?

20:29 seancorfield: sure... string? is a function that is like (fn [s] (= "java.lang.String" (type s)))

20:29 brehaut: ,(class (type "a"))

20:29 clojurebot: java.lang.Class

20:30 brehaut: comparing a string to a class is always going to be false

20:30 seancorfield: so ##(filter (fn [s] (= "java.lang.String" (type s))) ["test" 1 "test2" 3])

20:30 lazybot: ⇒ ()

20:30 brehaut: ,(= (type "A") java.lang.String)

20:30 clojurebot: true

20:31 seancorfield: ah, my bad... shouldn't be "quoted"

20:31 tomoj: ,(filter (comp #{String} type) ["test" 1])

20:31 clojurebot: ("test")

20:32 seancorfield: should be ##(filter (fn [s] (= java.lang.String (type s))) ["test" 1

20:32 "test2" 3])

20:32 minus the newline :)

20:32 mittchel: haha

20:32 Thanks

20:32 seancorfield: ,(filter (fn [s] (= java.lang.String (type s))) ["test" 1 "two" 3.0 "four"])

20:32 clojurebot: ("test" "two" "four")

20:33 mittchel: you guys gave me a lot of solutions

20:33 seancorfield: there are often many, many ways to solve a problem in clojure :)

20:33 brehaut: if your teacher is telling you to use type to test types, you should point out that they should be using instance? at least

20:34 ,(= (class {}) clojure.lang.IPersistentMap)

20:34 clojurebot: false

20:34 seancorfield: ,(filter (fn [s] (instance? java.lang.String s)) ["testing" 1 "two" 3.0 "four"])

20:34 clojurebot: ("testing" "two" "four")

20:34 brehaut: ,(instance? clojure.lang.IPersistantMap {})

20:34 clojurebot: #<CompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.lang.IPersistantMap, compiling:(NO_SOURCE_PATH:0)>

20:34 mittchel: But, this one works with vectors right: (filter (fn [s] (= java.lang.String (type s))) ["test" 1 "two" 3.0 "four"])

20:35 Or collections

20:35 brehaut: ,(instance? clojure.lang.IPersistentMap {})

20:35 clojurebot: true

20:35 srid`: any avout users here who found a way to drop zookeeper dependency?

20:35 seancorfield: any sequences... and [& y] gives you a sequence in y

20:35 srid`: it seems to me even using using the mongo backend will require zk for co-ordination.

20:35 (sorry for emacs wrapping up that message into two lines)

20:36 tomoj: would it be very difficult to write cljs versions of defprotocol/satisfies?/reify/extend-type/defrecord etc

20:36 for exposing to js

20:36 seancorfield: btw mittchel welcome to clojure :)

20:37 mittchel: Thanks a lot haha:D

20:37 Is there any website or something else you guys would advice me to read as a real beginner

20:38 gfredericks: did someone say 4clojure.com yet?

20:38 seancorfield: clojure koans project is good to practice on - as well as 4clojure.com

20:39 mittchel: I'm really going to give that a go.

20:39 I think my main problem is my way of thinking

20:40 PeregrinePDX: Just a warning. If you're slightly obsessive at all. Do not start a 4clojure problem if you intend to go to bed soon.

20:40 4clojure robbed me of a night of sleep since i couldn't figure out a solution

20:40 mittchel: haha I actually had the same problem with this one.

20:40 seancorfield: mittchel: mark volkmann's tutorial is probably a good read too http://java.ociweb.com/mark/clojure/article.html

20:40 mittchel: Maybe it sounds bad, but I've actually been working for 2 and half hours on this particular problem

20:41 PeregrinePDX: You're a newbie

20:41 I'm a newbie too

20:41 mittchel: seancorfield. looks awesome!

20:41 Is anyone using a Mac by coincidence?:P

20:41 PeregrinePDX: So I won't be judging people on how long it takes them to solve a problem.

20:41 * PeregrinePDX points at brehaut.

20:41 seancorfield: mittchel: most clojure developers are on macs i think

20:42 mittchel: Is there a way to get clojure working in terminal? Since eclipse gets buggy with the repl somethimes

20:42 seancorfield: mac and linux... very few windows folks...

20:42 amalloy: seancorfield: that's a pretty strong statement. mac or linux, yes

20:42 seancorfield: leiningen is your friend

20:42 mittchel: https://github.com/technomancy/leiningen

20:42 gfredericks: clojure confs don't look as macky as ruby confs

20:43 mittchel: Thanks seancor

20:43 seancorfield: leiningen manages all of your dependencies so you don't have to worry about java classpath nonsense, then you can just do: lein repl

20:43 gfredericks: clojure/west and clojure/conj both seemed very mac-heavy to me...

20:43 mittchel: Does the installation take long? otherwise I'll do it now

20:43 seancorfield: leiningen is a single shell script

20:44 mittchel: I actually just got a macbook air so getting used to it hehe

20:44 seancorfield: scroll down to "Installation", right-click on "Download the script" and save it to somewhere, make it executable and ensure it's on your path

20:45 mittchel: Often have the problem of having 3000 applications still running

20:45 seancorfield: folks generally put it in ~/bin/ i think

20:45 mittchel: does ~/bin exist on mac?

20:45 seancorfield: i.e., /Users/{username}/bin

20:45 you may have to create it

20:45 mittchel: alright, thanks again

20:45 Really appreciate your help

20:45 seancorfield: what were you using before mac?

20:46 mittchel: Windows

20:46 haha

20:46 Don't insult me now I said that

20:46 seancorfield: so you're still getting used to Terminal and *nix? :)

20:46 gfredericks: C:\

20:46 mittchel: Yep basicly.

20:46 Weird thing was like I tried to ping a website

20:46 and it kept on going

20:46 haha

20:46 seancorfield: hey, i have win xp and win 8 in VMs on my mac!

20:47 mostly to practice emacs / leiningen / clojure setup on so i can help others :)

20:47 although i run sql server express on xp so i can test clojure.java.jdbc

20:47 mittchel: haha great

20:47 Does that work good?

20:48 seancorfield: it works well enough to unit test c.j.jdbc against the MS jdbc driver and the jtds driver :)

20:49 i don't use windows for much except testing stuff when i have to

20:49 mittchel: my bin folder is actually in the main folder where Users map also is

20:49 seancorfield: i'm trying to avoid installing postgresql and oracle locally but at some point i'll probably do it so i can better test c.j.jdbc against those :(

20:50 mittchel: ~/bin should be /Users/{username}/bin - that's the most common place

20:50 mittchel: Alright, well the bin folder I mean is actually private anyways:P

20:50 seancorfield Could you give me 10% of your clojure knowlodge?

20:50 seancorfield: although you could always put the lein script in /usr/bin - unix system bin folder

20:50 mittchel: haha

20:51 You know whats giving me a hard time in mac

20:51 seancorfield: lol... i'm still pretty new... i only started with clojure in 2010... went to amit rathore's "pro bootcamp" one saturday

20:51 mittchel: simply creating a folder.. you have to press somewhere that is not a file lol

20:51 seancorfield: best $200 i ever spent

20:51 mittchel: haha

20:52 2010

20:52 that's 2 years

20:52 uvtc: mittchel: Although it's focus is on getting set up on GNU/Linux, you might have a look at this: <http://www.unexpected-vortices.com/clojure/brief-beginners-guide/&gt;.

20:52 gfredericks: 2 years in clojure is new. Most of us have been doing it for 10 or 15.

20:52 seancorfield: lol gfredericks !!

20:53 mittchel: Wow

20:53 seancorfield: mittchel: i mostly create folders in Terminal... mkdir somefolder

20:53 mittchel: You're a liar

20:53 wiki says Clojure is made in 2007

20:53 haha

20:53 seancorfield: gfredericks: is teasing :)

20:53 mittchel: I figured haha

20:54 @seancorfield: Do I need to download the source from lein too?

20:54 Or just the script

20:54 * gfredericks imagines a parallel universe where clojure became popular in 1993

20:56 gfredericks: mittchel: the lein script bootstraps itself

20:56 mittchel: alright

20:56 gfredericks: you'll probably see it doing that the first time you run it

20:56 mittchel: because its a .txt file when I download it

20:57 gfredericks: that is weird.

20:57 seancorfield: mittchel: just rename it to 'lein'

20:57 uvtc: mittchel: lein is a shell script. When you first run it (`lein self-install`), it installs the rest of Leiningen.

20:57 seancorfield: then make it executable: chmod +x lein

20:58 uvtc: i believe leiningen bootstraps itself on first use - you don't even need self-install these days?

20:58 uvtc: seancorfield: Right.

20:58 gfredericks: dat true.

20:58 seancorfield: download, make executable, lein repl

20:58 mittchel: I actually tried this: /Users/mittchel/bin/lein

20:58 Thanks for the help again :P

20:58 gfredericks: then at the repl run (#(% %) #(% %))

20:59 to make sure your computer is awake

20:59 seancorfield: you're so mean :)

20:59 mittchel: haha

20:59 seancorfield: if it's in that folder, then chmod +x ~/bin/lein should work

20:59 mittchel: when I did the chmod, then do the lein-instll command?

20:59 Since it still shows as a text file

20:59 seancorfield: no, just ~/bin/lein repl

21:00 you renamed it to just lein?

21:00 uvtc: mittchel: <http://www.unexpected-vortices.com/clojure/brief-beginners-guide/development-env.html#clojure-projects>

21:00 mittchel: Yes I did haha

21:00 seancorfield: then all you should need is ~/bin/lein repl

21:00 you'll want to put ~/bin on your path at some point for convenience

21:00 uvtc: mittchel: Oh, wait --- sorry, that guide is for Leiningen 2. I didn't ask which you were running (lein 1.x or 2)

21:01 mittchel: chmod: /Users/mittchel/bin/lein: No such file or directorya

21:01 Not running anything yet haha

21:01 seancorfield: it'll be lein 1.7.1 from the site

21:01 mittchel: Why does it give me the chmod error:/

21:01 seancorfield: mittchel: you said it was lein.txt - did you rename it?

21:02 uvtc: seancorfield: the "download the lein script" link at <http://leiningen.org/index.html> points to lein 2.

21:02 mittchel: I did

21:02 to just basically lein

21:02 seancorfield: uvtc: i pointed him at the github site

21:02 which is https://raw.github.com/technomancy/leiningen/stable/bin/lein and that's 1.7.1 i believe

21:02 mittchel: I removed the .txt from the name

21:02 uvtc: seancorfield: Oh, whoops, sorry.

21:03 seancorfield: mittchel: so do: ls -l ~/bin

21:03 what does it show?

21:03 mittchel: total 24

21:03 -rwxr-xr-x@ 1 mittchel staff 9905 13 mei 02:51 lein.txt

21:03 still lein.txt

21:03 huh

21:03 seancorfield: do: mv ~/bin/lein.txt ~/bin/lein

21:03 then: chmod +x ~/bin/lein

21:04 then: ~/bin/lein repl

21:04 mittchel: you are fast damn

21:04 seancorfield: i've been typing on *nix systems since '79 :)

21:04 mittchel: It's downloading stuff

21:04 clojurebot: Pardon?

21:04 seancorfield: mittchel: yup, it's installing itself and clojure

21:04 mittchel: 79? May I ask what your age is?

21:05 amalloy: seancorfield: save yourself some typing! mv ~/bin/lein{.txt,}

21:05 seancorfield: you'll get clojure 1.2.1 by default (outside a project)

21:05 you can create a new project: ~/bin/lein new playground

21:05 mittchel: I have to start it always by: ~bin/lein repl

21:05 ?

21:06 seancorfield: unless you add ~/bin to your path (edit .profile )

21:06 gfredericks: seancorfield is ##(+ (- 2012 1979) 10 (rand-int 30)) years old

21:06 lazybot: ⇒ 70

21:07 gfredericks: lazybot: you'd better apologize

21:07 uvtc: ~bin

21:07 clojurebot: :|

21:07 amalloy: 10d8

21:07 clojurebot: 48

21:07 mittchel: Where can I find the .profile if I may ask the last noob question haha

21:07 amalloy: probably a better guess by clojurebot

21:07 seancorfield: do: ls -a

21:07 that will show hidden files

21:08 and you may not have .profile yet on a brand new mac (? maybe)

21:08 what text editor are you using?

21:08 mittchel: -a command not found haha

21:08 Basic one: Texteditor

21:08 seancorfield: for the record everyone i'll be 50 on july 7th (and i already have my AARP card :p )

21:08 uvtc: mittchel: `cd` then `ls -a`

21:08 gfredericks: man clojurebot is good

21:09 uvtc: gfredericks: I wish I knew more of its secrets.

21:09 mittchel: it says

21:09 . .. .DS_Store lein

21:09 uvtc: ~age-of-universe

21:09 clojurebot: No entiendo

21:09 mittchel: hehe

21:09 gfredericks: ~42

21:09 clojurebot: 42 is the answer

21:10 uvtc: gfredericks: I laughed out loud when I read in the log what it replied to "gentlemen"

21:10 gfredericks: ~gentlemen

21:10 clojurebot: You can't fight in here. This is the war room.

21:10 seancorfield: mittchel: sounds like you're in ~/bin not your home folder

21:11 mittchel: You can simply get in home by: 'cd'

21:11 ?

21:11 in there

21:11 haha

21:11 seancorfield: mittchel: the pwd command will show you where you are and, yes, cd takes you home

21:11 mittchel: . ..

21:11 thats the output lol

21:12 seancorfield: ok so: open -a TextEdit .profile

21:12 that will fire up TextEdit to edit that file (I hope )

21:12 mittchel: The file /home/.profile does not exist.

21:12 we should create it first I guess

21:12 :P

21:12 seancorfield: touch .profile

21:12 :)

21:13 (that's a command)

21:13 mittchel: operation not supported

21:13 :P

21:13 seancorfield: really?

21:13 mittchel: Really haha

21:13 MacBook-Air-van-Mittchel:home mittchel$ touch .profile

21:13 touch: .profile: Operation not supported

21:13 amalloy: seancorfield: you had him write it to /home

21:13 instead of to ~

21:13 mittchel: shouldn't I be in users?

21:13 amalloy: or at any rate he did it. dunno if you told him to

21:13 mittchel: in my user directory

21:14 Google tells me this: The .profile file in MacOSX works exactly how you would expect. Simply create the .profile file in your user directory if it doesn't exist.

21:14 amalloy: cd ~

21:14 seancorfield: if he did `cd` he should be in his home folder

21:14 mittchel: when you typed cd (on its own), where did it put you? type pwd to find out

21:15 mittchel: damn I screwed

21:15 You were right

21:15 it brings me to /Users/Mittchel

21:15 but I actually have a 'home' folder so I thought you meant that one

21:15 uvtc: mittchel: "in your user directory" means in /Users/yourname, not in /Users.

21:15 mittchel: It has a .profile yay haha

21:15 uvtc: mittchel: and the `cd` command takes you to /Users/yourname.

21:15 seancorfield: open -a TextEdit .profile

21:16 mittchel: yea it's open:D

21:16 But nothing in there..

21:16 seancorfield: the fallibility of the english language

21:16 ok, add one line: export PATH=/Users/mittchel/bin;$PATH

21:16 then save it

21:16 then in Terminal: . .profile

21:16 that should reload it and then: which lein

21:17 should tell you /Users/mittchel/bin/lein

21:17 uvtc: seancorfield: I think that should be a colon, not a semicolon.

21:17 seancorfield: you are right - just realized - sorry

21:17 mittchel: MacBook-Air-van-Mittchel:~ mittchel$ . .profile

21:17 -bash: /Users/mittchel/bin: is a directory

21:17 hehe

21:17 seancorfield: export PATH=/Users/mittchel/bin:$PATH

21:17 sorry

21:18 * seancorfield crosses his fingers

21:18 mittchel: My terminal is doing some weird stuff

21:18 MacBook-Air-van-Mittchel:~ mittchel$ ls -a

21:18 -bash: ls: command not found

21:18 while in my user folder:/

21:19 uvtc: mittchel: type: `which ls`

21:19 gfredericks: mittchel: are you sure you're using a computer?

21:19 mittchel: hahaha

21:19 MacBook-Air-van-Mittchel:~ mittchel$ which ls

21:19 -bash: which: command not found

21:20 seancorfield: sounds like the line in .profile is messed up

21:20 and you'll need to do: . .profile

21:20 uvtc: Hm. I'm not a mac person ... is there some extra dev or unix packages you need to install to get the usual suite of commands?

21:20 seancorfield: no

21:21 gfredericks: brew install linux

21:21 seancorfield: mac has a full unix system already

21:21 mittchel: Alright I edited .profile

21:21 seancorfield: ok, and: . .profile

21:21 but you may need to open a new Terminal window

21:21 we may have messed up PATH in this one :)

21:21 mittchel: when I type . .profile

21:22 it just gives me a new line

21:22 haha

21:22 seancorfield: yes, that's right

21:22 mittchel: which lein now right

21:22 seancorfield: yup

21:22 if it doesn't work, open a new Terminal window and try in there

21:22 mittchel: It works

21:22 MacBook-Air-van-Mittchel:~ mittchel$ which lein

21:22 seancorfield: w00t!

21:22 mittchel: yay

21:22 lein repl works

21:23 seancorfield: so now you can just type lein repl

21:23 yay :)

21:23 mittchel: @seancorfield: You my man are the best!

21:23 seancorfield: you're off to the races now!

21:23 mittchel: haha

21:23 seancorfield: sorry it was a bumpy ride

21:23 wkmanire: I want to be, the very best, like noone was before.

21:23 uvtc: seancorfield: but why couldn't he see `ls` or `which` earlier?

21:23 seancorfield: btw, one of the great things on a mac is iChat because you can screen share with it and do remote pair programming

21:24 uvtc: because we messed up the PATH variable

21:24 mittchel: To catch 'em all is my real test

21:24 uvtc: seancorfield: Ah.

21:24 seancorfield: remote debugging via irc can be hard...

21:24 mittchel: @seancorfield: Didn't really was bumpy. You guided me great

21:24 wkmanire: mittchel: What did you install?

21:25 seancorfield: wkmanire: lein shell script

21:25 mittchel: Leining, I heard

21:25 haha

21:25 wkmanire: Which version?

21:25 I want to try to switch to 2 pretty soon.

21:25 mittchel: Alright. So I'll read this: http://java.ociweb.com/mark/clojure/article.html#FP and start with 4clojure.com

21:25 1.7 if I'm correct

21:25 seancorfield: mittchel: have you used iChat yet? if you have Gtalk account, feel free to add me: seancorfield@gmail.com

21:26 i'll be happy to help via IM or even screen share if you want

21:26 mittchel: @seancorfield: haven't used yet. I'm going to add you. I would like to thank you for your help, you're very kind person :)

21:28 Doesn't iChat come with the OS?

21:28 It's not on my machine lol

21:28 seancorfield: any time... always happy to help folks new to clojure and new to mac

21:28 ah, on new macs it's iMessage or Messages or something

21:28 mittchel: Ahh alright

21:29 I was having doubts between iMessage and facetime

21:29 but iMessage is something you have to install yourself

21:29 So I think its facetime

21:29 seancorfield: one of iChat or iMessage should be pre-installed

21:29 i would have expected it to be in your dock already

21:30 mittchel: It's still iChat on your mac?

21:30 seancorfield: i'm on 10.7.3 and have iChat

21:31 mittchel: Well

21:31 iMessage allows you to send plain text messages to an Apple device

21:31 I guess its facetime

21:31 seancorfield: yup, i haven't installed the beta of that yet

21:31 which mac os are you on?

21:32 mittchel: Mac OS X Lion 10.7.3 (11D50d)

21:32 seancorfield: (click on the apple, top left, select About this Mac...)

21:32 mittchel: Thats the only thing I do know

21:32 haha

21:32 seancorfield: you should have iChat then

21:32 in the Applications folder

21:33 mittchel: For some reason I don't have it

21:33 maybe I deleted it? don't remember lol

21:33 I wouldn't delete an application, but you never know

21:33 seancorfield: out of curiosity, in a Terminal, type: open -a iChat

21:34 wkmanire: I'm not sure how to write unit tests for my seesaw based UI.

21:34 My code is only instantiating swing objects and showing them.

21:35 mittchel: it opens iMessage huh

21:35 wkmanire: All of the work is being done by seesaw.

21:35 mittchel: but that's not correct.. it can't be. cause I message is for plain text like to mobile phones and such

21:35 wkmanire: Is there any value in testing that the UI layer laying itself out correctly?

21:35 seancorfield: mittchel: it works for AIM, Yahoo! and Gtalk as well

21:36 ibdknox: wkmanire: it's really valuable to unit test pure UI code

21:36 seancorfield: you just have to add those accounts

21:36 ibdknox: wkmanire: correction: rarely

21:36 mittchel: It shows your google talk account

21:36 but as soon as I'm trying to send the message it says user doesn't have imessage

21:36 haha

21:36 wkmanire: ibdknox: You confused me.

21:36 seancorfield: i suppose i should upgrade then :)

21:37 ibdknox: wkmanire: sorry. It is rarely useful to unit test pure UI code

21:37 it's usually a lot of work, frail, and doesn't actually prove things are doing what you expect

21:37 mittchel: Are you able to share screen with iChat?

21:37 wkmanire: ibdknox: So I won't worry about it and I'll make sure there isn't anything in there that is test worthy.

21:38 ibdknox: Thank you.

21:38 xeqi: yeah, unit testing UI isn't worth the effort

21:38 seancorfield: yes, iChat does screen sharing... so I'm sure iMessage does too since it's the upgrade

21:38 xeqi: integration testing can be sometimes

21:38 seancorfield: the iMessage installer wants me to reboot so i'll be back in a bit

21:39 mittchel: Sure no problem

21:39 gfredericks: boot and reboot were in a boat. boot fell out. who was left?

21:40 wkmanire: gfredericks: re?

21:40 gfredericks: (def re? (partial instance? java.util.regex.Pattern))

21:40 ibdknox: lol

21:44 wkmanire: I just listened to a heavy metal version of Trolololol on youtube.

21:44 I was expecting to turn it off after a few seconds.

21:44 It ended up exceding all expectations.

21:44 uvtc: Is it too far off-topic to ask git questions in here?

21:45 amalloy: wkmanire: some good advice i got is to make sure your app can run in CLI mode or GUI mode. then it's easy to write functionality tests against the CLI version, and you can't accidentally entangle business logic with the shiny buttons

21:45 wkmanire: amalloy: Is that always practical?

21:45 amalloy: In this particular case it is.

21:45 amalloy: is unit testing always practical?

21:46 wkmanire: I don't know the answer to that question actually.

21:46 mittchel: What's the best way for me to build this: for (int i = 0; i < 10; i += 2) in Clojure using Loop

21:47 gfredericks: mittchel: why do you want to use loop?

21:47 mittchel: I actually have to

21:47 gfredericks: is this some 4clojure thing?

21:47 mittchel: No it's actually something for school

21:47 a small part of an assignment

21:47 gfredericks: clojure is in school?

21:48 mittchel: Ye they wanted to bring in some functional programming

21:48 gfredericks: I saw clojure in B&N today for the first time

21:48 mittchel: and they wanted you to use clojure.core/loop specifically?

21:48 mittchel: Yep they do

21:48 * gfredericks realizes that's not a real var

21:48 mittchel: haha

21:49 amalloy: &#'clojure.core/loop

21:49 lazybot: ⇒ #'clojure.core/loop

21:49 mittchel: They wanted me to transform some java code into clojure.. and I had to use loop for that part

21:49 gfredericks: amalloy: I realized that false fact because you were in my head telling me it. Your communications are conflicting.

21:49 amalloy: i'll work on it

21:49 gfredericks: now wtf is that a var. isn't it a special form?

21:49 &#"clojure.core/if

21:49 lazybot: java.lang.RuntimeException: EOF while reading regex

21:50 gfredericks: &#'clojure.core/if

21:50 lazybot: java.lang.ClassNotFoundException: clojure.core

21:50 amalloy: it's a macro

21:51 gfredericks: mittchel: (loop [i 0] (when (< i 10) (do stuff) (recur (+ 2 i)))); though personally I would (doseq [i (range 0 10 2)] ...)

21:51 amalloy: on top of loop*

21:51 gfredericks: bah.

21:51 mittchel: Ahh

21:52 Elementary is even easier than Easy right haha

21:53 Now he's asking me to write my own predicate: not-zero?

21:53 Time to go to bed

21:53 haha

21:54 Problem is that he does;t provide any documentation on that whatsoever

21:55 gfredericks: (def not-zero? (complement zero?))

21:57 mittchel: lol

21:57 I was actually writing an if

21:58 to check if(=( 0)

21:59 how can you 'return false' in clojure?

22:00 Like lets say (if(= x 0) x) I want it to return 0

22:00 uhh true

22:01 gfredericks: (if (= x 0) true false)?

22:01 or you probably want the other way around

22:01 seancorfield: false is false, so is nil, true is true (so is anything that isn't nil or false)

22:01 mittchel: i'm upgraded to iMessage btw

22:02 mittchel: seancorfield: let me try to reach you:P

22:02 (defn not-zeroo? [x]

22:02 (if(>= x 0)

22:02 true false))

22:02 Why does it give me true when I give it a number of 5 and 0

22:03 oh nevermind

22:03 seancorfield: x >= 0

22:03 mittchel: yeap

22:03 I noticed

22:03 its getting late

22:03 haha

22:03 seancorfield: (def non-zero? (complement zero?)) ;; :)

22:03 mittchel: Yea gfredericks told me that one too

22:03 It's so frustrating that I'm always thinking the hard way

22:04 Sean Corfield is not available for iMessage

22:04 haha

22:04 Try to contact me: mittchel@gmail.com

22:04 PeregrinePDX: At some point I am sure I will learn to type clojure-jack-in instead of clojure-hack-in

22:05 mittchel: So basically complement does everything in the opposite way?

22:06 seancorfield: is it working when you try to message me?

22:06 amalloy: PeregrinePDX: just bind it to C-c j

22:07 gfredericks: yeah complement takes a predicate (a true/false function) and returns a new function that does the opposite

22:07 complement is for opposite day

22:07 mittchel: Does it only take predicates?

22:07 so (complement odd?) gives you even numers

22:07 Well, a check for even numbers

22:08 seancorfield: mittchel: i added you - probably waiting for accept on the request?

22:08 mittchel: Are you using iMessage? (blue cloud logo)

22:08 gfredericks: mittchel: any function can be thought of as a predicate, due to the fuzzy definitions of truthy and falsy

22:10 I guess what I mean is that 'predicate' is a loose concept

22:10 PeregrinePDX: amalloy, hmm that's a good idea. Goes to figure out how to bind.

22:10 mittchel: gfredericks: thanks

22:10 seancorfield: This is really weird, I don't think you need to accept people

22:12 seancorfield: oh, i'm used to ichat...

22:13 it said i couldn't send to you

22:14 mittchel: @seancorfield: You've got a google talk message.

22:14 @seancorfield: you added me on jabber too

22:15 technomancy: PeregrinePDX: and read a few William Gibson novels while you're at it

22:16 starting with Neuromancer, naturally

22:18 PeregrinePDX: Yay I figured out how to bind the key

22:19 wkmanire: Isn't there function that shows all of the members of Java object instances?

22:21 That was a crappy question. I remember reading somewhere in the seesaw documentation that you can list which functions will work on a swing object.

22:21 Gonna go look again.

22:21 amalloy: clojure.reflect/reflect?

22:22 clojurebot: vimclojure is http://kotka.de/projects/clojure/vimclojure.html

22:22 amalloy: thanks clojurebot

22:25 technomancy: is it just me, or is lein-cljsbuild's recommended new format needlessly verbose and boilerplatey for basic use?

22:25 can't we just have good defaults?

22:25 wkmanire: I haven't tried to use it yet.

22:32 xeqi: &(vec (.getMethods :k))

22:32 lazybot: java.lang.IllegalArgumentException: No matching field found: getMethods for class clojure.lang.Keyword

22:33 Raynes: gf3: This is going to be the weirdest thing you ever hear me saying, but: cljbin seems to be down.

22:33 gfredericks: optimizing a nontrivial core.logic program is a fascinating process.

22:34 wkmanire: I have a list of maps, I want to pull one key from each item in the list into a seperate list. Should I use 'for' for that?

22:35 amalloy: or map. up to you

22:36 wkmanire: amalloy: I used map, thanks.

22:58 gfredericks: wkmanire: map is easier when your keys are keywords, since the key itself can be your map fn

22:58 wkmanire: gfredericks: That is what I did. thank you

22:59 gfredericks: Although it turned out to be the wrong way to do it.

22:59 gfredericks: drat.

22:59 wkmanire: it* being what I'm tryin to do.

22:59 I want to bind a list of maps to a listbox.

23:00 I need to provider a renderer to the listbox I think.

23:01 gfredericks: (seesaw.core/config! l :model ads :renderer :name) but this isn't working.

23:03 * gfredericks has no idea

23:04 wkmanire: gfredericks: ads is a list of maps that contain addresses. I want to bind it as the model of a listbox from seesaw.core. I want it to show the name from each map.

23:05 I've tried a couple of things, I'm sure I'll figure it out here soon.

23:20 xeqi: wkmanire: have you seen https://github.com/daveray/seesaw/blob/master/test/seesaw/test/examples/cell_renderers.clj?

23:21 _KY_: How do I find the source code for function "assoc-in"?

23:21 amalloy: ~def assoc-in

23:22 _KY_: Nice=)

23:22 technomancy: what's thiiiiiis? https://github.com/technomancy/lein-gnome

23:23 amalloy: technomancy: it's in your github account! if you don't know what it is, someone may have hacked you!!!

23:55 geoffeg_c: for clojurescript templating, is hiccups still a good choice? has something that's still under active development come along? https://github.com/teropa/hiccups

23:56 gfredericks: geoffeg_c: crate?

23:57 geoffeg_c: jesus, this ibdknox guy

23:57 tomoj: there is enfocus, but I haven't used it

23:59 bsteuber: ibdknox: congrats :) so nice to see this come to reality..

23:59 PeregrinePDX: Gah stoopid bees

Logging service provided by n01se.net