2010-07-16
| 00:43 | Bahman | Hi all! |
| 02:11 | bortreb | How do I upload all the jars that I've hand-pick for my project to clojars, all under by group id? |
| 02:27 | bortreb | what happens if you screw up uploading something to clojars? can you remove it? |
| 02:28 | chouser | I think you can send email to ask that it be removed. :-/ |
| 02:30 | robtp | hey - does anyone care to critique this for style and idiomatic usage? http://gist.github.com/478019 |
| 02:31 | robtp | that's the prisoner-lightbulb problem |
| 02:31 | robtp | and other than the fact that storing turned-off and turned-on is redundant |
| 02:32 | bortreb | I wouldn't put (main) in the file itself because that will trigger it when it is 'used' |
| 02:32 | robtp | and then, another question - is there a readymade function to count the number of elements of a collection passing some test? |
| 02:33 | robtp | count-passes(coll, #(> % 5)) ; for [5, 7, 2, 9, -1] => 2 |
| 02:34 | bortreb | you could always combine count and filter |
| 02:36 | bortreb | (defn count-passes [pred? coll] (count (filter pred? coll))) |
| 02:48 | cais2002 | ,((fn count-passes [pred? coll] (reduce #(+ %1 (if (pred? %2) 1 0)) 0 coll)) #(> % 5) [5 7 2 9 -1]) |
| 02:48 | clojurebot | 2 |
| 02:53 | robtp | ahh, nice |
| 02:54 | chouser | ,((fn count-passes [pred? coll] (count (filter pred? coll))) #(> % 5) [5 7 2 9 -1]) |
| 02:54 | clojurebot | 2 |
| 02:54 | chouser | bortreb's is nice |
| 02:55 | cais2002 | will filter create another copy of coll ? |
| 02:57 | chouser | it will lazily walk coll as count forces it to |
| 02:57 | chouser | so no, there will not be a full copy of coll alive in memory |
| 03:00 | cais2002 | i mean a filtered copy of coll being created? |
| 03:07 | bortreb | Is it possible to delete stuff from clojars if you make a mistake? |
| 03:21 | robtp | in my test case, the reduce method works many times faster |
| 03:21 | robtp | ~5-6x |
| 03:21 | clojurebot | No entiendo |
| 03:21 | robtp | ~5-6x |
| 03:24 | cais2002 | robtp: that's what i expect, as it avoids creating a filtered coll |
| 03:41 | bortreb | On my machine my version is about 20% faster |
| 03:41 | bortreb | ,(time (dotimes [_ 30] (+)) |
| 03:41 | clojurebot | EOF while reading |
| 03:41 | bortreb | ,(time (dotimes [_ 30] (+))) |
| 03:41 | clojurebot | "Elapsed time: 1.155 msecs" |
| 03:45 | bortreb | ,(time (dotimes [_ 50] ((fn count-passes-reduce [pred? coll] (reduce #(+ %1 (if (pred? %2) 1 0)) 0 coll)) even? (range 100)))) |
| 03:45 | clojurebot | "Elapsed time: 26.85 msecs" |
| 03:45 | bortreb | ,(time (dotimes [_ 50] ((fn count-passes [pred? coll] (count (filter pred? coll))) even? (range 100)))) |
| 03:45 | clojurebot | "Elapsed time: 7.049 msecs" |
| 03:51 | kuwabara | I can't seem to compile a class, not even the example from the doc. It says: "Could not locate clojure/examples/hello__init.class or clojure/examples/hello.clj on classpath", although the source is in clojure/examples/hello.clj. |
| 03:51 | kuwabara | How do I add "." into the classpath ? |
| 03:56 | bortreb | first off, you can literally type "." in the -cp argument to java |
| 03:56 | bortreb | you also have to have the ./classes directory on the classpath to compile files |
| 03:57 | bortreb | are you using emacs and connecting via slime? |
| 04:01 | kuwabara | bortreb: no, I'm simply at the repl. |
| 04:02 | kuwabara | I added "." in the cp when running clojure, but I get the same error. |
| 04:03 | kuwabara | echo "(compile 'clojure.examples.hello)" | java -cp /usr/share/java/clojure.jar:. clojure.main |
| 04:05 | kuwabara | Oops. I renamed clojure/examples/hello to clojure/examples/hello.clj and there is no more FileNotFoundException. |
| 04:05 | bortreb | that's great |
| 04:05 | kuwabara | but still java.io.IOException: No such file or directory (hello.clj:1) |
| 04:06 | kuwabara | Line 1 of hello.clj is: (ns clojure.examples.hello (:gen-class)) |
| 04:08 | esj | Morning all. |
| 04:08 | bortreb | you may try a more complete (:gen-class) |
| 04:08 | kuwabara | Found it. -cp /usr/share/java/clojure.jar:./classes:. works. |
| 04:08 | bortreb | like |
| 04:08 | bortreb | (:gen-class |
| 04:08 | bortreb | :name rlm.push |
| 04:08 | bortreb | :main true) |
| 04:09 | bortreb | what did you change? |
| 04:10 | kuwabara | I added ./classes |
| 04:10 | kuwabara | which seems to be the hardcoded destination of compiled files, but it's not added to the cp by clojure |
| 04:11 | bortreb | yeah |
| 04:11 | bortreb | you can change *compile-path* to get a different destination |
| 05:27 | cais2002 | what's the best way to do this in clojure: opts=[]; if (condA) opts+=[valA]; if (condB) opts+=[valB]; if (condC) opts+=[valC]; return opts; |
| 05:37 | esj | cais2002: dunno if its the best, but a seq comprehension might help |
| 05:38 | esj | something like |
| 05:38 | esj | ,(apply + (for [c '([1 1] [0 2] [nil 3]) :while (first c)] (second c))) |
| 05:38 | clojurebot | 3 |
| 05:38 | esj | where the first elementi in each pair is your condition, and the second the value |
| 05:38 | boojum | cals2002: (let [opts []] (cond condA (conj opts "valA") condB (conj opts "valV) ..) |
| 05:39 | esj | or leave out the apply + if you want it as a seq of the values |
| 05:39 | mjul | boojum: we need to reduce over the list - evaluation stops on the first true in cond |
| 05:40 | boojum | mjul: true |
| 05:41 | mjul | cals2002: are you trying to append to the list for each true condition or just get the sum of the vals for which the corresponding condition is true? |
| 05:41 | cais2002 | esj: I end up using reduce again, but similar to ur approach |
| 05:41 | esj | cais2002: reduce is awesome |
| 05:41 | cais2002 | mjul: append.. but I want to know the general way to do it |
| 05:41 | esj | cons ? |
| 05:42 | esj | conj if you're using vectors, say. |
| 05:42 | cais2002 | I mean the python way I mentioned above is intuitive to me.. but the clojure versions are not that obvious |
| 05:43 | esj | ,(into [] (for [c '([1 1] [0 2] [nil 3]) :while (first c)] (second c))) |
| 05:43 | clojurebot | [1 2] |
| 05:46 | mjul | ejs: sweet :-) using for is so much more readable than reduce |
| 05:46 | esj | mjul: especially for pythonistas |
| 05:48 | cais2002 | esj: talking about this, could explain why the reduce version is not faster? |
| 05:48 | cais2002 | ,(time (dotimes [_ 50] ((fn count-passes-reduce [pred? coll] (reduce #(+ %1 (if (pred? %2) 1 0)) 0 coll)) even? (range 10000)))) |
| 05:48 | clojurebot | "Elapsed time: 580.593 msecs" |
| 05:48 | cais2002 | ,(time (dotimes [_ 50] ((fn count-passes [pred? coll] (count (filter pred? coll))) even? (range 10000)))) |
| 05:49 | clojurebot | "Elapsed time: 529.725 msecs" |
| 05:50 | esj | cais2002: i'm afraid i can't, except to speculate that the provided higher order functions are likely to be better written than what you or I could do. |
| 05:51 | cais2002 | I thought filter would create another list, while reduce does not.. |
| 05:51 | bortreb | don't forget about derefrenceng |
| 05:51 | bortreb | ,(into [] (for [[cond? value] [ [ true 1] [true 2] [false 3 ] [true 4]] :when cond?] value )) |
| 05:51 | clojurebot | [1 2 4] |
| 05:53 | Chousuke | cais2002: creating a new list isn't necessarily very expensive at all |
| 05:54 | Chousuke | cais2002: the clojure core functions make use of a whole bunch of tricks that improve performance, so doing things in a way that "seems" more efficient is not guaranteed to be so. |
| 05:55 | cais2002 | Chousuke: if the elements are not simple structure, will that make a difference? |
| 05:57 | Chousuke | what do you mean by simple structure? |
| 05:58 | Chousuke | cais2002: rhickey just has put a lot of effort into making map/filter/for/into etc. really fast so that you don't need to write contrived code to get performance. |
| 06:00 | Chousuke | ~def reduce |
| 06:00 | Chousuke | reduce is fast too though |
| 06:00 | cais2002 | Chousuke: I am just wondering whether it's only to create the pointers to point to the objects or it's replicating the objects/elements.. simple refers to (range 10000), it's all integers in the list |
| 06:01 | Chousuke | in java you only have pointers. |
| 06:01 | Chousuke | except if you have primitives |
| 06:01 | Chousuke | s/java/JVM/ |
| 06:02 | Chousuke | and the integers created by range are objects too |
| 06:03 | Chousuke | since you can't have a list of primitives. |
| 06:04 | Chousuke | But then JVM optimisations will kick in and all those object allocations will suddenly be virtually free, in the best case :P |
| 06:04 | bortreb | heh the jVm makes stuff "virtually" free :) |
| 06:05 | Chousuke | heh, no pun intended :P |
| 06:08 | cais2002 | ,(into [] (concat [1 2] [3 4])) |
| 06:08 | clojurebot | [1 2 3 4] |
| 06:08 | cais2002 | ,(vec (concat [1 2] [3 4])) |
| 06:08 | clojurebot | [1 2 3 4] |
| 06:09 | cais2002 | thanks, guys, my code looks a bit easier to understand now.. |
| 06:24 | cais2002 | 88 guys |
| 06:37 | mjul | LauJensen: hej! the Docjure lib for spreadsheet import/export is now open source: http://github.com/ative/docjure |
| 06:46 | zmila | mjul, it can read/write xlsx? so based on latest version of POI |
| 06:46 | zmila | our project uses old version, only for xls (2003) files |
| 06:46 | LauJensen | mjul: Great! Did you used a hacked version of Lein for that? :) |
| 06:48 | zmila | maybe the project was created before the -jure commit :) |
| 06:52 | mjul | it was created before the -jure commit :-) (it has been underway since 2009) |
| 06:53 | mjul | - and it reads/writes xlsx, too |
| 07:30 | powr-toc | Hey... is anyone using cljr http://github.com/liebke/cljr |
| 07:31 | powr-toc | It looks to be a pretty awesome complement for lein, for the times when you don't want a project, and just want a quick repl for experimenting with libs etc... |
| 07:32 | powr-toc | I was wondering though, if anyone knows whether you can get it to work with a .user.clj file |
| 08:08 | jowag | is it possible to dump the current environment? |
| 08:13 | zmila | right question is half of the answer. what is enviroment? |
| 08:17 | Kttmm | we found the solution of the problem of yesterday. There was some old code in the Library/Java/Extensions directory which was loaded and caused some troubles |
| 08:17 | Kttmm | thanks to all for the help |
| 08:19 | rhudson | jowag: if you mean system environment vars, (System/getenv) |
| 08:21 | jowag | I mean all the clojure Vars, all the stuff I've defined and loaded from .clj files |
| 08:22 | jowag | lets say I've been hacking in REPL and I want to save my stuff and later continue with it |
| 08:22 | rhudson | (ns-publics *ns*) maybe? |
| 08:26 | jowag | ok that will give me all the vars in the current ns, now what is left is how to dump a var |
| 08:26 | powr-toc | hmm I can't seem to get add-classpath to work properly with cljr... does it work ok in lein?? |
| 08:31 | rhudson | jowag: any defn or macro is gonna be a problem |
| 08:50 | Bjering | I find time really neat for interactivly test runtime performance of what I do, is there an eqvivlant function for memory usage, something like (mem-usage [value] (...)) to give me how many bytes a particular value is occupying? |
| 09:01 | ragnard | How (if possible) can I write a function or a macro that, given a function as an argument returns a namespace qualified symbol (or a name/namespace pair) that can be used to resolve the given function? |
| 09:02 | neotyk | defn: lol, you must be getting notified quite a lot ;-) |
| 09:02 | defn | :) |
| 09:02 | defn | ragnard: i can answer that but i need to pull up my editor |
| 09:04 | ragnard | defn: cool, excitedly waiting... :) |
| 09:04 | defn | ragnard: you could use (meta) |
| 09:06 | rhickey | chouser: whither finger trees? |
| 09:06 | defn | ragnard: (ns-name (:ns (meta #'doall))) |
| 09:07 | defn | ,(ns-name (:ns (meta #'doall))) |
| 09:07 | clojurebot | clojure.core |
| 09:07 | defn | (:name (meta #'doall)) |
| 09:07 | defn | ,(:name (meta #'doall)) |
| 09:07 | clojurebot | doall |
| 09:07 | defn | ragnard: would using that work for you? |
| 09:08 | chouser | rhickey: haven't touched them in ages. they work but the api and probably the performance should be improved. |
| 09:08 | rhickey | chouser: did you ever compare to the functional java ones? |
| 09:09 | chouser | no, that's at the top of my list for once the book is out of the way |
| 09:09 | defn | ,#^meta |
| 09:09 | clojurebot | EOF while reading |
| 09:09 | chouser | ...can see the light at the end of the tunnel now. And by tunnel I mean the process of adding index links |
| 09:10 | chouser | rhickey: if I can't match function java performance, I have officially failed. :-) |
| 09:10 | ragnard | defn: yes, thank you... I didn't realise I could use meta for this... |
| 09:10 | defn | #^ was deprecated, yeah? |
| 09:11 | ragnard | defn: so basically, all vars have metadata containing their name, and namespace (amongst other stuff) |
| 09:12 | defn | i believe the answer to that ragnard is yes |
| 09:12 | defn | but i only have ever used this with core |
| 09:13 | defn | it might not work on all vars |
| 09:14 | defn | it looks like it does... (def foo 9) (meta #'foo) |
| 09:14 | rhudson | i believe the metadata is put there by def defn defmacro etc, so anything defined "the usual way" should be ok |
| 09:14 | raek | how often is the list on clojure.org/contributing updated? |
| 09:14 | defn | yeah rhudson |
| 09:14 | ragnard | defn: The docs says: http://clojure.org/special_forms#def |
| 09:15 | defn | rhudson: do you know if defmacro behaves similarly |
| 09:15 | rhudson | suspect so, but don't know |
| 09:16 | defn | and the answer is yes |
| 09:16 | chouser | rhickey: you have a finger tree use case or something? |
| 09:17 | defn | priority queue? |
| 09:19 | chouser | sorted set or map often works well for priority queue. |
| 09:21 | raek | rhickey: sorry for bugging you, but do you happen to know if my CA has arrived? (from Rasmus Svensson) |
| 09:22 | rhickey | chouser: it would be a nice addition to Clojure, I think. No specific use case here |
| 09:22 | rhickey | raek: sorry, it's been a couple of weeks since I last checked the box. Will try to get there today |
| 09:23 | raek | ok, thanks! |
| 09:23 | raek | acknowledged. |
| 09:24 | chouser | rhickey: ok. fwiw the possibility of getting finger trees included in Clojure has been and is a primary motivator for my work on it, so thanks for bringing it up again. |
| 09:24 | chouser | a few more weeks and I should be able to start making progress on it again. |
| 09:25 | rhickey | chouser: I periodically get asked about persistent data structures with efficient insertion, and reluctantly admit Clojure hasn't got one yet |
| 09:26 | chouser | sorted sets and maps :-) But I know what you mean. |
| 09:28 | chouser | testing the performance of my code vs. PersistentQueue and PersistentTreeMap was a bit discouraging. |
| 09:37 | LauJensen | chouser: How discouraging? :) |
| 09:43 | chouser | pretty discouraging. I forget the actual numbers, but conjing onto a vector is *fast* |
| 09:50 | AWizzArd | rhickey: The search box on the upper right side of http://clojure.org/ produces an error when being used. |
| 09:50 | AWizzArd | chouser: was the PersistentTreeMap more efficient? |
| 09:51 | chouser | for anything that existing clojure collections can do, they're faster than my figer trees are right now. |
| 09:59 | rhickey | AWizzArd: it says "Search is temporarily unavailable." So, search is temporarily unavailable. |
| 10:18 | AWizzArd | Will read-lines be moved from clojure.contrib.io into clojure.java.io sooner or later? |
| 10:22 | pjstadig | rhickey: saw the keyword GC change |
| 10:23 | rhickey | pjstadig: work ok for you? |
| 10:23 | pjstadig | haven't tested it just yet, but i think it will |
| 10:26 | neotyk | AWizzArd: I've released ahc-clj 0.1.1 with your suggestion on NPE, thanks! |
| 10:37 | Bahman | Hi all! |
| 10:45 | yacin | does = not work for java arrays? |
| 10:45 | yacin | ,(= (into-array Byte/TYPE (map byte (range 10))) (into-array Byte/TYPE (map byte (range 10)))) |
| 10:45 | clojurebot | false |
| 10:49 | AWizzArd | neotyk: oh cool! |
| 10:50 | defn | ,(into-array Byte/TYPE (map byte (range 10))) |
| 10:50 | clojurebot | #<byte[] [B@53ff89> |
| 10:50 | defn | (into-array Byte/TYPE (map byte (range 10))) |
| 10:50 | defn | ,(into-array Byte/TYPE (map byte (range 10))) |
| 10:50 | clojurebot | #<byte[] [B@184681f> |
| 10:51 | defn | yacin: they're not equal? |
| 10:51 | yacin | nope: http://osdir.com/ml/clojure/2010-03/msg01184.html |
| 10:52 | yacin | looks like it just compares the references |
| 11:01 | tomoj | did prim and friends make it into beta1, I wonder? |
| 11:03 | chouser | no |
| 11:03 | chouser | I think they've been officially pushed to post-1.2 |
| 11:10 | tomoj | darn |
| 11:26 | defn | is there a way to print the full contents of a java array? |
| 11:27 | defn | i mean the obvious answer is yes, but using aget and looping doesn't seem very elegant |
| 11:29 | jkkramer | ,(seq (into-array [1 2 3])) |
| 11:29 | clojurebot | (1 2 3) |
| 11:31 | AWizzArd | defn: for multidimensional arrays you will have to manually traverse them |
| 11:55 | tomoj | is there no way to test whether something is a java array? |
| 11:59 | AWizzArd | tomoj: yes |
| 12:00 | AWizzArd | ,(let [x (byte-array 5)] (and (class? x) (.isArray x))) |
| 12:00 | clojurebot | false |
| 12:01 | AWizzArd | ,(let [x (byte-array 5)] (and x (.isArray x))) |
| 12:01 | clojurebot | java.lang.IllegalArgumentException: No matching field found: isArray for class [B |
| 12:01 | AWizzArd | ok, no, .isArray must be called on a class |
| 12:01 | AWizzArd | so, it would be more like |
| 12:02 | AWizzArd | ,(when-let [c (class (byte-array 5))] (.isArray c)) |
| 12:02 | clojurebot | true |
| 12:02 | AWizzArd | ,(when-let [c (class 42)] (.isArray c)) |
| 12:02 | clojurebot | false |
| 12:04 | tomoj | ah |
| 12:05 | tomoj | I was surprised not to see (array? x) |
| 12:06 | AWizzArd | (def array? #(when-let [c (class %)] (.isArray c))) |
| 12:06 | AWizzArd | (def array? #(boolean (when-let [c (class %)] (.isArray c)))) |
| 12:06 | AWizzArd | or if-let vs boolean |
| 12:08 | arohner | defn: pprint handles arrays, I believe |
| 12:08 | arohner | defn: or, it definitely handles 1-d arrays, not sure about 2-d |
| 12:40 | mefesto_ | clojure couchdb driver "clutch" no longer on github? |
| 12:42 | bpsm | mefesto_: http://github.com/ashafa/clutch ? |
| 12:42 | mefesto_ | bpsm: ah thanks, i guess i had a bad link |
| 12:59 | tomoj | username changed |
| 13:42 | savanni | Hi,all. I haven't been around in a while, but I ran into a question today. |
| 13:43 | defn | savanni: shoot |
| 13:43 | savanni | Is it idiomatic to, when a function encounters an error that it needs to report back up, raise an exception? |
| 13:43 | defn | i guess i don't see why not |
| 13:43 | savanni | and if so, how do I define new exceptions these days? The gen-and-load-class function that I see mentioned in a few places is not present in the clojure API documentation or in either version of clojure I have. |
| 13:45 | defn | that's a good question |
| 13:45 | savanni | Although I am considering just saying (throw (proxy [Exception] ["my error message"])), but I'd prefer to pattern match on the class of the exception. |
| 13:45 | ataggart | why bother with a proxy at all? |
| 13:45 | defn | ^^ |
| 13:45 | ataggart | (throw (Exception. "my error message")) works fine |
| 13:45 | savanni | Oh, in that case, you're right. |
| 13:46 | savanni | But i'd still like to define my own exception classes. |
| 13:46 | ataggart | then, you'll need to gen-class iirc |
| 13:46 | ataggart | but usually custom exceptions are a waste |
| 13:46 | savanni | Why is that? |
| 13:46 | savanni | err... |
| 13:46 | savanni | why are they a waste? |
| 13:46 | Hodapp | ugh |
| 13:46 | Hodapp | I got C++ all over me again |
| 13:47 | Raynes | Well, why would you need them? |
| 13:47 | Hodapp | how do I wash this off |
| 13:47 | defn | Hodapp: have a pressure washer? |
| 13:47 | Raynes | I've never needed DudeYouGaveMeTheWrongInformationException before. |
| 13:47 | Hodapp | defn: nah |
| 13:47 | Hodapp | defn: that's only good for Lispy languages... the water gets underneath all the parens |
| 13:48 | ataggart | in almost every case an exception indicates an unrecoverable condition anyway, just throw a RuntimeException |
| 13:48 | defn | Hodapp: as a service to the community ill hose you off, might sting a bit at 3000 PSI though |
| 13:48 | Hodapp | defn: wait till I get off work, I'm just gonna get covered in C++ again if I wash off |
| 13:48 | savanni | umm... no, I am working in cases where exceptions need to be handled. A runtime exception would not be nearly expressive enough. But I could possibly just match on the error string. |
| 13:48 | defn | good point. |
| 13:48 | ataggart | svanni: example of where the need to be handled, pls |
| 13:48 | defn | Hodapp: until then, enjoy the filth! :) |
| 13:49 | ataggart | I fail at typing today |
| 13:49 | ataggart | savanni: can you give an example of where they need to be handled? |
| 13:49 | ffailla | hello, does anyone know if we can define our own constructor via defrecord |
| 13:49 | ataggart | ffailla: no |
| 13:50 | savanni | Okay... user gets an object from a database, makes some modifications, then submits the object back. In the meantime, another user modified that same object and my code notices that the save would destroy something I don't want to destroy. So, I throw an exception which a high-level handler catches and provides a proper recovery interface to teh user. |
| 13:51 | ffailla | ataggart: thanks |
| 13:52 | ataggart | There are other, possibly better, ways to handle such cases |
| 13:53 | savanni | perhaps. I'm thinking of returning results using something like Haskell's Either structure. |
| 13:53 | savanni | failing a sanity check isn't necessarily exceptional, at least not in the same way that total database failure or total disk failure would be exceptional. |
| 13:54 | ataggart | in the java world such exceptions would be checked (i.e., derived from Exception, not RuntimeException), and the caller would be forced to handle it. Clojure doesn't force such behavior, thus intervening levels between handler and thrower can break in unexpected ways |
| 13:56 | ataggart | using typed, checked exceptions just isn't really a good fit |
| 13:56 | savanni | I'm much more experienced with Python than with Java, and we don't have checked exceptions there. But, again, the only way to return an expressive error is with an exception. |
| 13:56 | ataggart | yes, but "return[ing] an expressive error" is not your only option |
| 13:57 | ataggart | at least not from the code that detects a mid-air collision |
| 14:00 | ataggart | that said, you can also use error-kit |
| 14:00 | ataggart | http://richhickey.github.com/clojure-contrib/error-kit-api.html |
| 14:01 | savanni | Okay, I'll study that for a while. |
| 14:44 | mefesto_ | is there a way to simply download a jar from clojars instead of having to use leiningen/maven? |
| 14:45 | savanni | Yeah. Hit the "browse" link on clojars.org and just delve down into the hierarchy until you find the jar files. |
| 14:45 | mefesto_ | savanni: ahh thank you :) |
| 14:55 | rsh | is there a function to set a var's root binding without supplying a function? I really just want to set it to a value |
| 14:59 | bulters | Gday all... |
| 15:04 | raek | thinking of it, we clojurians use maps pretty much everywhere |
| 15:04 | raek | it's indeed a powerful data structure |
| 15:04 | technomancy | but, but--alists are functionally equivalent!</common-lisper> |
| 15:04 | programble | abloo |
| 15:05 | programble | heh |
| 15:05 | programble | lispy has no maps, uses alists |
| 15:05 | bulters | So I should consider myself lucky not having programmed in common lisp? |
| 15:05 | raek | I like how simple clojure makes usage of maps |
| 15:06 | technomancy | bulters: depends; are you often nostalgic for the 80s? |
| 15:06 | programble | =>72 / 24 |
| 15:06 | ataggart | technomancy: what OS do you use? |
| 15:06 | programble | no? |
| 15:06 | bulters | technomancy: I'm from 1984 |
| 15:06 | technomancy | ataggart: ubuntu |
| 15:06 | programble | ->72 / 24 |
| 15:06 | sexpbot | => 72 |
| 15:06 | programble | :\ |
| 15:06 | programble | lies |
| 15:07 | bulters | technomancy: So not too much to be nostalgic about... |
| 15:07 | programble | lololol |
| 15:07 | programble | wtf is wrong with me |
| 15:07 | programble | ->(/ 72 24) |
| 15:07 | sexpbot | => 3 |
| 15:07 | qbg | CL pathnames are just so weird |
| 15:07 | bulters | Although, I still have a movie of a 3 year old bashing on a MSX2 ;-) |
| 15:07 | qbg | Clojure makes CL look ugly |
| 15:08 | programble | lots of things do that |
| 15:12 | ponzao____ | I have a small noob question, which is not from a real problem I am suffering, just something I stumbled onto and didn't quite grasp why it does what it does. I have defined a struct (defstruct Foo :a), I am trying to map with :a over a list of Foos (map :a '((struct Foo 10))) -> (nil), if I use (map :a (list (struct Foo 3))) I get (3). If I use a map instead of a struct in both cases I get (3), just wondering what is the reason for this. |
| 15:13 | arohner | ponzao____: ((struct Foo 10)) tries to call the struct |
| 15:13 | arohner | try [(struct Foo 10)] instead |
| 15:13 | AWizzArd | well, not that, because it is quoted.. but, it is (list (list foo)) |
| 15:14 | AWizzArd | and (get '((100)) :a) ==> nil |
| 15:14 | programble | a quoted lists, nothing inside gets evaluated |
| 15:14 | ataggart | ^ |
| 15:14 | programble | use vectors |
| 15:14 | arohner | oh right |
| 15:14 | arohner | (:a struct) (:a Foo) (:a 10) |
| 15:14 | arohner | no |
| 15:15 | programble | '((+ 1 2)) is literally ((+ 1 2)), not (3) |
| 15:15 | ataggart | I can't think of a case outside of macros where one needs to use literal lists in clojure |
| 15:16 | ponzao____ | ataggart, I've seen them used in some examples, are they something that are not recommended? |
| 15:16 | arohner | ponzao____: quoting is annoying, so it's just more convenient to use vectors |
| 15:16 | ataggart | and is visually useful |
| 15:17 | AWizzArd | It may help some newcomers to litterally write out quote from time to time, as in (map :a (quote ((struct foo 10)))) |
| 15:18 | bulters | *makes a mental note to quote lists* |
| 15:18 | programble | no, make a mental to note to always use vectors |
| 15:18 | ataggart | alternately, don't use lists. |
| 15:18 | ataggart | damn my slow fingers |
| 15:18 | ponzao____ | Why is the behavior different for maps and structs? |
| 15:18 | bulters | ataggart: You're telling me not to use lists in a lisp? |
| 15:19 | arohner | (list (struct Foo 10)) is also more convenient that quoting |
| 15:19 | programble | vectors are lists... just... different... |
| 15:19 | programble | vector-ish |
| 15:19 | ponzao____ | (map :a '({:a 10})) -> (10) |
| 15:19 | arohner | ponzao____: that map is a literal, while (struct Foo 10) is a function call (that needs to be evaluated) to produce a struct |
| 15:20 | arohner | the quote prevented evaluation |
| 15:20 | ponzao____ | arohner, aaaah okay, well that explains it. |
| 15:20 | ataggart | bulters: yes, when simply constructing a literal datastructure. |
| 15:21 | ponzao____ | arohner, That brings up another question I wondered at some point: How can I force the evaluation of quoted code? |
| 15:21 | ataggart | eval |
| 15:21 | arohner | ponzao____: eval, or backticks |
| 15:21 | bulters | ataggart: I almost thought you were serious ;-) |
| 15:22 | arohner | in this case `(~(struct Foo 10)) would work |
| 15:22 | arohner | that says, build a quoted list, but evaluate the things that start with squigglies |
| 15:23 | arohner | ponzao____: though 99% of the time, you don't need eval |
| 15:23 | ataggart | not enough 9s |
| 15:24 | ataggart | I've used eval once in all the clojure I've written |
| 15:25 | ponzao____ | arohner, Ok. As I said before my "problem" was not something I really ran into. Thanks for the help to you and everybody else. I think the biggest learning curve in Clojure (and other Lisps?) comes from understanding the evaluation and macros. |
| 15:39 | raek | basically, functions and macros are very similar: |
| 15:39 | raek | functions: (apply f (map eval args)) |
| 15:39 | raek | macros: (eval (apply m args)) |
| 15:41 | AWizzArd | ,(doc apply) |
| 15:41 | clojurebot | "([f args* argseq]); Applies fn f to the argument list formed by prepending args to argseq." |
| 15:41 | AWizzArd | if m is a macro then apply won't work on it |
| 15:42 | raek | yes, that was just a rough scetch demonstrating the differences in evaluation of functions and macros |
| 15:42 | raek | I once made a lisp toy language |
| 15:43 | raek | I thought it'd be a good idea to be able to apply macros |
| 15:43 | raek | ...and special forms |
| 15:43 | raek | (x true (do-foo) (do-bar)) |
| 15:44 | raek | that could do completely different things if x was a function, a macro, or a special form |
| 15:45 | raek | e.g. if x evaluated to the special form object 'if' |
| 15:45 | somnium | Im guessing this was an interpreter? |
| 15:46 | raek | yes |
| 15:46 | raek | compiling this would not be very easy |
| 15:46 | TimMc | It would certainly not be as optimizable. |
| 15:47 | TimMc | (You could not compile it to bytecode.) |
| 15:47 | somnium | [if (= (%typeof x) if) ...] |
| 15:48 | somnium | maybe if it was lazy you could compile it |
| 15:50 | KirinDave | programble: Sorry you had to endure python |
| 15:50 | raek | i once began on a lisp with only parentheses |
| 15:50 | raek | () was 0 |
| 15:50 | TimMc | Heh. |
| 15:50 | raek | (x) was (inc x) |
| 15:50 | raek | ((())) = 2 |
| 15:51 | raek | all functions had numbers |
| 15:51 | programble | KirinDave: lol i use python all the time |
| 15:51 | raek | say, 3 is + |
| 15:51 | KirinDave | programble: My condolences. |
| 15:51 | programble | i like it, obv |
| 15:51 | raek | ((((())))()(())) -> (+ 0 1) => 1 |
| 15:51 | TimMc | KirinDave: Hey now, someone has to like it. |
| 15:51 | programble | raek: im scared |
| 15:52 | raek | ok, 4 is let |
| 15:53 | raek | (4 <binding> <body>) |
| 15:53 | raek | hrm |
| 15:53 | programble | lol |
| 15:53 | raek | I think I solved naming with a special lookup functoin |
| 15:54 | raek | (lets call it 5) |
| 15:54 | raek | (5 3) is lookup variable 3 |
| 15:54 | somnium | raek: I think the only legal identifiers should be sequences of [{}]... |
| 15:55 | KirinDave | TimMc: No. No one does. |
| 15:55 | programble | brainfuck is a great language |
| 15:55 | somnium | maybe ()<><>() for complex numbers |
| 15:55 | KirinDave | TimMc: Python is the first resort of the unimaginative. Knowing it is one thing. Liking it given the wealth of languages we have today that all do really well? Inexplicable. |
| 15:55 | raek | (let (var-6 (+ 1 2)) (+ 2 (lookup var-6))) |
| 15:56 | programble | i dont "like" it per se... |
| 15:56 | programble | its more just... easy to use |
| 15:56 | raek | (4 (6 (3 1 2)) (3 2 (5 6))) |
| 15:56 | ponzao____ | KirinDave, :D |
| 15:56 | raek | (((((()))))(((((((()))))))((((())))(())((()))))((((())))((()))((((((())))))((((((()))))))))) |
| 15:57 | raek | I should pick up this project again... |
| 15:57 | KirinDave | programble: Huh. |
| 15:57 | ponzao____ | KirinDave, I think I'd like a t-shirt with that |
| 15:57 | programble | pythons works, and its not ugly... |
| 15:57 | programble | good for scripts if you ask m |
| 15:57 | programble | e |
| 15:57 | KirinDave | It's pretty ugly. |
| 15:58 | programble | well yeah |
| 15:58 | programble | not as bad as some |
| 15:58 | KirinDave | It's not Erlang ugly. |
| 15:58 | programble | doesn't shove oop down your throat |
| 15:58 | programble | its easy to do things |
| 15:58 | KirinDave | Hah. There Is Only One Way To Do It. |
| 15:59 | KirinDave | And It Is Not A Very Good Way But I Am Sure You Rubes Can Handle It. I'm GVR, I Don't Give A Fuck. |
| 15:59 | TimMc | raek: Ah, a lookup function. |
| 15:59 | KirinDave | Long acronyms in the python community. |
| 15:59 | TimMc | I almost buy that. |
| 15:59 | somnium | I am still amazed that GVR is actively opposed to adding TCO |
| 16:00 | somnium | apparently on the grounds that people would use it do recursion |
| 16:00 | TimMc | KirinDave: Unfortunately, PHP and Python can be run interpreted just about everywhere. :-( |
| 16:00 | KirinDave | So can PLT Scheme. |
| 16:00 | TimMc | KirinDave: Not on any web host I've seen. |
| 16:00 | programble | wait wait |
| 16:01 | programble | we are talking about how bad python is |
| 16:01 | programble | and someone mentions PHP? |
| 16:01 | TimMc | programble: As an example of something that is easy to use. |
| 16:01 | programble | lolololololol |
| 16:01 | TimMc | Not comparing ugliness. |
| 16:01 | programble | PHP is not easy to use |
| 16:02 | TimMc | PHP is easy to start using, sure. Great docs, great HTML integration, pretty good library of simple data manipulation functions. |
| 16:02 | TimMc | It's only hard to use once you try to make your project bigger or scure. |
| 16:02 | TimMc | *scure |
| 16:02 | programble | PHP is a preprocessor, not a language |
| 16:03 | KirinDave | TimMc: PHP's inconsistent libraries are its biggest weakness last time I checked. |
| 16:03 | TimMc | KirinDave: Yes. But as a noob I had no trouble just looking up the syntax every few minutes. |
| 16:03 | somnium | KirinDave: have you seen Phuby? |
| 16:04 | KirinDave | No. |
| 16:04 | programble | ruby seems great and all |
| 16:04 | programble | but the syntax makes me want to kill myself with a spoon |
| 16:04 | somnium | KirinDave: its on github, great stuff |
| 16:04 | KirinDave | Wait. Now I have. |
| 16:04 | zkim | Hey all |
| 16:04 | KirinDave | I wish I hadn't. |
| 16:05 | KirinDave | My last words will be, "My God, it's full of stars!" |
| 16:05 | somnium | KirinDave: theres a video where they run wordpress in rails |
| 16:06 | KirinDave | somnium: I'm going to have nightmares for weeks now. |
| 16:06 | somnium | :D |
| 16:06 | KirinDave | “When I open my eyes it is still there!” |
| 16:06 | programble | lol |
| 16:28 | zkim | Anybody doing swing development with clojure? |
| 16:30 | savanni | No, but i'm considering it, amongst other gui tools. |
| 16:31 | zkim | Ah, was wondering if there was a lib or people just roll their own wrappers |
| 16:31 | zkim | What other gui tools are you looking at? |
| 16:48 | dakrone | zkim: you could check out swing-utils in contrib: http://richhickey.github.com/clojure-contrib/swing-utils-api.html |
| 16:51 | zkim | dakrone: thanks, I'm starting to convert a java app of mine over to clojure, and was wondering if there was a consensus on swing dev |
| 16:59 | ragnard | zkim: have you read Stuart Sierras blog posts on clojure/Swing? can recommend them. |
| 17:01 | zkim | ragnard: yeah, the heating up clojure & swing post? Definitely helped. |
| 17:02 | ragnard | yup, I think it starts with "First Steps With Clojure & Swing" |
| 17:03 | zkim | I only saw the one, I'll have to take a look for the others |
| 17:03 | ragnard | zkim: first one is at http://stuartsierra.com/2010/01/02/first-steps-with-clojure-swing |
| 17:03 | zkim | it looks like the choices are c.c.swing-utils, Licenser's lib, and roll your own |
| 17:04 | Licenser | if you want clj-swing feel free to ask questions |
| 17:04 | zkim | Hey licenser |
| 17:04 | zkim | yeah definitely looking at your lib |
| 17:05 | zkim | Got two of your libs up on clojuredocs.org, having trouble with the other two |
| 17:05 | Licenser | :) yay |
| 17:14 | Raynes | zkim: Have you considered letting users add libraries themselves? |
| 17:14 | Raynes | Seems kind of tedious to do all that yourself. |
| 17:15 | zkim | Yeah, definitely, there's some manual process around adding libs that I'm trying to get around |
| 17:16 | zkim | It's basically pull source -> lein / mvn install -> add to the cd-analyzer deps -> run |
| 17:16 | Raynes | :) |
| 17:16 | zkim | So I'm trying to automate the first 4 steps |
| 17:17 | zkim | That'd be great, it's second or third down on the list after categories |
| 17:18 | dakrone | zkim: coming to the meetup next wednesday? |
| 17:18 | ataggart | it'd be nice if the "namespaces" list omitted the common prefix |
| 17:18 | ataggart | e.g. http://clojuredocs.org/Clojure%20Contrib |
| 17:18 | zkim | dakrone: yeah, I'm looking forward to it |
| 17:19 | dakrone | zkim: cool, will see you there then :) |
| 17:19 | zkim | ataggert: good idea, I'll add it to the list |
| 17:19 | zkim | dakrone: cool, hope there's a good turnout |
| 17:19 | dakrone | yea |
| 17:33 | robtp | any ideas, anyone - java.lang.ClassNotFoundException: incanter.Matrix - like this, maybe: http://www.mail-archive.com/clojure@googlegroups.com/msg14941.html |
| 17:36 | cschreiner | zkim: ataggert: and remove the center alignment |
| 17:37 | zkim | cschreiner: center alignment for on the ns sidebar? |
| 17:37 | zkim | (minus for) |
| 17:38 | cschreiner | on the namespaces column |
| 17:38 | zkim | It's left aligned for me, which browser / os you on? |
| 17:38 | cschreiner | mac/safari/ff |
| 17:38 | zkim | hrm |
| 17:39 | ataggart | left for me om mac chrome, but looks like its not left due to the elipses |
| 17:40 | cschreiner | ataggart: you're right :) |
| 17:40 | zkim | yeah, the ellipses were kind of a hack, prior to that the nss would wrap at odd places, or hang over the center |
| 17:40 | cschreiner | fooled myself |
| 17:40 | cschreiner | make them go away (the prefixes) and group them instead |
| 17:41 | cschreiner | no need to repeat clojure.contrib. 170 times on a page |
| 17:41 | zkim | agreed |
| 17:41 | cschreiner | really love your initiative |
| 17:41 | cschreiner | zkim |
| 17:41 | zkim | groupings a good idea, I'll play with it a bit |
| 17:41 | cschreiner | but, you're no designer ;) |
| 17:41 | zkim | thanks, labor of love and all |
| 17:41 | zkim | haha no kidding :) |
| 17:42 | cschreiner | but I'll look through that for now |
| 17:42 | zkim | know any designers that want to get their work out? |
| 17:42 | zkim | I'm trying to figure out where I would find somebody like that |
| 17:43 | cschreiner | I don't know |
| 17:43 | cschreiner | depends on what you want |
| 17:43 | cschreiner | would love to throw a css at it though |
| 17:44 | zkim | go for it and I'll test it out |
| 17:44 | cschreiner | okay |
| 17:44 | zkim | html's kind of ugly, but you should have all the hooks you need |
| 17:45 | cschreiner | you should try and clean up the html, like make it more 5'ish |
| 17:46 | zkim | havn't really looked at 5, they get rid of the div tag or something :) |
| 19:29 | lpetit | hi |
| 19:29 | lpetit | does this macro already exist ? : |
| 19:30 | lpetit | (let [x #"baz\(" y "bar"] (interpol-regex #"(?:a|`x`|`y`)") => #"(?:a|baz\(|bar)" |
| 19:33 | lpetit | more useful (and real!) example: (let [symbol-head #"[a-z|A-Z]" symbol-rest (interpol-regex #"`symbol-head`|[0-9]")] (interpol-regex #"`symbol-head``symbol-rest`*") |
| 19:45 | lpetit | nobody here ? |
| 19:56 | arohner | what's the type hint for an array of Objects? |
| 19:59 | defn | Wirth's law: Software is getting slower faster than hardware is getting faster |
| 20:18 | ataggart | arohner: ^objects |
| 20:46 | slyrus | s/uses/wishes/ |
| 20:48 | dnolen | Clojure, Node.js and Concurrency Fail, http://dosync.posterous.com/clojure-nodejs-and-why-messaging-can-be-lame |
| 20:49 | dnolen | bound to stir up some controversy |
| 20:50 | TeXnomancy | dnolen: "how Node.js might fair" should be fare |
| 20:50 | dnolen | TeXnomancy: thx |
| 20:50 | ataggart | "Node.js is not faster that Aleph" s/that/than |
| 20:51 | dnolen | attagart: thx |
| 20:51 | ataggart | on a less pedantic note, are there any good guide to getting code out on he Amazon Compute cluster? |
| 20:52 | dnolen | attagart: it's pretty simple, just use the CentOS image, install the latest JDK and yr pretty much good to go. |
| 20:52 | ataggart | cool |
| 20:52 | ataggart | thx |
| 20:58 | dnolen | feel free to upvote on HN if you read that |
| 21:15 | robtp | logarithm? |
| 21:15 | robtp | i can't seem to find it |
| 21:15 | rhudson | Math/log |
| 21:15 | rhudson | (from java.lang.Math) |
| 21:15 | robtp | oh |
| 21:16 | robtp | *slap* |
| 21:31 | slyrus | umm... how do I specify a default value for an optional arg for a function again? |
| 21:32 | slyrus | i.e. the clojure equivalent of (defun foo (&optional (moose 32)) (1+ moose)) |
| 21:32 | slyrus | wishes google translate would do cl -> clojure |
| 21:36 | slyrus | wait, let me guess... you can't do that in clojure |
| 21:39 | raek | you can do it like this:: (defn foo ([] (foo 32)) ([moose] (inc moose))) |
| 21:40 | ericthorsen_ | Iit appears that after a I AOT a defprotocol and attempt to use it in an extend-type expression I get an error "java.lang.IllegalArgumentException: interface org.model.db.MyProtocol is not a protocol" |
| 21:40 | slyrus | ah, so I don't need the & |
| 21:40 | slyrus | thanks raek |
| 21:40 | slyrus | oh, i see... |
| 21:41 | slyrus | it's like i thought. ok. |
| 21:41 | ericthorsen_ | I also noticed that when AOTing defrecords the namespaces that get prepended are clojure style not java (so this-that does not turn into this_that) which surprised me |
| 21:41 | ericthorsen_ | Anyone else playing with defprotocol and defrecord? |
| 21:43 | raek | or like this: (defn foo [a b & [moose]] (+ a b (or moose 32))) |
| 21:44 | raek | not a very beautiful example, perhaps... |
| 21:45 | raek | I haven't played with defrecords and AOT at the same time |
| 21:45 | slyrus | raek: the (or moose 32) is hardly a default value for the parameter :) yes, I can add another let around the function body and check the value of the parameter, but I guess the whole &optional thing is at odds with clojure's multi-arity thing |
| 21:46 | slyrus | so the proper way to do this is as like what you had above |
| 21:46 | raek | that's probably the most common way of doing it |
| 21:47 | raek | destructuring with maps has support for :or which can provide default values |
| 21:47 | raek | this does not exist for sequence destructuring, though |
| 21:48 | raek | (let [{a :a, b :b, :or {a 1, b 2}} some-map] (+ a b)) |
| 22:04 | mudge | hello |
| 22:05 | mudge | i declared an atom in one namespace, and i required the namespace from another namespace, but how do I access the atom from the first namespace? |
| 22:05 | mikem | mudge: how did you require it? |
| 22:06 | hiredman | my guess would be with require |
| 22:06 | mudge | i used (:require in the ns declaration of the second namespace and said ":as pt-hook" so i could use pt-hook to reference the name space |
| 22:07 | mikem | mudge: then pt-hook/name-of-atom should do it |
| 22:07 | mudge | so would I then do: @pt-hook/my-atom ? |
| 22:07 | mudge | okay |
| 22:09 | mudge | hmm... my second namespace dosen't see pt-hook/my-atom, my first names space is actually using gen-class for AOT |
| 22:10 | mudge | i know that if you are going to use methods for a gen-class namespace you have to use :methods and declare your methods |
| 22:10 | mudge | but i'm not making a method, just an atom |
| 22:11 | mudge | so i guess the question is how do you expose definitions from within a gen-class namespace |
| 22:13 | mudge | i have this in one namespace: (def oh nil) |
| 22:13 | mudge | i want to refer to in another namespace, like so: pt-tools/oh |
| 22:14 | mudge | the first namespace is gen-classed |
| 22:20 | mikem | mudge: i'm not sure how gen-class complicates things, sorry |
| 22:22 | mudge | ok |
| 22:27 | mudge | can two namespaces require each other? |
| 22:31 | rhudson | no |
| 22:35 | mudge | no what? |
| 22:36 | mudge | how do you make a global variable at runtime in clojure? |
| 22:37 | rhudson | You can't have two namespaces require each other. |
| 22:37 | rhudson | require is a dependency relationship |
| 22:38 | mudge | rhudson, great, great to know |
| 22:38 | mudge | rhudson: yea, it would be like mutually recursive requiring |
| 22:39 | mudge | or something |
| 22:40 | rhudson | Yeah, I learned this the first time I wrote a multi-ns program. I had to push some stuff into a different ns to break the loop. |
| 22:42 | slyrus | is there a good deftype example around? |
| 22:42 | slyrus | oh, nvm the circuitbreaker example... |
| 22:43 | slyrus | well, maybe not... |
| 22:46 | mudge | def works at compile time, is there something like that, that works at runtime, but has module scope like def does? |
| 22:46 | rhudson | ,(doc intern) |
| 22:46 | clojurebot | DENIED |
| 22:47 | rhudson | mudge, look at clojure.core/intern |
| 22:50 | slyrus | erm... how do I undef a type? |
| 22:50 | mudge | thanks rhudson |
| 22:53 | Raynes | mudge: http://clojuredocs.org/v/1779 |
| 23:03 | slyrus | grumble grumble... the defprotocol/deftype example in the clojure.core API docs doesn't work |
| 23:04 | hugod | slyrus: it is missing an explicit "this" argument in the deftype |
| 23:05 | slyrus | yes |
| 23:05 | hugod | you might try ns-unmap for removing a definition |
| 23:06 | slyrus | yeah, that worked. thanks. |
| 23:07 | slyrus | oh, no, sorry, I did remove-ns |
| 23:07 | slyrus | and rebuilt the ns |
| 23:07 | slyrus | i'll try ns-unmap next time |
| 23:10 | slyrus | if i have (defrecord Foo [a b] ...) can I specify a default zero-arg constructor that will fill set a and b? |
| 23:12 | hugod | you have to write a factory function at the moment, but I believe it is planned |
| 23:12 | wooby | slyrus: fyi, reify also requires explicit 'this' for methods (contrary to examples) |
| 23:12 | wooby | ran into that myself |
| 23:12 | slyrus | factory... bah... what is this java? :) |
| 23:13 | hugod | just elide the word if it offends :) |
| 23:14 | slyrus | is used to (defclass ...) not DefaultAbstractFactoryGeneratorSingleton or whatever the java equivalent is :) |
| 23:15 | slyrus | and (make-instance ...), of course |
| 23:18 | hugod | ode to a meta object protocol |
| 23:18 | slyrus | heh |
| 23:19 | hugod | the doc-string thing is bug #340, but seems to have been relegated to the backlog |
| 23:20 | hugod | it even has a patch from fogus |
| 23:27 | Bahman | Hi all! |
| 23:40 | defn | kisses |
| 23:48 | Tekk_ | hey, my friend is too lazy to say why clojure is the best lisp and he sent me here >.> |
| 23:49 | rhudson | Tekk_: here's a good pitch: http://clojure.org/rationale |
| 23:51 | tautologico | is there any nice, built-in 2d matrix data structure available in clojure? |
| 23:51 | zkim | Tekk_: it sounds like you have a background in lisp, that correct? |
| 23:54 | Tekk_ | zkim: learning scheme :P |
| 23:54 | zkim | Tekk_: background in any other languages? |
| 23:55 | Tekk_ | zkim: also know python, some C, some C++, some perl, some ruby........ |
| 23:55 | Tekk_ | bit of everything :P |
| 23:55 | Raynes | We don't really deal in "this language is better than x". I'm sure you'll find plenty singing the praises of Clojure, but whether or not it's "the best Lisp" is for you to decide. :D |
| 23:55 | Tekk_ | I like how simple scheme is, but I havent done clojure yet so not sure how I'll like it ;D |
| 23:55 | zkim | Tekk_: Video-wise http://blip.tv/file/982823 really helped when I was starting out |
| 23:57 | zkim | Trying to find that dzone video where rich talks about time, anybody got the link? |
| 23:57 | zkim | whoops, meant infoq |
| 23:59 | zkim | Tekk_: Prob my favorite: http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey |
| 23:59 | Raynes | zkim: http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey |
| 23:59 | Raynes | I think it's that one. |
| 23:59 | zkim | Raynes: Yeah, loved that one |