2008-12-26
| 00:30 | lisppaste8 | holmak pasted "Math/sqrt failure" at http://paste.lisp.org/display/72665 |
| 00:30 | holmak | Clojure won't let me use Math/sqrt from the Java library - any idea why that would happen? |
| 00:31 | holmak | It works perfectly well when I type it directly in the REPL, but not if I try to defn a function or use it in a file. |
| 00:31 | holmak | I have the latest version of Clojure, 1162. |
| 03:03 | yangsx | I've come across this strange error java.lang.IncompatibleClassChangeError after defining a function and evaulating it at slime-repl |
| 03:04 | hiredman | what function |
| 03:05 | hiredman | lisppaste8: url |
| 03:05 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 03:05 | yangsx | Is it a bug with my function or the compiler? |
| 03:05 | hiredman | bug your function |
| 03:06 | hiredman | it manes you tried to use something as something it cannot be |
| 03:06 | hiredman | means |
| 03:14 | yangsx | hiredman: thanks, I'll review my code once more. |
| 03:16 | hiredman | ,(name *ns*) |
| 03:16 | clojurebot | java.lang.IncompatibleClassChangeError (NO_SOURCE_FILE:0) |
| 03:42 | yangsx | hiredman: my error was due to use disj as dissoc by mistake |
| 03:43 | yangsx | btw, is there a Clojure counterpart of CL's subseq? |
| 03:46 | hoeck | yangsx: there is subvec for vectors |
| 03:48 | hoeck | yangsx: and subseq :) |
| 03:51 | yangsx | hoeck: my data structures happen to be a vector, thanks. I was looking for samething general for seq in vain. |
| 04:12 | Lau_of_DK | Good morning all |
| 04:15 | hoeck | good morning Lau_of_DK |
| 04:55 | Lau_of_DK | Since assoc doesnt work, how do I change a key/val pair in a PersistantArrayMap ? |
| 05:10 | hoeck | Lau_of_DK: not shure what you mean, assoc works on PersistantArrayMap too |
| 10:46 | hiredman | clojurebot: ping |
| 10:46 | clojurebot | PONG! |
| 12:16 | chrisn | hello? |
| 12:19 | hiredman | clojurebot: java? |
| 12:19 | clojurebot | hmm... sounds like your out of heap space |
| 12:20 | hiredman | clojurebot: java is <reply>? |
| 12:20 | clojurebot | Roger. |
| 12:37 | danlarkin | clojurebot: java |
| 12:37 | clojurebot | ? |
| 12:37 | wwmorgan | Does a function already exist that does this? (foo 3 [:a :b]) => ((:a :a :a) (:a :a :b) (:a :b :a) (:a :b :b) (:b :a :a) (:b :a :b) (:b :b :a) (:b :b :b)) |
| 14:08 | Lau_of_DK | Slow night... anyone working on anything interesting? :) |
| 14:10 | Kerris7 | Lau_of_DK: I'm planning to port Lisp in Small Pieces to Clojure |
| 14:10 | Lau_of_DK | How do you mean ? |
| 14:10 | Kerris7 | I just want universities to start teaching Lisp again :( |
| 14:10 | Lau_of_DK | But you do realise that Clojure is a Lisp right? :) |
| 14:11 | Kerris7 | Yeah, it's mostly a syntax thing |
| 14:11 | Kerris7 | I daresay Clojure is the most accessible Lisp at the moment |
| 14:11 | Lau_of_DK | k, got a public repo somewhere? |
| 14:11 | Kerris7 | therefore* it would be a boon to have educational material using Clojure syntax |
| 14:12 | Kerris7 | *just had dinner, can't really think straight |
| 14:13 | Kerris7 | Lau_of_DK: would something like Stuart Holloway's Practical Lisp port do? |
| 14:13 | Lau_of_DK | In terms of providing teaching-material? |
| 14:14 | Kerris7 | yeah, also in terms of public repo, i.e. using github |
| 14:15 | Lau_of_DK | oh... In terms of the material I dont know, havent read the book, but Github is :)~ |
| 14:27 | chrisn | don't mix opengl and lazy evaluation |
| 14:28 | chrisn | next thing you know you get a hardcore crash because the opengl calls get evaluated in a thread with no active context |
| 14:30 | chrisn | I have a couple buddies working through "the structure and interpretation of computer programs" http://mitpress.mit.edu/sicp/full-text/book/book.html |
| 14:31 | chrisn | They are doing it in scheme, I think. If we had that, we wouldn't need much else. |
| 14:35 | Lau_of_DK | chrisn: You said OpenGL and SICP in the same sentense ? |
| 14:35 | chrisn | nope |
| 14:35 | chrisn | first two comments were exasperation |
| 14:35 | chrisn | second two were chiming in |
| 14:35 | chrisn | sry |
| 14:41 | Lau_of_DK | clojurebot: SICP? |
| 14:41 | clojurebot | Pardon? |
| 14:41 | Lau_of_DK | chrisn: I think I remember seeing an whole site with conversions from Scheme/SICP to Clojure |
| 14:42 | Kerris7 | Lau_of_DK: http://codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages ? |
| 14:42 | chrisn | hah |
| 14:42 | chrisn | yep |
| 14:45 | Lau_of_DK | That looks like it... though they ported it to C++ I see... they really must have missed the point of that lecture |
| 14:45 | Kerris7 | I'm only planning the Lisp in Small Pieces port at the moment, the strongest candidate I'm considering for a Lisp to Clojure port would be Simply Scheme |
| 14:46 | Lau_of_DK | Im looking forward to seeing what you come up with |
| 14:47 | chrisn | C++ involved a lot of extremely smart people who were amazingly adept at missing the point. |
| 14:48 | chrisn | So did Java. |
| 14:48 | Lau_of_DK | hehe, looks like that happend to Ruby as well |
| 14:58 | aperotte | hello all |
| 15:06 | Lau_of_DK | Hi aperotte |
| 15:08 | aperotte | seems like things are a little slow on the channel today |
| 15:11 | Lau_of_DK | Very, almost unbearable :) |
| 15:11 | aperotte | hahaha |
| 15:12 | aperotte | have you been working on a clojure project? |
| 15:14 | Lau_of_DK | yea |
| 15:21 | aperotte | what kind of project is it ... if you don't mind me asking |
| 15:25 | aperotte | Lau_of_DK: I'll be back in a few |
| 15:32 | Lau_of_DK | aperotte: Me and kotarak have been hacking away at ClojureQL, an attempt at turning SQL statements into higher order functions |
| 15:33 | Lau_of_DK | dk.bestinclass.clojureql> (execute (sql (query [id name language iq] |
| 15:33 | Lau_of_DK | developers.employees |
| 15:33 | Lau_of_DK | (< iq 100)))) |
| 15:33 | Lau_of_DK | {:iq 85, :language Python, :name Frank, :id 1} |
| 15:33 | Lau_of_DK | |
| 15:34 | aperotte | Lau_of_DK: haha ... very nice |
| 15:34 | aperotte | Lau_of_DK: I haven't used SQL much or done much web programming at all, but sounds cool |
| 15:35 | Lau_of_DK | yea it'll be nice when its done |
| 15:36 | aperotte | have you looked at compojure at all? |
| 15:37 | Lau_of_DK | Of course |
| 15:40 | Lau_of_DK | Did you think that the two are related aperotte ? |
| 15:41 | dudleyf | Lau_of_DK: Is the source up anywhere? |
| 15:41 | aperotte | not really, I've been keeping an eye on compojure |
| 15:41 | aperotte | I'd like to try my hand at web programming once there's more documentation |
| 15:41 | Lau_of_DK | dudleyf: http://github.com/Lau-of-DK/clojureql/tree/master |
| 15:41 | Chousuke | Lau_of_DK: do you have any plans regarding input sanitisation with clojureql |
| 15:42 | dudleyf | Lau_of_DK: Thanks |
| 15:42 | aperotte | I hadn't seen any mention of clojureQL on their site, so I didn't think it |
| 15:42 | Lau_of_DK | aperotte: In this game, I wouldnt wait for the docs :) |
| 15:42 | Lau_of_DK | But Compojure is cool, so you can dig into it |
| 15:42 | Lau_of_DK | ClojureQL is not web-related, its only for databases, so that |
| 15:42 | Lau_of_DK | SELECT id,name FROM database1 WHERE id = 5 |
| 15:42 | Lau_of_DK | becomes |
| 15:43 | Lau_of_DK | (sql (query [id name] database1 (= id 5))) |
| 15:43 | Lau_of_DK | Chousuke: In which way to you mean sanitisation ? |
| 15:44 | Chousuke | like, if you wanted that 5 to depend on user input somehow |
| 15:44 | chrisn | how do I type my variables in clojure again? |
| 15:45 | chrisn | I think I am running into some lag doing generic lookups on an interface where I know the type |
| 15:45 | Chousuke | I guess you could use clojureql to generate SQL with placeholders |
| 15:45 | Lau_of_DK | Chousuke: We're implementing it with unquote, so that you could do (let [x 5] (sql (query id table1 (= id ~x)))) |
| 15:45 | Chousuke | Lau_of_DK: yes but that's dangerous |
| 15:45 | Lau_of_DK | What do you fear ? |
| 15:45 | Chousuke | x being something like bobby tables' name :P |
| 15:46 | Lau_of_DK | haha |
| 15:46 | Lau_of_DK | But thats not really my concern is it? If you choose to fire a script with unvalidated data, then thats your call as a developer |
| 15:47 | dudleyf | Lau_of_DK: Since databases have mechanisms for avoiding injection like that, |
| 15:48 | dudleyf | if you're implementing a database library, it is your concern, I think |
| 15:48 | Chousuke | I mean constructs like INSERT INTO foo VALUES (?,?,?,?) and then using some programming language function to execute that query with supplied values |
| 15:49 | chrisn | (for [#^float i (range -50 50) #^float j (range -50 50)] |
| 15:49 | chrisn | Something like that? |
| 15:50 | dudleyf | I guess it depends on whether your library is a database interface or just a sql string generation library |
| 15:50 | dudleyf | But I imagine that line gets pretty blurry |
| 15:50 | Lau_of_DK | dudleyf: We're sending everything through with JDBC, if that makes a difference |
| 15:51 | Lau_of_DK | Chousuke: Your statement would be (sql (insert foo [x y z] [~x ~y ~z])) But what you bind those vars to, is totally up to you |
| 15:51 | dudleyf | Lau_of_DK: Then I would think you'd want to allow for PreparedStatements and such |
| 15:52 | Chousuke | Lau_of_DK: but what kind of sql does that generate? |
| 15:52 | Lau_of_DK | I mean, even JDBC will let you destroy your DB if you want, I really dont see why I should police that |
| 15:52 | Lau_of_DK | That would expand into INSERT INTO foo VALUES (x, y, z) ' and then the literal evalutated values of those vars, at the time of using (sql ..) |
| 15:52 | Chousuke | Lau_of_DK: if it generates INSERT INTO foo values (x, y, z) then it's dangerous unles x, y and z are all "?" |
| 15:53 | Lau_of_DK | dudleyf: Everything gets fitted into a preparedstatement |
| 15:53 | Lau_of_DK | Why dangerous? they're all seperately stored when you unquote them |
| 15:53 | Chousuke | separately stored? |
| 15:53 | Chousuke | they're dangerous becuase they become part of the SQL string |
| 15:54 | Chousuke | user-supplied values should never be part of the SQL string. That's why placeholders exist. |
| 15:54 | Lau_of_DK | I think we end up paramterizing (?) them, so that in the SQL string theyre @x @y @z |
| 15:54 | Lau_of_DK | And then we add them to a prepared statement |
| 15:54 | Chousuke | ah, that sounds like it's safe. |
| 15:57 | Chousuke | so you do something like PreparedStatement("INSERT INTO FOO VALUES (@x, @y, @z)").executeWithParameters(x,y,z)? (pseudocode, I can't remember the api right now) |
| 15:58 | Lau_of_DK | Yes |
| 15:59 | Lau_of_DK | I can dig it up for you if you want, one sedc |
| 15:59 | Chousuke | sounds good |
| 15:59 | Lau_of_DK | SqlConnection conn = new SqlConnection(_connectionString); |
| 15:59 | Lau_of_DK | conn.Open(); |
| 15:59 | Lau_of_DK | string s = "SELECT email, passwd, login_id, full_name " + |
| 15:59 | Lau_of_DK | "FROM members WHERE email = @email"; |
| 15:59 | Lau_of_DK | SqlCommand cmd = new SqlCommand(s); |
| 15:59 | Lau_of_DK | cmd.Parameters.Add("@email", email); |
| 15:59 | Lau_of_DK | SqlDataReader reader = cmd.ExecuteReader(); |
| 15:59 | Lau_of_DK | |
| 15:59 | Chousuke | right. |
| 15:59 | Lau_of_DK | Can I stamp it "Approved by the Chousuke" ? :) |
| 16:00 | Chousuke | yes. |
| 16:00 | Lau_of_DK | Sweet |
| 16:00 | Chousuke | seriously though, that looks really cool :) |
| 16:01 | dudleyf | Wait, where did that come from? |
| 16:02 | Lau_of_DK | I got the idea/link from someone in here a few days ago |
| 16:02 | Lau_of_DK | http://www.codinghorror.com/blog/archives/000275.html |
| 16:03 | dudleyf | I was looking for it in the github repo you posted earlier, but I didn't see that |
| 16:03 | Lau_of_DK | Oh, We've only just got Query working, now moving on to INSERT :) |
| 16:03 | Lau_of_DK | But Query actually works almost perfectly now, which is sweet |
| 16:04 | dudleyf | Awesome |
| 16:04 | Lau_of_DK | (execute (sql (query [id name iq] developers.employees (or (and (> id 3) (< id 5)) (and (> id 8) (< id 10)))))) |
| 16:04 | Lau_of_DK | {:iq 100, :name Mark, :id 4} |
| 16:04 | Lau_of_DK | {:iq 100, :name Arnold, :id 9} |
| 16:05 | Lau_of_DK | Thats a pretty nested WHERE clauses, yet is compiled like it should |
| 16:29 | chrisn | found an awesome bomb in gllpanel |
| 16:29 | chrisn | It destroys the gl context sometimes when resizing. |
| 16:29 | chrisn | Meaning you have to reload all buffers; be they textures, glsl programs, etc. |
| 16:31 | Lau_of_DK | Any egg users here? |
| 16:35 | tyusupov | quit |
| 17:48 | nomothetis | Hi all. Can someone help me with setting up classpaths for some tests that I'm trying to write for my application? |
| 17:49 | Lau_of_DK | Shoot |
| 17:49 | nomothetis | ok. |
| 17:49 | nomothetis | So right now, I have a folder that contains the source file rumi-logic.clj. |
| 17:50 | nomothetis | I want to write tests using the fact.clj library. |
| 17:50 | nomothetis | Which i've put in ext/fact.clj |
| 17:50 | nomothetis | and I want to write tests for my functionality in test/rumi-logic-test.clj |
| 17:50 | nomothetis | I'm trying to run rumi-logic-test.clj from the REPL that I started in the ~ folder. |
| 17:51 | nomothetis | (~ being the root development folder, where rumi-logic.clj is) |
| 17:51 | nomothetis | I thought taht this: |
| 17:51 | nomothetis | (ns rumi-logic-test |
| 17:51 | nomothetis | (:require rumi-logic ext.fact)) |
| 17:51 | nomothetis | would work. |
| 17:52 | nomothetis | But it tells me that it cannot locate rumi_logic_init.class or rumi_logic.lj. |
| 17:52 | nomothetis | (the code is in the rumi-logic-test.clj file). |
| 17:52 | nomothetis | I'm obviously completely misunderstanding how things work, so I was hoping someone would explain it to me. |
| 17:52 | Chousuke | nomothetis: the file must use underscores instead of dashes |
| 17:52 | Chousuke | file name that is |
| 17:53 | nomothetis | really? Interesting. |
| 17:53 | nomothetis | ok, let me try that. |
| 17:53 | Chousuke | so namespace foo.bar-zonk = foo/bar_zonk.clj |
| 17:53 | Lau_of_DK | if ~/ is in your classpath, then you can put test.clj in ~/src/nomo/rumi/test.clj, then you can require nomo.rumi.test), and test.clj but also start with (ns nomo.rumi.test) |
| 17:53 | Lau_of_DK | If Im mistaken, The Chousuke can correct me |
| 17:54 | Chousuke | otherwise correct, but it must be ~/src/ in the namespace :) |
| 17:54 | Chousuke | er |
| 17:54 | Chousuke | classpath |
| 17:54 | nomothetis | @Lau_of_DK: Alright, i'm going to change the names, and then I'll try what you said. I'll let you guys know how it coes. Thanks. |
| 17:55 | Lau_of_DK | kthxbye |
| 17:56 | Chousuke | nomothetis: use the directory layout and naming here as an example: http://github.com/Chousuke/clojurebot |
| 17:57 | Lau_of_DK | Chousuke: Are you now maintaining the clojurebot, or have you just forked it? |
| 17:57 | Lau_of_DK | For your own coding pleasure |
| 17:58 | Chousuke | well I made the github project of it, and hiredman forked it to make a github project for himself too :P |
| 17:58 | Lau_of_DK | oh :) |
| 17:58 | Lau_of_DK | clojurebot: where are you ? |
| 17:58 | clojurebot | http://github.com/hiredman/clojurebot/tree/master |
| 17:58 | Lau_of_DK | aha |
| 17:59 | Chousuke | the clojurebot here is still "version 1" unless I'm mistaken |
| 17:59 | Lau_of_DK | clojurebot: version? |
| 17:59 | clojurebot | Gabh mo leithsc�al? |
| 17:59 | Lau_of_DK | clojurebot: rev? |
| 17:59 | clojurebot | Gabh mo leithsc�al? |
| 17:59 | Chousuke | which is just fine, as I haven't yet really improved it. just did some restructuring of the code |
| 17:59 | Lau_of_DK | ,(map println (range 10)) |
| 17:59 | clojurebot | (nil nil nil nil nil nil nil nil nil nil) |
| 18:00 | Lau_of_DK | k |
| 18:01 | Chousuke | could probably make the svn stuff not depend on running the actual svn executable (instead make it work with a java library or something) |
| 18:02 | Lau_of_DK | ,(doseq [i (range 5)] (println i) (Thread/sleep 100)) |
| 18:02 | clojurebot | 0 1 2 3 4 |
| 18:02 | Lau_of_DK | Chousuke: When did SVN get tried into this ? |
| 18:02 | Chousuke | tried? |
| 18:02 | Chousuke | clojurebot: latest? |
| 18:02 | clojurebot | latest is 1185 |
| 18:02 | Lau_of_DK | tied |
| 18:02 | Chousuke | svn rev 1185 |
| 18:03 | Chousuke | Lau_of_DK: clojurebot actually runs the svn command |
| 18:03 | Lau_of_DK | oh ok |
| 18:03 | Chousuke | ... or at least, it should |
| 18:03 | Chousuke | looks like it's not working |
| 18:03 | Chousuke | clojurebot: svn rev 1185 |
| 18:03 | clojurebot | hiredman.clojurebot$term__102@15f157b is http://clojure.googlecode.com/svn/trunk/ |
| 18:03 | Chousuke | .. hm |
| 18:03 | Chousuke | that's... not right. :) |
| 18:04 | Lau_of_DK | you mean SVN in general or? .. :) |
| 18:04 | Chousuke | the weird java signature thingy :P |
| 18:05 | Chousuke | I still need to work on the dispatch stuff for my version though. it selects the first method that matches, so the order of lookup matters :/ |
| 18:06 | Lau_of_DK | how will you work around it? |
| 18:06 | Chousuke | don't know yet |
| 18:13 | nomothetis | ok, I got it working. Thanks guys! I appreciate the help. |
| 18:14 | Lau_of_DK | :D |
| 18:16 | nomothetis | quick question: is there a way to find out, from the REPL, what the location the REPL was launched from was? |
| 18:19 | chrisn | (. (java.io.File. ",") getCanonicalPath) |
| 18:21 | Chousuke | ,? |
| 18:21 | nomothetis | cool, thanks. |
| 18:22 | Lau_of_DK | Try (System/getProperty "user.dir") |
| 18:22 | chrisn | ignore dk. Do what I said. |
| 18:22 | nomothetis | that works as well. |
| 18:24 | Lau_of_DK | http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html |
| 18:27 | Chousuke | except using "." is evil |
| 18:27 | Lau_of_DK | Evil you say ? |
| 18:28 | Chousuke | yes, evil |
| 18:28 | Chousuke | .. is twice as evil |
| 18:28 | Lau_of_DK | oh, you're talking about chrisn attempt to produce code? |
| 18:29 | Chousuke | yes. |
| 18:29 | Lau_of_DK | Oh ok ... :D |
| 18:30 | chrisn | why is . evil? |
| 18:30 | Lau_of_DK | Its primarily because The Chousuke said so |
| 18:31 | Chousuke | mostly, yeah. but lisp forms are supposed to begin with an operator, and . is not a very informative operator. |
| 18:31 | Chousuke | it just says "java interop is going to happen" |
| 18:32 | Lau_of_DK | I second that critique |
| 18:33 | Lau_of_DK | But chrisn, that important thing is that you tried, and I encourage you to keep going :) |
| 18:33 | Chousuke | yeah, well, you can keep on using . |
| 18:34 | Chousuke | I just like the .field syntax much more :) |
| 18:35 | chrisn | I wish (.field obj) would return something you could apply |
| 18:36 | chrisn | I was wondering how to get a member function pointer, at it appears you have to use reflection |
| 18:36 | Lau_of_DK | (apply #(Class/function %) ...) ? |
| 18:36 | chrisn | does that work for instance functions? |
| 18:37 | Chousuke | there's (memfn method) |
| 18:37 | Chousuke | it still requires the object attribute though |
| 18:37 | Chousuke | but (partial (memfn method) obj) won't :) |
| 18:38 | chrisn | That is exactly what I wanted. |
| 18:38 | Chousuke | I think Rich might be considering making ".foo" things auto-memfn whenever it makes sense. |
| 18:38 | chrisn | no thanks to lau |
| 18:38 | chrisn | :) |
| 18:39 | Chousuke | so you could map java methods "directly" instead of wrapping them in memfn |
| 18:39 | Lau_of_DK | man youre coming down hard on me tonight |
| 18:39 | Chousuke | but memfn isn't too much work for now |
| 18:40 | chrisn | http://gpwiki.org/index.php/OpenGL:Codes:Simple_GLSL_example |
| 18:40 | chrisn | I just got that working on clojure |
| 18:40 | chrisn | in |
| 18:40 | Chousuke | hmm |
| 18:40 | Lau_of_DK | Post the code |
| 18:40 | chrisn | But the code looks like shit because the jogl gl interface is difficult to work with |
| 18:41 | chrisn | dude. |
| 18:41 | Chousuke | opengl is probably not the best fit for a functional language either :) |
| 18:41 | Lau_of_DK | Alternative, modify the wiki page with your code, and remove the old |
| 18:41 | chrisn | http://github.com/cnuernber/lambinator/tree/master/src/lambinator |
| 18:42 | chrisn | there is the code. I am trying to set up a good environment for trying out some different ideas I have about rendering |
| 18:42 | chrisn | Probably nothing that actually does anything is a good fit for a functional language |
| 18:43 | Lau_of_DK | thanks |
| 18:43 | Chousuke | chrisn: hah |
| 18:44 | Chousuke | funcctional style actually works with many problems. |
| 18:45 | Lau_of_DK | chrisn: you're code compiles fine but dont run |
| 18:45 | chrisn | I can't believe it compiled. |
| 18:45 | Chousuke | a big problem with functional programmin is that it's very different from imperative style; you don't actually control the machine directly. |
| 18:45 | Lau_of_DK | java -jar lambinator.jar |
| 18:45 | Lau_of_DK | Failed to load Main-Class manifest attribute from |
| 18:45 | Lau_of_DK | lambinator.jar |
| 18:45 | Lau_of_DK | |
| 18:45 | chrisn | You have to just run from the repl |
| 18:45 | Lau_of_DK | which one of those ~100 files do you want me to run ? |
| 18:45 | Chousuke | or rather, that's not a problem with functional programming; it's a problem with programmers. |
| 18:45 | chrisn | get it loaded into the repl, ensure have have jogl |
| 18:45 | chrisn | the jar file |
| 18:46 | chrisn | check out the repl test file |
| 18:46 | Lau_of_DK | k |
| 18:46 | Chousuke | the bigger problem is that most existing code is not really compatible with a functional programming style |
| 18:46 | chrisn | it contains some halfway stuff. |
| 18:46 | chrisn | That seems like an assumption, Chousuke. |
| 18:47 | Chousuke | well, it is. |
| 18:47 | Chousuke | but I'm fairly sure it's true enough |
| 18:47 | chrisn | lau: you have to create an app frame |
| 18:47 | chrisn | (def fm (lambinator.ui/create_app_frame "lau is crazy")) |
| 18:47 | chrisn | Get that far. |
| 18:48 | Lau_of_DK | chrisn: Sorry I have to get to bed, I'll check it out tomorrow |
| 18:48 | chrisn | Then go to the about box and check out your opengl extensions |
| 18:48 | chrisn | lates. |
| 18:48 | Lau_of_DK | :| |
| 18:48 | chrisn | Lau is nonplussed. |
| 18:48 | chrisn | I think the larger problems is all the bullshit people hear about functional programming |
| 18:49 | chrisn | I have tried to evangelize it in various places. |
| 18:49 | chrisn | Usually I get really strange responses. |
| 18:50 | chrisn | Its time has come, however. |
| 18:50 | chrisn | The largest problem with programming is how popular C-based languages are in general. |
| 18:50 | chrisn | People all think about problems in only very certain ways. |
| 18:50 | Chousuke | well, yeah |
| 18:51 | Chousuke | languages grew up in an environment where software had to be fast and the only way to be fast was to control the hardware directly. |
| 18:51 | Chousuke | nowadays, that's no longer true. |
| 18:52 | Chousuke | but the damage is done |
| 18:52 | chrisn | It was never true as true as people thought it was unless you were on a commodore 64 or something like that. A complex system is never fast due to the language. If it is fast, it is due to good design. |
| 18:53 | chrisn | no kidding |
| 18:53 | Chousuke | yeah, but they simply didn't have to tools to make functional languages go as fast as imperative, direct-control languages. |
| 18:54 | chrisn | only in very certain cases. LISP has had types and binary compilation forever. |
| 18:54 | chrisn | although it isn't functional, I guess. |
| 18:54 | Chousuke | I guess that wasn't early enough :/ |
| 18:54 | chrisn | heh |
| 18:55 | Chousuke | the growing number of multicore systems might help functional programming style gain more followers though |
| 19:36 | chrisn | Is there a function that returns both the passing and failures of a filter function? |
| 19:36 | chrisn | In two separate seqs? |
| 19:36 | gnuvince | chrisn: there's something in clojure-contrib |
| 19:36 | chrisn | I have that |
| 19:36 | chrisn | ? |
| 19:36 | chrisn | name? |
| 19:36 | gnuvince | hang on |
| 19:36 | gnuvince | looking for the name |
| 19:36 | gnuvince | separate |
| 19:37 | gnuvince | (doc separate) |
| 19:37 | clojurebot | I don't understand. |
| 19:38 | chrisn | heh |
| 19:38 | chrisn | thanks |
| 19:38 | gnuvince | happy to help |
| 19:48 | gnuvince | hmmm |
| 19:48 | gnuvince | weird... |
| 19:48 | gnuvince | I can't use it... |
| 19:52 | nomothetis | Is anyone familiar with the Fact unit testing library? |
| 19:52 | gnuvince | How come i don't see anything with (ns-publics 'clojure.contrib.seq-utils) |
| 19:52 | gnuvince | ? |
| 20:09 | mib_4tvgjgnr | hello? |
| 20:13 | gnuvince | mib_4tvgjgnr: hi |
| 20:14 | danlarkin | mib_4tvgjgnr: greetings! |
| 20:15 | mib_4tvgjgnr | mmm it's my first time on the clojure room |
| 20:15 | mib_4tvgjgnr | is it usually pretty lively? |
| 20:35 | danlarkin | people always leave before I can answer them :-/ |
| 20:57 | kabny | Im reading the wikipedia article on monte carlo methods(implemented the pi-approximation algorithm before) http://en.wikipedia.org/wiki/Monte_Carlo_method. but what Im not sure of is if it makes any sense to generalize the algorithm. ie is it possible to abstract out most of it or do I kind of have to rewrite everything for each different monte carlo simulation I want to do? |
| 20:58 | kabny | also, which is the best java lib for doing simple 2d graphics(still and moving)? like pythons pygame... is it swing or that is just GUIs? |
| 21:00 | chrisn | If you use swing then you can use openGL later if you want more pizzaz |
| 21:04 | kabny | but opengl seems so complicated to just the simpel stuff even |
| 21:04 | chrisn | it is |
| 21:04 | chrisn | the key word was later |
| 21:05 | chrisn | swing has a 2d rendering library |
| 21:05 | chrisn | You don't have to use widgets. |
| 21:06 | chrisn | create a jpanel with nothing in it and overload the paint method with something you care about |