Sunday, October 30, 2005

A Linguistic View of the Semantic Web?

Danny Ayers considers alternatives to the current set of ideas known as "The Semantic Web". How else might we evolve a better web. What would it be a web of?

Alternatives to the Semantic Web?

What follows is largely half-baked, stream-of-consciousness thoughtstuff. You've been warned.

Lately, at least in the Ruby community, there's been discussion of a language based approach to programming. Domain Specific Languages are all the rage these days. See, for example, Martin Fowler's excellent article Using the Rake Build Language. (And from RubyConf, I've now got some more reading to do on the Forth language that I successfully sidestepped during college.)

The World as Language

Now, all of this has me thinking quite a lot about the world as language. Conversations, context of a discussion, verbs & nouns as implemented in code, "executable words", etc, etc. It would make Wittgenstein proud! (Actually, it would probably make him berate me until I was reduced to an illogical quivering mass, but I'll go with "proud" just the same).

Aside: Levels of Complexity

So in the context of the Semantic Web, I'm considering an analog of the physical world where, in considering the human brain for instance, we have something like:

Physics->Chemistry->Biology->Neurophysiology->Cognitive Neuroscience

(Note that this is not meant to be at all a rigorous taxonomy, just an example.)

Each of these fields looks at the physical world at differing levels of abstraction and they are all useful. While a physicist may quip that all of biology is reducable to physics, and while that may be true, it would be a notably bad idea to fire all the biologists. Biologists discuss their world at a level of abstraction correlating to complexity of the physical world at the biological level.

So what makes us think that as we build a "Semantic Web" that we wouldn't need similar levels of abstraction?

"But XML allows markup of any concept, no matter how concrete or abstract. I think we've got it covered."

Well yes, but that statement is quite similar to the statement that biology is reducable to physics. What are those intermediate concepts (or levels of complexity)?

Another way to say this in terms of contemporary programming is as follows:

We talk about stuff and meta-stuff these days. Programming and metaprogramming. Content and metacontent. But it seems that this is a relatively simplistic view of our programs, content and by extension our world. I think we need some intermediate (meta) levels.

Back to Language

And this brings me back to the current thought. Is a linguistic view of the world useful as a conceptual building block akin to biology in our example? Or is it an optional and orthogonal way of considering the content on the Web?

Well, until the content on the web looks like pure and granular semantic markup, we're left with language as a communication platform. I can imagine content directly in the form of object structures captured in XML (or it's more readable forms like YAML - see some of my other posts) and without sentences:

  
lent:
from: Bob
to: Sally
thing:
book:
title: "A Tale of Two Cities"
id: ...


Yet even in this form, the markup carries quite a lot of linguistic baggage. 'Lent' is a verb, but it can also be considered an operation. 'from' and 'to' are prepositions, but can be considered attributes of the type or "dynamically typed object" called 'lent'. Similarly, 'book' is the object of the structure, even if it isn't a sentence, but it is also an object in the OO sense.

We can't seem to extract the 'linguistic' from the structure, which brings up another possibility: that language is (a) already considered in the notions of the Semantic Web and (b) so deeply embedded that it's there but not explicit.

So for now I leave it as an interesting question as to where language fits in to the Semantic Web. (Mostly because I need to get on with my day.)

RubyPad

So I'm doing a weird sort if integration between Ruby ("It's where objects want to be") and VoodooPad (_The_ OS X Personal Wikiware), currently called *RubyPad*.

Imagine that an IDE, and eBook and a Personal Wiki (on Speed) all got together for an orgy and had a *Freaky Voodoo Lovechild*. You can capture your thoughts and code in one place, sort of like how we have learned to co-mingle HTML and code in one place (ERb, JSP, etc.)

Presented for your consideration...




(And yes it's RubyConf, not RubyCon.. I know.. now.)

This next screenshot is - as they say - "where it's at". It's a standard page along with the results of hitting the _Magic Key_. When you press Cmd-R, you run whatever Ruby code is in the page. And it's this - and the blindingly quick SpeedWiki editing - oh, and the automatic hyperlinking to reference information - and the (pseudo)autocomplete, that makes this little fellow such an interesting Hack of Technologies.




In general though, the whole thing is fairly hard to grasp unless you're actually using it. It's research right now (and a lot of fun at that), but if you're interested, ping me (gsnider at pobox dot com) and I can send you a voodoo doc example. This is quite new, and pretty theory-laden, so I'm quite interested in feedback.

BTW, It's built on Flying Meat's "VodooPad":http://flyingmeat.com/voodoopad/, which is a wonderful OS X application - it's the "Personal Wiki on Speed" and has that 'oh so beautiful' OS X style. If the WikiWorld tickles your fancy at all - or if you're just anal about notes - I hightly recommend taking the next thirty seconds to get the demo and the next few hours after that being dazed and confused by the Wonder that is VoodooPad.

Back to RubyPad for a final thought... just keep in mind that:

* It's part of a Wiki, but one without separate edit and view modes - like a word processor with on-the-fly hyperlinks.
* You press Cmd-R to execute the code in the page
All pages can have code, though some are 'mere' documents (like the index page in the screenshot, or the pages in every wiki in existence. :)
* Navigation is weirdly simple. Think of a word (e.g. Regex) , type it, and *poof* becomes a hyperlink. You click and you're at all your notes and any ruby documentation in RubyPad for regular expressions.
* I've even got the text of Dave Thomas's Programming Ruby (v1) in there and am trying to organize it such that navigation is automatic (And Surreal).
* It's all in the phenomenology and the Gestalt, Baby! (Note to self: work on my catch phrases.)

Friday, October 28, 2005

Enterprise Ruby On Rails

Online book about deploying Rails on a large scale:

Enterprise Ruby On Rails |

Note that if you're not familar with it, this is posted using the Hieraki, which describes itself as Wiki + Hierarchy.

The command line on steroids with Rails and YAML

Here's a quickie app that I am using to play with YAML as an enhanced command line. Just as the command line is a "power user" interface, this just like a browser and a web server sending XML back and forth. Unlike XML though, YAML is very concise and results in a fairly natural presentation form. Here is a screenshot:



Now, YAML (and XML) is just a representation of a (static) object structure, so in essence, the user and the web server are communicating with a object structure. This provides a few new benefits:

(1) The yaml layout provides context to the user-server interface.

(2) You can do multiple things at once. The server can essentually ask for verification on multiple tasks, and the user can respond to those tasks _and_ specifies new commands and information to the server at once.

(3) The object structure can be "typed" to specific ruby classes, or it can map simply to hashes, ostructs, arrays, strings, numerics, etc. Using general types allows the user to actually define the object structure through use. This form of interaction is similar to the way tagging is being done to dynamically define "classes of similar things". Here though, we are extending that capability to define richer data types. (Like one might do in code with a language like Lisp.)

In general, I think this is a nice interface to have a "power user" interface that provides stateful and "conversational" form of cummunication between the user and the server.

More to come...

Metaclasses in Ruby

Hints and discussion from Why the Lucky Stiff:

SeeingMetaClassesClearly

From Java to Ruby: 10 Things Every Java Programmer Should Know About Ruby

You've heard about Ruby. You're a Java Peep. Read this article to get a grasp of the qualitative differences in the languages:

10 Things Every Java Programmer Should Know About Ruby

Thursday, October 20, 2005

TextPander: System-level predefined text snippets for your Mac

TextPander
(http://www.petermaurer.de/nasi.php?section=textpander)

Another Whooa! application for OS X.

It does tag expansion, but does it at the OS level. There is a system preferences panel that is the interface. Typing the keywords will auto expand then on the fly. many expansion are simple string replacements, though date and time expansionas are supported. It would be nice to have the ability to execute any script (including ruby) and return the result. This might allow things like code completion to be done.

In general, adding context awareness and the ability to execute anything would be nice.

It’s a beautiful example of what I have been thinking about in the way of using the full system to build an application, rather than trying to suck everthing into a “abstracted”, “change protected” and massively overcoded app.

As an example of it’s use, I use a context menu in VoodooPad to enter the crrent date and to add

"------ ----- ---- --- -- -"

The problem is that these items are on a sub-context menu. So I set up entries to replace those: ”==.” => ”
------ ----- ---- --- -- -
” “ddtt” => Tuesday; November 1, 2005 6:44 PM
plus, I added the convienient:
"uupdate" => (updated Tuesday; November 1, 2005 6:44 PM)
and now I don’t have to even right click and navigate down. It’s soo fast!

For code, I added (just as a starting point)


"cclass" =>
class XXX
def initialize(arg)
@attr = "val"
end
end

I would add similar stuff for java loops, if I typed many these days.
Best of all, it’s free.

Thursday, October 06, 2005


Collaborank, originally uploaded by -garrett.

Apparently, I'm the 813th most del.icio.us. Yay, I think.