#clojure logs

2008-11-24

00:01hiredmana, uh, �thunk?
00:03timothypratleyOk I have an example of a null pointer user error:
00:03timothypratley(defn new-listener [port]
00:03timothypratley (try (java.net.ServerSocket. port)
00:03timothypratley (println "Listening on " port)
00:03timothypratley (catch Exception e
00:03timothypratley (println "Failed to listen on port " port ": " (.getMessage e)))))
00:03timothypratley(println "Server started")
00:03timothypratley(let [listener (new-listener 8888)]
00:04timothypratley (.accept listener))
00:04timothypratleynew-listener is incorrectly defined
00:04timothypratleyso throwing a null pointer exception is the correct action
00:04timothypratleyException in thread "main" java.lang.NullPointerException (test.clj:0)
00:05timothypratleybut there are no clues as to where the error occured.
01:36timothypratleyif i had a set, and wanted to call a function on all members for side-effects... what should I use?
01:36notallamadoseq?
01:37albinobut I just learned about it 10 minutes ago :)
01:38timothypratleygreat! thanks
01:38hiredman(doc doseq)
01:38clojurebotRepeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for". Does not retain the head of the sequence. Returns nil.
01:40albinohiredman: did you write clojurebot?
01:56hiredmanalbino: yes
01:56hiredmanclojurebot: where are you?
01:56clojurebothttp://gist.github.com/27733
01:57hiredmanclojurebot: where are you is <reply>#who: I am at http://gist.github.com/27733 or there abouts
01:57clojurebotOk.
02:21replacaanyone active?
02:21replacaI have an 'ns' question
02:22replacaI don't see a good source of documentation on the ns macro
02:22timothypratleyI'm here, but unlikely to be able to help :)
02:22timothypratleyyou can but ask...
02:23replacabut in the api doc, they say to prefer ":as" with ns to using refer to make aliases
02:23replacabut I don't see the syntax for add anywhere
02:24replaca*add -> :as
02:24replacaI would guess that it fits into (ns (:use ...)) somehow
02:24replacaideas? pointers?
02:25replacatimothypratley: are you a noob too?
02:25timothypratley(doc require)
02:25clojurebotLoads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly. Libs A 'lib' is a named set of resources in classpath whose contents define a library of
02:25timothypratleyRecognized options: :as :as takes a symbol as its argument and makes that symbol an alias to the lib's namespace in the current namespace.
02:26timothypratleyI think that means (require something :as somethingelse)
02:26timothypratleyyup indeed!
02:26replacayeah, but I thought that require was now mostly deprecated in favor of using ns
02:26timothypratleywhat exactly are you trying to do...?
02:27replacaor am I misreading things?
02:27replacaSo, I'm making a port of the CL format function
02:27replacabut that conflicts with clojure.core
02:27replacaso I call it cl-format
02:28replacabut I'm using test ode from the examples in CLtL and they all call it
02:28replacaformat
02:28replacaso I wanted to alias it back so the tests look like the book
02:28replaca(and just to show that it could be done :-))
02:30replacaahh, but now I see that :as aliases namespaces and not symbols
02:30replacamaybe I just need def...
02:31replacahmmm
02:31replacatimothypratley: how long have you been clojuring?
02:34timothypratleygroovey :) yes you are beyond my help sorry... you want to 'hide' the clojure core in favour of your own functions I take it
02:35timothypratleyabout a month, not very heavily and I don't know Lisp or Java that great so I'm a bit of a battler :P
02:47replacayup, it turns out I was just thinking too hard
02:48replacaafter hiding format with (:refer-clojure :exclude [format])
02:48replacaI was able to do (def format cl-format) and everything works
02:49replacayeah, that is a little bit of a battle :-)
02:49replacaI'm a newbie, but I come knowing lisp, java and some haskell so
02:49replacaI know most of the concepts
02:53ZephtarGood morning
03:07PupenoHello.
06:16yonatanhello channel, anybody know how i can get a list of all currently defined symbols?
06:18blackdog_http://clj-doc.s3.amazonaws.com/tmp/doc-1116/index.html
06:18yonatani mean dynamically
06:19yonatanat runtime, get a list of anything that's been def'ed
06:22blackdog_yonatan, this file is from enclojure it grabs symbols
06:23yonatancool, thanks. i'll just see how i get this DCC thing to work
06:23blackdog_actually i;ll paste it hang on
06:24blackdog_http://paste.lisp.org/display/70949
06:25yonatanthanks, blackdog_
06:43lau`Hey heey :)
07:29Pupeno-GHello.
08:09gnuvinceIs there a Clojure or Java library to generate XML? Specifically, RSS.
08:11duck1123there are tons of java libs
08:12gnuvinceduck1123: any one in particular? A very simple one would be ideal
08:12duck1123There's a really good one, I'm just trying to remember the name. one sec
08:13rhickeygnuvince: there is clojure.xml, which pulls xml into Clojure data structures, and has a simple emit function
08:15gnuvinceI'll check it out.
08:18duck1123gnuvince: are you more interested in rss or atom
08:18duck1123you might want to check out Apache Abdera
08:21gnuvinceduck1123: it's for my mini tutorial
08:21duck1123then Abdera is way too much for you
08:21gnuvinceMy need is so trivial that if there's no good lib, I'll just println the tags
08:21duck1123go with rhickey's suggestion
08:24gnuvinceTrying to figure out clojure.xml/emit right now
08:33duck1123I would hate to have to program much of this clojure.xml format by hand
08:35rhickeygnuvince: try this:
08:35rhickey(require 'clojure.xml)
08:35rhickey(def x (clojure.xml/parse "http://arstechnica.com/journals.rssx&quot;))
08:35rhickeyx
08:35rhickey(clojure.xml/emit x)
08:36Lau_of_DKrhickey: wouldnt it be a good idea to include Chousers zip-filter routines in that namespace?
08:37duck1123Lau_of_DK: zip-filter has other uses though
08:38Lau_of_DKIsnt zip-filter the one where he put (xml-> x :element) and all that in ?
08:38duck1123actually, I think I'm thinking of something else
08:38duck1123have a link?
08:39Lau_of_DKIts in contrib
08:39rhickeyduck1123: yes, the preferred by-hand format is [tag {:maybe attrs} maybe-child ...], but I haven't switched clojure.xml to produce it
08:39duck1123ok, clj-doc hasn't indexed that one yet
08:40duck1123rhickey: will that handle namespaced tags?
08:41duck1123we have to be careful not to mess up <foo:bar/>
08:42rhickeyduck1123: there's an old conversation about ns tags, they can be supported explicitly, i.e. :foo:bar is an ok keyword - the trick is implicit namespace contexts
08:43duck1123I haven't gotten around to doing any of the xml stuff with my project yet
08:44duck1123which is surpising considering the previous incarnation was written in xquery
08:50Lau_of_DKrhickey: wouldnt it be a good idea to include Chousers zip-filter
08:50Lau_of_DK routines in that namespace? (Im thinking of xml-> and all that)
08:51rhickeyLau_of_DK: please don't ask the same question twice, if I'm not answering it's because I'm trying to work here
08:52Lau_of_DKrhickey: Please accept my appologies. I thought that it was probably easy to miss messages in the middle of a discussion. Wont happen again.
09:19abrooksLau_of_DK: The Google Group is a good way to ask a more persistent question. It's less ephemeral, is more obvious when a question hasn't been directly addressed (because of threading) and has a larger audience. I know I personally have a gravity to IRC since it's much more interactive so I have to remind my self to consider what things should be sent to IRC and what should be sent to the group.
09:21Lau_of_DKabrooks: Very good point indeed. I've been too lazy with the group
10:19wlrmattrepl: i notice you've retracted clj-cont. are you willing to say why?
10:21mattreplbecause it was awful. I'm also not convinced that conversion to CPS is the way to go. it may be better to build support for higher-level constructs using built-in features (e.g., coroutines via agents)
10:24mattreplwlr: you're welcome to have the source, although it was my first Clojure project and it was a port of CL code. starting fresh and using idiomatic Clojure is the way to go.
10:30wlrmattrepl: thx. i made a local clone early on but it's still sitting unused. i agree about using idiomatic clojure. i was curious to see if you would gradually transform the original into idiomatic clojure.
10:33mattreplwlr: that was the plan, but no longer need continuations. it'd be a fun project though, it's one of those things that's easy to hand wave but anyone who hasn't done it before (like myself) will end up learning something
10:39wlrmattrepl: well, i have a pie-in-the-sky hope of trying to do lispy version of Constraint-Based Local Search (van Hentenryck and Michel). They use and swear by continuations for their purposes.
10:58blackdog_danlarkin, with your json lib, is it possible to add new methods to decode objects like Timestamps from a db?
10:59blackdog_i don;t think it is right now as you arn't using multimethods
10:59danlarkinblackdog_: I've given thought to that but I couldn't figure out a good way to add in a good way, but I'd like for it to be possible
11:00blackdog_ok, i guess the encode-helper is a good candidate for a multimethod ?
11:00blackdog_then one could plug in new helpers as required
11:00danlarkinwell there's two issues with that
11:00blackdog_that's my understnading
11:00blackdog_ok
11:01danlarkinone is that in my testing I found multimethods to be slightly slower than the cond, which would be OK if it indeed provided extra flexibility,
11:01danlarkinbut I'm thinking that the :else could just call a multimethod that dispatches on type?
11:02blackdog_not sure, sounds reasonable
11:02blackdog_not a biggie right now just thought i'd mention it
11:02danlarkinthat's the other problem... the multimethod dispatch function has to be defined by me
11:03danlarkinthat is, the library, not the user of the library
11:03blackdog_i look at it very much like the print-method i guess, which is on type too
11:04blackdog_actually i'd like to vote for the json encoder/decoder in core
11:05danlarkinyeah maybe dispatching on type isn't horrible
11:05blackdog_i think it's a good hook for a lot of peeps
11:07danlarkinI think rich aims for clojure to have a small core
11:07blackdog_well true, but there is a vote right now as to what may be good to be included in core
11:08ChousukeI think a json encoder would be just fine in contrib
11:08Chousukecontrib is kind of semi-official anyway.
11:08rhickeyblackdog_: I think at some point Clojure will ship with contrib, so libs like that will be included in the download and jar
11:09blackdog_ah cool, that my other thought
11:09blackdog_batteries included - good plan
11:11Chousukeand I don't know how your json encoder/decoder works, but couldn't you take a dispatch function as a parameter when you create the decoder/encoder object?
11:12Chousukemaybe that's too flexible :/
11:13Chousukeor rather, instead of a dispatch function you could just take a multimethod parameter :/
11:15danlarkinI think I might like just dispatching on type better
11:16danlarkinI wanted custom dispatch for a while but after thinking about it for a while and trying a whole bunch of options I think it's too complicated and unnecessary
11:24flonk(take 100 (repeatedly (rand))), shouldnt that work?
11:24abrooksflonk: (take 100 (repeatedly rand))
11:25danlarkinblackdog_: are you using a Java decoding right now, or don't you have a need for decoding?
11:26abrooksflonk: Repetedly takes an IFn (a function). By wrapping "rand" in ()s you've invoked it and now have a Double. Does that make sense?
11:27flonk(Integer. 5.5)
11:27flonkshoulnt that worj?
11:28flonkabrooks: yes
11:29flonki want to round down anyway, so not Math/round
11:29hiredmanflonk: (int 5.5)
11:29abrooksflonk: No. Integer doesn't have a constructor that takes a Double. It takes an int or a string. You want (int 5.5)
11:29abrooksflonk: See http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html
11:30flonkis there some automatic unittestin builtin?
11:32abrooksflonk: Since 5.5 is a double, you'd have to call one of its methods (if "int" wasn't available or sufficient) : (.intValue 5.5)
11:34flonkok
11:35flonkhmm i doing a google-interview quesion/puzzle
11:35flonkgiven a funcion that returna random number between 1 and 5(int, not loat)
11:35flonkwrite a function that returns a number between 1 and 7
11:36flonkat least i got it is a return ing ints
11:36flonkfirst it seemed rather simple but ov it wasnt, my rand5 * 7 / 5 didnt return any 3 and 6s i think it was
11:38flonkand it doesnt give arnsaom distributiona t all
11:38flonk(0.7142857142857143 0.8333333333333334 1.0 1.25 1.6666666666666667 2.5 5.0)
11:38flonkanyways
11:39flonkany CS-students out there?
11:39flonkthat can point a poor little HS-student on his way?
11:39flonkwait
11:39flonkit does
11:40flonkgot something
11:50Chouseranybody have a more succint solution for: (filter identity (map #(when-not % %2) [nil nil 1 nil 1 nil] (iterate inc 0)))
11:55bradbevcan an un-patched Clojure create standalone "executables" now? Ie, java mypackage.jar -> runs Clojure code. If yes, are there docs/message posts?
11:56isidoProbably a stupid question: when I have a list and want to convert it to vector, what is the best way to do it? (into [] lst) or something else?
11:56Chousuke(vec lst) perhaps
11:57isidoChosuke, yes, that's probably better. Thanks!
12:04flonkwait im stuck, anyone good with random number generating?
12:05flonkrand5 -> (random nbr from 1 to 5)
12:05flonkhow to write rand7?
12:05flonk(random nbr from 1 to 7)
12:05flonkgiven only rand5
12:05blackdog_(rand-int 7)
12:06duck1123clojurebot: executable jar?
12:06clojurebotI don't understand.
12:07duck1123clojurebot: executable jar is http://etherplex.org/archives/50
12:07clojurebotAck. Ack.
12:10Chousukethat looks like outdated info
12:10duck1123hmm, it was just the first relevant google hit
12:12duck1123what about? http://rpdillon.googlepages.com/creatingexecutablejarswithclojure
12:14Chousukethat's the same thing isn't it.
12:14Chousukeit uses gen-and-save-class which is deprecated
12:14duck1123well I guess it is.
12:14ChousukeI just can't find the announcement for main methods in the group
12:18duck1123clojurebot: forget executable jar
12:18clojurebotExcuse me?
12:22duck1123clojurebot: clojure box?
12:22clojurebotI don't understand.
12:22duck1123clojurebot: clojure box is http://clojure.bighugh.com/
12:22clojurebotOk.
12:25Chousukeright.
12:26Chousuketo get a "standalone" clojure app you just need to defn a "-main" function in your namespace
12:26albinois clojurebox like lispbox or readylisp?
12:26duck1123that's the idea
12:27Chousukeafter that just compile the namespace and you can run java -cp clojure.jar:.classes/ your.namespace
12:27Chousukeand the -main fn will be run
12:27cooldude127wooooo
12:27Chousukeneed a recent clojure though.
12:28ChousukeI still couldn't find the google group message telling more about that but I figured out this much with a bit of experimentation
12:28hiredmanI think in the example it is "defn- -main" does -main have to use defn-?
12:28Chousukehiredman: no idea.
12:29Chousukeprobably not.
12:29ChousukeI didn't.
12:29Chousukeand it worked.
12:29hiredmangood enough for me
12:29cooldude127no that just affects whether other clojure code works
12:29duck1123clojurebot: executable jar is <reply>to get a "standalone" clojure app you just need to defn a "-main" function in your namespace. after that just compile the namespace and you can run java -cp clojure.jar:.classes/ your.namespace and the -main fn will be run
12:29clojurebotOk.
12:29hiredmanclojurebot: executable jar?
12:29clojurebotto get a "standalone" clojure app you just need to defn a "-main" function in your namespace. after that just compile the namespace and you can run java -cp clojure.jar:.classes/ your.namespace and the -main fn will be run
12:30duck1123that works
12:30Chousukethe -main fn will be run with (apply -main *command-line-args*) too
12:30cooldude127AWESOME
12:30Chousukeso if you want all command line args in a list, just (defn -main [& args])
12:31Chousukewhoops, that explanation is missing a slash
12:31Chousukehm
12:32ChousukeI'll just go an write something in the wiki about this.
12:32duck1123that'll be easier to point to
12:32ChousukeWho's the person responsible for approving edits to the wiki?
12:32duck1123is there one?
12:33Chousukeapparently.
12:33cooldude127clojurebot: executable jar is to get a "standalone" clojure app you just need to defn a "-main" function in your namespace. after that just compile the namespace and you can run java -cp clojure.jar:.classes/ your.namespace and the -main fn will be run
12:33clojurebotRoger.
12:33cooldude127shit!
12:33cooldude127i meant to make the edit first
12:33cooldude127clojurebot: executable jar is to get a "standalone" clojure app you just need to defn a "-main" function in your namespace. after that just compile the namespace and you can run java -cp clojure.jar:./classes/ your.namespace and the -main fn will be run
12:33clojurebotYou don't have to tell me twice.
12:34cooldude127clojurebot: executable jar?
12:34clojurebotexecutable jar is to get a "standalone" clojure app you just need to defn a "-main" function in your namespace. after that just compile the namespace and you can run java -cp clojure.jar:./classes/ your.namespace and the -main fn will be run
12:34cooldude127yay
12:34duck1123clojurebot: botsnack
12:34clojurebotthanks; that was delicious. (nom nom nom)
12:34Chousukeit has 8 edits pending since saturday :/
12:34cooldude127botsnack? really? lol
12:36shooveralbino: Clojure Box is inspired by the Lispbox from gigamonkeys.com. Something for new users to fire up a REPL and edit code.
12:36cooldude127yummy
12:36cooldude127is clojurebox in clojure or is it like lispbox where it packages up emacs and slime?
12:36hiredman(+ 1 5)
12:36clojurebot*suffusion of yellow*
12:37duck1123cooldude127: the latter
12:37shooverclojurebox is emacs and slime. Didn't mean to get anyone's hopes up :)
12:37cooldude127i actually would rather it be emacs and slime
12:37cooldude127emacs is my best friend
12:38cooldude127so i'm pleased
12:38duck1123I haven't gotten a chance to try it out since I'm on a linux machine. I will probably try it when I get to school later tonight
12:39hiredmanclojurebot: vim is <reply>watxh out, #who, or emacs will get you!
12:39clojurebotAck. Ack.
12:39cooldude127clojurebot: vim?
12:39clojurebotwatch out, cooldude127, or emacs will get you!
12:39cooldude127lol
12:39cooldude127who the hell wrote this thing?
12:40hiredmanclojurebot: creator?
12:40clojurebothiredman: I'll tell you who my creator is if your tell me who your creator is
12:40cooldude127damnit
12:40cooldude127clojurebot: author?
12:40clojurebotHuh?
12:40cooldude127clojurebot: tell me who made you
12:40clojurebotI don't understand.
12:41hiredmanI do it
12:41hiredmaner
12:41hiredmanI did it
12:41cooldude127lol
12:41cooldude127it's hilarious
12:41duck1123it's too bad it doesn't have an AIML interpreter
12:42Chousukethe groups are really hard to search :/
12:42ChousukeI can't find the post that introducer the main method support.
12:43Chousukedocumentation is something I hope will be in gear before 1.0 ;(
12:48duck1123Chousuke: I couldn't find it either. I searched my mail, and all I saw was the AOT thread, and the thread about using "/"
12:48Chousukebut I really wonder who is the "authorised user" approving changes to the book
12:49ChousukeI don't like how it is at the moment.
12:50ChousukeBut the book should really be split into multiple pages
12:53hiredmanthere was a thread on the ml about wikibooks being bad
12:54ChouserI'm not sure the AOT -main stuff was announced on the group. It may have been just here.
12:55Chouserclojurebot: main?
12:55clojurebotTitim gan ?ir? ort.
12:55Chouserclojurebot: main is http://paste.lisp.org/display/7
12:55clojurebotYou don't have to tell me twice.
12:56Chouserclojurebot: main is http://paste.lisp.org/display/70665 and http://clojure-log.n01se.net/date/2008-11-18.html#14:19
12:56clojurebotYou don't have to tell me twice.
12:56Chousermain?
12:56Chouserclojurebot: main?
12:56clojurebotmain is http://paste.lisp.org/display/70665 and http://clojure-log.n01se.net/date/2008-11-18.html#14:19
12:56hiredmanugh
12:56Chouseroh, that's all the AOT gen-class stuff.
12:56hiredmanunicode mangling
12:57ChouserI guess 'main' is in there too.
13:13hiredmanhttp://paste.lisp.org/display/7
13:14hiredmanhttp://paste.lisp.org/display/7
13:15Chousuke-main doesn't need gen-class though.
13:26Lau_of_DKGood evening gentlemen
13:31danlarkinoh herro
13:38technomancyis there any function that will partition a sequence by a predicate function instead of just partitioning it into N parts?
13:41danlarkintechnomancy: it's yours to write
13:41Chousukethere was something like partition-with in contrib I think
13:41hiredmanlike split-with?
13:41Chousukenot sure though.
13:42hiredman(doc split-with)
13:42clojurebotReturns a vector of [(take-while pred coll) (drop-while pred coll)]
13:42danlarkinthat'd do it
13:42technomancycool.
13:42technomancythanks
13:44technomancyhiredman: looks like clojurebot would be more helpful if it showed the parameter list
13:46hiredmanyeah
13:46hiredmanthere are formating issues
13:46hiredmanthe ircbot java library I am using eats anything with a newline
13:47hiredman:\
13:47Chousukeif there are any people interested in fixing the wikibook here, please do what you can
13:47waltersirritatingly BufferedReader's readLine method does that
13:47Chousukeit's in horrible state right now.
13:48Lau_of_DKCan somebody please bring me up to speed, on what the low-level difference between alter and commute is? I remember Rich mentioning some performance gain by using Commute
13:48hiredmanshit
13:48hiredmandid not mean to do that
13:50danlarkinall of our ises! :'(
13:50ChousukeLau_of_DK: commute seems to require that the function is commutative so it can avoid (b)locking more than alter does.
13:51kid_meierLau_of_DK: If you alter a ref in transaction A, and transaction B then alters the same ref, transaction A will retry
13:51kid_meierIf you use commute in both, the STM knows that the function being applied is commutative, and so neither transaction will retry.
13:51Lau_of_DKoh
13:51kid_meierbut its up to you to ensure that your function truly is commutative :)... or deal with the consequences :P
13:52Lau_of_DKAh I got it, thanks
13:52Lau_of_DKI simply misunderstood the word commute - I thought it meant to travel from A to B. But Google informs me that it means independant of order :)
13:53kid_meierhaha :) ya, not sure where the "commuter" phrase comes from
13:54Lau_of_DKDid any of you see the post in the Google Group today regarding a chat server terminal ?
13:54hiredmandanlarkin: most of them are saved
13:54Lau_of_DKThe author uses this function for the listner (forever (new-client (.accept listener))) where is forever defined?
13:55danlarkinhiredman: phew
13:56hiredmanhmmm
13:58hiredmanclojurebot: how much do you know?
13:58clojurebotI know 0 things
13:58kid_meier(doc forever)
13:58clojurebotexcusez-moi
13:59kid_meierhiredman: Is that the exception handler?
13:59Lau_of_DK(doc map)
13:59clojurebotReturns a lazy seq consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.
13:59Lau_of_DKclojurebot: arg list?
13:59clojurebotExcuse me?
13:59Lau_of_DKYoure excused
14:01hiredmanfuck
14:01hiredmanremember how I said "most of them are saved"?
14:01hiredmanthat was a lie
14:02Chouserheh
14:02Lau_of_DKhiredman: your welcome to direct your emotional outbursts to #emotionaloutburst :)
14:02hiredmantypo in the load-dicts function
14:02hiredmanopened a writer instead of a reader
14:02hiredman*poof*
14:02technomancyouch. =\
14:03technomancyall that knowledge... gone forever!
14:03danlarkinack
14:03hiredmanhe knew 30 things
14:03Chouserit's all in the irc log, in tidy "<foo> clojurebot: x is y" format
14:03hiredman!
14:05Lau_of_DKHave you guys experienced, when you do (time (map #(func) large-seq)) that the time returns after 60ms, yet the map runs for x minutes, making the result useless?
14:05ChouserLau_of_DK: yes. map is lazy.
14:06danlarkinstick it in a dorun
14:06hiredmanclojurebot: map is <reply>map is *LAZY*
14:06clojurebotOk.
14:06Lau_of_DKOh thats right Mr. Houser, thanks :)
14:07technomancyis compojure the most-used web framework for clojure, or are there other big ones?
14:08Chousertechnomancy: there is also webjure
14:09technomancythey get really creative with those names, don't they. =)
14:11hiredmanclojurebot: map?
14:11clojurebotmap is *LAZY*
14:14hiredmanhow much do you know?
14:14hiredmanuh oh
14:15Chouserclojurebot: how much do you know?
14:15clojurebotI know 19 things
14:15hiredmanduh
14:15Chouser:-)
14:15hiredmanclojurebot: hiredman is slightly retarded
14:15clojurebotRoger.
14:15Chouserclojurebot: hiredman is an evil genius.
14:15clojurebotRoger.
14:16hiredmanso many features, so little time
14:20technomancydo you have "is also" yet?
14:20kid_meierclojurebot: hiredman?
14:20clojurebothiredman is an evil genius.
14:20kid_meierneat
14:21Lau_of_DKclojurebot: (doseq [i (range 10)] (println i))
14:21clojurebotPardon?
14:21Lau_of_DK:(
14:21Chouser(+ 1 2)
14:21clojurebot3
14:21Chouser(rem 10 3)
14:22Lau_of_DKthats kinda cool
14:22Chouser(/ 10 3)
14:22clojurebot10/3
14:22Lau_of_DK(/ 10 0)
14:22Lau_of_DK:D
14:22Chouser(int 10.5)
14:22Lau_of_DKKilled by DivisionByZero! Muhahaha :)
14:22Chouser(/ 9 8 7 6)
14:22clojurebot3/112
14:22danlarkinclojurebot: where are you?
14:22clojurebothttp://gist.github.com/27733
14:23Lau_of_DKGuys I wondered about that ants.clj that Rich made. It uses an 80x80 grid if I remember correctly, and about 50 agents are running simultaneously doing simple operations. And the performance seems absolutely horrible even with 2 cores fully loaded... why?
14:24Chousercan you defined 'horrible'?
14:24Lau_of_DKlagging, 20 fps, cpu drowned... its just slow
14:25Lau_of_DKI expected a nice smooth ant colony marching around
14:28ChouserLau_of_DK: the animation is pegged at 10 fps
14:28triddellLau_of_DK: does the performance have to do with the sleep time built into the program?
14:28Chousukehiredman: did you make a list of functions to allow? :/
14:28ChouserLau_of_DK: on my dual-core laptop, the cpu runs at about 30%
14:29Chousuke(defn foo [x] (+ 1 x))
14:29Lau_of_DKreally...
14:29Chousuke(foo 4)
14:29Chousukehm, no worky :(
14:31triddellLau_of_DK: on second thought, sleep time wouldn't effect ants since you're not timing the completion of anything
14:34Lau_of_DKtriddell: Im not quite sure of all the implications of the sleep. If only the agents dont update less than the animator, it should be the animators intervals that reflects fps
14:35hiredmanChousuke: just + - / *
14:49hiredmanclojurebot: one?
14:49clojurebotone is B
14:49technomancywhy are docstrings placed before the arg list instead of after?
14:49hiredmanclojurebot: one?
14:49clojurebotone is A
14:50hiredmanclojurebot: hiredman is also slightly retarded
14:50clojurebotYou don't have to tell me twice.
14:51hiredmantechnomancy: strings are valid literals in function bodies
14:51Chousertechnomancy: because functions can have only one docstring, but can have multiple arg lists (each with its own function body)
14:51hiredman(defn a [] "foo")
14:51Chouseroh. that too.
14:52hiredmanis that a docstring? a return?
14:52technomancyChouser: ah; I haven't seen that notation yet.
14:52hiredmanclojurebot: do you know?
14:53danlarkin(+ (- (+ 1 5) 3))
14:53danlarkin(+ (- (+ 1 5) 3) 5)
14:53danlarkinclojurebot: :(
14:54hiredmanno next expressions
14:54Chousuketechnomancy: (defn foo "docstring" ([x] x) ([x & y] (+ x (apply foo y))))
14:54hiredmanand, uh, I would not do anything that adds up to more than 4
14:55Chousukeextra paren there ;/
14:55ChousukeI always miscount them
14:56technomancyChousuke: wouldn't have that problem if you used an Emacs-based IRC client. =)
14:56technomancy(that last smiley paren matched danlarkin's sad-face)
14:56technomancyChousuke: thanks.
14:57Chousuketechnomancy: yeah I tried erc once but it's no match for irssi.
14:57technomancyI guess if you like perl better than lisp. =)
14:57Chousukenah
14:57ChousukeI don't write irssi scripts.
14:58Chousukeirssi does most things I need out of the box, and the few things it doesn't, I have already solved by downloading scripts made by others.
14:58flonkis unittesting builtin?
14:58cooldude127flonk: to clojure? no
14:59flonklike with python?
14:59flonkok
14:59cooldude127i suppose you could use junit
14:59flonkok
14:59cooldude127it wouldn't be pretty
14:59technomancyit's in contrib or something though, right?
14:59cooldude127is it?
14:59cooldude127i have no idea
14:59Chousukethere's some testing stuff in contrib, yes
14:59hiredmanthere seem to be a lot of testing frameworks popping up on the ml
14:59Chouseryeah, there's much testing work going on in contrib.
14:59Chousertest-is
14:59cooldude127sweet
14:59flonkanyway i have clojure-box installed now, its great. since it has clojure-contrib can I use databases right away or do I have to install something extra?
15:00hiredmansome kind of rspec sort of thing
15:00technomancythat stuff belongs in core though; it makes me sad if people aren't encouraged to write tests by default. =\
15:00Chousukeflonk: well clojure-contrib has the sql library
15:00Chousukeflonk: you'll still need an actual *database* though.
15:02Chousukedoesn't the core include some testing support too?
15:02cooldude127i don't think so
15:03hiredmanthere is (test ...)
15:03hiredman(doc test)
15:03clojurebottest [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception
15:03technomancythere's no literal syntax for string interpolation, is there?
15:04Chousukeinterpolation?
15:04technomancyfor instance, ruby allows "two and two is #{2 + 2}"
15:04Chousukeright. well.
15:04technomancyjust use format?
15:04Chousukeunless java.util.Formatter allows something like that, no.
15:05abrooks(str "two and two is " (+ 2 2) " don't you know...")
15:06technomancyabrooks: that works; thanks
15:06Chousukeusing 'format would be more flexible though.
15:06abrookstechnomancy: Subtitute println if you actually want to print it.
15:07abrookstechnomancy: Oh, and remove the spaces...
15:07abrooks(println "two and two is" (+ 2 2) "don't you know...")
15:18hiredmanclojurebot: how much do you know?
15:18clojurebotI know 19 things
15:19cooldude127is one of those things how much you know?
15:19cooldude127lol
15:21Chouserhe actually knows lots more than that
15:21Chouser(doc count)
15:21clojurebotReturns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collections and Maps
15:21cooldude127WOW
15:21cooldude127awesome
15:21cooldude127(+ 1 2)
15:21clojurebot3
15:22cooldude127oh that is too much fun
15:22hiredmanwell, yeah
15:22kid_meier(prn "hello, world")
15:22kid_meierwhere does *out* go?
15:22cooldude127kid_meier: apparently /dev/null
15:22hiredmanok, I got the "save what you know so you do not forget it" thread running
15:23hiredmankid_meier: only simple math
15:23kid_meierI suppose thats to prevent spamming?
15:23hiredman(+ 2 3)
15:23clojurebot*suffusion of yellow*
15:23hiredmanhmmm
15:23cooldude127what's suffusion of yellow mean?
15:23hiredmanhard to say...
15:29hiredman(doc prn)
15:29clojurebotSame as pr followed by (newline). Observes *flush-on-newline*
15:38AWizzArdWhich is the "best" jvm debugger, in which I can set break points and step through my Clojure code, line by line?
15:39AWizzArdI found JSwat so far.
15:58Lau_of_DKAWizzArd: JSwat seems to be it
15:58kid_meierAWizzArd: I have not found anything that really works properly. I have not tested JSwat but clearly I need to get on that
15:59kid_meierAwhile back Rich was working on generating debug info that was similar to regular .java debug info so that vanilla java debuggers can work with clojure code.
16:00kid_meierSo... in theory other debuggers should work better than they did, but I haven't tried in awhile so I'm not sure.
16:00Lau_of_DKJSwat works quite OK, supports breakpoints and stepping. Can be quite helpful
16:00Lau_of_DKIf youre into more advanced debugging, I have no clue
16:00smeehiredman: I'm playing with your sources of clojurebot, nice work!
16:01hiredmansmee: thank you
16:02smeehiredman: did you change the pircbot implementation? I can't call .changeNick as is is declared as final and seems to be not available in the proxy?
16:02hiredmansmee: I there maybe bugs around
16:03hiredmanI change stuff in the repl and only change it in the code later
16:03hiredman(bad bad bad)
16:03smee:)
16:03hiredmanI seem to recall in the file I forgot the bot object in the changeNick call
16:03hiredman(.changeNick *bot* "foo")
16:04smeeno, no fix needed. the call doesn't seem to have any effect in my setup :(
16:04hiredmanhrm
16:05hiredmanare you connected to a server?
16:05hiredmanI think changeNick only works once you have connected
16:06smeemmh, I'll just keep experimenting... thanks
16:12hiredmanlatest clojurebot checked into the gist
16:13hiredmanincludes changes support for stuff like
16:13hiredmanclojurebot: one?
16:13clojurebotNo entiendo
16:13hiredmanclojurebot: one is A
16:13clojurebotAck. Ack.
16:13hiredmanclojurebot: one is also B
16:13clojurebotAlles klar
16:13hiredmanclojurebot: one?
16:13clojurebotone is B
16:13hiredmanclojurebot: one?
16:13clojurebotone is B
16:13hiredmanuh
16:13hiredmanmaybe I should not spam the channel with this
16:27danlarkinso no adding docstrings to a defmulti? :'(
16:30Chouserdanlarkin: sure
16:31Chouser(defmulti #^{:doc "docs for foo"} foo class)
16:31hiredmanhmmm
16:32Chouserclojurebot: defmulti doc is (defmulti #^{:doc "docs for foo"} foo class)
16:32clojurebotIn Ordnung
16:33danlarkinbut I can't use the pretty syntax for it
16:33Chouserdanlarkin: indeed.
16:33hiredmanclojurebot: defmulti doc is also ugly
16:33clojurebotIk begrijp
16:34danlarkinhaha
16:34ChouserI imagine there's a decent chance that rhickey would accept a patch that adds nice syntax for defmulti doc
16:35tWipwhat language is clojurebot speaking?
16:36hiredmanthat was German then, I think Dutch
16:37tWipwouldn't english be the most accepted language on this channel?
16:37hiredmanclojurebot: English is the Official Language of the Universe
16:37clojurebotIk begrijp
16:38cooldude127it was speaking english earlier
16:38cooldude127clojurebot: defmulti doc?
16:38clojurebotdefmulti doc is ugly
16:38cooldude127how do i get to the next part
16:38cooldude127or previous
16:38hiredmancooldude127: it is random
16:38cooldude127clojurebot: defmulti doc?
16:38clojurebotdefmulti doc is (defmulti #^{:doc "docs for foo"} foo class)
16:38cooldude127oh
17:00larrytheliquid_is there a naming convention for functions that shadow their macro counterparts?
17:01Chouserlarrytheliquid_: I've not see one. I've used foo-fn for foo a couple times. *shrug*
17:02larrytheliquid_Chouser: thx
17:16danlarkinblackdog_: I committed a custom-encode multimethod
17:27duck1123hiredman: have you thought about giving clojurebot the "tell" functionality
17:27duck1123phenny, in #swig has that and it's quite useful
17:29hiredmanyeah, I think it's not so useful
17:42blackdog_danlarkin, thanks i'll give it a shot
17:43FloxGood evening.
17:46FloxDoes anybody have any experience with JEdit plugins/modes for Clojure yet? I have tried to keep up with the channel log for a couple of weeks now (though it's getting harder), but information on this has been scarce.
17:47blackdog_i have some stuff i worked on but it's in bad shape right now
17:48blackdog_i have syntax hilighting repl that's throwing exceptions and a ripped of namespace tree from enclojure
17:48blackdog_if you want to work on it, i'll give you a copy :)
17:48blackdog_i started using emacs
17:49FloxYes, I have seen your announcements on the channel and on the group - and have just seen that there are some others mentioned (since Nov 5).
17:49blackdog_if you're interested to make it better, i'll send you what i have
17:50blackdog_actually I'll upload what I have right now to google groups
17:50blackdog_i've been meaning to
17:51FloxThanks! That's what I just wanted to ask for...
17:51hiredmanclojurebot: vim?
17:51clojurebotI don't understand.
17:51hiredmantouche
17:52Hunemacs already features that (besides being small)
17:52Hunand... why do you need highlighting for a lisp?
17:52Chouserblackdog_: that's written in Java, riht?
17:52blackdog_jedit yes
17:52FloxI'd really like to go for a pure Java solution.
17:52blackdog_it's very good actually
17:53blackdog_generally
17:53blackdog_i did quite a lot on it, i just can't countenance 60mb for an editor image
17:55blackdog_but the good thing it's a heck of a lot simpler than netbeans
17:56FloxI tried chimp/gorilla (since I am more of a vim guy), but the combination is not light weight enough for me - you cannot just put it into a single directory - or even a jar file and be happy...
17:58blackdog_clj-edit.tar.gz is uploaded,
17:58hiredmanclojurebot: anonymous functions is <reply>anonymous functions are functions with no names
17:58clojurebotAlles klar
17:58Flox:-)
18:00Huni always found it weird to think this way... i mean, named functions are more special cases of anonymous functions than the other way round
18:01hiredmanYes
18:01cooldude127mhm
18:01cooldude127we're too keen on naming everything
18:01Hunbut the notion of functions as named thingies seems so inbound that one can only talk in this backwards way to explain it
18:02hiredmanthis haskell guy on the ml, asks if clojure can do anonymous functions, then in his haskell example proceeds to name the function
18:02cooldude127hiredman: link?
18:02hiredmanclojurebot: group?
18:02clojurebotHuh?
18:02hiredmandamn it
18:02hiredmandidn't I fix you?
18:02cooldude127lol
18:03cooldude127is clojurebot written in clojure?
18:03hiredmanyes
18:03technomancycooldude127: of course!
18:03cooldude127yay
18:03hiredmanclojurebot: how much do you know?
18:03clojurebotI know 24 things
18:03technomancyhiredman: why are you always using the <reply> syntax when teaching clojurebot?
18:03hiredmanclojurebot: group is http://groups.google.com/group/clojure/
18:03clojurebotRoger.
18:04hiredmantechnomancy: <reply> means leave out the is
18:04hiredmanclojurebot: group?
18:04clojurebotgroup is http://groups.google.com/group/clojure/
18:04technomancyhiredman: right, but you did stuff like map is <reply>map is LAZY.
18:04hiredmanand #who gets replaced with the nick of whoever is speaking to the bot
18:04hiredmanuh
18:04hiredmanmy mistake?
18:05hiredman*shrug*
18:05technomancyoh, right; heh.
18:05hiredmancooldude127: http://groups.google.com/group/clojure/browse_thread/thread/3ccb40bcb1a0f797
18:05cooldude127hiredman: yeah i found it
18:05cooldude127i'm gonna reply
18:08Chousukeoh meh, you beat me to it. :p
18:09technomancyI can't be the only one having trouble keeping Chousuke and Chouser apart, can I?
18:09Chousukeno.
18:09danlarkinnope
18:10technomancyI guess I can't complain since I hang out in a channel with a guy called technoweenie... I know how it is. Tab completion causes mistakes...
18:10Chousukewell
18:10hiredmanirssi has given both of them the same color nicks
18:10hiredmannot helping
18:11Chousukeat least we're not as bad as drewc and drewr-`
18:11technomancythat's pretty bad
18:11technomancyhiredman: see, if you were using Emacs, you could rewrite the nick coloring function in Lisp to pick very distinct colors for similar-looking nicks. =)
18:11Chousukabetter?
18:12cooldude127wow that haskell dude got a barrage of the same damn posts
18:12Chousukeno :(
18:12Chousukeheh
18:12drewc:)
18:13hiredmantechnomancy: well, the nickcolor thing is a script add on for irssi, so I could rewrite it
18:13hiredmanbut it is in perl, so, uh, no?
18:13technomancyhiredman: exactly. =)
18:13larrytheliquid_is there a way to get the "name" of a struct map instance?
18:13hiredmancause elisp is so much better then perl
18:13technomancythough maybe once you get used to Clojure, writing elisp is just as bad
18:13technomancydoh
18:14Chouserlarrytheliquid_: no
18:14hiredmanlarrytheliquid_: sounds like you want a type, and all structmaps are of the structmap type, so you are going to need to use type tags
18:14Chouserlarrytheliquid_: that's sort of an 'implementation detail'
18:15Chouserwell, either a type tag (which usually implies meta-data) or just another key in your structmap, :type
18:19hiredmanlisppaste8: url
18:19lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
18:19hiredman(((partial comp (partial + 1)) (partial + 2) (partial + 3))) <- my poor head
18:22Chousukeheh
18:23Chousukedoes that return 6?
18:23hiredmanyes
18:23Chousukepretty evil though.
18:23hiredmanI think some was asking about accumulators last night
18:24cooldude127that's just brutal
18:24hiredmanclojurebot: accumulator is (((partial comp (partial + 1)) (partial + 2) (partial + 3)))
18:24clojurebotOk.
18:24hiredmanwell you just wrap it in a macro or something
18:24hiredmanbut yeah
18:24hiredmanouch
18:28hiredmanclojurebot: accumulator is (((partial (partial comp (partial + 1)) (partial + 2)) (partial + 3))
18:28clojurebotYou don't have to tell me twice.
18:28hiredmanyeah I do
18:58technomancyI'm reading a tutorial that says there's no function in clojure to download the contents of a URL and return a string. is this still true?
18:59AWizzArdtechnomancy: yes, because that is not needed, as this functionality is already available in the jvm
19:00whotheheckami_AWizzArd: and that method call would be...?
19:00AWizzArdxlightweb.sourceforge.net
19:01technomancyAWizzArd: he builds such a function in the tutorial by calling Java code, it just seems like an obvious candidate for inclusion in clojure
19:02technomancyand using a third-party library for something as simple as this is a bit silly
19:06AWizzArdtechnomancy: what is also missing is a counter part for slurp, which reads the contents of a file.
19:07AWizzArdat least I am not aware of such a function
19:08Chousukespit exists in contrib
19:08AWizzArdI see
19:09Chousukealso, contrib has duck-streams which can be used to download URLs
19:09Chousukeas far as I know, anyway
19:27technomancycool, thanks
19:30technomancyso contrib is kind of a "proving ground" for libraries that may or may not be needed in core?
19:38mtrimpeDoes anyone here have experience with using Clojure for (purely) functional reactive programming where you basically keep a record of all the events coming in and build the UI etc. up from there so that you can replay your interaction with the system?
19:38Chousuketechnomancy: not quite.
19:40Chousuketechnomancy: some things from contrib can be included in core, but it also has libraries that will never be in core.
19:42Chousukethat doesn't mean those libraries are bad or anything though. They're just not "essential"
19:42technomancyI see.
19:42technomancydoes everything in core get loaded every time clojure is invoked?
19:43Chousukeno. core actually has several namespaces.
19:43Chousukeone of them is clojure.core :P
19:44Chousuke(only that is loaded by default)
19:45powr-tocmore of a java question this, but presumably proxies are slower than java objects with real native classes/
19:46powr-toc?
19:46Chousukehmmh
19:46Chousukeproxies are real native classes. :p
19:46powr-tocwell the proxy is... but... you know what I mean :-)
19:47Chousukewell, there's just a tiny bit of indirection. all the proxy does is forward the invocation to the appropriate clojure fn :)
19:48Chousukethat's my understanding anyway..
19:49rhickeyChousuke: yes, there is an indirection. In return you get the ability to fix/modify methods of running objects
19:50ChousukeI wonder if the JVM can optimise the indirection away if there are lots of calls to the proxy :/
19:51ChousukeI don't know what kind of tricks Hotspot is capable of, exactly. Only that it's got lots of them :)
19:52technomancythat 20GB/s story from the JVM summit was pretty amazing
19:56powr-toctechnomancy: which story's that?
19:57technomancypowr-toc: from the "clojure for lisp programmers" video
19:57technomancyrich talks about meeting a guy who has a 600-core machine optimized for the JVM
19:58technomancyhe started running a sloppy-ish clojure program on it; it generated 20GB of garbage a second, and the GC only took up 7% of the total CPU
19:58technomancyI think that was the point at which I decided to stop worrying about the JVM. =)
19:59blackdog_if you have a look at the slides off this page has more info http://blogs.azulsystems.com/cliff/2008/09/jvm-language-su.html
19:59powr-toctechnomancy: damn... that's amazing!!!! I always knew the JVM was an awesome piece of kit, but that's incredible...
20:00powr-tocnot sure what's better... the JVM or that 600-core machine... seriously, what was that?!
20:00technomancyhe didn't say much about the box
20:01blackdog_check out that link to azul systems
20:05powr-tocLooks pretty sweet... does it run on Sun's VM or a custom one?
20:05powr-tocok, it's the AVM... I wonder how bespoke that is...
23:25falconairhi folks, i'm the one spamming the group with jms/reactive/cells related posts
23:25falconairjust thought i'd introduce my self
23:26cooldude127sup falconair
23:26cooldude127i don't know shit about that stuff but hi :)
23:26falconairit cool stuff dude
23:27cooldude127enlighten me
23:27cooldude127(side note) i'm getting too dependent on tab completion. i just tried to tab complete the word enlighten. how the hell will erc know what i'm trying to say?
23:28hiredmanyou can get dictionary tab completion stuff for irssi
23:28cooldude127lol i could probably get it here too
23:29cooldude127i just haven't figured out how yet
23:29falconairwell...perhaps the simplest (but not exact) way is to think in terms of a spreadsheet (Excel)...cell A has 1, cell B has 2 and cell C has an expression (+ A B) ... C will have the sum of A and B ... if A or B changes, C will get updated
23:29cooldude127falconair: that actually is pretty cool
23:29cooldude127you have proven yourself to not be a liar
23:29cooldude127:)
23:29notallamai find myself mashing tab on msn/aim. maybe i'll have to look into actually making it do something.
23:31notallamahaving tab cycle through possible completions without moving the cursor is what would be good, i think.
23:31cooldude127yeah
23:32falconairsay I have a clojure expression in a string like "(+ 1 2)" ... how do I evaluate this expression? Using the "read" function? Another way to ask is the simplest way to build my own REPL?
23:33cooldude127falconair: eval is what evaluates expressions i think
23:33Chouserfalconair: load-string
23:33Chouser(doc load-string)
23:33clojurebotSequentially read and evaluate the set of forms contained in the string; arglists ([s])
23:33cooldude127(doc eval)
23:33clojurebotEvaluates the form data structure (not text!) and returns the result.; arglists ([form])
23:33falconairyup, works!
23:34cooldude127repl basically equates to (print (eval (read "(+ 1 2)")))
23:34cooldude127but ya know with prompts and stuff
23:34falconaircooldude127, so how does that differ from load-string? is load-string the primitive or eval?
23:34cooldude127eval is the primitive
23:35hiredman(doc load-string)
23:35clojurebotSequentially read and evaluate the set of forms contained in the string; arglists ([s])
23:35hiredmanhuh
23:35cooldude127with one s-expr they seem to be the same
23:35Chouserload-string calls read and eval for you, among other things.
23:35cooldude127oh
23:35cooldude127yeah
23:35falconairso read returns a datastructure (not text right?) and eval evaluates that data structure?
23:35cooldude127(load-string "(+ 1 2)") roughly equals (eval '(+ 1 2))
23:36cooldude127aka (eval (read "(+ 1 2)"))
23:37Chouserfalconair: yes
23:38cooldude127that is exactly how it goes
23:38falconairok, so does it make sense to wire up a JTable where each cell has a clojure expression...blah blah blah...turn it into a spreadsheet?
23:39falconair(i'll fill in the blah if required)
23:39hiredmanhuh
23:39cooldude127falconair: that could probably work
23:39cooldude127basically a spreadsheet where clojure is the language for formulas?
23:40falconairexactly...but better than normal spreadsheets...because you can define your own functions, work on more complex data structures...and not be bound by the grid
23:40hiredmanuh
23:40cooldude127i think that's pretty cool actually
23:40falconairhiredman: don't like the idea?
23:41hiredmanI don't know that anyone would use it
23:41hiredmanspreadsheet junkies have a lot invested in excel and excel style formulas, vba, etc
23:41hiredmanand programers can just use clojure
23:42cooldude127hiredman has a point
23:43hiredmanwait
23:43hiredmanvba sucks
23:43hiredmando it!
23:43cooldude127lol yes VBA does suck
23:43falconairok, here is my spreadsheet defence :) : the 'spreadsheet' programming model has some extremely interesting things to offer even elitest of language designers--if the goal of a good programming language is productivity:
23:43cooldude127athough I started programming in VBA
23:44cooldude127falconair: i think it's cool
23:44falconairI'm going to present my excel point of view any way...since clojure has greatest potential in this area:
23:44hiredmanclojurebot: emacs is <reply> uggada buggada
23:44clojurebotIn Ordnung
23:46falconairenthusiasts of REPL based languages sing the virtues of exploratory programming...the ability to test small snippets of programs as the programs grows is one of the only ways to stay sane...spreadsheets take that to the next level by allowing
23:46falconairprogrammers to edit their code AS it is running!
23:47falconairUnlike most languages or programming environments, spreadsheets are not just programs, but also user interfaces
23:47hiredmanurm
23:47falconairuh...I had more than two points but I'm forgetting them now
23:47notallamayou can't define a function in a spreadsheet?
23:47falconairby the way, for me, spreadsheets don't mean VBA, I mean purely cell based programming
23:48falconairnow, the bad parts are that you can't define a function in a spreadsheet :)
23:48falconairalso that there is one giant grid (or several giant grids)
23:48falconairwith something like clojure...function definition is not a problem (obviously)...
23:49notallamai figured you would be able to. (although that function would be named by its coordinates) i have not used a preadsheet, though.
23:49falconairinstead of a giant grid, we can provide a bunch of floating text fields (or whatever layout works better)
23:50falconairApple's new spread sheet has a concept of 'painting a grid' on the screen...having a bunch of them float next to each other...as opposed to a giant grid
23:51falconairthat's my defense of spreadsheets and (partial) motivation behind why clojure is more interesting in this respect that almost any other language (with the exception of small talk languages)
23:51falconairmeant to put a :), to clarify that I am not insane
23:52notallamai played a game. mindrover. it let you program robots by dragging wires between different components/functions. same idea? (you're directing the function's i/o basically?)
23:52falconairwell, connecting comonents by wires doesn't seem to scale very much...a few connections and you find yourself in a huge mess
23:54falconairi think such programming is most relevant when programmers have to deal with streaming data...i personally deal with stock prices...this would be incredibly useful
23:54hiredmanhah
23:54hiredmanyou are talking about yahoo pipes for clojure
23:55falconairpipes still go back to "boxes and arrows" style of programming that notallama mentioned...but they are very similar...
23:56falconairI think the only difference is that expressions should be definable syntactically rather than just through click and drag
23:57hiredman(doc ->)
23:57clojurebotThreads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.; arglists ([x form] [x form & more])