#clojure log - Mar 03 2012

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

0:02 ztellman: I shouldn't drink and read IRC logs: https://github.com/ztellman/potemkin/blob/master/README.textile

0:02 mk: how can I redefine a function via the repl?

0:03 I'm using aleph with (start-http-server hello-world {:port 8080}), and I'd like to have the hello-world function send out a new body

0:04 TimMc: ztellman: Huh, cool. I hadn't actually looked at what potemkin *does*.

0:04 ztellman: mk: if you just do another (defn hello-world …) at the repl, that should work fine

0:04 TimMc: once you look at the abyss...

0:05 TimMc: ztellman: Ah, well, I already have.

0:05 ztellman: https://github.com/baznex/imports/blob/7754d3a565a4db47b68cdf1e86bb6edf6bb8cbbd/src/org/baznex/imports.clj#L169

0:06 ztellman: TimMc: wat

0:06 TimMc: ^ yet another ugly reification of IFn (this one didn't work out and was reverted, by the way)

0:07 ztellman: reifications of common constructs in clojure require an awful lot of effort

0:07 TimMc: ztellman: That was in service to a macro that would create a private defn proxying a Java static method.

0:08 So yes, the abyss.

0:08 mk: yeah, it doesn't seem to change. I'm doing a defn hello-world .... :body "TEST"})), and it still gives me hello world. It's not a cache issue, since I'm going to a different url

0:09 ztellman: TimMc: this seems positively innocuous compared to that: https://github.com/ztellman/penumbra/blob/master/src/penumbra/opengl/core.clj#L171

0:10 though to be fair, the initial version of that was written in my first week of writing clojure

0:10 mk: I'm using eclipse/ccw

0:11 ztellman: mk, you're not wrapping the function in wrap-ring-handler by any chance?

0:13 mk: nope. just the basic wiki code. is it a namespace issue?

0:14 TimMc: `(defmacro ...) is always a good time

0:15 ztellman: TimMc: my clojure/west talk will involve macros that write macros

0:15 it won't condone them, but it will involve them

0:15 TimMc: haha

0:16 ztellman: mk, if you enter this at the repl: (let [ch (result-channel)] (hello-world ch nil) @ch), what do you see?

0:16 mk: java.lang.IllegalArgumentException: No implementation of method: :consumer of protocol: #'lamina.core.channel/ChannelProtocol found for class: lamina.core.pipeline.ResultChannel (NO_SOURCE_FILE:0)>

0:18 ztellman: ugh, why can't protocols notice they haven't actually changed...

0:20 TimMc: Would it be possible for the compiler to emit less-performant dynamic-coding-safe code for protocols depending on a command-line switch?

0:20 because that would be killer

0:21 (or do protocols *have* to be load-once)

0:23 ztellman: mk, https://gist.github.com/1964538

0:24 it loses the var when creating the handler, so it won't update if the var is redirected

0:24 but if you do this, then updating hello-world will change the response

0:26 I've got to run, hope that helps

0:28 mk: thanks, that does

1:55 chris-m-r: if someone has access to the clojurescript github page, would be good to mention that the jdk is required, rather than just the jre

1:58 mk: file an issue. closing it shouldn't be much more trouble than reading an email.

1:59 talios: or make a pull request with the content change :)

2:04 Bahman: Hi all!

2:08 mk: hello Bahman !

3:58 tomoj: if I want to define a protocol, implement its interface in java, and use that implementation in clojure, do I have to put the protocol definition in a separate project?

4:15 _ulises: morning

4:19 Cozey: Hello. Is there some clojure library to handle [the apps] user registration, login, password change, reset password functionality etc?

4:21 muhoo: where did clojure.contrib.graph go?

4:22 and no, the wiki page with "where did conttrib go?" doesn't list anything for graph

4:25 _ulises: Cozey: is this about web-dev?

4:28 Cozey: yes. sorry for no clariffication

4:29 it's this common stuff with users which is highly reusable. also has to do with site security

4:29 so - somehing like spring-security for ring ?

4:30 _ulises: Cozey: I know that there is a session middleware for ring, but I'm not sure there's much CRUD stuff for users around. I seem to recall one such module for Noir though.

4:31 Cozey: is noir popular/developed? I was thinking about giving it a try

4:31 _ulises: I'd like to think it's becoming more and more popular. I for one use it a fair bit

4:32 and ibdknox (the creator/main dev) is very active in all things Clojure so I reckon that yes, it's developed and maintained

4:36 dhkl: Cozey: noir is probably the easiest to get started with. The documentation is quite good.

4:36 Cozey: I've used compojure before for a while, so i'm not really a beginner now

4:36 but i'll give it a shot

4:37 just didn't want to write the security stuff myself.

4:38 i have actually managed to use spring-security with clojure, but it's a mess and i wouldn't recomment it do anyone

4:38 _ulises: heh

4:38 Cozey: the're just too much spring-security is bringing in to the clj world

4:45 What about i18n? I read here in google that java world uses .properties files for this, but is'nt gettext a better standard [with support for plural forms etc]

4:47 talios: we use gettext

4:48 tho we also wrote an antlr gettext grammer to support it, we couldn't find any decent java gettext libraries that worked the way we wanted

5:09 Cozey: do you host it on github

5:09 ?

5:12 talios: nope, thats sadly stuck inside our work git repos.

5:14 i wanted it to be open source, but the powers that be wernt keen at the time.

5:15 Cozey: mhm

6:02 tutysra: hi there

6:02 _ulises: hey tutysra

6:03 tutysra: I am using swank + slime, whenever a command throws an exception successive execution of other commands also gives the same exception back in slime repl

6:04 others in room have experienced something similar, i had reinstalled emacs + clojure mode, still the behavior is the same

6:05 _ulises: perhaps it's the swank version?

6:06 tutysra: _ulises : using swank version 1.4.0

6:06 _ulises: same as me :/

6:07 raek: tutysra: did you close the first exception? (by pressing 0)

6:08 _ulises: yup

6:08 tutysra: raek : yes i killed that buffer in emacs

6:08 _ulises: oh, eek, heh

6:09 tutysra: raek : C+x k

6:09 _ulises: tutysra: I think raek meant whether you dismissed the exception by pression 0

6:10 raek: tutysra: ah, if I just ignore the buffer then the repl continues to work, but if I kill the buffer the old exception popped up again

6:10 tutysra: _ulises : no i didn't pressed 0

6:11 raek: so I guess the second time you eval something, slime realized you have an exception you didn't deal with, and opens that buffer again

6:12 tutysra: raek : ok...i am new to emacs, so, what is the preferred workflow? you guys keep all the error message open in their buffer? or should I just press 0 to dismiss them instead of killing the buffer?

6:12 raek: tutysra: I have always dismissed it by pressing 0

6:13 then the buffer goes away

6:13 tutysra: raek : ok...thx

6:13 raek: in Common Lisp, you can often do more things than just return to the top level

6:14 and Slime is really built for CL

7:12 Vinzent: Hi, is there public function which parses protocol implementation definition in a map? e.g. (foo [x] ...) => {:foo (fn [x] ...)}

9:17 drostie: This might be a very evilly question, but how far are you guys from ClojureScript in ClojureScript? I became interested mostly because I wanted to run ClojureScript directly in Node. >:D

9:18 Now I find out that if I want to run it I'll need Java, and Java's JS engine, to run a REPL that won't have access to Node libraries, etc.

9:18 RickInGA: that's actually a cool question...

9:18 drostie: (or maybe I'm missing something.)

9:19 RickInGA: I haven't looked into it yet (still pretty early in the learning process)

9:19 But I have heard that the ClojureScript compiler was written in Clojure

9:19 As opposedd to the Clojure compiler, which has a lot of java in it

9:20 drostie: I know. :D

9:20 RickInGA: But from what you are saying, the CLJS in Clojure requires java... so it is not CLJS in CLJS

9:21 I can't answer your question, but you have given me more to think about, and some questions of my own

9:21 drostie: Well one thing is that CjS is Cj. So CjS-in-Cj starts you very far off towards Cj-in-Cj.

9:22 RickInGA: did you see that some people have done clojure in python, for the pypy compiler

9:22 drostie: (replace "is Cj" with "is a subset of Cj" I guess.)

9:23 yeah. might be nice. I'll miss lisp's bignums if I switch to CjS.

9:23 RickInGA: some of the numeric things probably will get added

9:23 drostie: Python also has bignums so that would actually not be so bad. :D

9:24 RickInGA: I know that vectors, which are 32-bit tries in clojure are just arrays in java

9:24 if you 'modify' a vector in javascript, you just get a copy

9:25 for large vectors, this will have performance issue

9:25 but for an early release, they didn't feel like being able to handle huge datastructures was a priority

9:26 drostie: They're entirely right. Copying an array is one of the fastest things you can do in JavaScript -- also one of the most succinct.

10:02 okay, it looks like I could at least do bignum parsing and bignum addition and multiplication in perhaps only 40-50 lines of fast JS code, by encoding as an array of N numbers divisible by 10^7 (so that the very large "digits" can be multiplied without losing precision).

10:02 But division and modulo would be more complicated. :x

10:03 RickInGA: wow

10:03 I bet you have a high score on project Euler :)

11:37 mk: what is the way to set up a cached/DP function return value?

11:42 drostie: Okay, I slightly underestimated the work to provide a new BigNum primitive in JavaScript for ClojureScript. Rather than 40-50 lines of code it came out at 58 lines of code just to implement + and * .

11:42 (and string parsing and bignum * num and other such cases).

11:43 http://www.bpaste.net/show/24517/

11:46 mk: nice work :)

11:47 drostie: mk: yes but it's not good enough and therefore I give up. ^_^

11:48 mk: what's the problem?

11:48 drostie: Lispy bignums have so many more features. :P

11:48 like moduluses and such.

11:48 mk: how many?

11:50 drostie: that's a tough question. Hm.

11:50 mk: and why a new BigNum? (I'm not familiar with clojurescript.) Does it lack one now, or?

11:55 drostie: mk: https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure "Currently ClojureScript numbers are just JavaScript numbers"

11:57 mk: I see

11:57 drostie: mk: but I should check whether Google Closure already has bignums. ^_^;;

12:00 mk: :o it does, there is a goog.math.Integer class.

12:01 TimMc: I'd also take a look around for other EPL-licensed JS that implements bignum

12:01 drostie: Well it was just a random fun thing to do. ^_^

12:02 TimMc: Maybe not even EPL licensed, if you can conditionally compile CLJS against a third party JS lib.

12:02 mk: implementing a bignum yourself is probably among the things that a programmer should try regardless :)

12:03 TimMc: true

12:03 along with finite state machines, compilers, and MUAs

12:05 mk: I'd add simple text editors and http servers to the list, too

12:05 AimHere: Alternatively just reimplement emacs and cross them all off your list at once

12:06 drostie: Wow, also I didn't realize that EPL was GPL-incompatible. o_O. One more reason to not like the GPL I suppose.

12:06 TimMc: drostie: Not really.

12:06 There's a lot of incidental incompatibility out there in license-land.

12:07 A far better reason to not like the GPL is the aggressive virality of it.

12:07 (Which I like, for some projects.)

12:08 AimHere: EPL has a choice of law clause which is a good way of fostering unnecessary licensing incompatibilities

12:09 drostie: Well the "aggressive virality" has toned down a bit, but yes, there exists a way to use GPL as a proprietary license by exploiting that, in a way that one can't do with BSD.

12:09 AimHere: What way would that be/

12:10 drostie: You give someone a license to use your work via GPL, and then don't give them your source code. They can't share it without sharing the source code and they can't make you give it to them, so... :P

12:10 AimHere: How is that different from giving out BSD-licensed code and not giving the source code to it?

12:11 Other than the people with the BSD-licensed code can make copies of binary-only freeware, I suppose

12:11 mk: they can share it

12:11 AimHere: So a choice between binary-only unfree junk and not having the right to give the software out at all

12:11 drostie: And they could disassemble it and do weird stuff and share that weird stuff under the BSD license. :D

12:12 pipeline: drostie: well, no, they can't do that. the GPL compels the upstream licensee to make the source available on request

12:12 AimHere: Someone publishing software like that whether under BSD or GPL is being a dick

12:12 pipeline> THe copyright owner can do what the fuck he wants. It's his code

12:12 mk: pipeline: that's only the case for GPL-derived works. a license isn't a contract, and does not impose obligations on the original author

12:13 drostie: pipeline: what they said. The GPL is intentionally a *license*, not a *contract*, and thus places absolutely no obligation on the licensor.

12:13 AimHere: It's a silly corner case anyways, I don't think it means anything

12:14 pipeline: oh, you mean on green-ground work

12:14 mrBliss: Noir question: using noir.status/set-page! I can provide a default string for 404 requests. How can I get it to route the 404 requests to a function instead?

12:15 TimMc: pipeline: "green ground"?

12:15 drostie: "green" as in fresh, new, untrodden.

12:15 TimMc: Does this have anything to do with "blue sky"?

12:15 Ah, "from scratch".

12:16 drostie: But I agree. It doesn't mean much of anything. It could, I suppose, if Apple decided to play a large practical joke on the FSF by GPLing their operating system just to pollute the namespace, but other than those fringe cases, it's not a very useful loophole. ^_^

12:17 TimMc: Haha, that would be amazing.

12:17 drostie: Possibly you could get Stallman to reject a GPLed piece of software and then make fun of them both.

12:17 AimHere: Well Stallman would reject the nominal sourceless GPL as unfree to begin with, and quite rightly

12:17 The aim of the game is 'free software', not the GPL

12:18 mk: it would also mean that a source code leak would not legally qualify as a leak

12:18 AimHere: Well it would

12:18 mk: it would be possible to use the code, and it would be difficult to claim trade secret on it (I suspect)

12:19 TimMc: The license would cover the source code.

12:19 mk: (though I don't know as much about trade secrets)

12:19 AimHere: But if you've not published the source code yet, it would still be a trade secret

12:19 TimMc: Right, any court would reject a trade secret argument on that.

12:19 AimHere: There WAS a test case of this nature. Someone pilfered source code from an organization that was going to put it out as free software anyways, IIRC

12:20 And the court ruled that he shouldn't have done so

12:20 TimMc: AimHere: Imagine if that org had released binaries and called them GPL, but withheld source.

12:20 AimHere: That was before anything at all was published, of course

12:21 mk: AimHere: publication is a solid legal indicator of intention. I'd think that declaring the code to be GPL is the same.

12:22 AimHere: Well if you say 'These binaries are GPL. No you can't have source', isn't that a clearer indicator of intent than the GPL, which doesn't actually mention this case

12:24 dnolen: drostie: as far how far off from CLJS-in-CLJS not far I think - but no one's taken a crack at it.

12:24 mk: unsure. The GPL seems to give away certain rights, and I think the right to having the source code is among them.

12:25 dnolen: drostie: it's easy to connect to a Node REPL as well, no need to fire up Rhino.

12:25 mk: it's like people who publish some stupid photo, and then put a big disclaimer under it saying "you are not allowed to use this photo"

12:25 heck yes I am, there's fair use, and a variety of other provisions

12:27 drostie: dnolen: are there docs on that somewhere? starting up java for every request is getting tiresome. ^_^

12:28 dnolen: drostie: not much in the way of docs, https://github.com/swannodette/clojurescript/tree/node-repl

12:28 drostie: I have a branch I use for testing purposes, not robust yet - script/node-repl

12:29 drostie: dnolen: yay! thanks.

12:30 dnolen: drostie: no problem. Feedback appreciated, good CLJS support for Node.js is desirable, but we need someone to actually focus on that.

12:31 drostie: also cljs.numeric-tower would be cool, core arithmetic probably can't support BigNum, but no reason that can't come via a library

12:33 spoonman: hi, does anyone have a nice updated tutorial on setting up emacs and clojure? I'm a an emacs and clojure begginer

12:34 mk: spoonman: (if you're just looking for an ide, I'm finding eclipse+ccw is easy enough)

12:36 spoonman: mk: thanks but i'm not a fan of eclipse neither netbeans

12:38 mk: if I have a function that takes a long time to compute, and I want to cache the result, what's the way to do this?

12:40 AimHere: memoization might help, if we're talking about caching stateless functions that get repeatedly called with the same arguments

12:42 mk: I was wondering in general, though at the moment I'd like to download a webpage and have it expire after a day

12:49 TimMc: dnolen: I suppose it helps that JS generation in CLJS is probably more approachable than JVM bytecode generation in CLJ. :-)

12:54 raek: spoonman: https://github.com/technomancy/swank-clojure

12:54 this is the official up to date info

12:55 it's pretty simple if you have a clean install

12:55 if you don't, make sure you don't have slime installed in emacs, and that you don't have any old swank-clojure as a plugin or as a dev-dependency

13:01 rlb: FWIW, the GPL says 'The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source

13:01 form of a work.'.

13:01

13:02 dnolen: TimMc: definitely. But JS also is a dynamic host - many things are simpler because of that.

13:04 spoonman: raek: thanks, i will try that one

13:05 raek: spoonman: if you have followed any other guide, make sure you undo any steps you performed there

13:08 spoonman: raek: ok, thanks

13:13 dgrnbrg: is there a function in clojure.core to reverse a map?

13:13 i.e. create the map from vals to keys

13:14 I know how to do, but it seems like something that would be built-in, but I don't see it on clojuredocs

13:14 Vinzent: I think no

13:14 dgrnbrg: thanks :)

13:15 Vinzent: (zipmap (vals m) (keys m)) is pretty short :)

13:15 Iceland_jack: dgrnbrg: a map doesn't have to be a bijection, why would you want to reverse a map?

13:15 dgrnbrg: vincent, is vals and keys guaranteed to be in the same order? It seems like vals could be a set an come in other orders

13:15 Iceland_jack: keep in mind that Vinzent's solution ruins duplicates

13:15 &(let [m {:a "m" :b "m"}] (zipmap (vals m) (keys m)))

13:15 lazybot: ⇒ {"m" :b}

13:15 dgrnbrg: Iceland_jack: my map is a bijection :)

13:15 Iceland_jack: as it should

13:16 ah

13:16 TimMc: dgrnbrg: Yes, vals and keys on a map are ordered collections, in the same order, and will return the same order every time (for the same exact map instance in the same JVM)

13:16 dgrnbrg: ok, good to know :)

13:17 I can probably get rid of some order invariant-ing code I wrote :)

13:17 I am writing a hardware description language in clojure

13:17 clojure on fpgas

13:18 Vinzent: wow, that's cool! Are you doing it just for fun or no?

13:18 dgrnbrg: just for fun :)

13:18 I think that all the HDLs that exist suck

13:18 so I'm making a better one

13:18 it has a strong type system w/ composite types and pattern matching

13:19 it will have a multithreaded simulator that can co-simulate with verilog

13:19 and it'll generate verilog (and maybe vhdl later)

13:19 it also will have automatic pipelining features

13:20 I currently have math on unsigned modular bit-constrained types, structs, enums, bools, and a simulator

13:20 Vinzent: is it embedded dsl or you're writing compiler in clojure?

13:20 dgrnbrg: it's an embedded dsl with a full-blown compiler

13:20 suppose you did something like (+ ((uintm 3) 2) + 4)

13:21 that'd give you ((uintm 3) 0) as a result

13:21 but you can declare modules which have state elements

13:21 and then it'd defer the computation for the cycle simulation

13:21 and you can write hooks in the simulator to get callbacks when things happen

13:22 so that you can write tests based on expected behavior and sequences of events, but the synthesizable code maps more closely to the fpga's semantics

13:22 but it all supports clojure's destructuring

13:25 Vinzent: whoa, I'm not into all that stuff, but it sounds very promising and cool :) I can only wish you good luck!

13:25 dgrnbrg: eventually, I want to get it to the point where it'll be the best choice for building hardware

13:25 weavejester: Are there any mocking libraries apart from clojure.contrib.mock ?

13:25 dgrnbrg: so that you can just buy a $100-500 fpga board, and then write audio/video processors or new processors quickly

13:29 fliebel: dnolen: ping

13:34 raek: dgrnbrg: there is a function to reverse a map: clojure.set/map-invert

13:34 dgrnbrg: your project sounds interesting... :-)

13:34 dgrnbrg: how do I depend on clojure.set?

13:34 is it in core?

13:34 raek: dgrnbrg: yes, just require or use it

13:34 http://clojuredocs.org/clojure_core/clojure.set/map-invert

13:35 dgrnbrg: got it :)

13:35 if you'd like to see tho code now, it's on github

13:35 but it's not particularly usable at the moment

13:35 for actually generating verilog

13:35 raek: it's easy to see on that page which namespaces are included in clojure

13:35 dgrnbrg: it needs a couple more weeks

13:36 I never looked too closely at the sidebar

13:42 technomancy: weavejester: with-redefs? =)

13:42 netrealm: Is there any way to insert into a hash-map and preserve the order of insertion?

13:42 weavejester: technomancy: I was hoping for something with a little more features :)

13:43 scriptor: netrealm: what do you mean preserve the order? Hashmaps are unordered

13:43 Vinzent: weavejester, midje?

13:43 scriptor: relying on the order of a hashmap is very unreliale

13:43 gfredericks: netrealm: use a sorted-map instead?

13:43 Vinzent: technomancy, by the way, do you really changed the syntax of :dependicies?!

13:43 weavejester: Vinzent: As I understand it, that would require me having to rewrite my clojure.test-based tests.

13:44 netrealm: Oh..I feel stupid...sorted-map and hash-map are two different types of maps.

13:44 ivan: how do you make a sorted-map that stays sorted by insertion order?

13:45 netrealm: ^ that would be my next question.

13:45 Vinzent: weavejester, no, you don't have to (although you of course can't use midje's mocking possibilities with your deftests)

13:45 gfredericks: oh I missed that aspect of the question

13:45 Vinzent: there was ordered-map implementation somewhere on github

13:46 gfredericks: netrealm: so this would be a data structure that's indexed in two different ways

13:46 TimMc: netrealm: I've seen ordered-map in one of ztellman's projects.

13:46 potemkin does some stuff with novel maps, but I think this was actually in gloss

13:47 netrealm: gfredericks: Yes, I suppose that's one way of looking at it.

13:47 TimMc: Thanks, I'll go look at those.

13:47 Vinzent: also see https://github.com/flatland/ordered

13:48 * gfredericks once spent hours debugging what turned out to be an incomplete map implementation in gloss

13:49 scriptor: php has ordered maps, could switch to that ;)

13:49 TimMc: lulzphp

13:54 RickInGA: I am thinking about getting a macbook, if my only goal is to do clojure/clojurescript dev, are there reasons that mac would be a bad idea

13:57 netrealm: Vinzent: Thanks, flatland's ordered is what I needed.

13:57 Vinzent: np

13:59 scriptor: RickInGA: well, it's a lot easier to get it working on osx than on windowww

13:59 *windows

13:59 RickInGA: It seems like a lot of people use macs, are they running mac os, or a vm with linux in it?

13:59 muhoo: gfredericks: is that problem still in current gloss?

13:59 RickInGA: I already feel the pain of dev on windows :)

13:59 scriptor: a lot use straight up osx

13:59 weavejester: RickInGA: I went from Ubuntu to OSX very recently

13:59 ibdknox: RickInGA: osx

14:00 weavejester: RickInGA: I've had no problems running Clojure

14:00 It was also a little easier to install the latest Emacs 24 snapshot with brew

14:01 scriptor: even installing it from the binary wasn't too bad

14:01 ibdknox: and macvim is awesome ;)

14:01 RickInGA: I imagine that the air is powerful enough, so I won't feel bad about going for the lightweight instead of bigger processor

14:01 ibdknox: I use an air

14:02 weavejester: RickInGA: I haven't had any problems with the Air

14:02 RickInGA: thanks for the feedback guys

14:02 weavejester: ibdknox: Did you go for the 11" or 13" out of interest?

14:02 ibdknox: weavejester: 13, to me it's the perfect screen size

14:03 you?

14:03 clojurebot: YOU WILL LIKE OVERTONE & CLOJURE

14:03 ibdknox: lol

14:03 weavejester: ibdknox: I went for the 11". I liked the feel of it a little better.

14:04 ibdknox: weavejester: still happy with it?

14:04 RickInGA: when I am on my desktop I use dual screens, does air support that?

14:04 weavejester: ibdknox: Yeah, my previous netbook had the same size screen.

14:04 RickInGA: In my experience, macs are not good with dual screens.

14:05 RickInGA: k thx

14:05 ibdknox: why not?

14:05 I never had issues really

14:05 weavejester: ibdknox: Dual screens as in two monitors?

14:05 Not a screen + laptop screen

14:05 ibdknox: yeah

14:05 weavejester: I was never able to get it to work.

14:06 When I googled it, there was a bunch of posts saying how hard it was

14:06 But this was a few years ago

14:06 ibdknox: ah, from a laptop it is tricky

14:06 unfortunately the only "easy way" to do it is with apple's new monitors

14:07 since you can dasiy-chain them

14:07 weavejester: Ahh

14:08 I was trying to get a Macbook Pro to dual screen a couple of years back, and didn't manage it.

14:34 jondot_: any recommended image manipulation lib for working with clojure (like image magick) ?

14:44 technomancy: Vinzent: I backed out of the :dependencies-as-map idea; too many issues with extra settings like :exclusions and :classifier

14:44 Vinzent: :repositories is an ordered-map now though

14:44 (though the vector-of-vectors still works)

14:44 RickInGA: anything that's not windows is going to be about the same from the perspective of Clojure

14:45 Vinzent: technomancy, glad to hear it!

14:45 technomancy: the main annoyance with OS X is the way it's hard to set the $PATH consistently

14:45 plus you end up installing a lot more stuff by hand

14:45 but that's kind of orthogonal to Clojure

14:46 RickInGA: hard to set the path?

14:46 technomancy: RickInGA: that's the #1 issue people report with Emacs on OS X

14:46 RickInGA: if you launch a program from the GUI rather than the console, your environment variables are ignored

14:46 I've gotten a lot of bug reports for that even though there's nothing I can do about it =(

14:47 RickInGA: ah ok, so I should stick with the console

14:48 beardmigration: /?

14:49 technomancy: RickInGA: I don't know. I try to avoid OS X as much as I can

14:50 I mean, there are ways to make it work. it's just annoying and not obvious.

14:51 RickInGA: thecnomancy: you run *nix?

14:52 technomancy: RickInGA: I'm on Debian, yeah

14:53 I also run this nix: http://nixos.org/nix if that's what you mean

14:54 RickInGA: no, Debian was what I meant (or some other distro, or unix)

14:54 technomancy: if you're going to be deploying you'll need to develop on Linux anyway

14:54 *deploying on Linux

14:55 RickInGA: what if I wanted to upload to heroku, for example, can you do that from mac?

14:56 I have felt like a second class citizen because I am on Windows, I can get stuff to work, but it takes a lot of patience

14:56 technomancy: the closer your dev environment is to deployment, the better your ability to catch bugs before they become an issue in production

14:56 RickInGA: If I am going to run into that on osx, then I am not going there!

14:56 dabd: i am starting a java process using (shell-out/sh "java" ... ) and it starts the java process (xml-rpc server in this case) but it does not return and hangs the REPL. how can I prevent it from hanging the REPL?

14:57 technomancy: having a different development environment from everyone else is kind of a different problem from having development/production mismatches

14:58 dabd: you can put it in a future

14:59 h0x5f3759df: Hi, how can i unpack my args from a list to call a func. (looking for the python's "foo(*lst)" equivalent)

14:59 technomancy: this is pretty trollish but still raises some good points: http://teddziuba.com/2011/03/osx-unsuitable-web-development.html

14:59 RickInGA: technomancy: ok, so setting up a dev environment shouldn't be an issue, at least for learning purposes, but I may find myself wanting a different os when I want to have an environment similar to production

14:59 scriptor: h0x5f3759df: you're looking for apply

14:59 xeqi: ,(apply + [1 2])

14:59 scriptor: http://clojuredocs.org/clojure_core/clojure.core/apply

14:59 technomancy: RickInGA: yeah and it's easy enough to develop in virtualbox on OS X if you like

14:59 clojurebot: 3

15:00 h0x5f3759df: thanks scriptor

15:00 scriptor: honestly, as much of a pain it's been to set up emacs and lein on my windows box

15:00 it was just so cheap

15:01 RickInGA: scriptor: the problems I had with emacs was that all the instrucions I could find seemed to assume that you already knew how to use emacs

15:02 jondot_: can i specify a maven dependency in lein?

15:02 RickInGA: jondot_: lein does search maven

15:02 jondot_: great

15:03 dabd: technomancy: cool thanks. I just wrapped my (shell.out/sh ..) call in a a (future ...). Hope I am doing it right.

15:05 jondot_: fwiw - i also only develop on what i deploy on

15:06 all the cool kids have macs, but the proper cool kids know they have to run virtualbox/parallels in their macs to do actual work

15:07 may be less important on JVM but i've seen plenty of teams using macs + MRI because its cool, going to production stings when you have segfaulting native extensions

15:13 RickInGA: I need to run, thanks everybody for the input.... decisions decisions...

15:46 jondot_: to make clojure as close to the metal as possible, should i add type hints everywhere?

15:46 dgrnbrg: jondot_: just set *warn-on-reflection* and put hints to eliminate those warnings

15:46 everywhere else, the clojure compiler inferred types

15:47 jondot_: nice, is there any notion of how close this will be to actual java?

15:47 dgrnbrg: If I have several lazy seqs, and I want to get a lazy seq whose elements are (the tuple of the first element of each seq), (the tuple of the second element of each seq), etc, is there a built-in function like juxt for seqs?

15:47 Raynes: You have to write Java-like code to produce Java-like bytecode.

15:47 dgrnbrg: jondot_: there is, but you should understand what clojuer's doing

15:48 Raynes: You can write Clojure code to produce basically the same bytecode, but you tend to lose the benefits of Clojure the more you try.

15:48 dgrnbrg: generally it doesn't matter

15:48 and there are profilers to help you when it does matter

15:48 jondot_: Raynes, i see. in my case clojure will provide a glue for several java libraries so i'm afraid there wouldn't be much idiomatic code

15:49 Raynes: Java interop is idiomatic in Clojure.

15:49 jondot_: bad choice of words. i guess i meant functional forms

15:49 Raynes: I once used java.util.Date. True strory.

15:49 story*

15:50 jondot_: dgrnbrg, is there any documentation about 'what clojureis doing' that you mentioned, i'd love to read that?

15:51 dgrnbrg: jondot_: it's scattered

15:51 do you have intuition as to how laziness is implemented?

15:51 I can offer some links

15:51 do you care about vectors, maps, vars, refs, agents, atoms, numbers, or what?

15:52 jondot_: one link is enough, i could get the context from there and continue searching :)

15:52 dgrnbrg: I don't have one link--i know of a blog post on how persistent data structures work

15:52 another of vars

15:52 another of atoms

15:52 etc.

15:52 jondot_: any of those would do

15:53 dgrnbrg: the best resource is here, actually:

15:53 https://github.com/clojure/clojure/tree/master/src/jvm/clojure/lang

15:53 I keep that open

15:53 then, there's no guessing

15:53 just source code to understand exactly what everything does

15:55 worrelsik: Raynes, http://www.the-ocean.com/simpsons/homer/stories.wav

15:55 jondot_: thanks

15:56 dgrnbrg: jondot_: I am assuming you are an expert java programmer and beginning clojure programer

15:56 if that's not your background, i have other resources that would be more appropriate

15:57 jondot_: not expert on java but i'll manage :)

16:41 goodieboy: technomancy: Hey there. Could you tell me how to get lein 2 setup and running? I have it cloned, tests pass... but how to install the lein 2 executable?

16:42 technomancy: do'h! I got it, I didn't see that top-level bin directory.

16:53 qbg: Can you create anonymous relations in core.logic?

Logging service provided by n01se.net