2009-02-01
| 00:00 | durka42 | :) |
| 00:01 | gnuvince_ | However, now that the seq is evaluated, the time for seq vs vector is nearly the same (still 6 seconds faster for seq) |
| 00:02 | durka42 | apparently computation takes time :) |
| 00:02 | durka42 | weird that you needed a doall if the lazy algorithm worked before |
| 00:02 | gnuvince_ | See ya |
| 00:27 | gnuvince_ | lisppaste8: url? |
| 00:27 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 00:27 | lisppaste8 | gnuvince pasted "Does this look clean?" at http://paste.lisp.org/display/74667 |
| 00:31 | dreish | Not without a docstring. |
| 00:35 | ayrnieu | ,(into [] (range 100)) |
| 00:35 | clojurebot | [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99] |
| 00:35 | ayrnieu | ,(vec (range 100)) |
| 00:35 | clojurebot | [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99] |
| 00:41 | lisppaste8 | ayrnieu annotated #74667 with "hash-map/repeatedly" at http://paste.lisp.org/display/74667#1 |
| 00:50 | gnuvince_ | ayrnieu: I had tried with memfns, but they were too slow. In the end, I went with a small macro to call the appropriate method. |
| 01:21 | blbrown | ayrnieu, what is the difference between the into and vec calls |
| 01:25 | blbrown | hmm, #clojure is way more active than #jruby. hmmm, that is saying something |
| 01:27 | Wizardofwestmarc | really? I'm surprised, since I thought jruby was a fairly popular ruby implementation |
| 01:48 | durka42 | so i can do (reduce max [1 2 3 6 4]) to get 6, but is there an easy way to get the index back too? |
| 01:51 | Wizardofwestmarc | only thing I can think of is building a set of pairs, so like [1 0] [2 1] etc then making a lambda that max's against the first value |
| 01:54 | durka42 | yeah |
| 01:54 | durka42 | i'm working on that |
| 01:54 | durka42 | java is very touchy about what i do with this array... |
| 01:54 | Wizardofwestmarc | oh fun |
| 01:54 | durka42 | if i try and count it the jvm crashes |
| 01:55 | Wizardofwestmarc | I'd try writing it up but this machine's copy of slime-mode for clojure is broken |
| 01:55 | Wizardofwestmarc | since I do most of my clojure coding on the laptop haven't bothered to correct it. |
| 01:56 | durka42 | (reduce #(if (> (second %1) (second %2)) %1 %2) (indexed pixel-data-array)) |
| 01:56 | durka42 | that should do it, no? |
| 01:56 | durka42 | indexed from contrib.seq-utils |
| 01:56 | Wizardofwestmarc | if indexed returns what I think it does I would expect that to work |
| 01:57 | Wizardofwestmarc | what error are you getting? |
| 01:57 | durka42 | the JVM segfaults :) |
| 01:57 | Wizardofwestmarc | ...really? |
| 01:57 | Wizardofwestmarc | wow |
| 01:57 | durka42 | yeah |
| 01:57 | durka42 | i thought it wasn't supposed to do that |
| 01:57 | Wizardofwestmarc | gimme a sec to get on the laptop, I want to try this |
| 01:58 | durka42 | Invalid memory access of location 00000000 eip=09433ff5 |
| 01:58 | durka42 | it might be QTJava that's unstable |
| 01:59 | durka42 | ,(reduce #(if (> (second %1) (second %2)) %1 %2) (indexed (into-array Integer/TYPE [5 4 3 2 1]))) |
| 01:59 | clojurebot | java.lang.Exception: Unable to resolve symbol: indexed in this context |
| 01:59 | durka42 | ,(use 'clojure.contrib.seq-utils) |
| 01:59 | clojurebot | nil |
| 01:59 | durka42 | ,(reduce #(if (> (second %1) (second %2)) %1 %2) (indexed (into-array Integer/TYPE [5 4 3 2 1]))) |
| 01:59 | clojurebot | [0 5] |
| 01:59 | durka42 | works fine with normal arrays |
| 02:00 | Wizardofwestmarc | so indexed uses java arrays and not vectors? |
| 02:01 | durka42 | java arrays seem to magically convert to seqs |
| 02:01 | Wizardofwestmarc | hm |
| 02:03 | durka42 | it's so weird |
| 02:03 | durka42 | i can (reduce max pixel-data-array) |
| 02:03 | durka42 | and (indexed pixel-data-array) is fine |
| 02:04 | durka42 | but trying to reduce with the indexed array, or trying to (count pixel-data-array) is a crash |
| 02:07 | Wizardofwestmarc | so you're using Jambi? |
| 02:07 | durka42 | no, QTJava for grabbing images from an iSight |
| 02:08 | Wizardofwestmarc | hm |
| 02:08 | durka42 | it is, unfortunately, a 32-bit only API that is headed for obsolescence |
| 02:09 | durka42 | but there is no java wrapper for its replacement yet |
| 02:09 | Wizardofwestmarc | eck |
| 02:09 | Wizardofwestmarc | and I hate when I get screwed up by a typo |
| 02:09 | Wizardofwestmarc | was trying to use seq-utils, kept getting errors, thought it was a classpath issue |
| 02:09 | Wizardofwestmarc | ...turns out I was typing clojure.contrib.seq-util |
| 02:10 | Wizardofwestmarc | *headdesk* |
| 02:14 | blbrown | Wizardofwestmarc I have been on there for years and rarely see a lot of discussion (#jruby). but then again, there is a #ruby-lang and jruby is really just the java implementation. Maybe there is no need. |
| 02:15 | blbrown | Discussion of the book I want to write. http://berlinbrowndev.blogspot.com/2009/01/outline-for-enterprise-development-with.html |
| 02:16 | Wizardofwestmarc | hm, certainly a useful book idea. And with the love all the JVM languages are getting these days could be popular. |
| 02:17 | Wizardofwestmarc | now if only my work codebase was on the JVM so I could convert them to clojure >_>. |
| 02:18 | blbrown | Wizardofwestmarc, exactly. There are books for each language (most of them anyway) but I feel there is a place for using a combination in an enterprise shop. You might use jruby for jdbc based scripting. scala for engineering a server app. Clojure for web apps, GUI apps |
| 02:18 | blbrown | Wizardofwestmarc, but you can't call the existing code from clojure |
| 02:19 | Wizardofwestmarc | blbrown: oh yeah. Using multiple languages to take advantage of their strengths, assuming you have a good enough dev team to handle it, will only increase productivity |
| 02:21 | blbrown | Wizardofwestmarc take (clojure.xml/parse filename) ... that is one line of code to load a serialize a xml file. How many lines of java setup code is normally required to do that? 30-40? |
| 02:21 | Wizardofwestmarc | at least |
| 02:22 | Wizardofwestmarc | and the idea of tying into, say, django with clojure is pretty appealing since I come from a python background on personal programming |
| 02:23 | Wizardofwestmarc | giving you the power of a proven framework but the other capabilities of clojure on top of it. |
| 02:23 | blbrown | you mean mixing django jython and clojure? |
| 02:23 | Wizardofwestmarc | right |
| 02:24 | blbrown | woaaa, heavy |
| 02:24 | blbrown | I am going to add that to my book |
| 02:24 | Wizardofwestmarc | should be doable |
| 02:24 | Wizardofwestmarc | rails works with jruby as well doesn't it? |
| 02:24 | blbrown | jruby/rails was too slow. Like 2 seconds a request too slow I don't know about django/jython. |
| 02:24 | Wizardofwestmarc | ... |
| 02:24 | Wizardofwestmarc | wow that bad? |
| 02:25 | Wizardofwestmarc | and the django guys took the time to help get it working on jython |
| 02:25 | Wizardofwestmarc | I doubt they'd have been satisifed with slow and crappy |
| 02:25 | blbrown | Wizardofwestmarc, I bench marked it too. http://berlinbrowndev.blogspot.com/2008/08/application-server-benchmarks-including.html But I think I ran with the wrong rails settings |
| 02:25 | blbrown | I like django over rails anyway |
| 02:25 | Wizardofwestmarc | nod |
| 02:25 | Wizardofwestmarc | I'm just not big on ruby, I looked at it at one point |
| 02:26 | Wizardofwestmarc | I already knew python and ruby didn't feel different enough to warrant the time to learn. |
| 02:26 | Wizardofwestmarc | seemed better to spend the time getting into stuff like lisp that expands you in other directions entirely. |
| 02:26 | blbrown | I don't have a the language developer chops to totally describe the issues with ruby, but I just felt that I didn't see any productivity gains with the style of development. |
| 02:27 | blbrown | plus, it is totally interpreted (at least pre 1.8) and slow in most of the benchmarks |
| 02:27 | Wizardofwestmarc | yeah, 1.8 and before was at least close to the slowest "big name" vm around |
| 02:27 | Wizardofwestmarc | 1.9 supposedly is a lot better, according to a ruby nut I know |
| 02:29 | blbrown | this book will be awesome, will also cover setting up the various IDEs . Textmate, VIM, Emacs, JEdit, Eclipse |
| 02:30 | blbrown | only thing, I am certainly a guy that will brush over the finer grain details of a technology, but this is a quantity over quality kind of book |
| 02:32 | Wizardofwestmarc | blbrown: if you're going that route I hope you'll include information to point to more in depth data about various things |
| 02:34 | blbrown | Wizardofwestmarc, absolutely, the clojure book I believe is 300+ pages on clojure, all or most of the language features. I want to do short 'how to do X' How to write a web client app in X language. How to write a GUI, etc. |
| 02:34 | Wizardofwestmarc | blbrown: gotcha |
| 02:47 | durka42 | interesting... second is kind of slow |
| 02:48 | blbrown | Wizardofwestmarc, only thing and I asked this earlier. Do people want to use the java specific libraries on the jvm. For example, people will probably use Jython/Django. But do people use springmvc and jython. hmm |
| 02:48 | durka42 | and first is twice as fast as second |
| 02:48 | Wizardofwestmarc | blbrown: hm, probably depends on the person's background |
| 02:49 | blbrown | Wizardofwestmarc, still, how much Java do you take with you when you use a jvm language. I have been asking myself that for 10 years. |
| 02:49 | Wizardofwestmarc | hm |
| 02:49 | blbrown | durka42 http://barefootdevelopment.blogspot.com/2007/07/jruby-on-rails-performance.html they are showing similar performance. I am sorry, 1 second request is unusable for a web app |
| 02:50 | durka42 | oh |
| 02:50 | durka42 | i was talking about clojure.core/first and clojure.core/second |
| 02:50 | durka42 | :) |
| 02:50 | blbrown | durka42, oops, sorry |
| 02:51 | Wizardofwestmarc | actually, first being twice as fast as second doesn't surprise me |
| 02:51 | durka42 | since second is #(first (rest %)) |
| 02:51 | Wizardofwestmarc | well, that and the simple fact you're going to the second element of a linked list basically |
| 02:52 | Wizardofwestmarc | so even if it were implemented some other way then (first (rest %)) |
| 02:52 | Wizardofwestmarc | unless first doesn't inherently go against the seq of the collection |
| 02:52 | durka42 | right, although not all collection types are linked lists |
| 02:52 | durka42 | i was testing with vectors |
| 02:52 | Wizardofwestmarc | err first and second |
| 02:52 | Wizardofwestmarc | doesn't matter likely |
| 02:52 | Wizardofwestmarc | it's probably doing it as though it were a seq |
| 02:52 | blbrown | I wonder if that is where the JVM kicks in with any optimizations |
| 02:52 | Wizardofwestmarc | since it's going off of the interface |
| 02:53 | Wizardofwestmarc | blbrown: if you ran that code enough times the JIT might find a way to speed it up |
| 02:53 | durka42 | in doing the indexed max thing, there is a visible performance difference between using seq-utils/indexed and #(if (> (second %1..., and re-implementing indexed to put the index second, and using #(if (> (first %1... |
| 02:53 | Wizardofwestmarc | but you'd need to do a ton of timing tests and see if it suddenly increased in speed after a while. |
| 02:54 | Wizardofwestmarc | durka42: how many items are in your list? |
| 02:54 | durka42 | ,(* 320 240) |
| 02:54 | clojurebot | 76800 |
| 02:54 | Wizardofwestmarc | hm, yeah |
| 02:54 | Wizardofwestmarc | so even a 30-50 ms delay adds up |
| 02:56 | Wizardofwestmarc | good thing it isn't a larger image <_< |
| 02:56 | durka42 | 640x480 is unusably slow :( |
| 02:56 | durka42 | and if i set any other resolution... |
| 02:56 | durka42 | you guessed it -- the JVM segfaults! |
| 02:57 | durka42 | did i mention i don't like this library very much |
| 02:58 | Wizardofwestmarc | only a couple times, but from what you're saying it probably needs saying a few more ;-) |
| 02:58 | Wizardofwestmarc | is the lib open source so you can dig into the guts of it yourself if need be? |
| 02:58 | durka42 | alas, i don't think so |
| 03:15 | blbrown | http://donsbot.wordpress.com/2009/02/01/haskell-is-a-busy-place/ good grief, haskell is becoming popualar |
| 03:16 | durka42 | i wonder what such a graph would look like for this channel |
| 03:17 | kotarak | The logs are available.... |
| 03:17 | Wizardofwestmarc | Well, I've heard only good things about Haskell, so not surprised it's getting so much buzz in the IRC channel. |
| 03:18 | Wizardofwestmarc | I know I want to pick it up once I feel fairly comfortable w/clojure. |
| 03:18 | Wizardofwestmarc | especially now that RWH is out |
| 03:18 | blbrown | and ironically pretty different from clojure/lisp. I guess more akin to scala. But there is a need for that strong, static typed language |
| 03:18 | Wizardofwestmarc | yeah, one where the compiler can save you from lots of dumb mistakes up front |
| 03:19 | durka42 | well i'll be damned |
| 03:19 | Wizardofwestmarc | durka42: ? |
| 03:20 | durka42 | accumulating a max value using with-local-vars and having the library map my function over pixels is twice as fast as (reduce my-max (my-indexed (extract-pixel-array))) |
| 03:20 | Wizardofwestmarc | heh I know how that goes |
| 03:20 | Wizardofwestmarc | I basically rewrote my own version of merge-with for some work I was doing |
| 03:21 | Wizardofwestmarc | then when I switched to using merge-with the loop went from slow but useable to pretty damned fast |
| 03:21 | durka42 | i had thought the overhead of calling the function would slow it down considerably |
| 03:21 | durka42 | but apparently not |
| 03:22 | blbrown | Wizardofwestmarc, durka42 maybe you should submit a patch |
| 03:23 | durka42 | for making programs slower? |
| 03:24 | blbrown | whatever the faster version was |
| 03:25 | Wizardofwestmarc | faster was using the built in clojure.core operations |
| 03:25 | blbrown | oh |
| 03:25 | Wizardofwestmarc | instead of trying to reimplement them (in my case because I totally missed merge-with in the api docs) |
| 03:25 | durka42 | i wonder whether it's still funcall overhead |
| 03:25 | durka42 | reduce calls a lot of functions |
| 03:27 | durka42 | tomorrow i'll try unrolling reduce into a loop/recur |
| 03:27 | durka42 | and see if my divide and conquer idea buys anything |
| 03:27 | Wizardofwestmarc | loop-recur has been slower then reduce and/or map every time I tried it |
| 03:27 | durka42 | i'll keep that in mind |
| 03:27 | Wizardofwestmarc | but I may have been doing it wrong, but fair warning |
| 03:28 | Wizardofwestmarc | err however fair warning even |
| 03:32 | Wizardofwestmarc | durka42: I take it you need all the data at once from this calculation? |
| 03:34 | durka42 | Wizardofwestmarc: yes, this is real time image processing |
| 03:34 | durka42 | FSVO real |
| 03:34 | durka42 | not very sophisticated processing either |
| 03:35 | Wizardofwestmarc | nod |
| 03:35 | durka42 | i can see why these things are generally written in C |
| 03:35 | Wizardofwestmarc | just pondering if lazy might help, but I don't think so |
| 03:35 | kotarak | I hope the link works... http://spreadsheets.google.com/ccc?key=ptyDXXBHu_Ji3Dbcf-HE7BA |
| 03:35 | kotarak | The #clojure Traffic |
| 03:35 | Wizardofwestmarc | yeah that worked |
| 03:36 | durka42 | cool |
| 03:36 | Wizardofwestmarc | traffic seems... really erratic by that graph |
| 03:41 | durka42 | goodnight all |
| 03:43 | Wizardofwestmarc | hm, sleep sounds like a good idea, take care all. |
| 03:59 | cads | can we make a concurrent package installation system for unix? |
| 03:59 | cads | are there already such things? |
| 04:02 | hiredman | "for unix" is a target the size of a battle ship, or even a small aircraft carrier |
| 04:46 | blbrown | kotarak, can you chart that sucker |
| 04:46 | blbrown | nvm |
| 04:47 | blbrown | kotarak I am posting on reddit |
| 05:19 | kotarak | blbrown: sorry, was afk. What can I chart? |
| 05:20 | blbrown | kotarak, nevermind, I saw the chart on the spreadsheet |
| 05:21 | blbrown | so at present, clojure has about half the amount of traffic as #haskell |
| 05:22 | kotarak | How long is Haskell around? The #clojure logs are for roughly one year. |
| 05:28 | blbrown | clojure is one of the top 167 blogs out of 8000 on freenode. It is close to couchdb in terms of activity |
| 05:28 | kotarak | What happened in October? There was an explosion. Also on the list... |
| 05:31 | blbrown | oct 2008, hmm are the logs all in text format? |
| 05:32 | blbrown | kotarak, without even looking, I bet this is where a newb comes on and says clojure/lisp sucks. Just my guess |
| 05:33 | kotarak | Up to now, we didn't have the clojure sucks part. |
| 05:34 | kotarak | More the "why can't Japanese not be English" part. |
| 05:36 | blbrown | nothing abnormal in the oct logs http://clojure-log.n01se.net/date/2008-10-20.html |
| 05:37 | Raynes | blbrown: Clojure has less than a quarter of the amount of traffic #haskell has. |
| 05:37 | Raynes | There are 600 people in there regularly and somewhere around 100 active at most times during the day. |
| 05:38 | Raynes | kotarak: I would guess that #haskell has been around for over 10 years. |
| 05:39 | Raynes | At least it seems like it lol. |
| 05:41 | blbrown | Raynes I took the high end of clojure which was 220k at one point. haskells max was 400k |
| 05:41 | Raynes | Huh? I'm talking about active users at any given time. |
| 05:42 | kotarak | I just took the sizes of the file listing. So the markup will blow up the numbers.... |
| 05:42 | kotarak | However the trend should be valid. :) |
| 05:42 | Raynes | Oh, you mean activity. |
| 05:42 | Raynes | I was talking about users. |
| 05:43 | Raynes | It's not that there are less users in #haskell I guess Clojure people just talk more. |
| 05:43 | Raynes | Imagine if we had 600 users in here. |
| 05:52 | Raynes | Well at least a higher ratio over activity to users. |
| 05:59 | Lau_of_DK | Hey Raynes :) |
| 05:59 | Raynes | Hi Lau_of_DK. |
| 06:03 | blbrown | in the last 6 hours, jruby had one post |
| 06:04 | kotarak | Well. Normally that's the same here on Sunday mornings. |
| 07:29 | adakkak_ | can someone tell me why I get a "wrong number of args passed" error for the following code http://paste.lisp.org/display/74674 |
| 07:30 | hiredman | ,(doc filter) |
| 07:30 | clojurebot | "([pred coll]); Returns a lazy seq of the items in coll for which (pred item) returns true. pred must be free of side-effects." |
| 07:30 | hiredman | the predicate function should be of one argument |
| 07:31 | hiredman | your ik function takes two |
| 07:32 | adakkak_ | so I should rewrite it as (filter #(ik x %) (p)) ;; if I got the parens right ? |
| 07:33 | hiredman | p doesn't need parens around it |
| 07:34 | adakkak_ | true |
| 07:34 | BigTom | Good morning |
| 07:34 | hiredman | or (partial ik x) |
| 07:34 | hiredman | instead of the #() form |
| 07:35 | adakkak_ | hiredman: suppose ik returns a 0, is it possible to do (zero? (paritial ik x)) ? it does not seem to work |
| 07:36 | BigTom | WIth lazy collections, the persistant collection that gets generated is at the end of the chain of lazy components isn't it? |
| 07:36 | hiredman | zero? does not return a function |
| 07:36 | hiredman | which is what filter wants there |
| 07:37 | adakkak_ | what I am trying to do is: (def factors (filter (zero? (partial mod x)) primes)) |
| 07:37 | adakkak_ | what is the best way to accomplish that? |
| 07:38 | hiredman | BigTom: I am unsure exactly, but I believe all the stuff inbetween must be generated too |
| 07:38 | StartsWithK | adakkak_: (def factors (filter #(zero? (mod x %)) primes)) |
| 07:39 | hiredman | (filter (comp zero? (partial mod x)) primes) |
| 07:40 | adakkak_ | comp is the composition function? |
| 07:40 | hiredman | yes |
| 07:41 | BigTom | so in adakkak_'s example (assuming primes is a lazy) there is a primes collection and a filter collection (of course, with Rich's funky collection classes there is only one underlying collection of 'things') |
| 07:41 | hiredman | most people seem to prefer function literals though |
| 07:41 | adakkak_ | why couldn't you do (partial zero? (partial mod x)) |
| 07:42 | hiredman | BigTom: stuff that is needed is createdd and stuff that isn't is GCed |
| 07:42 | BigTom | ok |
| 07:42 | hiredman | adakkak_: because zero? takes one arg |
| 07:43 | adakkak_ | makes sense |
| 07:43 | hiredman | (partial mod x) -> gives you a function that takes one arg |
| 07:43 | hiredman | (partial zero? that-function) |
| 07:44 | hiredman | would give a function of no-args that tells you weather a function is 0 or not |
| 07:44 | hiredman | (it isn't) |
| 07:44 | hiredman | (ever) |
| 08:04 | turbo24prg | morning |
| 11:35 | sooth | How should I take all items in a (lazy) sequence upto and including the first that satisfies a given predicate? |
| 11:38 | BigTom | ,(doc filter) |
| 11:38 | clojurebot | "([pred coll]); Returns a lazy seq of the items in coll for which (pred item) returns true. pred must be free of side-effects." |
| 11:42 | sooth | BigTom: I know of filter but what is a clean way to take all the items until the true element? (foo #evenp '(1 3 5 6 7 8 10)) -> (1 3 5 6) |
| 11:45 | ayrnieu | ,(doc take-while) |
| 11:45 | clojurebot | "([pred coll]); Returns a lazy seq of successive items from coll while (pred item) returns true. pred must be free of side-effects." |
| 11:45 | sooth | ayrnieu: Thanks that what I was looking for. |
| 11:45 | ayrnieu | however, |
| 11:45 | Chouser | that only gets ... oh, really? |
| 11:45 | leafw | that's some sort of lazy sequence generator. |
| 11:45 | ayrnieu | ,(take-while even? [1 3 5 6 7 8 10]) |
| 11:45 | clojurebot | nil |
| 11:46 | ayrnieu | ,(take-while #(not (even? %)) [1 3 5 6 7 8 10]) |
| 11:46 | clojurebot | (1 3 5) |
| 11:46 | ayrnieu | do you want the 6 ? |
| 11:46 | sooth | ayrnieu: Yeah |
| 11:47 | sooth | ayrnieu: Erm, I think I can re-write my predicate so that I take-while will be okay. |
| 11:47 | sooth | ayrnieu: Thanks |
| 11:48 | ayrnieu | ,(let [[odd [e1 & _]] (split-with odd? [1 3 5 6 7 8 10])] [odd e1]) |
| 11:48 | clojurebot | [(1 3 5) 6] |
| 11:49 | Chouser | ,(let [s [1 3 5 6 7 8 10]] (concat (take-while odd? s) (take 1 (drop-while odd? s)))) |
| 11:49 | clojurebot | (1 3 5 6) |
| 11:49 | Chouser | bleh |
| 11:52 | adakkak_ | ,(bigdec (. Math (pow 1000 1000))) |
| 11:52 | clojurebot | java.lang.NumberFormatException |
| 11:52 | adakkak_ | is there a way to make the previous statement work? |
| 11:52 | Chouser | ,(.pow 1000M 1000) |
| 11:52 | clojurebot | 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| 11:53 | adakkak_ | what does the M do? |
| 11:53 | ayrnieu | ,(class 1M) |
| 11:53 | clojurebot | java.math.BigDecimal |
| 11:54 | adakkak_ | thanks |
| 11:59 | gnuvince_ | ,(time (.pow (bigint 1000) 1000)) |
| 11:59 | clojurebot | 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| 11:59 | clojurebot | "Elapsed time: 2.872 msecs" |
| 11:59 | gnuvince_ | ,(time (reduce * (replicate 1000 1000))) |
| 11:59 | clojurebot | 10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
| 11:59 | clojurebot | "Elapsed time: 25.843 msecs" |
| 12:03 | ayrnieu | (defmacro constant [expr] (eval expr)) ... (defn foo [] ... (recur (* n (constant (.pow 1000M 1000))))) |
| 12:52 | lisppaste8 | ayrnieu pasted "does this already exist? iterator-seq that clears iterator" at http://paste.lisp.org/display/74683 |
| 13:05 | turbo24prg | is there a way to check how much memory a map consumes? |
| 13:44 | Lau_of_DK | Good evening gents |
| 13:45 | gnuvince_ | hi |
| 13:49 | durka42 | good afternoon |
| 13:49 | Lau_of_DK | durka durka |
| 14:58 | Lau_of_DK | So, anyone working on anything interesting? |
| 14:59 | leafw | Lau_of_DK: slow Sunday? |
| 14:59 | leafw | Lau_of_DK: I've been toying with a clojure gui to xmms2 |
| 15:00 | leafw | http://github.com/acardona/xmms2-clj/tree/master |
| 15:00 | leafw | very tiny. Just to see how to go about making guis in Clojure. |
| 15:01 | Lau_of_DK | leafw: Interesting, we can compare notes in a hour or so, I'll be uploading a GUI project to Github based on Qt |
| 15:02 | leafw | my only problem with Qt is that on closing the main window and quitting the application, one has to restart the JVM. Otherwise, it segfaults. |
| 15:02 | leafw | do you know any way around that problem? |
| 15:03 | Lau_of_DK | There are a couple of ways to go around it |
| 15:03 | mfredrickson | Lau_of_DK: I |
| 15:03 | mfredrickson | m writing a growl interface |
| 15:03 | Lau_of_DK | You can see the simple one in the project I'm upping - The more difficult one, is launching a QtRepl |
| 15:03 | Lau_of_DK | mfredrickson: Growl? |
| 15:03 | mfredrickson | http://growl.info |
| 15:03 | mfredrickson | for the mac users among us |
| 15:04 | Lau_of_DK | growl looks nice |
| 15:09 | mfredrickson | my overall goal is getting popups from test-is when tests fail (or better yet, pass). Like this: http://blog.codefront.net/2007/04/01/get-your-testing-results-via-growl-notifications/ |
| 15:09 | Lau_of_DK | Ah mon kotarak ! Salut |
| 15:10 | kotarak | Do you have an bot waiting? ;) |
| 15:10 | Lau_of_DK | mfredrickson: Looks really good - Its a shame its only for Mac OSX |
| 15:10 | Lau_of_DK | no... |
| 15:11 | mfredrickson | Lau_of_DK: there is a Linux copy called mumbles, there may be others for windows |
| 15:12 | Lau_of_DK | Ok - Im 100% a Linux guy, I dislike proprietary software in most regards, so maybe I should look into mumbles |
| 15:49 | Lau_of_DK | danlarkin: Hows "Barkin' Larkin'" doing? Almost Ver. 1.0 ? |
| 15:50 | danlarkin | Lau_of_DK: hahah oh jeez, that won't be the name either :) |
| 15:50 | Lau_of_DK | oh :( |
| 15:50 | Lau_of_DK | But how far along are you? I was actually hoping to dig into it soon, putting up some test sites |
| 15:51 | danlarkin | Lau_of_DK: went skiing this weekend so no more work done on it since thursday, but I've got a ./manage.clj style system going |
| 15:51 | danlarkin | akin to django's ./manage.py |
| 15:51 | technomancy | Lau_of_DK: hey, what do you think about clojure-mode coloring lazy forms a bit differently? |
| 15:51 | Lau_of_DK | Is it Githubbed yet? |
| 15:51 | technomancy | (just read the suggestion on the mailing list) |
| 15:51 | Lau_of_DK | technomancy: Example? |
| 15:52 | kotarak | technomancy: me too, but we have a nameing convention already: do... doseq, dorun, doall, ... |
| 15:52 | technomancy | Lau_of_DK: I just mean picking slightly different colors for map and filter than you would for doseq etc. |
| 15:52 | Lau_of_DK | Its not a bad idea, I think visually it could never make it 'worse' than it is |
| 15:53 | technomancy | kotarak: yeah, that's enough if it's followed closely I suppose |
| 15:53 | kotarak | for just has an unfortunate name... |
| 15:54 | Lau_of_DK | You prefer 'foreach' ? |
| 15:54 | danlarkin | Lau_of_DK: nope still local only. I did work on the templating system too, you can plug in any arbitrary templating system by writing a loader function |
| 15:54 | kotarak | No. for is not a loop. |
| 15:55 | Lau_of_DK | danlarkin: Fair enough - Just to let you know, Im looking forward to it |
| 15:55 | Lau_of_DK | Btw, are you using ClojureQL for the DB backend? It ought to speed things up a little |
| 15:55 | danlarkin | Lau_of_DK: but before I release anything I want to get my own templating system done, I hit a roadblock with that and switched to easier things |
| 15:56 | danlarkin | but I've gotta finish it eventually :) |
| 15:56 | Lau_of_DK | Cool |
| 15:56 | kotarak | Lau_of_DK: For list comprehensions I only no the mathematical notation { (x, y) | x,y \in X, x <= y }. No name here.. |
| 15:56 | kotarak | s/no/know |
| 15:57 | technomancy | oooh, unicodes. |
| 15:57 | danlarkin | Lau_of_DK: no, I haven't started the model code yet :-/ |
| 15:57 | Lau_of_DK | k |
| 16:01 | Wizardofwestmarc | danlarkin: do you have any kind of guestimate on how long it'll take to get something you want to release to the public ready? |
| 16:02 | technomancy | danlarkin: what is this library you've got everyone talking about? |
| 16:03 | danlarkin | Wizardofwestmarc: I hate estimates! |
| 16:03 | technomancy | did you finally find an appropriate prog-rock-related name? |
| 16:03 | Wizardofwestmarc | hence guestimate :P |
| 16:03 | danlarkin | technomancy: nope, as of yet unnamed |
| 16:03 | Wizardofwestmarc | if you don't that's cool, just wondering since I've got some ideas where I may have a web component, and if I could do that in clojure, well... |
| 16:04 | Wizardofwestmarc | and I was currently planning on using Django ;-) |
| 16:04 | technomancy | oh, the django port; right |
| 16:04 | danlarkin | Wizardofwestmarc: all that I have left to do on my TODO for a 0.01 is getting a templating system in there |
| 16:04 | Wizardofwestmarc | \m/ |
| 16:04 | danlarkin | Wizardofwestmarc: oh... well this won't rival django anytime soon... probably ever |
| 16:04 | Wizardofwestmarc | if you get no help? Probably not |
| 16:04 | Wizardofwestmarc | but if you can get it going, community can make a difference |
| 16:05 | drewr | Is there a git-hg yet? |
| 16:07 | danlarkin | Wizardofwestmarc: it's true, more people would help :) |
| 16:12 | Lau_of_DK | Gents, Im trying to consolidate some much needed Qt tools for making simple UIs and couple that with the main goal, which is a flexible parser for Git logs, which in the long run should be able to produce quality documentation, simply from the log. Its now up in version 0.1 @ http://github.com/Lau-of-DK/gitdoc/tree/master |
| 16:15 | canadaduane | When I start Aquamacs (first time user) it tells me "Wrong type argument: stringp, nil" in the mini buffer. How can I go about finding where this is coming from? |
| 16:17 | ayrnieu | ./src/dk/bestinclass/gitdoc/engine.clj: [ ui (QUiLoader/load (QFile. "/home/lau/coding/lisp/projects/lbj/core/git/git.ui")) ] |
| 16:19 | Lau_of_DK | ayrnieu: Was actually fixing that right now, youre too fast |
| 16:20 | ayrnieu | canada: I don't see it right now, but there should be a command to debug your ~/.emacs; ask #emacs |
| 16:21 | ayrnieu | maybe look in *Messages* to see if Emacs told you the command, the way I remember it telling me in those circumstances. |
| 16:21 | WizardofAway | About to head out, have a good day/evening everyone. |
| 16:22 | Lau_of_DK | Same to you |
| 16:31 | Lau_of_DK | Ok, I've added a UI designer with Qt-Designer |
| 16:31 | Lau_of_DK | The path is hardcoded, but it works |
| 16:34 | Lau_of_DK | clojurebot: clojureql? |
| 16:34 | clojurebot | clojureql is http://github.com/Lau-of-DK/clojureql/tree/master |
| 16:34 | Lau_of_DK | clojurebot: gitdoc is http://github.com/Lau-of-DK/gitdoc/tree/master |
| 16:34 | clojurebot | Ik begrijp |
| 16:43 | leafw | is there any "break" statement for a (doseq [...] ...). I am reading from a lazy seq generated from line-seq |
| 16:43 | Chousuke | Lau_of_DK: instead of port, you should probably call Jambi "bindings" just to avoid people thinking someone actually ported Qt to java... |
| 16:43 | leafw | otherwise I'll have to loop and set the next line as first/rest of line-seq |
| 16:44 | kotarak | leafw: (doseq [x (take-while #(some-condition? %) the-seq] ...) |
| 16:44 | leafw | thanks kotarak! |
| 16:53 | Lau_of_DK | Chousuke: Youre right ofc |
| 18:03 | danlarkin | http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/ |
| 18:05 | durka42 | ^ good read |
| 18:25 | blbrown | damn, I lost my remote, can't watch the superbowl. darn |
| 18:39 | hiredman | blbrown: don't worry, it is earlier but the steelers seem to be waltzing down the field |
| 18:40 | hiredman | hah |
| 18:42 | blbrown | good grief |
| 20:30 | cads | danlarkin: am just looking at that one right now |
| 21:04 | gnuvince_ | Is it possible to download the Java library documentation for offline reading? |
| 21:11 | Nafai | gnuvince_: You mean the javadocs? |
| 21:24 | gnuvince_ | Nafai: yes. |
| 21:26 | Nafai | I believe they are downloadable from Sun, can't remember exactly where |
| 21:27 | Nafai | In Ubuntu, I notice there is a sun-java5-doc package |
| 23:00 | cooldude127 | fuck b-tree |
| 23:00 | cooldude127 | s |