Speaking of "walking/filtering code," what about walking _actual_ code?

The only thing off the top of my mind would be an example of, say, a "Hello
World" function, but with the code represented as a JTree.  Say, in the
function (pr (.toLowerCase "Hello World")), you'd see .toLowerCase as a
node.  You'd click on the node to edit it and enter .toUpperCase.

After showing people the "HELLO WORLD," you could show them how the JTree
used a zipper (or some similar walking tool) to edit the datastructure.
This shows how a textual .clj file is only one of the possible
representations of the datastructure, code is data, data is code, etc. etc.

Even better, the JTree could be editing a live program... Or the program
running the JTree itself! :)

This doesn't have to be the actually example used.  Someone else might be
able to come up with something more practical, ideally implementing some of
the xml stuff you were talking about.

However, I can tell you that from my perspective, this whole "code is data"
thing was a bit of an epiphany for me when I realized it allowed for things
like in the example above.  (And it's thanks to Clojure that I took the dive
into lisp.)  I think something like this might have some jazz to it.  Not
sure the other languages can play the same tune.  (correct me if I'm wrong)

Regards,

On Thu, May 21, 2009 at 11:43 AM, Rich Hickey <richhic...@gmail.com> wrote:

>
>
>
> On May 21, 10:38 am, Chas Emerick <cemer...@snowtide.com> wrote:
> > I'm guessing glitz and visual impact is what's going to wow the crowd,
> > especially in that environment, where it's likely that most people are
> > steeped in "business applications".
> >
> > Perhaps using one of the clojure-processing wrappers to do some
> > outrageously-slick data visualization, and then showing how little
> > code is required to do it and how much leverage the language provides
> > when addressing changes in requirements?  Maybe the slick visual
> > impact part can be merged with the "business application" mindset by
> > generating a report that includes the data visualization (I think PDF
> > generation is built into processing).
> >
>
> Last year the JRuby demo was a fancy graphics thing that utilized the
> motion sensor in the laptop + OpenGL or something. It really said
> little about JRuby (IMO), other than that being on the JVM lets you
> reach these libs, and perf was good enough.
>
> I'd like to do something modest but distinguishing. I have a vague
> notion of showing some Clojure data originating in some XML off the
> web, being passed to some filtering/walking code, getting displayed,
> stored in a DB, all without specific DOM/model/recordset APIs, a
> couple of lines for each task. This demonstrating the difference of
> not being OO - using generic abstract data types like maps everywhere.
>
> Help wanted in implementing some demo code.
>
> Rich
>
> >
>


-- 
John

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to