2009-03-13
| 00:00 | arohner_ | amap, areduce, etc |
| 00:00 | arohner_ | see the java interop section of clojure.org |
| 00:00 | Raynes | Why hasn't Rich released a new version yet? You'd think with all the huge changes he would because there is no telling how many people are downloading the old version and doing stuff with it only to find out their code is no longer compatible with new clojure. |
| 00:00 | Guest46760 | arohner_: will do. thx |
| 00:04 | cooldude227 | it would be kinda nice to have releases more often. that way, most people can be working off the same point |
| 00:05 | cooldude227 | without missing out on big stuff |
| 00:05 | Chouser | I think he doesn't like the overhead of a release -- bring the docs up to date, do the build, package, collect changelogs, announce, etc. |
| 00:06 | cmvkk_ | what's the plan anyway? is there going to be a 1.0 or something? just 'eventually'? |
| 00:06 | cooldude227 | sounds right, that stuffs totally bitchy |
| 00:06 | rzezeski | cooldude227, I think Howard Lewis Ship setup a nightly build at some point, maybe people could use that. Although I imagine Rich has reasons of his own for why it is the way it is |
| 00:06 | durka42 | if you're going to use a "nightly", just use svn |
| 00:06 | cooldude227 | or git |
| 00:06 | cooldude227 | :) |
| 00:07 | cmvkk_ | but then you have to have ant! |
| 00:07 | Chouser | the major version number will be based on the years since release |
| 00:07 | rzezeski | well what I'm saying is...for people who don't want/cant build it, or pull from git (my company network blocks git) then there is a common place people can pull binaries from, and the zip name could have a timestamp built into it so people can easily compare what they have |
| 00:07 | durka42 | like C++0x? |
| 00:07 | Chouser | so for it to still be called 1.0, he's got to get it out by Nov 2009. |
| 00:08 | Chouser | I think. |
| 00:08 | cmvkk_ | I....kind of get it? |
| 00:08 | Raynes | I don't. |
| 00:09 | Chouser | the minor will count the number of releases within that year |
| 00:09 | cmvkk_ | but the next release will start with 1, or what? because this last release didn't have version numbers or anything. |
| 00:09 | rzezeski | because they weren't really releases, more like "snapshots" |
| 00:09 | Chouser | so the first stable release before Nov will be 1.0, then 1.1, 1.2, etc. The first stable release after Nov will be 2.0 |
| 00:10 | cmvkk_ | and that seems like a bad release policy. majors are for major changes, etc. Why bother changing the major if the code isn't any different? |
| 00:10 | Chouser | unless of course he changes his mind before then. |
| 00:10 | cmvkk_ | and what if you want to change the code a lot during the middle of the year? |
| 00:10 | Raynes | That's just... Unnecessary. |
| 00:11 | durka42 | i agree, seems a little arbitrary |
| 00:11 | Raynes | "Experimental 2.0 release" I always hated those. |
| 00:11 | cmvkk_ | anyway, is there a 'road map' to the next release? Things that need to get coded/decided? |
| 00:11 | p_l | Raynes: Talking about Oracle? xD |
| 00:12 | cmvkk_ | obviously if things like the lazyness change are still going on, it's too early to be setting things in stone. |
| 00:12 | Raynes | p_l: Nope, lots of other stuff. |
| 00:12 | p_l | and yeah, releasing a very untested thing as 2.0, like Oracle, is a bad idea |
| 00:13 | rzezeski | Does anyone know if Stu has a set release date for his book? Is he still waiting on 1.0? |
| 00:13 | durka42 | i thought there was a deadline, maybe May? |
| 00:14 | Raynes | April last time I checked. |
| 00:14 | Chouser | http://clojure-log.n01se.net/date/2008-10-14.html#09:53 |
| 00:14 | Raynes | I still say that Stu jumped the gun big time writing a book so early. |
| 00:15 | Raynes | Imagine if Rich hadn't hacked out the fully lazy implementation in time. And he almost didn't. :| |
| 00:16 | cmvkk_ | Chouser, I see. Wouldn't that make the current release 1.0 then? |
| 00:16 | cmvkk_ | since it was the first release after that thursday. |
| 00:16 | rzezeski | Raynes, OTOH, having a book so early could help adoption |
| 00:16 | rzezeski | I guess it's a double edged sword of sorts |
| 00:16 | Raynes | rzezeski: That cuts both ways. |
| 00:17 | Raynes | Not much use for a book if everything in it is outdated next year :p |
| 00:17 | Chouser | cmvkk_: *shrug* |
| 00:17 | rzezeski | but at some point, Clojure needs to stabilize, and not let perfect get in the way of good |
| 00:18 | cmvkk_ | yeah. when i talk about the future, i'm mostly wondering what breaking changes have yet to occur. |
| 00:23 | arohner_ | can I call alter inside an alter? |
| 00:25 | hiredman | arohner_: ew |
| 00:25 | cooldude227 | sounds like trouble |
| 00:25 | arohner_ | yeah, that's what I was thinking |
| 00:25 | arohner_ | turns out I don't need to |
| 00:26 | cooldude227 | good |
| 00:40 | Raynes | I predict myself learning factor in the far future "just cuz". |
| 00:40 | duncanm | i'd like to learn a stack-based language |
| 00:41 | Raynes | I just want to learn it because it looks so fuckin' cool. |
| 00:41 | duncanm | looks? |
| 00:41 | Raynes | Of course if Clojure never makes it mainstream factor wont even be in the books, but still, it looks awesome. |
| 00:42 | Raynes | The postfix syntax, the heavy documentation and the dinosaur on the front page all conspired to make me put it on my "Tolearn" list. |
| 00:46 | cooldude227 | factor is a fun language, and it has libraries for EVERYTHING |
| 00:46 | cooldude227 | the emacs mode, fuel, is almost as good as SLIME |
| 00:46 | duncanm | i'm surprised - who writes them? |
| 00:46 | cooldude227 | a lot are from slava himself, but there are quite a few from other random people |
| 00:50 | Raynes | Is factor everyones secret pleasure or something? |
| 00:50 | Raynes | :o |
| 00:50 | Raynes | I don't see any electronic ink about it :\ |
| 00:51 | Raynes | Oh, it's newer than I thought. 03. |
| 00:51 | cooldude227 | dealing with stack is really hard to wrap your head around |
| 00:51 | Raynes | I predict the userbase skyrocketing in 2070 long after I'm dead. |
| 00:51 | cooldude227 | s/stack/the stack/ |
| 01:05 | Raynes | A guy on stackoverflow.com replied to a post "Will you ever use factor?" with this: fun for aside language based stack a in point the see don't I but, Forth resembles it and briefly Factor studied I |
| 01:05 | Raynes | (apply str (reverse (interpose " " (.split "fun for aside language based stack a in point the see don't I but, Forth resembles it and briefly Factor studied I" " ")))) |
| 01:05 | Raynes | ,(apply str (reverse (interpose " " (.split "fun for aside language based stack a in point the see don't I but, Forth resembles it and briefly Factor studied I" " ")))) |
| 01:05 | clojurebot | "I studied Factor briefly and it resembles Forth but, I don't see the point in a stack based language aside for fun" |
| 01:05 | Raynes | I always forget that darn , |
| 01:06 | p_l | heh. till one starts working in various small environments, I guess... Open Firmware etc. |
| 01:08 | hiredman | freebsd's boot loader is in Forth |
| 01:08 | hiredman | or at least one stage of it is |
| 01:10 | durka42 | http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/boot/forth/ |
| 01:12 | hiredman | ~google freebsd forth boot |
| 01:12 | clojurebot | First, out of 8470 results is: |
| 01:12 | clojurebot | The Boot Process (FreeBSD) � UNIX Administratosphere |
| 01:12 | clojurebot | http://administratosphere.wordpress.com/2008/03/01/the-boot-process-freebsd/ |
| 01:16 | Raynes | Whoa. |
| 01:16 | Raynes | Slava Pestovs home page has a total of 4 views since 1994. |
| 01:23 | durka42 | from that link -- if the kernel fails to load, you a get a forth prompt to fix it |
| 01:24 | hiredman | there are a few different prompts you can end up at |
| 01:24 | p_l | many big iron systems have that capability |
| 01:25 | hiredman | big iron like my msi wind |
| 01:26 | p_l | Well, I'm pretty sure it runs a backward-compatible BIOS for IBM-PC :P |
| 01:26 | p_l | that doesn't mean that FreeBSD can't use it's much more powerful bootloader :) |
| 01:26 | p_l | and frankly speaking, "config mode" is a great function to have |
| 01:28 | p_l | it's great when instead of going nuts when my VMS install refuses to boot, I only have to change the boot command to BOOT/R5:1 and it will drop me in config manager |
| 03:26 | Mec | how would i do something like (apply and '(true true false)) |
| 03:27 | Cark | ,(doc every?) |
| 03:27 | clojurebot | "([pred coll]); Returns true if (pred x) is logical true for every x in coll, else false." |
| 03:27 | Mec | ah hah, thanks |
| 03:31 | Raynes | Why do all good ideas come in while you're in bed and half asleep? |
| 03:33 | Mec | because you're not thinking as "clearly" so you're not constrained to your normal thought processes |
| 04:09 | Mec | is there a library function that calls a function with an initial value, then calls the funciton with the result, and again on the result, and putting them all in a list? |
| 04:11 | Puzzler | iterate |
| 04:11 | Mec | oo nifty, thanks |
| 04:12 | Mec | that just makes my life a million times easier, i keep getting random errors trying to implement it myself |
| 04:48 | AWizzArd | clojurebot: max people |
| 04:48 | clojurebot | max people is 162 |
| 04:48 | AWizzArd | woohoo ;) |
| 05:06 | Mec | i use (first (filter ..)) an aweful lot, is there an equivalent library construct? |
| 05:09 | cgrand | Mec: no and it was recently discussed on the ML (subject: "filter1 interseting?") |
| 05:20 | Mec | (first (drop-while )) is about the same but sounds closer to it's purpose |
| 05:24 | AWizzArd | yes, especially this (first (filter ..)) is a common pattern |
| 05:28 | Mec | it's such a common idea but for some reason hard to put a simple name to |
| 05:31 | AWizzArd | in Common Lisp it is called find |
| 05:31 | AWizzArd | but that name is already used |
| 05:32 | cgrand | first-match? seek? |
| 05:32 | Mec | seek's not bad |
| 05:33 | cgrand | or hide it into destructuring (let [[x] (filter ...) ...] ...) |
| 05:38 | AWizzArd | seek would be good if destructuring is not an option |
| 05:39 | AWizzArd | the problem with first-match is, that it indeed does reduce the complexity of the code, but it is not shortening the overall pattern. |
| 05:44 | karmazilla | overloading 'find' is not an option? |
| 05:49 | cgrand | The two overlaod would be too different : map * object -> map-entry vs seq * pred -> object |
| 05:50 | karmazilla | yes, you're right about that |
| 06:00 | Mec | if I'm performing the same computation at the init of a loop and at the recur, is there a better pattern to use? |
| 06:01 | Mec | hmm nvm i dont even need to recur that value |
| 06:03 | Holcxjo | FYI: Yesterday's talk by Rich was taped and "will be posted in approximately 48 hours" at http://skillsmatter.com/podcast/java-jee/clojure-for-java-programmers |
| 06:05 | Mec | is it the same talk as the current clojure for java? |
| 06:08 | cgrand | Mec: can't you put that computation at the start of the loop body? |
| 06:08 | cgrand | Holcxjo: thx |
| 06:09 | Mec | cgrand: yup |
| 06:09 | kotarak | Holcxjo: is this a "general overview" talk? That would be not thaat interesting. (I know the general overview already. ;) ) Wasn't there also a more in detail talk? Will it also be podcasted? |
| 06:19 | Holcxjo | kotarak: Yes, he gave a general introduction to Clojure. IT was aimed at Java programmers |
| 06:24 | lisppaste8 | mec pasted "ugly nested loop" at http://paste.lisp.org/display/76951 |
| 06:25 | Mec | please tell me there's a more graceful way, that's just hideous, but i dont know how to use 'for for this |
| 06:25 | Drakeson | how should I check (cond) based on class of data? (= (class x) java.lang.String) ? |
| 06:26 | Mec | Drakeson: looks like that should work |
| 06:26 | Drakeson | yeah, but is there a shorthand for that? somehow using #^String? |
| 06:27 | Mec | ,(= (class "abc") String) |
| 06:27 | clojurebot | true |
| 06:32 | lisppaste8 | cgrand annotated #76951 "re: ugly nested loop" at http://paste.lisp.org/display/76951#1 |
| 06:34 | Mec | i try to stay away from max-key because it calls pred too many times |
| 06:35 | Mec | hmm maybe not in this situation |
| 06:36 | cgrand | it will call first ~2*n times (instead of n times) but first is cheap |
| 06:38 | Mec | right i was thinking back to another way i used it |
| 06:44 | Mec | alors au lit |
| 07:55 | Holcxjo | Mec: I submitted a bug about max-key doing double evalutations -- let's see if it gets accepted -- http://bit.ly/hqivY |
| 07:55 | Holcxjo | Bah -- gone already |
| 07:58 | kotarak | Holcxjo: did you talk to rhickey before submitting the bug? |
| 08:00 | Chousuke | wouldn't max-key be equal to (max (map k xs))? |
| 08:02 | Holcxjo | kotarak: No, I thought he can always close it as invalid if he doesn't like it |
| 08:02 | kotarak | Holcxjo: He prefers discussing such things before the bug is opened. |
| 08:03 | Holcxjo | oops |
| 08:03 | Chousuke | ~source max-key |
| 08:04 | Holcxjo | chousuke: No, max-key returns the element that maximises (k element) |
| 08:05 | Chousuke | ah, indeed. |
| 08:06 | Chousuke | I wonder how often k will actually be expensive to calculate, though :/ |
| 08:07 | Holcxjo | Chousuke: indeed -- but how expensive is my method? Not very either, I assume -- believing Rich's mantra of ephemeral garbage being cheap |
| 08:07 | Chousuke | I suppose |
| 08:10 | banisterfiend | does clojure have its own good standard lib or does it just use the java lib? |
| 08:18 | Chousuke | banisterfiend: there's clojure.core and .contrib |
| 08:18 | Chousuke | banisterfiend: they don't do everything; using the java libs is perfectly fine and encouraged, even :) |
| 08:19 | Chousuke | though my guess is that we'll see a "pure clojure" standard library if people get serious about implementing clojure on non-java platforms |
| 08:19 | banisterfiend | yeah but it's a bit ugly and unwieldy isn't it? wouldn't ppl prefer to use a library that is designed with lisp/clojure in mind |
| 08:20 | Chousuke | nah |
| 08:20 | Chousuke | a lot of the java stuff works just fine with clojure. |
| 08:20 | Chousuke | people will write wrappers and libraries for the stuff that doesn't. |
| 08:21 | Chousuke | but to take an example, clojure.core has very few string functions |
| 08:21 | banisterfiend | yeah |
| 08:21 | Chousuke | because the java String methods provide everything that is needed. |
| 08:21 | banisterfiend | scala is having the same issue it looks like |
| 08:22 | Chousuke | it's not really an "issue". it's a feature :) |
| 08:22 | banisterfiend | some ppl say a language written on the jvm is both a blessing and curse, a blessing because all the libs are already tehre, but a curse in that using them feels like you're stepping outside the language into java-land, and you have to manually write a bunch of wrappers |
| 08:23 | Chousuke | the java integration in clojure tries to be as seamless as possible. |
| 08:23 | banisterfiend | yeah fair enough |
| 08:23 | banisterfiend | is 'programming clojure' a good book in your opinion? |
| 08:23 | Chousuke | in the best case, the only thing that tells you you're using a java method is that the operator starts with a . :) |
| 08:24 | Chousuke | I haven't read it, but I have heard a lot of good things about it. |
| 08:57 | etnt | hi folks, is possible to combine clojure and j2me ? |
| 09:15 | etnt | probably not then... |
| 09:15 | kotarak | etnt: you might ask some time later on. |
| 09:15 | kotarak | When more people from NA are active. |
| 09:15 | etnt | ok, will do, thx |
| 09:16 | kotarak | Or you can ask on the google group. There's a wider audience. |
| 09:21 | Chouser | I don't think I've heard of anyone trying. |
| 09:29 | pjstadig | ~pjstadig entered the room and suddenly... |
| 09:29 | clojurebot | CLABANGO! |
| 09:34 | pjstadig | clabango.com is up |
| 09:34 | karmazilla | that is one ugly monkey :) |
| 09:36 | pjstadig | the eyes are...interesting |
| 09:36 | kotarak | yeah. It sure smoked the wrong things. |
| 09:36 | karmazilla | so, what is clabango? |
| 09:36 | pjstadig | clojurebot: clabango is http://www.clabango.com/ |
| 09:36 | clojurebot | In Ordnung |
| 09:36 | kotarak | a port of django to clojure, IIRC |
| 09:37 | pjstadig | clojurebot: clabango is <reply>http://www.clabango.com/ |
| 09:37 | clojurebot | c'est bon! |
| 09:37 | pjstadig | danlarkin is holding out on us |
| 09:38 | karmazilla | I notice Lau have a clabango repo on github but it is empty |
| 09:39 | pjstadig | ya he was trying to encourage danlarkin |
| 09:40 | karmazilla | is it based on ring? |
| 09:41 | pjstadig | i haven't seen any code myself |
| 09:41 | karmazilla | the mystery framework |
| 10:12 | danlarkin | karmazilla: yes, madison is based on ring |
| 10:16 | karmazilla | what do you do for models/ORM that django has? |
| 10:18 | danlarkin | don't have any yet :-/ |
| 10:26 | danlarkin | me too |
| 10:50 | Drakeson | OK, I got fed up! I want to help improve access to documentations, from the repl (or slime). First I want to make sure what works and what doesn't. |
| 10:50 | Drakeson | 1. Can `doc' and `repl-utils/javadoc' be unified? |
| 10:51 | Chouser | probably. if javadoc sees the arg is a var not a class, it could do what doc does. |
| 10:52 | Drakeson | is there any imaginable ambiguity as to which one should act? |
| 10:52 | cgrand | right now javadoc works also on instances |
| 10:55 | Drakeson | OK, so that one needs fixing (merging javadoc into doc, if possible) |
| 10:55 | Drakeson | 2. Can we get a "more..." or "examples..." link in the output of `doc'? The link should be automatically generated. I am not advocating putting the link inside the doc-string. |
| 10:57 | Drakeson | 3. Where should examples go (I want to help gather snippets and examples, when there is a *one* cannonical place for such). |
| 10:58 | Chouser | ~examples |
| 10:58 | clojurebot | examples is http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples |
| 11:01 | Drakeson | that's not good enough, I prefer somewhere on github. |
| 11:02 | Drakeson | (since writing code in a textarea in a web-browser is much more fun than using a Real Editor) |
| 11:03 | Drakeson | what do you think of a clojure-examples package? |
| 11:03 | Drakeson | s/package/repos on github |
| 11:07 | Drakeson | is there any copyright or licensing issue with snippets posted on http://groups.google.com/group/clojure ? |
| 11:10 | Drakeson | There are many nice examples in the mailing-list or in the google-group that can picked up, polished, and put in an examples repository. Do I have to care about copyright for small pieces of code from those places? |
| 11:11 | Chouser | probably :-( |
| 11:12 | AWizzArd | you could ask the authors for permission |
| 11:13 | danlarkin | those in the US, at least, have copyright on whatever they produce as soon as it's produced |
| 11:13 | Drakeson | regardless of the "size"? |
| 11:13 | danlarkin | yup |
| 11:14 | kotarak | In Germany you cannot resign your copyright. No public domain here.. |
| 11:14 | Chouser | that's why rhickey is a bit of a stickler about people not just randomly posting patches to the list |
| 11:14 | Drakeson | I guess Stallman has a point ;) |
| 11:15 | Drakeson | what should I do? should I gather them and put the posters name beside it? |
| 11:15 | Drakeson | what if I "rewrite" the example? |
| 11:15 | danlarkin | one could argue that by submitting their work to a public mailing list they're licensing it for redistribution... |
| 11:16 | AWizzArd | But it should be possible in most/all contries to license the use. |
| 11:16 | AWizzArd | Drakeson: A simple rewrite won't do, it must be your own work. |
| 11:16 | AWizzArd | Renaming vars/functions is not enough. |
| 11:17 | Chouser | people will probably not be very possessive about code they posted to the group |
| 11:17 | AWizzArd | Chouser: I was thinking about licensing it for 20$ per LOC. |
| 11:17 | danlarkin | indeed, just renaming things would be a derivative work |
| 11:17 | Chouser | AWizzArd: good luck with that. |
| 11:17 | AWizzArd | ;) |
| 11:18 | Chouser | Drakeson: for any example you want to use, I imagine you could contact the author and most would easily grant permission for republishing or fixing up or whatever you need. |
| 11:18 | AWizzArd | Two US experts suggestd a few days ago to eliminate the laws regarding copyrights/patents completely. |
| 11:19 | danlarkin | I don't know if completely would be a good idea... but author's life + 75 years is a little much |
| 11:19 | Drakeson | Chouser: that takes care of the mailing list, how about wikipedia? |
| 11:20 | danlarkin | Drakeson: I think when you contribute to wikipedia you implicitly license your contribution CC? |
| 11:20 | Chouser | Drakeson: the wiki books may have excplicit licensing coverage for submissions -- you could look for that. |
| 11:20 | pjstadig | is there a TOS for wikibooks? |
| 11:20 | pjstadig | might have licensing |
| 11:21 | pjstadig | i think the Clojure Google Group should be renamed to the VIM Google Group |
| 11:21 | pjstadig | hehe |
| 11:22 | hiredman | *cough* |
| 11:23 | hiredman | I think traffic analysis of group and irc traffic will show far more emacs |
| 11:24 | hiredman | for about a week technomancy and cooldude127 would talking emacs in here for hours at a time |
| 11:24 | kotarak | pjstadig: I'm sorry |
| 11:25 | kotarak | But there are also lots of SLIME questions also.... |
| 11:25 | Drakeson | OK, I imagine copyright can be dealt with by using enough communication. Now the next issue is how should it be organized. A flat directory of small files (possibly one per symbol, like defn.clj, ns.clj, etc.)? a few large .clj files with sections coded in the comments, (;;;SYMBOL: defn), etc? |
| 11:26 | eevar2 | <-- vim guy turning to the dark side just because of lisps |
| 11:26 | AWizzArd | eevar2: you mean you now try Emacs? |
| 11:27 | eevar2 | emacs+slime seems to have an edge over vim for cl/clojure, yup |
| 11:27 | AWizzArd | The Clojure support for Vim seems to be pretty good. |
| 11:27 | AWizzArd | I am not so sure if emacs+slime+Clojure have an edge over VimClojure+Gorilla. |
| 11:27 | pjstadig | kotarak: np. I was just joking |
| 11:28 | pjstadig | though if there is enough traffic about it VimClojure could maybe have its own list |
| 11:28 | AWizzArd | eevar2: for Common Lisp it is maybe true. I am using the emacs+slime+Clojure combo only because I am used to use emacs since many years, in which I was doing Common Lisp. |
| 11:28 | pjstadig | not that it's at that point yet...it's not overwhelming just yet |
| 11:29 | durka42 | Drakeson: if you're putting this on something like github i'd suggest lots of small files, easier for linking and updates |
| 11:29 | AWizzArd | Maybe kotarak would like to implement a simplified version of Vim, written in Clojure? ;) |
| 11:29 | danlarkin | nooo not another clojure text editor |
| 11:30 | hiredman | we should stop talking about this or we might wake Lua "Emacs is minfestly better, and if you disgree you are blinded by religion" DK |
| 11:30 | pjstadig | AWizzArd: so you're saying I should learn vim? |
| 11:30 | eevar2 | pjstadig, shoot for netbeans ;) |
| 11:30 | hiredman | manifestly |
| 11:30 | pjstadig | i've always used Eclipse for java, and tried it for Lisp too with my school projects |
| 11:31 | pjstadig | but broke down and learned emacs |
| 11:31 | pjstadig | then just figured emacs is the way to go with clojure since it's a lisp |
| 11:31 | Drakeson | durka42: good point. |
| 11:32 | AWizzArd | This is what I right now think too. But Enclojure (+ NetBeans) can potentially become the leading environment for Clojure. |
| 11:33 | pjstadig | i used to use netbeans, but found it slow and unintuitive, but maybe i'll have to cave |
| 11:33 | pjstadig | any test-is experts? |
| 11:33 | pjstadig | i'm trying to run the clojure.contrib.test-clojure.predicates tests on Clojure+TC |
| 11:34 | AWizzArd | I think on modern computers it really is not too slow anymore. That it eats a few hundred mbs of ram means nothing to those with 2+ gigs. It is what Emacs was for 32mb machines some years ago. |
| 11:36 | pjstadig | ner'mind |
| 11:36 | pjstadig | i think it's another array.clone() problem in PersistentArrayMap |
| 11:43 | pjstadig | sweet |
| 11:43 | pjstadig | predicates passes now |
| 11:44 | pjstadig | danlarkin: terracotta work is proceeding, how's the second half of our plan for world domination? (i.e. clabango) |
| 11:44 | pjstadig | :) |
| 11:45 | danlarkin | ha! |
| 11:46 | danlarkin | well enough |
| 11:48 | danlarkin | needs man hours |
| 11:52 | pjstadig | post to github and get some collab goin' on |
| 11:56 | danlarkin | aye I know I totally should |
| 11:56 | danlarkin | maybe tonight after work I'll actually do it |
| 12:09 | jayfields | sax is the way to go for parsing xml in clojure? |
| 12:13 | Chouser | I always recommend xmpp if you can handle a 3rd-party jar |
| 12:14 | Chouser | clojure.xml for sax or clojure.contrib.lazy-xml for either sax or xmpp |
| 12:18 | jayfields | thanks Chouser |
| 12:18 | replaca_ | Q: what's the syntax for throwing a "main" func into my file? I don't see it on clojure.org |
| 12:18 | cgrand | Chouser: do you mean XmlPull? |
| 12:20 | kotarak | replaca_: (ns my.class (:gen-class)) (defn -main ...)) |
| 12:21 | hiredman | replaca_: do mean main as in java's main? |
| 12:21 | Lau_of_DK | Hey all |
| 12:21 | cgrand | (:gen-class :main true) |
| 12:21 | hiredman | ^- |
| 12:21 | Chouser | cgrand: yes, Xml Pull Parser |
| 12:21 | replaca_ | Hmm, I'm not after a "java main" but rather a "clojure main". Is this a sensible idea? That is, a func that's invoked with the command line args |
| 12:21 | Chouser | oh |
| 12:21 | Chouser | xpp |
| 12:21 | Chouser | :-) |
| 12:22 | hiredman | replaca_: just put a function call the end of your file |
| 12:22 | hiredman | (main) |
| 12:22 | Chouser | http://www.extreme.indiana.edu/xgws/xsoap/xpp/ |
| 12:23 | replaca_ | hiredman: but then it gets called when I load the file as a ref, doesn't it? What I'm looking for is the equiv of python's if __name__ == "__main__": |
| 12:24 | replaca_ | so when a load a file as a main thhing from the coomand line it's run, but not when it's simply referred to |
| 12:25 | hiredman | replaca_: ah |
| 12:25 | replaca_ | *cdomand = command, but you knew that |
| 12:25 | kotarak | replaca_: (ns my.class (:gen-class)) (defn -main ...) ; see replaca_: (ns my.class (:gen-class)) (defn -main ...) |
| 12:25 | kotarak | oops |
| 12:26 | kotarak | replaca_: http://clojure.org/compilation was intended after the "see" |
| 12:27 | replaca_ | kotarak: yeah, I don't want to make a java class here. Not the goal. I'm thinking like a pythonista here, but that's a good way to think for various kinds of scripting things |
| 12:27 | hiredman | replaca_: that is trickier, I think the best way would be to put functions in a seperate library file/namspace so you can refer to them |
| 12:27 | hiredman | and your consumer of the lib in it's own namespace, maybe with just a (main) |
| 12:29 | replaca_ | hiredman: OK, maybe I'll have to do that. I think we should think about how this might work well in clojure since it's a super valuable idiom in python (and, iirc, in perl as well) |
| 12:29 | hiredman | you might be able to work something around *file* |
| 12:30 | hiredman | replaca_: take it to the group |
| 12:30 | replaca_ | it lets you write scriptable units that can stand on their own as scripts or can be used as the basis for other things or repl use as a bundle of func |
| 12:30 | hiredman | clojurebot: latest? |
| 12:30 | clojurebot | latest is 1327 |
| 12:30 | replaca_ | hiredman: that sounds like being sent to the principal :-) |
| 12:31 | kotarak | This was discussed on the group already. I remember there was no non-hacky way to solve the problem and gen-class is maybe the Right Way. |
| 12:31 | Chouser | there was a proposal that looked pretty good, but it didn't go anywhere iirc. |
| 12:32 | replaca_ | kotarak: yeah, but once you do gen-class, you're not scripting anymore |
| 12:32 | Chouser | for a var that would let you determine if your script was the command-line's "main" or not. |
| 12:33 | hiredman | actually |
| 12:33 | hiredman | hmmm |
| 12:33 | replaca_ | Chouser: or maybe just a clojure invocation that would call a specific func with args |
| 12:33 | replaca_ | seems like it shouldn't be too difficult |
| 12:34 | replaca_ | a variation on the clojure.main invocation |
| 12:34 | replaca_ | where the first arg was a func name |
| 12:34 | hiredman | replaca_: -e |
| 12:35 | hiredman | % java clojure.main -i f.clj -e "(f)" |
| 12:35 | hiredman | :foo |
| 12:35 | replaca_ | hiredman: yeah, that might be a reasonable sol'n, but it doesn't give me command line args (or does it set *command-line-args*) |
| 12:36 | replaca_ | ? |
| 12:36 | hiredman | where f.clj contains (defn f [] (println :foo)) |
| 12:36 | hiredman | dunno if that works with files properly namespaced and what not |
| 12:36 | replaca_ | oh yeah, that should set *command-line-args*. Let me try it. Thanks! |
| 12:37 | replaca_ | hiredman: we'll find out! |
| 12:37 | hiredman | you have to namespace qualify the function |
| 12:37 | replaca_ | yup |
| 13:20 | hiredman | hmmm |
| 13:20 | hiredman | vimclojure seems to time out or something |
| 13:20 | kotarak | hiredman: another issue? |
| 13:21 | hiredman | when I start vim it works fine, but if stop and come back to vim it doesn't work |
| 13:21 | kotarak | What do you stop? The server? |
| 13:21 | hiredman | ugh |
| 13:21 | hiredman | er |
| 13:21 | hiredman | stop vimming |
| 13:21 | hiredman | leaving vim open |
| 13:21 | hiredman | well, it started working now |
| 13:22 | kotarak | There is no persistent connection. So there is nothing to time out. |
| 13:22 | hiredman | hmmm |
| 13:22 | hiredman | \ep just worked, but \sr is not working |
| 13:22 | kotarak | What is the error message? |
| 13:23 | hiredman | no error |
| 13:23 | kotarak | So what happens? |
| 13:24 | hiredman | I think it may not be a timeout thing |
| 13:25 | hiredman | \sr doesn't seem to work on files with no namespace |
| 13:25 | kotarak | As I said: there is nothing to timeout. The first invocation might be slower, because the server has to load the nails classes but afterwards there should be much of delay. |
| 13:26 | hiredman | I type \sr, and end up replacing whatever character is under the cursor with 'r' |
| 13:26 | hiredman | but \ep works |
| 13:26 | kotarak | what does :nmap \sr say? |
| 13:27 | kotarak | The namespace is not interesting for \sr. It must only be a Clojure buffer. |
| 13:27 | hiredman | No mapping found |
| 13:27 | kotarak | Then the mapping was not setup correctly or it was removed somehow. |
| 13:27 | hiredman | hmmmm |
| 13:27 | kotarak | What does :nmap \ep say? |
| 13:27 | hiredman | if I switch to another tab (with an open clojure file) there is a mapping |
| 13:28 | hiredman | another open clojure file |
| 13:28 | kotarak | What filetype has the original buffer? |
| 13:28 | hiredman | f.clj |
| 13:28 | hiredman | is the name of the file |
| 13:28 | kotarak | set filetype? (<- including ?) |
| 13:29 | Lau_of_DK | Slime, Swank, everything is updated to the latest rev of Clojure? |
| 13:29 | hiredman | filetype=clojure |
| 13:29 | kotarak | hmmm... then something went wrong when setting up the buffer key mappings. |
| 13:29 | kotarak | Try :e |
| 13:29 | hiredman | changes nothing |
| 13:30 | kotarak | Hmmm... |
| 13:31 | hiredman | :( |
| 13:32 | kotarak | hiredman: For now I can only think of :bd and reloading the file completely. |
| 13:33 | kotarak | Did you get an error when first loading the file? |
| 13:33 | hiredman | nope |
| 13:33 | kotarak | That might also prevent correct setup. |
| 13:33 | kotarak | hmmm |
| 13:33 | hiredman | ok |
| 13:34 | hiredman | the \sr binding doesn't apear to happen for any files opened other then the file specified on the command line |
| 13:34 | hiredman | if I vim foo.clj then within the running vim :tabe bar.clj \sr works for foo.clj and not for bar.clj |
| 13:35 | kotarak | Ok. Let me try here with tabs. |
| 13:35 | durka42 | WFM :\ |
| 13:35 | durka42 | although i'm using macvim not console vim |
| 13:36 | hiredman | and it is only the \sr binding that seems to vanishor not get made |
| 13:37 | hiredman | if I bind \sr my self in the other tabs it works fine |
| 13:37 | kotarak | WFM also.... |
| 13:38 | hiredman | *sigh* |
| 13:38 | hiredman | computers |
| 13:38 | kotarak | which kind of vim do you use? terminal or gvim? |
| 13:39 | hiredman | terminal right now |
| 13:39 | kotarak | Ok. Let me try there. |
| 13:42 | kotarak | Hmm... Also works in the terminal... |
| 13:44 | durka42 | me too |
| 13:45 | durka42 | with vim 7.2 |
| 13:45 | kotarak | 7.2.22 in terminal, 7.2.108 in gvim |
| 13:46 | hiredman | 7.2.69 |
| 13:46 | hiredman | I think, but I am not 100% sure I had this same behaviour last night with gvim |
| 13:48 | kotarak | I don't get this "for foo.clj and not for bar.clj" thing.... It should either work always or never... hrmph.. |
| 13:50 | hiredman | ah |
| 13:50 | hiredman | I had pasted the remapping example from the readme in my .vimrc |
| 13:51 | hiredman | removing that, made \sr work everywhere |
| 13:51 | hiredman | kind of weird |
| 13:51 | kotarak | Hmm... that suggests, that the FileType autocmd is not triggered for the file on the command line. :( |
| 13:53 | kotarak | I hate special cases |
| 14:16 | rzezeski | kotarak, you were right about autoclose, it can act a little funky, especially with Clojure code and undo operations |
| 14:20 | durka42 | the problem i have with autoclose is occasionally when i press ESC it decides to overwrite the next few characters with close-parens |
| 14:21 | Lau_of_DK | durka durka |
| 14:21 | Lau_of_DK | Are you guys still using Vim? I mean seriously, this is 2009.... Heard of Emacs anyone? |
| 14:22 | rzezeski | durka42, yea I don't think I'm going to use it much longer |
| 14:23 | Raynes | Lau_of_DK: I agree. |
| 14:23 | tashafa | emacs+slime ftw |
| 14:23 | gnuvince | whois Lau_of_DK |
| 14:23 | Raynes | Even though I use Enclojure. |
| 14:23 | Lau_of_DK | hehe |
| 14:23 | gnuvince | Vim is just fine. |
| 14:24 | Lau_of_DK | I mean, Vim... you might as well use nano |
| 14:24 | Lau_of_DK | Its old, outdated, lacks every feature in the book... |
| 14:24 | Lau_of_DK | Oh well, theres freedom to choose I guess :) |
| 14:24 | gnuvince | Lau_of_DK: you obviously don't know anything about Vim if you think it's the same as nano. |
| 14:24 | rzezeski | Lau_of_DK, I don't want to trade my superb text editor, not an OS |
| 14:24 | rzezeski | ;) |
| 14:24 | durka42 | nano is pretty terrible, it can't even handle long lines |
| 14:24 | rzezeski | for an OS* |
| 14:25 | Lau_of_DK | ~ all Im saying is, that before I used to be a slow developer, always being retrained by my software, when suddenly... |
| 14:25 | clojurebot | CLABANGO! |
| 14:25 | Lau_of_DK | EMACS! hit me |
| 14:25 | Lau_of_DK | :) |
| 14:25 | ayrnieu | nano is absolutely wretched, should have never existed, has no merit, should not be used or recommended to anybody. Using its vi 'mockulation' twice in two days causes brain damage most of the time. |
| 14:25 | albino | vim is the shiznit Lau :) |
| 14:26 | tashafa | how is enclojure now these days? I used it a while ago and got discouraged when I was learning clojure |
| 14:26 | Lau_of_DK | hehe |
| 14:28 | rzezeski | Well, I used to be an Emacs only user, and then I switched to Vim and saw the light (ie, superior key bindings) and never looked back :) |
| 14:29 | Lau_of_DK | So you didnt just consider M-x viper? :) |
| 14:29 | rzezeski | editing modes is where its at |
| 14:30 | digash` | EMACS? Who uses that thing? It was, like, hacked in '80. And it uses this weird language called LISP. |
| 14:30 | rzezeski | does viper give me modes? |
| 14:31 | ayrnieu | rzez - yes. |
| 14:31 | javuchi | hello |
| 14:31 | Chouser | rzezeski: yep -- viper mode and viper-got-disabled mode |
| 14:31 | javuchi | what IDE do you prefer to use with clojure? |
| 14:31 | Lau_of_DK | rzezeski: This is all you need to know http://xkcd.com/378/ |
| 14:31 | Lau_of_DK | javuchi: Emacs of course, coupled with Swank-clojure and slime |
| 14:31 | dnolen | haha, javuchi: you just came into the middle of Vim vs. Emacs, things never change. |
| 14:32 | Raynes | tashafa: It's good now. It's good enough for everyday editing. |
| 14:32 | rzezeski | Lau, I've seen that one before, very funny |
| 14:32 | ayrnieu | javuchi - I like unix for my integrated development environment^W^W^Wopen tool platform^W^W^Woperating system |
| 14:32 | Raynes | I use it and nothing else. |
| 14:32 | Raynes | Also, anyone complains about Emacs being bloated and being an OS in a window needs to leave this channel and kill themselves. |
| 14:32 | Raynes | :| |
| 14:32 | ayrnieu | Raynes - suppose that someone compliments it for those very features. |
| 14:33 | javuchi | i know emacs, but also like netbeans |
| 14:33 | javuchi | Lau_of_DK: why emacs? |
| 14:33 | Raynes | I hate netbeans but love Enclojure. |
| 14:33 | Lau_of_DK | M-x netbeans |
| 14:33 | Raynes | It cuts both ways. |
| 14:33 | p_l | Raynes: it could be worse, you might be forced to use Eclipse |
| 14:33 | Raynes | javuchi: M-x haskell-mode |
| 14:33 | Raynes | p_l: I actually like Eclipse, but I don't like clojure-dev |
| 14:33 | Lau_of_DK | javuchi: First of it can do everything. Secondly you can compile straight to another buffer, and get some interactive development going, thirdly, there are no real alternatives |
| 14:34 | javuchi | i use emacs for CL |
| 14:34 | javuchi | is it that good with clojure? |
| 14:34 | Raynes | I would use emacs for Clojure if it wasn't for having to compile Clojure code and jar it myself. |
| 14:34 | Raynes | I'm lazy. |
| 14:34 | Raynes | And I don't like ant. |
| 14:35 | javuchi | i'm confused, there are 3 things: |
| 14:35 | javuchi | clojure-mode |
| 14:35 | Lau_of_DK | javuchi: http://bc.tech.coop/blog/081023.html |
| 14:35 | dnolen | javuchi: it's getting better. The release of cl-format 2.0 fixes one of the major missing things for which is readable macro-expansions. |
| 14:35 | javuchi | swank-clojure |
| 14:35 | p_l | Raynes: I've got rid of Eclipse after it eating too much memory :) |
| 14:35 | javuchi | clojure-extra |
| 14:35 | Lau_of_DK | javuchi: http://bc.tech.coop/blog/081023.html |
| 14:35 | dnolen | javuchi: clojure-mode is just syntax highlight |
| 14:35 | ayrnieu | thanks for putting those on separate lines, javuchi. |
| 14:35 | Lau_of_DK | Explains it all I think |
| 14:36 | dnolen | javuchi: swank-clojure is for SLIME interaction |
| 14:36 | Raynes | If you have the memory why not use it? |
| 14:36 | p_l | Raynes: it gets a little bad when Eclipse stops fitting into memory |
| 14:37 | javuchi | thanks Lau_of_DK |
| 14:37 | p_l | and FF isn't memory friendly too (and you need to use it at the same time) |
| 14:37 | Lau_of_DK | nps |
| 14:37 | Raynes | p_l: Never happened too me on my 2g machine. |
| 14:37 | Lau_of_DK | javuchi: On the same blog, you can also find a post which gives the greater overview of Emacs/Slime/Clojure, but it doesnt sound like you need it |
| 14:37 | p_l | Raynes: I had 512M :D |
| 14:37 | Raynes | Understandable. |
| 14:38 | javuchi | Lau_of_DK: i'm used to slime |
| 14:38 | Lau_of_DK | Then just start hacking |
| 14:38 | p_l | Raynes: changing it to 1.5G still didn't liberate me from constant swapping |
| 14:38 | javuchi | Lau_of_DK: but, in fact, this is the first time i'm goint to test clojure |
| 14:38 | javuchi | i don't even know how to start it! |
| 14:38 | Lau_of_DK | If you find Technomancy's Clojure-mode on Github it has an installer branch, which will clone, clojure, contrib, swank, slime and set it all right up for you |
| 14:38 | Lau_of_DK | Ive only heard good things about it javuchi |
| 14:39 | Lau_of_DK | Then technomancy is your friend |
| 14:39 | dnolen | javuchi: Lau_of_DK is right, I've set up a bunch of beginners with emas-starter-kit it works great. otherwise bill clementson's blog post covers the details for experience users. |
| 14:39 | Lau_of_DK | http://github.com/technomancy/clojure-mode/tree/installer |
| 14:39 | Lau_of_DK | Check that out |
| 14:40 | dnolen | emacs-starter-kit, i mean, also done by technomancy. |
| 14:40 | javuchi | so ok, where to absolutly start? |
| 14:40 | javuchi | don't confuse me :) |
| 14:40 | dnolen | haha, if you know emacs+slime, just do bill clementson, if you don't technomancy |
| 14:41 | kotarak | I just have to get the installation easier and some user education on how to setup a namespace, and one can omit the S from SLIME. hehe. ;) |
| 14:42 | javuchi | technomancy is another mode? |
| 14:42 | javuchi | so there are FOUR modes? |
| 14:42 | hiredman | technomancy is a dude |
| 14:42 | Raynes | javuchi: It's the same mode. Technomancy just slaps everything together. |
| 14:42 | hiredman | not an emacs mode |
| 14:43 | Raynes | I wonder how many people have disregarded Clojure as soon as they read "Emacs" in the wiki. |
| 14:43 | Raynes | I would guess a good 10-20 people. |
| 14:44 | hiredman | damn it |
| 14:44 | javuchi | emacs is a beast because it is completely different to the rest of the world |
| 14:44 | albino | Lisps have always had that problem, learning emacs+lisp at the same time is daunting |
| 14:45 | javuchi | i'm using it for years and still don't remember how cut/paste shortcuts are!! |
| 14:45 | Raynes | albino: And Clojure has IDE's being made, and one of them is pretty good for general Clojure development. |
| 14:45 | kotarak | albino: what does shiznit mean? |
| 14:46 | Raynes | kotarak: Mean's 'shit'. |
| 14:46 | kotarak | Oh. Ok. |
| 14:46 | kotarak | At least it's usable shit. |
| 14:47 | albino | kotarak: http://www.urbandictionary.com/define.php?term=shiznit "the shit" |
| 14:47 | hiredman | ,(?map range $ 3 inc � inc) |
| 14:47 | clojurebot | java.lang.Exception: Unable to resolve symbol: ?map in this context |
| 14:47 | hiredman | ,(pl (?map range $ 3 inc � inc)) |
| 14:47 | clojurebot | (2 3 4) |
| 14:47 | albino | Raynes: yeah, that's good news |
| 14:47 | kotarak | geez... slang... |
| 14:48 | Lau_of_DK | hiredman: w00t? |
| 14:48 | javuchi1 | Raynes: an IDE being done? |
| 14:48 | Raynes | javuchi1: 2 actually. |
| 14:48 | hiredman | Lau_of_DK: ? |
| 14:48 | dnolen | 3 if you include Emacs ;) |
| 14:48 | Raynes | There is Enclojure for netbeans, and it's pretty decent for everyday development. |
| 14:48 | Lau_of_DK | (:map range $ 3 inc - inc?)) ? |
| 14:49 | albino | Sorry, I forget they're are probably lots of people here who aren't from the US |
| 14:49 | Raynes | Clojure-dev which... Well, it's Clojure-dev, lets just say that. |
| 14:49 | hiredman | clojurebot: pl? |
| 14:49 | clojurebot | examples is http://en.wikibooks.org/wiki/Clojure_Programming/Examples/API_Examples |
| 14:49 | javuchi1 | i had problems with netbeans ide |
| 14:49 | hiredman | clojurebot: transform? |
| 14:49 | clojurebot | transform is http://github.com/hiredman/odds-and-ends/blob/8a84e6ddbad9d71f714ba16c3e1239633228a7eb/functional.clj |
| 14:50 | Raynes | Who was it that said choosing between an IDE and Emacs is choosing whether you want something that just works good enough or something you can configure until the end of time. |
| 14:50 | Raynes | It's actually a very true statement. |
| 14:50 | Raynes | It's the compile and build button that got me. |
| 14:50 | Raynes | :D |
| 14:50 | Lau_of_DK | You mean S-tab in emacs? :) |
| 14:51 | Lau_of_DK | hiredman: Man thats nasty - What is that dot character you use ? |
| 14:51 | hiredman | interpunc |
| 14:51 | hiredman | � |
| 14:51 | Raynes | Lau_of_DK: Last time I checked, you couldn't automatically compile and build a clojure jar automatically without an ant script or something of the sort in Emacs. |
| 14:52 | Raynes | Noticed how I said automatically twice? |
| 14:52 | javuchi1 | anyway, even if you waste your time configuring emacs, it is not going to get as good as Netbeans for the languages that Netbeans support well |
| 14:52 | Lau_of_DK | Raynes: I can set it up for you if you like, Emacs makes computing a breeze (see butterfly mode pasted above) |
| 14:52 | javuchi1 | netbeans is an order of magnitude better for java/ruby/c |
| 14:52 | Lau_of_DK | javuchi1: Its already better than netbeans in my oppinion |
| 14:54 | javuchi1 | in which directory to install clojure-mode? |
| 14:55 | Lau_of_DK | You choose |
| 14:55 | Lau_of_DK | in .emacs just do (add-to-list 'load-path "/path/to/clojure-mode") |
| 14:55 | Raynes | Any, you will be putting the path to it in your emacs configuratio.. |
| 14:55 | Lau_of_DK | But Bill will set you right up :) |
| 14:55 | Raynes | What he said. |
| 14:55 | Lau_of_DK | slowmo :) |
| 14:55 | Raynes | :p |
| 14:56 | javuchi1 | Lau_of_DK: i want a general instalation |
| 14:56 | javuchi1 | /usr/share/site-lisp?? |
| 14:57 | pjstadig | i put mine in ~/.emacs.d/clojure-mode |
| 14:58 | Raynes | Emacs Haskell-mode is awesome. |
| 15:00 | Lau_of_DK | pjstadig: I did the same :) |
| 15:00 | javuchi1 | oh my god! |
| 15:00 | javuchi1 | it runs SBCL! |
| 15:01 | Raynes | I'll have to say that I like the name more than anything else >_> |
| 15:01 | Lau_of_DK | ~ you thought you liked it better than anything else, when suddenly... |
| 15:01 | clojurebot | CLABANGO! |
| 15:02 | kotarak | Lau_of_DK: www.clabango.com |
| 15:02 | javuchi1 | how to setup clojure-mode? |
| 15:02 | Raynes | :| |
| 15:02 | javuchi1 | i cannot imagine windows users trying to configure this |
| 15:03 | javuchi1 | it would be vey funny |
| 15:03 | javuchi1 | ;) |
| 15:03 | kotarak | javuchi1: windows users can use clojure-box |
| 15:03 | Raynes | javuchi1: I did, and I succeeded. |
| 15:03 | Lau_of_DK | javuchi1: Read and understand that blog post from Bill C |
| 15:03 | Lau_of_DK | He takes you through setup and installation step by step |
| 15:03 | Raynes | I'm a windows user, and I did very will install Clojure mode and get it working before ending up using Enclojure anyways. |
| 15:03 | Raynes | well* |
| 15:04 | javuchi1 | for configuring SBCL/slime I just did apt-get install sbcl slime |
| 15:04 | Raynes | I downloaded the snapshot! |
| 15:04 | Raynes | Cause that's how I roll. |
| 15:04 | Raynes | :) |
| 15:04 | Lau_of_DK | lol |
| 15:05 | cmvkk_ | I just typed my e-mail address as @gmail.clj :/ |
| 15:05 | pjstadig | haha |
| 15:06 | Lau_of_DK | lol |
| 15:06 | kotarak | hehe :) |
| 15:06 | pjstadig | ~suddenly |
| 15:06 | clojurebot | CLABANGO! |
| 15:06 | pjstadig | Lau_of_DK: clabango.com is live |
| 15:06 | kotarak | The next level is (@ user gmail.clj) ;) |
| 15:07 | Lau_of_DK | pjstadig: Whats its purpose? Just for launching CottaBango ? |
| 15:07 | danlarkin | terrabango |
| 15:07 | pjstadig | hehe |
| 15:07 | danlarkin | hahah oh god |
| 15:07 | danlarkin | the monkey!! |
| 15:07 | pjstadig | terraclotta |
| 15:08 | javuchi1 | errrr |
| 15:08 | javuchi1 | how to use ant???? |
| 15:08 | javuchi1 | hahaha |
| 15:08 | Lau_of_DK | well, you type "ant" |
| 15:08 | cmvkk_ | usually just typing 'ant' works. |
| 15:08 | Lau_of_DK | copyclabangocats all over |
| 15:08 | javuchi1 | i don't have it installed |
| 15:09 | Lau_of_DK | on Linux, sudo apt-get install ant |
| 15:09 | Lau_of_DK | on Windows, 1) Install Linux 2) sudo apt-get install ant |
| 15:09 | Lau_of_DK | On Mac its the same as Windows |
| 15:09 | cmvkk_ | what if they're using redhat or gentoo or something? |
| 15:09 | Lau_of_DK | Same as Mac :) |
| 15:09 | kotarak | cmvkk_: 1) install debian 2) sudo apt-get install ant |
| 15:10 | javuchi1 | it uses gcj |
| 15:10 | javuchi1 | isn't that beast dead already? |
| 15:10 | javuchi1 | who uses gcj? |
| 15:11 | Lau_of_DK | it does |
| 15:12 | hiredman | eh |
| 15:14 | javuchi1 | fuck! how to install git on debian? |
| 15:14 | pjstadig | git-core |
| 15:14 | Raynes | apt-get git |
| 15:14 | Raynes | Naw, I don't know. |
| 15:14 | Lau_of_DK | javuchi1: No swearing on this channel, you know how Rich gets |
| 15:14 | kotarak | apt-get install mercurial |
| 15:14 | hiredman | is this a brand new install or something? it sounds like you don't have anything installed |
| 15:14 | pjstadig | apt-get install git-core |
| 15:14 | Lau_of_DK | javuchi1: on debian you need the backports probably, git-core there is 1.6 |
| 15:14 | pjstadig | oh |
| 15:15 | pjstadig | i don't know about debian, i'm on ubuntu |
| 15:15 | Raynes | apt-get 1 large supreme pizza delivered to 54334 state highway 13 eldridge please. |
| 15:15 | javuchi1 | i don't use git nor ant for nothing |
| 15:15 | javuchi1 | Des:2 http://ftp.debian.org lenny/main git-core 1:1.5.6.5-3 [3426kB] |
| 15:16 | javuchi1 | do i need a special version of slime too? |
| 15:16 | Lau_of_DK | javuchi1: You might need Ubuntu :) |
| 15:17 | Drakeson | javuchi1: http://github.com/nablaone/slime/commits/master |
| 15:17 | javuchi1 | Lau_of_DK: debian is right |
| 15:17 | durka42 | Raynes: http://www.beigerecords.com/cory/Things_I_Made/PizzaParty |
| 15:18 | Lau_of_DK | javuchi1: Not for you :) |
| 15:18 | Drakeson | javuchi1: have you read this ---> http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Emacs_.2F_Slime_Integration |
| 15:18 | javuchi1 | i'm simply too lazy and like to protest |
| 15:19 | Drakeson | javuchi1: you need upstream versions of swank-clojure and slime for things to work with clojure. |
| 15:20 | Drakeson | javuchi1: actually, I get my slime from git://git.boinkor.net/slime.git |
| 15:21 | javuchi1 | there is a lot of things to do |
| 15:24 | javuchi1 | eeeemmmm |
| 15:24 | javuchi1 | there is a problem |
| 15:24 | Drakeson | ? |
| 15:24 | javuchi1 | I actually don't want to substitute my default lisp-program |
| 15:24 | javuchi1 | which is sbcl |
| 15:24 | Drakeson | you don't need to |
| 15:24 | Drakeson | I run clojure by M-- M-x slime RET clojure RET |
| 15:25 | Drakeson | sbcl is the main. |
| 15:26 | javuchi1 | somebody should be packaging this for ubuntu/debian |
| 15:26 | Drakeson | javuchi1: let me try to streamline what needs to be done to get clojure+slime under debian. (btw, what is the version of emacs that you are using?) |
| 15:26 | javuchi1 | i'm using plain Lenny |
| 15:27 | javuchi1 | slime from repos |
| 15:27 | eevar | do I have to add params to get swank-clojure starting the server jvm, or does it pick that version by default? |
| 15:27 | Drakeson | don't use slime from repos. |
| 15:27 | javuchi1 | Drakeson: until now i was happy |
| 15:28 | Drakeson | javuchi1: I cannot remember the details but someone in #emacs was having problems with slime (from repos) + clojure. |
| 15:28 | javuchi1 | i'm downloading the git version |
| 15:28 | javuchi1 | i have a slow connection |
| 15:29 | javuchi1 | i can't understand why it occupes so much space!! |
| 15:29 | Drakeson | javuchi1: let me try to streamline what needs to be done to get a debian+emacs+slime+clojure setup. |
| 15:29 | javuchi1 | Receiving objects: 30% (4257/13782), 6.57 MiB | 34 KiB/s |
| 15:30 | javuchi1 | nice Drakeson |
| 15:30 | Drakeson | probably other people have written about it, though :p |
| 15:31 | javuchi1 | http://riddell.us/clojure/ |
| 15:31 | javuchi1 | may be that? |
| 15:32 | javuchi1 | it's an impressive amount of things to do |
| 15:33 | javuchi1 | somebody should be packaging this |
| 15:33 | Drakeson | you don't need to do all that. |
| 15:33 | javuchi1 | if i were a debian developer, i would do |
| 15:33 | Raynes | durka42: I cross-platformized my reader. (.replaceAll (.replaceAll (slurp f) "\r" " ") "\n" "")) |
| 15:33 | durka42 | nice |
| 15:34 | pjstadig | i had started working on a debian package for clojure |
| 15:34 | Raynes | Before someone askes me why I didn't use filter, I had to have a space in place of the \r\n or \n's. |
| 15:34 | pjstadig | i'm not a debian developer though |
| 15:34 | Drakeson | javuchi1: the problem is that things are changing to quickly at the moment. packaging would only make sense when the rate of important changes slows down. |
| 15:35 | pjstadig | packaging would make sense if it was automated like with a nightly build |
| 15:35 | hiredman | Raynes: use map |
| 15:35 | durka42 | also, replaceAll takes a regex |
| 15:35 | hiredman | it sure does |
| 15:35 | Chousuke | Raynes: I think that would be nicer with ->; (-> (slurp f) (.replaceAll "\r" " ") (.replaceAll "\n" " ")) :) |
| 15:35 | Raynes | Oh really? Cool. |
| 15:35 | hiredman | and reading a file into a string is icky |
| 15:35 | Raynes | ... |
| 15:35 | mecolin | hello |
| 15:36 | Drakeson | pjstadig: imagine a post laziness package, with half clojure-contrib stuff not yet updated to the new API. |
| 15:36 | Chouser | (apply str (map #(get {\r \space \n nil} % %)) (slurp f))) |
| 15:36 | hiredman | (not that it stops me from doing it) |
| 15:36 | javuchi1 | why slime is so big? |
| 15:36 | Chousuke | javuchi1: git downloads the entire history. |
| 15:36 | javuchi1 | Receiving objects: 33% (4569/13782), 12.05 MiB | 31 KiB/s |
| 15:36 | Chousuke | javuchi1: you might want to do git clone --depth 1 |
| 15:36 | javuchi1 | Chousuke: how to avoid that? |
| 15:36 | durka42 | (reduce #(.replaceAll %1 (first %2) (second %2)) (slurp f) {"\r" " ", "\n" ""}) |
| 15:36 | pjstadig | i'm just saying. everyone does it manually now. no reason it couldn't be packaged for easier install |
| 15:37 | Raynes | I give up. |
| 15:37 | Chousuke | pjstadig: not until 1.0 at least :) |
| 15:38 | Drakeson | javuchi1: the whole slime + history is about 54M |
| 15:38 | mecolin | how to resolve the following problem, exception: java.lang.ClassNotFoundException: clojure.lang.LazyCons (clojure and clojure-contrib from trunk) |
| 15:38 | javuchi1 | this simply gets people out of clojure |
| 15:38 | pjstadig | has anyone thought about how to make clojure work with #! scripts? |
| 15:38 | javuchi1 | i have a slow connection |
| 15:38 | pjstadig | i know there's a hack in the wiki |
| 15:38 | javuchi1 | its too long |
| 15:39 | Chousuke | mecolin: the code you're trying to run is not full-lazy compatible. |
| 15:39 | pjstadig | but something that sets up the classpath and such |
| 15:39 | Drakeson | javuchi1: I see your point. 50M of 54M slime is just history. |
| 15:39 | javuchi1 | pjstadig: a package will be REALLY welcom |
| 15:39 | Chousuke | pjstadig: #! is a comment in clojure so all you need is a launcher script. |
| 15:40 | Raynes | Is my code /really/ all that bad :\ |
| 15:40 | javuchi1 | pjstadig: even it is a very experimental one |
| 15:40 | pjstadig | right but you can't use a launcher script as a #! for another bash script |
| 15:40 | durka42 | Chouser: need \return and \newline |
| 15:40 | durka42 | Raynes: no |
| 15:41 | Chousuke | pjstadig: hmm. |
| 15:41 | Chouser | durka42: ah, sure enough. I should have warned that was untested. :-/ |
| 15:41 | Chouser | Raynes: no, what you had was perfectly fine. |
| 15:41 | Lau_of_DK | (ns my-domain |
| 15:41 | Lau_of_DK | (:use (compojure html http validation control)) |
| 15:41 | Lau_of_DK | (:load "csv" |
| 15:42 | Lau_of_DK | "logic" |
| 15:42 | Lau_of_DK | "graphics")) |
| 15:42 | Lau_of_DK | |
| 15:42 | Lau_of_DK | Why does this boork in the latest rev of Clojure? |
| 15:42 | pjstadig | hmm |
| 15:42 | javuchi1 | i have to go now. almost an our and haven't finished even 50% of the installation!! |
| 15:42 | javuchi1 | too much |
| 15:42 | Drakeson | what does deployment in github mean? can we make it create a zip file of the sources only (excluding certain directories?) |
| 15:42 | javuchi1 | i'll continue tomorrow |
| 15:42 | pjstadig | #!/home/paul/bin/clojure |
| 15:42 | pjstadig | (println "test") |
| 15:42 | pjstadig | that worked with a launcher script |
| 15:42 | mecolin | Chousuke: how can I convert this code to fully-lazy compatible ? |
| 15:42 | pjstadig | i thought bash had a problem with it last time i tried |
| 15:43 | Chousuke | mecolin: hm |
| 15:43 | hiredman | erm |
| 15:43 | kotarak | pjstadig: it's not portable. depends on the system you are running. |
| 15:43 | Chousuke | mecolin: http://clojure.org/lazy |
| 15:43 | pjstadig | specifically Stephen Gilardi's launcher from clojure-contrib |
| 15:44 | pjstadig | so what would you have to do a simple binary launcher? |
| 15:44 | durka42 | couldn't you do #!/bin/bash /path/to/script |
| 15:44 | hiredman | uh |
| 15:45 | hiredman | bash would expect /path/to/script to be a bash file, I believe |
| 15:45 | pjstadig | kotarak: you mean the path? or the method? |
| 15:45 | kotarak | pjstadig: using a #! script as #! for another one |
| 15:45 | pjstadig | k |
| 15:45 | durka42 | oh, i see |
| 15:46 | pjstadig | well at least if i can get it to work on my computer I can write clojure scripts, which would be fun |
| 15:46 | hiredman | I seem to recall that #! is not handled by the shell |
| 15:46 | Drakeson | pjstadig: what about the startup time? is it not too long for a script? |
| 15:47 | hiredman | "The shebang is actually a human-readable instance of a magic number in the executable file" |
| 15:47 | kotarak | I recall something like the #! is exec() and hence must be binary. But that was for older unixes. |
| 15:48 | hiredman | interesting |
| 15:48 | Lau_of_DK | Ok - Where is include-js in the latest compojure? |
| 15:49 | pjstadig | Drakeson: maybe, but I might find application for it |
| 15:49 | pjstadig | it would be a way to sharpen my clojure foo |
| 15:49 | pjstadig | and more fun! |
| 15:50 | Lau_of_DK | I asked you boys a question... |
| 15:50 | pjstadig | CLABANGO! |
| 15:50 | digash` | pjstadig: you can use #/usr/bin/env clj |
| 15:50 | Raynes | durka42: Thanks for bringing it to my attention that replaceAll takes a regex. :D |
| 15:51 | digash` | pjstadig: #!/usr... |
| 15:51 | durka42 | although not a clojure regex literal, which is slightly annoying |
| 15:51 | pjstadig | so if got all of the clojure.contrib.test-clojure tests (except for the evaluation test suite) running on TC |
| 15:51 | pjstadig | not that they're comprehensive |
| 15:52 | pjstadig | even loading clojure.contrib.test-clojure.evaluation throws an error |
| 15:52 | pjstadig | user=> (require 'clojure.contrib.test-clojure.evaluation) |
| 15:52 | pjstadig | java.lang.Exception: Can't take value of a macro: #'clojure.core/if (evaluation.clj:169) |
| 15:53 | pjstadig | which is (I think) what one of the tests is testing |
| 15:53 | pjstadig | i think it's confused |
| 15:53 | Drakeson | pjstadig: I didn't follow the discussion above, and I don't know if the #! problem is solved. I just tested and I can write clj scripts. (#!/usr/bin/clj) |
| 15:53 | danlarkin | Drakeson: it depends on your OS |
| 15:54 | danlarkin | for instance, I have to do #!/usr/bin/env clj |
| 15:54 | Drakeson | danlarkin: what is your OS? |
| 15:54 | Chousuke | Drakeson: that's the better way in any case |
| 15:54 | danlarkin | osx |
| 15:54 | Chousuke | er |
| 15:54 | Chousuke | danlarkin: |
| 15:54 | kotarak | ah, ye olde env hack... :) |
| 15:54 | danlarkin | I *believe* POSIX specifies that you can't hash-bang a non-binary file |
| 15:55 | danlarkin | that's why you've gotta use the aforementioned env hack |
| 15:55 | hiredman | erm |
| 15:55 | p_l | ... non-binary? |
| 15:55 | danlarkin | p_l: shell script |
| 15:56 | kotarak | p_l: eg. a shell script, everything starting in #! |
| 15:56 | p_l | danlarkin: on POSIX, everything is a binary stream of octets |
| 15:56 | p_l | (or should be) |
| 15:56 | durka42 | http://en.wikipedia.org/wiki/Shebang_(Unix)#Solving_shebang_problems_with_the_env_program |
| 15:56 | kotarak | and you may only pass _one_ argument. |
| 15:57 | digash` | $ file ~/bin/clj ==> clj: a bash script text executable |
| 15:57 | p_l | #! is just conventional magic number for specifying interpreter (mind you, ELF header also contains link to an interpreter) |
| 15:57 | danlarkin | we're not all using ELF binaries |
| 15:57 | p_l | danlarkin: it's just an example |
| 15:58 | danlarkin | also of note, "#!/usr/bin/env clj" didn't work when "~/bin" was on my PATH, but did when I changed it to "$HOME/bin" |
| 15:59 | vy | danlarkin: That's why people distrubute .bat and .sh files together. |
| 15:59 | Drakeson | danlarkin: I always put $HOME in the path, instead of ~ |
| 15:59 | kotarak | danlarkin: ~ is shell magic |
| 16:00 | pjstadig | danlarkin: yeah what's your problem dude! ;) |
| 16:00 | danlarkin | :'( |
| 16:01 | Drakeson | is it possible to compile a wrapper to native code? |
| 16:01 | pjstadig | gcj! |
| 16:01 | Chouser | Drakeson: not sure, but I once tried to compile a rapper to native code. |
| 16:01 | Chouser | ~haskell |
| 16:01 | clojurebot | Yo dawg, I heard you like Haskell, so I put a lazy thunk inside a lazy thunk so you don't have to compute while you compute. |
| 16:02 | Drakeson | like putting something in clojure's ant that builds a "happy non-text binary" executable to keep some OS's happy |
| 16:03 | mattrepl | Drakeson: with JNA, yes. if it's a C shared library (or C++ without symbol name mangling) |
| 16:04 | kotarak | Drakeson: int main(int argc, char *argv[]) { char *args[] = { "/usr/bin/java", "-cp", "clojure.jar", "my.main.class" }; execv(args[0], args); return -1 } |
| 16:04 | Chouser | whoa. C. |
| 16:05 | pjstadig | yeah no kidding dude |
| 16:05 | pjstadig | would it be that much trouble to have a simple binary wrapper |
| 16:05 | danlarkin | there's always hashdot |
| 16:05 | pjstadig | but you'd probably want to setup the classpath with more than clojure.jar |
| 16:05 | Raynes | (.replaceAll (slurp f) "\r(\n)?" " ")) :D |
| 16:06 | hiredman | java picks up the CLASSPATH environment variable if not overriden by -cp |
| 16:06 | pjstadig | even through a wrapper? |
| 16:07 | kotarak | pjstadig: one can also access the in environment. |
| 16:07 | kotarak | ah, yes. |
| 16:07 | hiredman | pjstadig: I believe so |
| 16:07 | kotarak | The Java also inherits the environment from the parent process. |
| 16:07 | pjstadig | it would be nice, though, if the wrapper would automatically pickup things in the ~/.clojure or /usr/lib/clojure directory or something |
| 16:08 | Drakeson | I guess a C wrapper is not perfect but might be good enough. |
| 16:08 | danlarkin | the clj script should do that |
| 16:08 | danlarkin | Drakeson: look at hashdot |
| 16:08 | pjstadig | but the clj script cannot be used for #! scripts |
| 16:09 | hiredman | lisppaste8: url? |
| 16:09 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 16:09 | pjstadig | at least not portably |
| 16:09 | danlarkin | pjstadig: hm? why not? |
| 16:09 | pjstadig | haha |
| 16:09 | lisppaste8 | hiredman pasted "how I manage my classpath" at http://paste.lisp.org/display/76979 |
| 16:09 | pjstadig | i thought that's what the whole discussion was about |
| 16:09 | kotarak | pjstadig: but the C wrapper could just execute "sh clj-script".... |
| 16:10 | pjstadig | kotarak: true |
| 16:10 | Drakeson | hiredman: I just use java 6 :p |
| 16:11 | durka42 | Drakeson: how does that help? |
| 16:11 | hiredman | yes, please explain |
| 16:12 | Drakeson | durka42,hiredman: instead of putting all .jar files in the env var CLASSPATH, you can just say, e.g. export CLASSPATH="$HOME/.local/share/java/*" |
| 16:12 | Drakeson | (that's where I put my jars) |
| 16:13 | hiredman | interesting |
| 16:13 | Drakeson | (actually I symlink the actual clojure.jar, etc. into that directory) |
| 16:15 | Drakeson | also I symlink swank-clojure/swank into that directory. To make swank happy as well, I actually have to set: export CLASSPATH="$HOME/.local/share/java:$HOME/.local/share/java/*" |
| 16:17 | Drakeson | I think a good clj script wrapper (whether it can be compiled by java or written in C), should behave like python. (you set PYTHONPATH and PYTHONSTARTUP in your path). |
| 16:27 | Drakeson | danlarkin: hashdot looks interesting, though apt-cache search hashdot returns nothing. |
| 16:28 | danlarkin | that's a shame |
| 16:28 | danlarkin | it seems useful |
| 16:31 | pjstadig | hashdot looks interesting |
| 16:31 | pjstadig | anyone using it with clojure? |
| 16:31 | Drakeson | pjstadig: it even has clj.hdp in it |
| 16:31 | Drakeson | how can I run java as client? clj script runs java server by default. java -help | grep client returns nothing |
| 16:32 | pjstadig | -server just uses a bigger starting heap |
| 16:33 | hiredman | pjstadig: nope |
| 16:33 | hiredman | -server uses the hotspot vm, which does jiting and all kinds of optimizing |
| 16:33 | Drakeson | it's startup takes much longer |
| 16:33 | pjstadig | d'oh |
| 16:33 | hiredman | -client does not |
| 16:33 | pjstadig | oh right |
| 16:33 | pjstadig | yeah |
| 16:34 | Drakeson | a short-lived script wrapper should use the client, then |
| 16:34 | pjstadig | i knew that somewhere in the deep recesses of my brain |
| 16:34 | pjstadig | can't you change the clj script? |
| 16:35 | hiredman | everyone should just setup their OS to fire up nailgun |
| 16:35 | hiredman | at boot |
| 16:35 | Drakeson | sure. I just cannot figure the right command line option for java to run the client |
| 16:35 | Drakeson | my java somehow does not have -client :( |
| 16:35 | pjstadig | o |
| 16:35 | hiredman | *shrug* |
| 16:36 | hiredman | maybe 6 is all hotspot now? |
| 16:37 | kotarak | hiredman: nailgun works surprisingly smooth for its last update in 2005 :) |
| 16:37 | hiredman | yeah |
| 16:37 | hiredman | ng clojure.main starts up so fast |
| 16:38 | pjstadig | apt-get ?? |
| 16:39 | kotarak | well, that's because the JVM is already running :) So starting up is maybe so wrong word... ;) |
| 16:40 | hiredman | well |
| 16:40 | hiredman | the repl starts |
| 16:40 | danlarkin | Ooo nailgun looks very useful |
| 16:41 | pjstadig | nailgun + hashdot |
| 16:42 | hiredman | I may have to setup crontab on my machines to fireup nailgun at boot |
| 16:43 | Drakeson | apt-cache search nailgun nope :( |
| 16:43 | kotarak | http://www.martiansoftware.com/nailgun/index.html |
| 16:44 | Drakeson | what does it do? does it keep them all in a single process or it forks for every new "sub-shell"? |
| 16:44 | pjstadig | haha |
| 16:44 | pjstadig | i love the google ads on that site |
| 16:45 | hiredman | you get a single vm instance |
| 16:45 | pjstadig | "Grex 23 Gauge Pin Nailer" |
| 16:45 | kotarak | Drakeson: the client is like the X Windows system: it just relies cli arguments and I/O |
| 16:45 | kotarak | relays |
| 16:47 | Drakeson | pjstadig: get ad-block-plus firefox extention and filter google-analytics :p |
| 16:48 | Drakeson | kotarak: so if there is any problem the whole vm goes belly up? (for instance, I got 2 jvm crashes this week) |
| 16:49 | bitbckt | clojurebot: ~haskell |
| 16:49 | clojurebot | Yo dawg, I heard you like Haskell, so I put a lazy thunk inside a lazy thunk so you don't have to compute while you compute. |
| 16:49 | kotarak | Drakeson: well. If you kill the vm, it's dead, I suppose. Then you have to restart it. |
| 16:50 | bitbckt | ,(doc send) |
| 16:50 | clojurebot | "([a f & args]); Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)" |
| 16:50 | bitbckt | (sorry... showing off) |
| 16:50 | bitbckt | hiredman: :D |
| 16:50 | pjstadig | ~suddenly |
| 16:50 | hiredman | bitbckt: ? |
| 16:50 | clojurebot | CLABANGO! |
| 16:51 | bitbckt | hiredman: showing off clojurebot to great acclaim |
| 16:51 | Drakeson | is it possible to have the vm in a "forkable" state, and have very quick forks (just memcpy the appropriate memory area to the new vm process for forking)? |
| 16:51 | hiredman | ~roulette |
| 16:51 | clojurebot | click |
| 16:51 | hiredman | ~roulette |
| 16:51 | clojurebot | bang |
| 16:52 | bitbckt | one of my favorites... |
| 16:52 | kotarak | Drakeson: forking on any sane unix is copy-on-write. And hence fast. But it's not portable, eg. to Windows, AFAIK. |
| 16:52 | p_l | not to WinAPI |
| 16:53 | bitbckt | clojurebot: brain dump |
| 16:53 | clojurebot | brain dump is http://clj.thelastcitadel.com/clojurebot |
| 16:53 | kotarak | forking is indeed similar to clojure's persistent collections :) |
| 16:53 | bitbckt | hmm |
| 16:54 | Drakeson | I only ever have to do with Unices. Do I qualify to get a fast fork? |
| 16:54 | kotarak | You probably do, but does the JVM support forks? |
| 16:55 | hiredman | bitbckt: that's been throwing execptions, and I haven't dealt with it |
| 16:55 | hiredman | ~google java fork |
| 16:55 | clojurebot | First, out of 221000 results is: |
| 16:55 | clojurebot | fork process in Java |
| 16:55 | clojurebot | http://www.velocityreviews.com/forums/t151556-fork-process-in-java.html |
| 16:59 | Drakeson | seriously, can I achieve that using JNI or JNA? (I don't need platform independence, as much as Sun needed to appeal to Windows developers). |
| 16:59 | p_l | Drakeson: Windows isn't the only other OS :) |
| 16:59 | kotarak | Drakeson: you can probably go down to a call to fork() in the libc. But don't ask what happens afterwards.... |
| 17:00 | kotarak | You have to the children/parent checking and the like. |
| 17:00 | kotarak | to do |
| 17:01 | bitbckt | hiredman: ah. that's alright... I just wanted to find something 'impressive' for it to say for the live audience ;-) |
| 17:02 | hiredman | audience? |
| 17:02 | bitbckt | easy crowd |
| 17:02 | bitbckt | yeah... asking about bots, and yours came to mind as a good example |
| 17:02 | Drakeson | is it written in clojure? |
| 17:02 | hiredman | clojurebot: where are you? |
| 17:02 | clojurebot | http://github.com/hiredman/clojurebot/tree/master |
| 17:02 | hiredman | yes |
| 17:03 | hiredman | ~def count |
| 17:03 | hiredman | ~jdoc String |
| 17:04 | walters | Drakeson: i think the right approach is to just fix the VM startup in general |
| 17:05 | walters | Drakeson: right now it involves unzipping jar files - that's *broken* |
| 17:05 | walters | Drakeson: should just be mmap() on a binary format |
| 17:05 | walters | Drakeson: it also re-verifies the jars which is also busted |
| 17:06 | gnuvince_ | Hello |
| 17:07 | Drakeson | I have yet to hear a good thing about java other than the sheer size of its library :( |
| 17:07 | durka42 | gnuvince: congratulations! |
| 17:07 | pjstadig | gnuvince_: congrats! which unis? |
| 17:07 | bitbckt | gnuvince_: great! |
| 17:08 | Drakeson | ~ congraJulations! |
| 17:08 | clojurebot | excusez-moi |
| 17:08 | bitbckt | >_< |
| 17:08 | gnuvince_ | pjstadig: two universities in Quebec, Universit� de Montr�al and Universit� de Sherbrooke. |
| 17:09 | walters | Drakeson: heh, well i appreciate the available tools and the general maturity of the platform, but this particular issue is just one of those things that should have been fixed long ago |
| 17:09 | kotarak | Drakeson: hotspot jit |
| 17:09 | gnuvince_ | I now need to figure where I'll go :) |
| 17:09 | hiredman | which you get from -server |
| 17:09 | kotarak | gnuvince_: Uh. Die Qual der Wahl. The agony of choice. (freely translated) |
| 17:13 | pjstadig | gnuvince_: easy, just go to the better one. :) |
| 17:14 | Drakeson | kotarak: I am new to java, and I hate the "premature-standardized APIs" in java. python interfaces are better designed, IMHO. I haven't got to a point to see JIT optimization in action, yet, so my opinion might change. |
| 17:14 | gnuvince_ | pjstadig: I have other criterias :) |
| 17:15 | Drakeson | gnuvince_: I would go to the larger city. (is Sherbrooke even a city?) |
| 17:16 | hiredman | the library has all kinds of cool stuff in it, but a lot of it is not "maintence script" type stuff |
| 17:16 | kotarak | Drakeson: I also thought "Ugh, Java... Big... Slow..." (That's why I almost missed Clojure) But a lot of people with a lot more knowledge than me (eg. rhickey) told me that there is Java and that there is the JVM. That these are two horses of a different color and that the JVM is quite a nice piece of software engineering. |
| 17:17 | p_l | kotarak: there's also "-server" command line switch |
| 17:17 | cp2 | p_l: -server is automagically implied in java 6 |
| 17:17 | Drakeson | kotarak: I appreciate JVM itself, but reading tons of javadocs or java-examples-written-by-idiots-over-the-interwebs is giving me headaches. |
| 17:17 | hiredman | like, when was the last time you wrote a python script that used a threadpool? |
| 17:17 | p_l | cp2: good to hear. i still add it manually anyway |
| 17:18 | cp2 | p_l: ;) |
| 17:18 | Chousuke | Drakeson: javadoc is still good |
| 17:18 | p_l | hiredman: over 2 years, cause python threading is broken by design |
| 17:18 | hiredman | p_l: and it does state wrong of course :P |
| 17:18 | kotarak | Drakeson: see: fighting off Python missionaries is giving me headaches. So nothing is perfect. ;) |
| 17:19 | p_l | hiredman: I don't have anything against state... I have a lot against GIL :D |
| 17:21 | hiredman | the point is, lots of the java "standard" library is threading stuff |
| 17:22 | hiredman | so, yeah, java libraries are great, but not really targeted at light scripting tasks |
| 17:23 | p_l | and applications where "enterprise" && "good" actually try not to contradict themselves they don't use much of it :P |
| 17:23 | hiredman | what? |
| 17:23 | p_l | hiredman: message passing :) |
| 17:24 | hiredman | uh |
| 17:25 | hiredman | message passing if anything requires dealing with threading and state even more, you just have the library do it for you |
| 17:26 | p_l | hiredman: but you can make it a FIFO operation, a'la erlang :) |
| 17:26 | hiredman | p_l: but you have to manage the queue, pass messages to the corrent process, etc |
| 17:27 | hiredman | correct |
| 17:27 | hiredman | (erlang process) |
| 17:27 | hiredman | the erlang process have to run on something... (threads) |
| 17:28 | hiredman | green or otherwise |
| 17:28 | p_l | hiredman: erlang processes use shared-nothing architecture, so threading primitives are much simpler |
| 17:28 | p_l | while what you will see getting taught often will be mutexes everywhere >_> |
| 17:29 | Drakeson | I am trying to gather examples over the net, and put them in git://github.com/gilaras/clojure-example.git |
| 17:30 | hiredman | p_l: what I am trying to say is, java provides the stuff you could use to "build" erlang in its libraries |
| 17:31 | Drakeson | hiredman: java (+clj) might be the way to the future. It has many mistakes to fix first, though. |
| 17:31 | hiredman | regardless of the interface the erlang lanuage provides to programmers, all the bookkeeping and what-not is done somewhere by someone |
| 17:31 | hiredman | *shrug* |
| 17:32 | hiredman | Drakeson: whichever, I am just saying that the java libraries provide a lot of cool stuff, that you will never see if all you do is write little one off scripts |
| 17:33 | hiredman | I've been exposed to way more of java's standard libraries since starting with clojure then I was when I ever bothered to write java |
| 17:34 | hiredman | Drakeson: what issues? |
| 17:34 | Chousuke | one point for Clojure for the fact that that JVM advances are separate from Clojure advances. |
| 17:34 | Chousuke | If the JVM gets fast startup due to modularisation or some other trickery, Clojure benefits immediately. |
| 17:34 | Drakeson | hiredman: I do care about "one-off" scripts, or startup time, etc. |
| 17:35 | p_l | Drakeson: make a "java machine" like lispmachines and have it provide a preloaded, established and optimized image? :D |
| 17:35 | kotarak | Well, there are screws and nails... one tool to saw them all? |
| 17:35 | Chousuke | p_l: or he could run a java VM on the background for clojure :) |
| 17:36 | slashus3 | p_l: How is the performance on JDK7? |
| 17:36 | hiredman | Drakeson: I don't see that improving any time soon, if you look at what java provides that is clearly not the niche they where trying to fill |
| 17:36 | p_l | slashus3: I haven't run anything to test performance, but I can say that X11 is as broken as it have been since 1.0 |
| 17:36 | Chousuke | hiredman: actually, I think they're taking startup time very seriously nowadays |
| 17:36 | pjstadig | rhickey: how'd the interview go? |
| 17:38 | p_l | slashus3: I remember however my friends reactions to 1.5 and 1.6 (and compared to me, who mainly just used java apps, he was a hardcore java programmer) and he was quite enthusiastic about 1.7 :) |
| 17:38 | Chousuke | It probably won't be until after JDK8 that there will be any really visible changes though. |
| 17:39 | hiredman | Chousuke: which is, what?, at least two years down the road |
| 17:39 | p_l | I can say though that JDK7 is better at memory management than Firefox :> |
| 17:39 | p_l | my netbeans process is actually apparently getting _smaller_ |
| 17:39 | hiredman | if you want to use clojure for little one off scripts, nailgun seems the way to go |
| 17:39 | Drakeson | to appeal to "script kiddies", or the "open-source community" they should take scripting seriously. "Small useful scripts" is the entry point for many future contributors. |
| 17:40 | Chousuke | Drakeson: "script kiddie" is a very negative term :/ |
| 17:40 | Chousuke | no-one wants to appeal to them |
| 17:40 | p_l | they make interesting wall decorations though |
| 17:41 | hiredman | the skillsmatter podcast is still "coming soon" :( |
| 17:43 | p_l | 1) track the kiddie down 2) "hire" a security consultant for 10k classified as damages 3) call law enforcement |
| 17:44 | Raynes | I just realize I have Clojure plastered over everything I do on the internet. It's in my signature on forums, it's in my profiles on websites. It's even on my twitter. |
| 17:44 | Raynes | O_O |
| 17:44 | Drakeson | Chousuke: I didn't mean script kiddie. I meant "script" + "kiddie" (literally), like high school or undergrads kids trying to write small scripts, as opposed to "enterprise oldies". |
| 17:44 | kotarak | hiredman: "skillsmatter podcast"? |
| 17:45 | hiredman | http://skillsmatter.com/podcast/java-jee/clojure-for-java-programmers |
| 17:45 | Raynes | O_O |
| 17:45 | kotarak | Uh. Bots writing bots. In true Lisp spirit of macro writing macros. :) |
| 17:47 | hiredman | ~hiredman is also <reply>#who: I heard hiredman failed the turing test. |
| 17:47 | clojurebot | Alles klar |
| 17:47 | hiredman | ~hiredman |
| 17:47 | clojurebot | hiredman is an evil genius. |
| 17:47 | durka42 | ~hiredman |
| 17:47 | clojurebot | hiredman is a three-toed sloth |
| 17:47 | Chousuke | hm |
| 17:47 | Chousuke | if you write a macro-writing macro that writes macro-writing macros, is that an infinite loop? :/ |
| 17:48 | p_l | Chousuke: yes |
| 17:48 | Raynes | Chousuke: Yes. |
| 17:48 | Raynes | A very /advanced/ infinite loop. |
| 17:48 | hiredman | Chousuke: while it does write the macro, it may not call the macro |
| 17:48 | kotarak | Chousuke: or will there be The First Macro? Deep down in the lower-levels of the systems? |
| 17:48 | hiredman | might not |
| 17:50 | pjstadig | later people |
| 17:50 | Drakeson | that's just a chain of 4 macros! (defmacro foo [] `(defmacro bar [] ....)) |
| 17:51 | p_l | also, the fact it's an infinite loop might not be that bad. Look in the mirror |
| 17:52 | kotarak | There are theories, that the universe could create itself with some loop in time. Maybe it made just *poof* and there was lisp? |
| 17:53 | p_l | kotarak: there are theories that the world is a holographic projection of a 2D plane... |
| 17:57 | Raynes | There are theories that Rich Hickey is John McCarthy is God and that he wrote the universe in LISP. |
| 17:58 | Chousuke | yes, yes, I also have a theory that there is a unicorn on my backyard. |
| 17:59 | cp2 | yes, and the goa'uld actually did enslave earth with their damn pyramid ships |
| 18:00 | Chousuke | Quite a theory, considering I live in a block of flats. :p |
| 18:00 | Chousuke | but I can hypothesise a backyard for my theory. |
| 18:01 | Raynes | cp2: Stargate SG1!!! |
| 18:01 | cp2 | yes :) |
| 18:01 | cp2 | i knew at least one of you |
| 18:01 | p_l | btw, the 2d plane one actually has some experimental backing ;-) |
| 18:01 | cp2 | liked stargate |
| 18:01 | Raynes | (: |
| 18:01 | cp2 | i watched all of sg-1 and atlantis in about 2 months |
| 18:01 | cp2 | with minor breaks, of course |
| 18:01 | kotarak | p_l: the "loop in time" one, also |
| 18:01 | cp2 | and waiting between downloads |
| 18:02 | Raynes | p_l: I also have a theory as to how we can surpass the speed of light. |
| 18:02 | Raynes | By coding it in Clojure! |
| 18:02 | cp2 | all my theories involve using a gameshark |
| 18:03 | triddell | Hey, anyone here good at upgrading old code to the updated lazy stuff? Remember the old ants.clj? I think the ants are very lazy nowdays because the code doesn't fully run now. It probably only needs a couple changes but I don't know what they would be. |
| 18:03 | Raynes | Mutable state taste like bacon. |
| 18:04 | cp2 | triddell: mostly the only thing that has to be changed is lazy-cons to cons |
| 18:04 | p_l | ... that's a bad analogy <--- loves fried bacon |
| 18:04 | cp2 | i ran ants.clj recently and iirc thats all that needed changing |
| 18:04 | Drakeson | cp2: and rest -> next ? |
| 18:04 | cp2 | er, i think |
| 18:04 | cp2 | dont remember |
| 18:05 | triddell | I don't see lazy-cons |
| 18:05 | kotarak | triddell: http://clojure.org/lazy has some hints how to port the code |
| 18:05 | Raynes | (doc lazy-cons |
| 18:05 | clojurebot | No entiendo |
| 18:05 | Raynes | -_- |
| 18:05 | Raynes | (doc lazy-cons) |
| 18:05 | clojurebot | excusez-moi |
| 18:05 | Raynes | O.O |
| 18:05 | cp2 | what |
| 18:05 | cp2 | lol |
| 18:05 | triddell | I don't see lazy-cons or rest in the code. |
| 18:05 | hiredman | (doc lazy-seq) |
| 18:05 | clojurebot | Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. Any closed over locals will be cleared prior to the tail call of body.; arglists ([& body]) |
| 18:05 | Raynes | wut |
| 18:06 | hiredman | lazy-cons doesn't exist anymore |
| 18:06 | Raynes | :o |
| 18:06 | Raynes | I see. |
| 18:06 | Raynes | You guys are tricking me to make me look stupid. |
| 18:06 | cp2 | no, i said you need to change any lazy-cons call to cons |
| 18:06 | cp2 | there might be others |
| 18:06 | cp2 | but i dont remember |
| 18:07 | cp2 | (for ants.clj) |
| 18:07 | kotarak | triddell: compile your clojure with -Dclojure.assert-if-lazy-seq=true, that should give some warnings for nil punning in ants.clj |
| 18:08 | kotarak | if there is any, of course |
| 18:08 | triddell | kotarak: k, thanks for the link |
| 18:22 | replaca_ | Back to the Lisp is God theme, this is a classic: http://xkcd.org/224/ |
| 18:46 | triddell | FYI: the current ants.clj *already* supports the latest clojure :-) |
| 18:49 | kotarak | hehe :) |
| 19:15 | danlarkin | tada! http://github.com/danlarkin/madison/tree/master |
| 19:16 | kotarak | ~and suddenly... |
| 19:16 | clojurebot | CLABANGO! |
| 19:17 | durka42 | that will never get old will it |
| 19:18 | danlarkin | now I have a ton of work to do :-o |
| 19:19 | kotarak | danlarkin: wait till the bug reports come in.... :] |
| 19:19 | kotarak | Releasing half past midnight is not a good idea.... |
| 19:20 | danlarkin | haha oh I don't know if there'll be bug reports... it's barely usable right now |
| 19:20 | kotarak | danlarkin: haha there will, there will. users generally expect every release to be perfect! |
| 19:21 | danlarkin | ruh roh |
| 19:22 | cemerick | does anyone know of a trie implementation in clojure? |
| 19:23 | kotarak | aren't vectors tries? |
| 19:24 | cemerick | perhaps, but they're implemented in java |
| 19:24 | kotarak | Ah. Ok. |
| 19:57 | hiredman | ,(doc nth) |
| 19:57 | clojurebot | "([coll index] [coll index not-found]); Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences." |
| 20:26 | dreish | Ooh, neat: apply can apply macros. |
| 20:28 | Chousuke | huh? |
| 20:28 | dreish | ,(apply #'when 1 2 ()) |
| 20:28 | clojurebot | (if 1 (do 2)) |
| 20:28 | Chousuke | :| |
| 20:28 | kotarak | That's because the macro property is in the metadata of the Var. |
| 20:28 | dreish | Good call. |
| 20:29 | kotarak | when directly wouldn't work. |
| 20:29 | Chousuke | that's rather cool |
| 20:29 | Chousuke | now I wonder if it's actually usefuls |
| 20:29 | Chousuke | -s |
| 20:29 | dreish | Well, I was wondering how it might be possible to do an interpreted eval, since e.g., apply is 1000x faster than eval. |
| 20:30 | Chousuke | ,(apply #'when [1 2 3]) |
| 20:30 | clojurebot | (if 1 (do 2 3)) |
| 20:30 | kotarak | clojurebot: eval |
| 20:30 | clojurebot | eval is sometimes useful - but only sometimes |
| 20:30 | dreish | Yes, I know. |
| 20:30 | kotarak | hmmm.... |
| 20:30 | kotarak | clojurebot: eval |
| 20:30 | clojurebot | eval is DENIED |
| 20:30 | kotarak | aha |
| 20:30 | kotarak | clojurebot: eval |
| 20:30 | clojurebot | eval is evil |
| 20:31 | dreish | Usually I'm the one delivering this lecture. |
| 20:31 | dreish | No, wait, I'm always telling people not to use macros. |
| 20:31 | kotarak | That's also a good idea. |
| 20:31 | kotarak | Because most of the time they really want a function. |
| 20:32 | dreish | Yes. |
| 20:33 | dreish | I think it's a symptom of a desire to grok Lisp by shortcut. |
| 20:34 | dreish | "I hear macros are great" or "I hear eval is some mysterious wizardry", therefore, "I want to dive in and immediately write everything with macros and eval." |
| 20:34 | kotarak | Just a few days ago, someone recognised the limits of macros just be himself. Without help. That was a glorious moment. :) |
| 20:39 | Chouser | macros have limits? |
| 20:39 | kotarak | Yes. Indeed they have. |
| 20:39 | dreish | They're limited in the means of combinaaation. |
| 20:40 | kotarak | (def x [1 2 3]) (some-macro x) ; the macro sees x, not [1 2 3]. |
| 20:40 | Chouser | @(resolve x) |
| 20:41 | Chouser | I'm just rousing rabble. don't mind me. |
| 20:41 | kotarak | Chouser: please.... (defn foo [x] (some-macro x)) (foo [1 2 3]) |
| 20:42 | kotarak | This defn is a common "use case", people have with macros.... |
| 20:42 | dreish | Other drawbacks to appeal to people who think they're some sort of all-purpose optimizing inliner: they increase the size of the code and force the JVM to do more work to optimize and inline. |
| 20:42 | kotarak | And their "solution" is almost always eval.... -.- |
| 20:42 | Chouser | why not use eval? |
| 20:42 | Chouser | oh. |
| 20:42 | dreish | Because eval is about 1000x slower than apply. :) |
| 20:42 | Chouser | sorry, I don't know why I'm saying any of these things |
| 20:42 | Chouser | as if we don't all have better things to do |
| 20:43 | kotarak | Chouser: maybe because I say the things, I said above to often? ;) |
| 20:43 | Chouser | perhaps I'm in rhickey withdrawal |
| 20:44 | dreish | You should be happy he's out spreading the gospel. |
| 20:44 | dreish | http://twitter.com/_benb/statuses/1324431942 |
| 20:46 | kotarak | "factoring primes" ... I see the next speed discussion coming up... |
| 20:46 | dreish | True fact: the most efficient algorithm to factor a prime x is [1 x]. |
| 20:51 | Chouser | maybe an array... |
| 20:51 | Chouser | see? what's wrong with me. argumentative for no good reason. |
| 20:52 | dreish | Oh, that wasn't Clojure, that was a hypothetical language specifically written and optimized for returning two numbers. |
| 20:53 | gnuvince_ | "Another macro bytes the dust" |
| 20:59 | powr-toc | Looking at core.clj, what are the (def unquote) and (def unquote-splicing) for? |
| 21:00 | powr-toc | are they defined later, elsewhere/ |
| 21:00 | powr-toc | ? |
| 21:00 | dreish | ,'~foo |
| 21:00 | clojurebot | (clojure.core/unquote foo) |
| 21:00 | hiredman | ,(macroexpand ~foo) |
| 21:00 | clojurebot | java.lang.Exception: Unable to resolve symbol: foo in this context |
| 21:00 | dreish | It's got to have something to resolve to. |
| 21:00 | hiredman | jerk |
| 21:00 | hiredman | ,(macroexpand '~foo) |
| 21:00 | clojurebot | (clojure.core/unquote foo) |
| 21:01 | hiredman | ,(macroexpand '~@foo) |
| 21:01 | clojurebot | (clojure.core/unquote-splicing foo) |
| 21:01 | shoover | Chouser: the good old days were when rhickey used to pop in from the airport when out giving talks. now he just hangs out in the pubs with the Londoners |
| 21:01 | powr-toc | dreish: cheers |
| 21:01 | dreish | Pop in from the airport? As in, not spend a long time away? |
| 21:01 | shoover | pop into #clojure |
| 21:02 | dreish | Ah right. |
| 21:02 | dreish | Well, when you put it that way, it does fill me with a jealous rage. |
| 21:06 | slashus2 | I have noticed. If you use the Math/pow function for smaller powers you get a lot more overhead than if you just used (* 3 3 3) . I was experimenting with creating a macro like (defmacro ** [number power] `(* ~@(repeat power number))) , which creates a multiplication like the latter. It seems to be more efficient for smaller powers than the Math/pow function call. |
| 21:08 | slashus2 | up to a certain point. |