#clojure log - Feb 18 2008

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

9:56 rhickey: Anyone try doc or find-doc in the recent SVN?

9:56 (doc refer)

9:56 (find-doc "lazy")

11:01 ericthorsen: that's excellent !

11:20 rhickey: I'm still working through adding docs from the web reference, done through Namespaces

11:33 Chouser: and then you can auto-generate the web reference from the doc strings.

11:33 rhickey: At least some part of it, I hope

11:34 Chouser: I'm finding it difficult to build an API as flexible as XPath without being at least about twice as wordy.

11:35 Although I wonder if part of my problem is my lack of comfort with the lisp syntax.

11:36 xpath is read left-to-right which I often find more comfortable that lisp's inside-out structure.

11:37 rhickey: .. and -> are examples of how to swap things around when it's more convenient

11:40 Chouser: yeah, I wrote my own thing like -> before I found yours.

11:41 that helps, but it makes me wonder if lisp people will laugh at me. :-)

11:41 rhickey: I think people expect paths left-to-right

16:25 jgracin: refering to non-existent package throws

16:25 NPE

16:26 (refer 'aoeu)

16:28 rhickey: hmmm...

16:29 I'll fix

16:30 (ns-publics nil)

16:33 jgracin: btw, 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:33 otoh, I'm delighted with using a map for all the metadata.

16:34 rhickey: which old - prior to there being docs?

16:35 jgracin: no, prior to putting var name on newline, first column.

16:35 after all metadata, and lots of tabs

16:36 but I can't think of a better way.

16:37 rhickey: I think having the name at the top, after defn, is going to be important, still trying out ideas there

16:38 refer is fixed

16:39 jgracin: cool.

16:42 I think having names immediately after defns is worth making the exception.

16:43 rhickey: which exception?

16:43 jgracin: the exception in handling metadata on vars

16:43 putting metadata after the var...

16:44 but it's not so easy, is it?

16:44 rhickey: the name isn't the var yet, it's essentially just defn syntax (defn name attrs sigs) where attrs become metadata on var

16:45 not hard

16:45 but defn-generating macros will be harder, still not hard

19:49 jonathan____: Hi Rich, my prototype gas nominations GUI went live across the network about an hour ago ... it's about 1900 lines of Clojure

19:49 (network = in my house)

19:50 rhickey: cool - what are gas nominations?

19:51 jonathan____: transactions on a gas pipeline ... I prototyped a caching layer for an app enhancement we are doing

19:51 rhickey: very neat

19:52 jonathan____: 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:53 rhickey: That's great! Doing UI w/Swing?

19:54 jonathan____: 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:55 rhickey: Have you found you wanted to derive from concrete classes at any point?

22:56 jonathan_: Hey Rich, is there anything in the pipe as far as new language features or demos?

23:01 rhickey: next few things are deriving from concrete classes, maybe some relational algebra for maps, a rule system

23:03 jonathan_: so new class definitions? That should open up a few things

23:03 rhickey: more like what implements does, but for concrete superclasses, rather than class definitions from scratch

23:04 jonathan_: sub classing existing objects ...

23:07 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:08 rhickey: more like "out of the tarpit", if you've read that

23:09 web.mac.com/ben_moseley/frp/paper-v1_01.pdf

23:09 jonathan_: copied, will read later, thanks!

23:20 Chouser: How can I use a debugger with clojure? Will jdb work somehow?

23:21 I'm getting a "Don't know how to create ISeq from arg" and I can't tell where it's coming from.

23:34 jonathan_: @Ch, are you in the repl

23:35 Chouser: no, but I could be

23:36 jonathan_: the backtrace usually helps me, ... but it can be pretty cryptic, what are you trying to do?

23:37 Chouser: Yeah, it's giving me the .clj line, but I'm still not bright enough to spot the problem.

23:38 I've got a macro calling a function... I may be in over my head. ;-)

23:38 (defn seq-filter-expr [f s] (mapcat #(let [rtn (f %)] (if (= true rtn) % rtn)) s))

23:38 jonathan_: [rtn]

23:39 Chouser: That's my function, the error is on the mapcat. But which means I suspect the s ...

23:39 what?

23:40 jonathan_: return a list from mapcat ... I think

23:40 ISeq from arg means it wants a sequence

23:40 Chouser: right

23:40 oh!

23:40 jonathan_: I did the same bug, but not in a macro

23:41 Chouser: of course you're right. thanks!

23:41 jonathan_: No sweat

23:41 Chouser: sheesh. I've done the same bug in this same codebase.

23:41 Maybe I can blame it on the flu.

23:42 jonathan_: Hey, I have the flu too!!! I stayed home and prototyped code

23:43 Chouser: heh

23:44 lisp's not quite a cure, but it helps pass the time...

23:46 jonathan_: I find all the Hindley-Milner stuff really hard ... most of my Clojure stuff just works

23:47 (looks at stack of unread books on Haskell, F# etc)

23:49 * Chouser googles Hindley-Milner

23:50 Chouser: hm. Well, I was having pretty good success with Scala...

23:50 But I was getting a bit tired of saying everything twice, once in computation and once in type syntax.

23:52 jonathan_: ohhh ... that's ugly, all my ML programs looked worse than VB

23:52 produce any useful programs with it ?

23:53 Chouser: well, i've been using the projecteuler.net problems as a means to dabble in some new languages.

23:54 So yeah, I've got a couple dozen small working scala programs.

23:55 jonathan_: cool, that looks pretty neat

23:56 Chouser: Yeah, 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:56 well, not that the problems are easy, but the resulting programs are simple.

23:57 jonathan_: Yes, people used to just have basic

23:58 programmers seem to have got worse, if the quality (lack thereof) of mS Word is anything to go by

23:59 Chouser: well, I think it's pretty rare for any big company to produce quality software.

Logging service provided by n01se.net