#clojure logs

2008-02-18

09:56rhickeyAnyone try doc or find-doc in the recent SVN?
09:56rhickey(doc refer)
09:56rhickey(find-doc "lazy")
11:01ericthorsenthat's excellent !
11:20rhickeyI'm still working through adding docs from the web reference, done through Namespaces
11:33Chouserand then you can auto-generate the web reference from the doc strings.
11:33rhickeyAt least some part of it, I hope
11:34ChouserI'm finding it difficult to build an API as flexible as XPath without being at least about twice as wordy.
11:35ChouserAlthough I wonder if part of my problem is my lack of comfort with the lisp syntax.
11:36Chouserxpath is read left-to-right which I often find more comfortable that lisp's inside-out structure.
11:37rhickey.. and -> are examples of how to swap things around when it's more convenient
11:40Chouseryeah, I wrote my own thing like -> before I found yours.
11:41Chouserthat helps, but it makes me wonder if lisp people will laugh at me. :-)
11:41rhickeyI think people expect paths left-to-right
16:25jgracinrefering to non-existent package throws
16:25jgracinNPE
16:26jgracin(refer 'aoeu)
16:28rhickeyhmmm...
16:29rhickeyI'll fix
16:30rhickey(ns-publics nil)
16:33jgracinbtw, I liked the old source code formatting better. I find the new one too dispersed. Maybe the solution would be to use colors in editors to make metadata less distracting.
16:33jgracinotoh, I'm delighted with using a map for all the metadata.
16:34rhickeywhich old - prior to there being docs?
16:35jgracinno, prior to putting var name on newline, first column.
16:35jgracinafter all metadata, and lots of tabs
16:36jgracinbut I can't think of a better way.
16:37rhickeyI think having the name at the top, after defn, is going to be important, still trying out ideas there
16:38rhickeyrefer is fixed
16:39jgracincool.
16:42jgracinI think having names immediately after defns is worth making the exception.
16:43rhickeywhich exception?
16:43jgracinthe exception in handling metadata on vars
16:43jgracinputting metadata after the var...
16:44jgracinbut it's not so easy, is it?
16:44rhickeythe name isn't the var yet, it's essentially just defn syntax (defn name attrs sigs) where attrs become metadata on var
16:45rhickeynot hard
16:45rhickeybut defn-generating macros will be harder, still not hard
19:49jonathan____Hi Rich, my prototype gas nominations GUI went live across the network about an hour ago ... it's about 1900 lines of Clojure
19:49jonathan____(network = in my house)
19:50rhickeycool - what are gas nominations?
19:51jonathan____transactions on a gas pipeline ... I prototyped a caching layer for an app enhancement we are doing
19:51rhickeyvery neat
19:52jonathan____yeah, I'll try and post something up at some point ... there's no way I could have got this working this fast in any other language
19:53rhickeyThat's great! Doing UI w/Swing?
19:54jonathan____Yeah, it's a NetBeans generated, just made all the controls public ... the GUI came first, and I refactored a cache in, instead of direct to db calls
19:55rhickeyHave you found you wanted to derive from concrete classes at any point?
22:56jonathan_Hey Rich, is there anything in the pipe as far as new language features or demos?
23:01rhickeynext few things are deriving from concrete classes, maybe some relational algebra for maps, a rule system
23:03jonathan_so new class definitions? That should open up a few things
23:03rhickeymore like what implements does, but for concrete superclasses, rather than class definitions from scratch
23:04jonathan_sub classing existing objects ...
23:07jonathan_Does the relational algebra stuff have anything to do with 'throw away your boilerplate' ... which sounded pretty useful ... There's a bunch of Peyton-Jones papers on that
23:08rhickeymore like "out of the tarpit", if you've read that
23:09rhickeyweb.mac.com/ben_moseley/frp/paper-v1_01.pdf
23:09jonathan_copied, will read later, thanks!
23:20ChouserHow can I use a debugger with clojure? Will jdb work somehow?
23:21ChouserI'm getting a "Don't know how to create ISeq from arg" and I can't tell where it's coming from.
23:34jonathan_@Ch, are you in the repl
23:35Chouserno, but I could be
23:36jonathan_the backtrace usually helps me, ... but it can be pretty cryptic, what are you trying to do?
23:37ChouserYeah, it's giving me the .clj line, but I'm still not bright enough to spot the problem.
23:38ChouserI've got a macro calling a function... I may be in over my head. ;-)
23:38Chouser(defn seq-filter-expr [f s] (mapcat #(let [rtn (f %)] (if (= true rtn) % rtn)) s))
23:38jonathan_[rtn]
23:39ChouserThat's my function, the error is on the mapcat. But which means I suspect the s ...
23:39Chouserwhat?
23:40jonathan_return a list from mapcat ... I think
23:40jonathan_ISeq from arg means it wants a sequence
23:40Chouserright
23:40Chouseroh!
23:40jonathan_I did the same bug, but not in a macro
23:41Chouserof course you're right. thanks!
23:41jonathan_No sweat
23:41Chousersheesh. I've done the same bug in this same codebase.
23:41ChouserMaybe I can blame it on the flu.
23:42jonathan_Hey, I have the flu too!!! I stayed home and prototyped code
23:43Chouserheh
23:44Chouserlisp's not quite a cure, but it helps pass the time...
23:46jonathan_I find all the Hindley-Milner stuff really hard ... most of my Clojure stuff just works
23:47jonathan_(looks at stack of unread books on Haskell, F# etc)
23:50Chouserhm. Well, I was having pretty good success with Scala...
23:50ChouserBut I was getting a bit tired of saying everything twice, once in computation and once in type syntax.
23:52jonathan_ohhh ... that's ugly, all my ML programs looked worse than VB
23:52jonathan_produce any useful programs with it ?
23:53Chouserwell, i've been using the projecteuler.net problems as a means to dabble in some new languages.
23:54ChouserSo yeah, I've got a couple dozen small working scala programs.
23:55jonathan_cool, that looks pretty neat
23:56ChouserYeah, they're fun in their own right, but it's a great way to dig into a language. Nice simple problems that don't require deep knowledge of support libs
23:56Chouserwell, not that the problems are easy, but the resulting programs are simple.
23:57jonathan_Yes, people used to just have basic
23:58jonathan_programmers seem to have got worse, if the quality (lack thereof) of mS Word is anything to go by
23:59Chouserwell, I think it's pretty rare for any big company to produce quality software.