I believe James Clark, who co-designed Relax/NG, understands and programs in Lisp pretty well (as well as Haskel, Java, C and many other languages). He helped design and implement DSSSL (wikipedia article), which is based on Scheme, and led to XSLT, which he also designed.
-Don
Re:Relax NG: Design-by-Inspired-Individuals
on
Tim Bray Says RELAX
·
· Score: 1
And you consider XSD to be progress??! You sound like George W Bush trying to put a good spin on Iraq. "Mission Accomplished!"
So how to you counter Tim Bray's arguments against XSD?
-Don
Re:Relax NG: Design-by-Inspired-Individuals
on
Tim Bray Says RELAX
·
· Score: 0, Troll
Do you have any idea who you're calling a "not-invented-by-me blowhard", and what else they've invented and written? You obviously have no idea what you're talking about. Learn your history and get your facts straight, before showing yourself to be a such an ignorant blowhard. If you had a leg to stand on, you wouldn't be afraid to post under your own name, troll.
Why do you have such hard feelings about RNG? Were you on the XSD committee??! Shame on you! Yuck! Bad dog.
From: Rick Jelliffe
To: xml-dev@lists.xml.org
Date: Wed, 29 Nov 2006 12:46:06 +1100
Robert Koberg wrote:
I wonder if the people who think RNG won have "Re-elect Gore" bumper
stickers...
Maybe a better analogy would be that the people who say that XSD is
lovely is Mr Bush's "Mission Accomplished!"
Though of course there are differences between Iraq and XSD. One seems
to be about people with their own fiefdom agendas stubbornly miring us
in a quagmire, using a grabbag of thin reasons to justify it, denying
any evidence that things are not rosy, perpetually promising that things
are turning around, and enmeshing all sorts of decent people in a life
of horror, difficulty and with no confidence in accomplishing the
mission. The other is in the Middle East.
Just joking...
Rick
Maximizing Composability and Relax NG Trivia
on
Tim Bray Says RELAX
·
· Score: 4, Informative
Tim Bray is right, and he couldn't have put it better: W3C XML Schemas (XSD) suck.
The reason Relax NG is so much cleaner and more powerful than committee-designed XML Schemas, is that it's based on a sound mathematical foundation (tree regular expressions, or "hedge automata theory"). While XML-Schemas suffer from ad-hoc design, committee-burn, lack of focus, and half-baked attempts to solve too many unrelated problems.
Here's some interesting stuff from my blog about the design and development of Relax NG.
First, a little digression. In general, I have made it a design
principle in TREX to maximize "composability". It's a little bit hard
to describe. The idea is that a language provides a number of different
kinds of atomic thing, and a number different ways to compose new things
out of other things. Maximizing composability means minimizing
restrictions on which ways to compose things can be applied to which
kinds of thing. Maximizing composability tends to improve the ratio
between functionality on the one hand and simplicity/ease of use/ease of
learning on the other.
Clark
describes the derivative algorithm's lazy approach to automaton construction:
I don't agree that <interleave> makes automation-based
implementations impossible; it just means you have to construct
automatons lazily. (In fact, you can view the "derivative"-based
approach in JTREX as lazily constructing a kind of automaton where
states are represented by a canonical representative of the patterns
that match the remaining input.)
While the Java code is quite brittle and verbose, the Haskell code is extremely flexible and concise. Haskell is an excellent design language, a vehicle for exploring complex problem spaces, designing and testing ingenious solutions, performing practical experiments, weighin
Relax NG: Design-by-Inspired-Individuals
on
Tim Bray Says RELAX
·
· Score: 3, Interesting
Relax NG is a great example of the triumph of Design-by-Inspired-Individuals vs. Design-by-Committee.
In The State of XML, Edd Dumbill explains the secret behind the success of Relax NG:
Incidentally the RELAX NG success can equally well be framed as a case of design-by-inspired-individuals vs. design-by-committee as much as it can be seen as a OASIS vs. W3C thing.
-Don
Relax NG's compact non-XML syntax
on
Tim Bray Says RELAX
·
· Score: 2, Interesting
Relax NG has a compact non-XML syntax. But C++/Java is a horrible syntax to use if you want a language to be readable and easy to understand. Since when was 17 levels of operator precedence easy to understand? Of course any good programmer always uses parenthesis to avoid ambiguity, so why should a language have 17 levels of built-in ambiguity just to make it that much easier to make hard to find mistakes?
James Clark is a fucking genius! Hes the guy who wrote the Expat XML parser, works on Relax NG, and does tons of other important stuff.
Relax NG is an ingeniously designed, elegant XML schema language based on regular expressions, which also has a compact, convenient non-xml syntax.
I totally respect the way he throws down the gauntlet on operator precedence (take that you Perl and C++ weenies!):
There is no notion of operator precedence. It is an error for patterns to combine the |, &, , and - operators without using parentheses to make the grouping explicit. For example, foo | bar, baz is not allowed; instead, either (foo | bar), baz or foo | (bar, baz) must be used. A similar restriction applies to name classes and the use of the | and - operators. These restrictions are not expressed in the above EBNF but they are made explicit in the BNF in Section 1.
You can translate back and forth between Relax NG's XML and compact syntaxes with full fidelity, without losing any important information. Relax NG supports annotating the grammar with standard and custom namespaces, so you can add standard extensions and extra user defined meta-data to the grammar. That's useful for many applications like user interface generators, programming tools, editors, compilers, data binding, serialization, documentation, etc.
Here's an interesting example of a complex Relax NG application: OpenLaszlo
is an XML/JavaScript based programming language, which the Laszlo compiler translates into SWF files for the Flash player.
The Laszlo compiler and programming tools use this
lzx.rnc Relax NG schema for the OpenLaszlo XML language.
This schema contains annotations used by the Laslzo compiler to define the syntax and semantics of the XML based programming language.
The schema starts out by defining a few namespaces:
The a: namespace defines some standard annotations like a:defaultValue, and the lza: namespace defines some custom annotations private to the Laszlo compiler like lza:visibility and lza:modifiers. Thanks to the ability to annotate the grammar, much of the syntax and semantics of the Laszlo programming language are defined directly in the Relax NG schema in the compact syntax, so any other tool can read the exact same definition the compiler is using!
To show how truly simple and elegant it is, here is the snake eating its tail: The Relax NG XML syntax, written in the Relax NG compact syntax:
# RELAX NG XML syntax specified in compact syntax.
default namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace loc
The real reason they want to use touch screen voting machines is so they can pay for all the new equipment by selling targeted ads on the touch screens. As you vote, the ads will be tailored to the demographics of the candidates you support.
I'm not arguing that anyone should be using HyperCard now, nor that it's a replacement for Cocoa. My point is that Apple had all that great stuff like HyperCard and OpenDoc in the past, and they took a big step backwards when they went to NeXTStep, whose architecture was designed 18 years ago, before the web, before XML, back when people were still arguing about Objective C -vs- C++. Third party extension and hacks aside, NeXTStep was designed a LONG time ago, and it wasn't designed to be user extensible like HyperCard (or Wikipedia, which was inspired by HyperCard).
Can you edit the user interface of a Cocoa application WHILE it's running? Hypercard and OpenDoc were designed to do that. Simply editing a resource file while the program's not running is a different thing entirely. Can you add scripts to the resource files that modify the behavior of the program? Is the system designed to support that, or are you treading on thin ice?
What planet are you from?
HyperCard has been used to develop many different applications, and has inspired a lot of other wonderful user-editable software, such as Wikipedia:
HyperCard has been used for all sorts of hypertext and artistic purposes. Before the advent of PowerPoint, HyperCard was often used as a general-purpose presentation program. Examples of HyperCard applications include simple databases, "choose your own adventure"--type games, educational teaching aids, and the first (off-line) wiki. The wiki idea originates from Macintosh HyperCard, via Ward Cunningham [1].
Due to its rapid application design facilities, HyperCard was also sometimes used for prototyping of applications, and sometimes even for version 1.0 implementations. Inside Apple, the QuickTime team was one of HyperCard's biggest customers.
Beethoven's Ninth stack
Enlarge
Beethoven's Ninth stack
A number of commercial software products were created in HyperCard, most notably the original version of the interactive game narrative Myst, the Voyager Company's Expanded Books, and multimedia CD-ROMs of Beethoven's Ninth Symphony CD-ROM, the Beatles' A Hard Day's Night, and the Voyager MacBeth.
The prototype and demo of the popular game You Don't Know Jack was written in HyperCard.
Activision, until that time primarily a game company, saw HyperCard as an entry point into the business market. Changing their name to Mediagenic, they published several major HyperCard based applications, most notably Danny Goodman's Focal Point, a personal information manager, and Reports For HyperCard, a program by Nine To Five Software that allowed users to treat HyperCard as a full-fledged database system with robust information viewing and printing features.
The HyperCard-inspired SuperCard for a while included the "Roadster" plugin that allowed stacks to be placed inside Web pages and viewed by browsers with an appropriate browser plugin. There even was a Windows version of this plugin allowing computers other than Macintoshes to use the plugin.
My point is, that NeXTStep / Cocoa is NOT among the wonderful user-editable software inspired by HyperCard. At this point, it's an old, obsolete architecture (just like HyperCard is now). It is limited to only developers editing the user interface. It does not support run-time scripting and user interface building and customization like HyperCard and OpenDoc did.
You can certainly learn the value of the platform without paying for a seminar. The development platform is free since it's open source, and it doesn't cost anything to read the online documentation,
the wiki,
and get involved with the community.
Of course there are differences between the capabilities of different platforms. OpenLaszlo is most mature on Flash, which runs identically on all platform and browsers, and has great graphics and multimedia capabilities. The DHTML/JavaScript version of OpenLaszlo runtime relies on the Dojo Toolkit JavaScript AJAX library to achieve cross-browser compatibility. The J2ME version of OpenLaszlo uses the Rhino JavaScript interpreter, and its own graphics library, but it's only in the early development stages.
There's an Eclipse based IDE for OpenLaszlo (developed by IBM), and some tools for Emacs as well.
OpenLaszlo inherits the limitations of the delivery platform, so there are some limitations that apply to Flash and other limitations that apply to DHTML. But the API is purposefully designed to hide the differences between platforms, instead of exposing platform specific APIs directly (like the way Adobe's FLEX is designed to lock you into Flash).
Using XML micro-formats is a more dynamic and flexible approach than persistent objects.
Your data is much too important to tie it directly to the internal implementation of one particular version of one particular class.
The approach that OpenLaszlo takes is XML data binding and declarative constraints. You design XML "micro formats" for your data, and then you can write many different views and editors of the same data, by binding different OpenLaszlo classes to the XML data with XPath constraints and JavaScript expressions. (As well as methods and event handlers written in JavaScript, declared in XML).
That way you can have many different viewers and editors that are compatible with the same XML data, and you can use constraints and JavaScript to bind and tailor off-the-shelf and custom widgets together with the XML data. JavaScript constraints are automatically updated when the values they depend on are changed. The two-way XPath data binding between the XML and the OpenLaszlo objects automatically updates the XML and all other views bond to the same data.
It's not just old-school cargo-cult MVC. OpenLaszlo uses a more powerful, general purpose, easier to use approach: data binding (XPath), declarative constraints (JavaScript), with a prototype based class system.
OpenLaszlo is a great way to write "AJAXian" dynamically downloaded componentized data driven applications, that run in the Flash player and DHTML/JavaScript browsers (and eventually the J2ME Java VM).
For many years, I've been building distributed data driven scriptable user interfaces, and evangelizing what's now called the "AJAX" architecture. Here are some old articles I wrote about X, NeWS and TCL in the 80's and 90's.
Note that in this context "server" means window server (your desktop: once called the window server, now called the browser client), not web server (the remote system running the application: once called the application client, now called the web server).
From: Don Hopkins (don@brillig.umd.edu)
Date: Tues, Sep 19 1989 8:08 am
Groups: comp.windows.x
I think it's a pretty good idea to have the window manager, or some
other process running close to the server, handle all the menus.
Window managment and menu managment are separate functions, but it
would be a real performance win for the window and the menu manager to
reside in the same process. There should be options to deactivate
either type of managment, so you could run, say, a motif window
manager, and an open look menu manager at the same time. But I think
that in most cases you'd want the uniform user interface, and the
better performance, that you'd get by having both in one process.
I think it would be possible to implement something like this with the
NDE window manager in X11/NeWS. It's written in object oriented
PostScript, based on the tNt toolkit, and runs as a light weight
processes inside the NeWS server. This way, selecting from a menu
that invokes a window managment function only involves one process
(the xnews server), instead of three (the x server and the two
"outboard" managers), with all the associated overhead of paging, ipc,
and context switching.
Here's a message on a related subject that I sent to xpert a couple
years back (before I'd heard of the ICCCM). I never did get much
response, except that one person pointed out that that was precisely
the problem that NeWS was designed to solve.;-)
c(-; Once were done forging the menu manager standard, how about we
do text editors, huh?)
-Don
Date: Mon, 23 Feb 87 18:31:00 EST
From: Don Hopkins don@brillig.umd.edu
To: ru...@ucbvax.berkeley.edu
Cc: xpert@athena.mit.edu
Subject: Uwm extensions, perhaps?
Date: 23 Feb 87 19:44:43 GMT
From: ru...@ucbvax.berkeley.edu (Rusty Wright)
Marvin Solomon writes:
What's the solution? I think it is to get rid of the idea of window
manager as a separate process, and build "window-manager" functions
into all windows.
That scares me. Wouldn't we then have the problem that suntools has
where the suntool binaries are huge? On my sun 3/50 the suntools
program itself is 728 blocks and the various other tools that run
under suntools are 952 blocks. Yuck.
How about setting up some sort of standard? For example, all window
managers must use control+shift when the mouse is in a window or an
icon, and when it's in the background the control+shift is optional.
rusty c. wright
r...@weyl.berkeley.edu
I see just the same problem with XToolKit. I would like to see the
ToolKit as a client that you would normally run on the same machine as
the server, for speed. Interactive widgets would be much more
interactive, you wouldn't have to have a copy of the whole library in
every client, and there would be just one client to con
HyperCard was originally released with System Software 6 in 1987.
HyperCard was more advanced than NeXTStep in 1987, and in many important ways it is still is more advanced than Cocoa in 2006. In all the 18 years since the release of NeXTStep, it STILL does not let users edit their user interfaces the way HyperCard did. It has none of the user-customizable run-time flexibility, which was one of the most important features of HyperCard: it enabled anyone (even kids) to construct their own user interfaces.
Even OpenDoc (from 1992) and Cyberdog (from 1996) let users edit their own interfacs at run-time.
The technology behind Apple's Cocoa is old an outdated, and unimpressive and unimaginative compared to older but more advanced technologies that Apple dumped and forgot about.
Here's what your glorious Christian leader Ted Haggard had to say about Arrogance. Preacher, heal thyself.
Ted Haggard: But you see, you do understand, you do understand that this issue right here, of intellectual arrogance, is the reason why people like you have a difficult problem with people of faith. I don't communicate an air of superiority over the people because I know so much more, and if you only read the books I know, and if you only knew the scientists I knew, then you would be great like me. Well, sir, there could be many things that you know well. There are other things that you don't know well. As you age, you'll find yourself wrong on some things, right on some other things. But please, in the process of it, don't be arrogant.
I'd say it's pretty arrogant of you to proclaim that gays are sinners, and to condemn the "homosexual lifestyle".
Especially since you pay to suck gay hooker cock an snort crystal meth yourself.
Arrogant Christians who think they know what's right for other people, and like to tell people how to run their lives and call them names and say they're going to hell, should Shut the Fuck Up.
Will you please explain why you publically claim that gays are "sinners", and why you condemn the "gay lifestyle"? What proof do you have? What stake do you have in this? Why do you care if gays get married?
Answer this simple question: What would you do if your kids turn out to be gay: Would you stop hating gays, or would you start hating your kids?
If you can't justify and won't stand by your hate speech, then SHUT THE FUCK UP.
The reason you're afraid to discuss your beliefs is because you know they are wrong.
If you think you have a leg to stand on, then please explain why you hate gays, and shoot your mouth off in public by saying gays are sinners and condemning their so-called "lifestyle".
YOU are the one who started with the hate speech. Now the ball is in your court to justify what you've said. And you're too much of a chicken shit to stand up for what you believe in.
It's bizarre that the you, the person spreading hate speech, would accuse me of hating people.
I'm just telling you to Shut the Fuck Up with your hate speech against gays. Understand? It's UNACCEPTABLE.
You are afraid to answer my question: What would YOU do if your kids turned out to be gay?
Would you stop hating gays, or would you start hating your kids?
Since you are prejudiced against gays, and publically call them sinners and condemn their so-called "gay lifestyle", you certainly have a lot in common with the religious right. If it walks like a duck, and quacks like a duck, it's a duck.
Since you choose not to believe the church's doctrine on Creationism, you're the type of Christian who cherry-picks their beliefs out of convenience. I have a lot of respect for people who are sensible enough to reject the flaws of the church and embrace its good parts. And I even have some respect for people who have chosen to take the untenable position that the bible is literally true, and can stick to their guns consistently.
But I have very little respect for any Cherry Picking Christian who's sensible enough to reject Creationism, but still chooses to believe there's something wrong with homosexuality. And I have contempt for anyone like you who tries to spread that false and malicious belief in public. You made it an issue. It's not your beliefs that are in question, it's your behavior.
Let's talk about beliefs versus actions, a distinction you seem to think is so important:
When Mel Gibson shot off his mouth about how he hates jews, he was wrong to do that (although it's certainly possible tat he truly hates jews, and that's his right). When you claim that there's anything wrong with the "homosexual lifestyle" and claim that gays are sinners, you are wrong. Both of you need to drink a big mug of shut-the-fuck-up.
It's hillariously hypocritical that you would whine about your human rights to believe whatever you want being violated, if you don't believe that gays have the right to marry. Believe whatever you want, just stay the fuck out of other people's private lives.
The reason you can't convince people of the consequences of homosexuality, is that you are dead wrong. The problems you cite are common to heterosexual lifestyles too. Do you really require the "homosexual lifestyle" to be a "100% clean and safe alternative"? To what? Since when was the "heterosexual lifestyle" 100% clean and safe? Where do you live, Disneyland??! If your so-called "homosexual lifestyle" were 100% safe and clean, then would you drop your moral opposition and go gay yourself? If not, then what are your REAL reasons for opposing gays?
You've made and acted on the decision to believe AND SPREAD the church's hateful beliefs about gays. And you've also made a decision not to believe in creationism, so you're certanly not a true by-the-book Christian.
So why do you Cherry Pick hateful beliefs, so obviously false that you can't logically convince anyone you're right? You're worse than the consistent Christians w ho say they only hate gays because they take the bible literally: because for you it's a matter of choice.
Gays can't be "cured," because it's generically based and not a mental or physical disorder. (Reverend Haggard would tell you otherwise, but we all know about him now.) But you have a mental disorder can be cured, because your homophobia is a choice that you made, that you alone can change.
Just as it's not acceptable to post anti-Jewish and anti-Black slurs on slashdot or anywhere in public, it's unacceptable for you to post anti-gay slurs. You can agree with Ted Haggard, Osama bin Laden and Hitler's views on gays in the privacy of your own home, but shut the fuck up about it in public, because you're wrong and it's not acceptable.
Your tired old lines about "hate the sin but love the sinner" and "condemn the homosexual lifestyle" are no excuse for your actions. You personally are spreading the false and malicious belief that there's something wrong with being gay. You are wrong. Believe what you want, but shut the fuck up with the thinly disguised hate speech.
There is no such thing as a "homosexual lifestyle". Your fine distinction does not matter to the people who are the subject of your discrimination. By spreading your lies about gays, you're doing them damage, no matter how you rationalize it. I don't care if you learned those lies about gays from the Church, Osama bin Laden, Adolph Hitler, or if you came up with them all on your own. But the excuse that "I'm just doing what the scriptures tell me to" hold just about as much water as an Auschuitz guard saying he just did what his commander told him to. It's a bullshit excuse.
You're smart enough to reject the Church's ridiculous teachings on evolution. So you have no problem with cherry picking your beliefs as you find convenient. Then why the hell haven't you rejected their superstitious beliefs about gays, too? Is it so deeply ingrained in your psyche that you can't?
I ask again: what would you do if your kids turned out gay? Don't tell me you know they're not. Ted Haggard's parents didn't know until just recently. Maybe they won't tell you, because they know you'd reject them. Maybe you're setting your kids up for years of self hatred and internal conflict, like Haggard has gone through, which drive them into the sin of hypocracy and cheating on their wifes by sucking gay hooker cock on crystal meth, like Ted Haggard lives his life.
How do you think Ted Haggard would have turned out of his parents had been supportive about his homosexuality? A little less self-loathing and hypocritical, perhaps?
And how do you know your own kids aren't gay?
If one of your kids came out to you as gay, would you suddenly change your beliefs to conform with reality? Or would you condemn your kid's chosen lifestyle, and refuse to listen to their arguments?
I believe James Clark, who co-designed Relax/NG, understands and programs in Lisp pretty well (as well as Haskel, Java, C and many other languages). He helped design and implement DSSSL (wikipedia article), which is based on Scheme, and led to XSLT, which he also designed.
-Don
And you consider XSD to be progress??! You sound like George W Bush trying to put a good spin on Iraq. "Mission Accomplished!"
So how to you counter Tim Bray's arguments against XSD?
-Don
Do you have any idea who you're calling a "not-invented-by-me blowhard", and what else they've invented and written? You obviously have no idea what you're talking about. Learn your history and get your facts straight, before showing yourself to be a such an ignorant blowhard. If you had a leg to stand on, you wouldn't be afraid to post under your own name, troll.
Why do you have such hard feelings about RNG? Were you on the XSD committee??! Shame on you! Yuck! Bad dog.
-Don
From the xml-dev mailing list:
From: Rick Jelliffe
To: xml-dev@lists.xml.org
Date: Wed, 29 Nov 2006 12:46:06 +1100
Robert Koberg wrote:
Maybe a better analogy would be that the people who say that XSD is lovely is Mr Bush's "Mission Accomplished!"
Though of course there are differences between Iraq and XSD. One seems to be about people with their own fiefdom agendas stubbornly miring us in a quagmire, using a grabbag of thin reasons to justify it, denying any evidence that things are not rosy, perpetually promising that things are turning around, and enmeshing all sorts of decent people in a life of horror, difficulty and with no confidence in accomplishing the mission. The other is in the Middle East.
Just joking...
Rick
Tim Bray is right, and he couldn't have put it better: W3C XML Schemas (XSD) suck. The reason Relax NG is so much cleaner and more powerful than committee-designed XML Schemas, is that it's based on a sound mathematical foundation (tree regular expressions, or "hedge automata theory"). While XML-Schemas suffer from ad-hoc design, committee-burn, lack of focus, and half-baked attempts to solve too many unrelated problems.
Here's some interesting stuff from my blog about the design and development of Relax NG.
-Don
James Clark wrote about maximizing composability:
Clark describes the derivative algorithm's lazy approach to automaton construction:
The Relax NG derivative algorithm is implemented in a few hundred elegent declarative functional lines of Haskel, and also in tens of thousands of lines and hundreds of classes of highly abstract complex Java code.
Clark's Java implementation of Relax NG is called "jing", which is a Thai word meaning truthful, real, serious, no-nonsense, and ending with "ng".
Comparing the Java and Haskell implementations of Relax NG illustrates what a wicked cool and powerful language Haskell really is. The Java code must explicitly model and simulate many Haskel features like first order functions, memoization, pattern matching, partial evaluation, lazy evaluation, declarative programming, and functional programming. That requires many abstract interfaces,, concrete classes and brittle lines of code.
While the Java code is quite brittle and verbose, the Haskell code is extremely flexible and concise. Haskell is an excellent design language, a vehicle for exploring complex problem spaces, designing and testing ingenious solutions, performing practical experiments, weighin
Relax NG is a great example of the triumph of Design-by-Inspired-Individuals vs. Design-by-Committee.
In The State of XML, Edd Dumbill explains the secret behind the success of Relax NG:
-Don
Relax NG has a compact non-XML syntax. But C++/Java is a horrible syntax to use if you want a language to be readable and easy to understand. Since when was 17 levels of operator precedence easy to understand? Of course any good programmer always uses parenthesis to avoid ambiguity, so why should a language have 17 levels of built-in ambiguity just to make it that much easier to make hard to find mistakes?
-Don
From my blog: Relax NG Compact Syntax: no to operator precedence, yes to annotations!
James Clark is a fucking genius! Hes the guy who wrote the Expat XML parser, works on Relax NG, and does tons of other important stuff. Relax NG is an ingeniously designed, elegant XML schema language based on regular expressions, which also has a compact, convenient non-xml syntax.
I totally respect the way he throws down the gauntlet on operator precedence (take that you Perl and C++ weenies!):
You can translate back and forth between Relax NG's XML and compact syntaxes with full fidelity, without losing any important information. Relax NG supports annotating the grammar with standard and custom namespaces, so you can add standard extensions and extra user defined meta-data to the grammar. That's useful for many applications like user interface generators, programming tools, editors, compilers, data binding, serialization, documentation, etc.
Here's an interesting example of a complex Relax NG application: OpenLaszlo is an XML/JavaScript based programming language, which the Laszlo compiler translates into SWF files for the Flash player. The Laszlo compiler and programming tools use this lzx.rnc Relax NG schema for the OpenLaszlo XML language. This schema contains annotations used by the Laslzo compiler to define the syntax and semantics of the XML based programming language.
The schema starts out by defining a few namespaces:
default namespace = "http://www.laszlosystems.com/2003/05/lzx" .0"
namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
namespace lza = "http://www.laszlosystems.com/annotations/1.0"
The a: namespace defines some standard annotations like a:defaultValue, and the lza: namespace defines some custom annotations private to the Laszlo compiler like lza:visibility and lza:modifiers. Thanks to the ability to annotate the grammar, much of the syntax and semantics of the Laszlo programming language are defined directly in the Relax NG schema in the compact syntax, so any other tool can read the exact same definition the compiler is using!
To show how truly simple and elegant it is, here is the snake eating its tail: The Relax NG XML syntax, written in the Relax NG compact syntax:
# RELAX NG XML syntax specified in compact syntax.
default namespace rng = "http://relaxng.org/ns/structure/1.0"
namespace loc
The real reason they want to use touch screen voting machines is so they can pay for all the new equipment by selling targeted ads on the touch screens. As you vote, the ads will be tailored to the demographics of the candidates you support.
-Don
I'm not arguing that anyone should be using HyperCard now, nor that it's a replacement for Cocoa. My point is that Apple had all that great stuff like HyperCard and OpenDoc in the past, and they took a big step backwards when they went to NeXTStep, whose architecture was designed 18 years ago, before the web, before XML, back when people were still arguing about Objective C -vs- C++. Third party extension and hacks aside, NeXTStep was designed a LONG time ago, and it wasn't designed to be user extensible like HyperCard (or Wikipedia, which was inspired by HyperCard).
-Don
Can you edit the user interface of a Cocoa application WHILE it's running? Hypercard and OpenDoc were designed to do that. Simply editing a resource file while the program's not running is a different thing entirely. Can you add scripts to the resource files that modify the behavior of the program? Is the system designed to support that, or are you treading on thin ice?
-Don
What planet are you from? HyperCard has been used to develop many different applications, and has inspired a lot of other wonderful user-editable software, such as Wikipedia:
My point is, that NeXTStep / Cocoa is NOT among the wonderful user-editable software inspired by HyperCard. At this point, it's an old, obsolete architecture (just like HyperCard is now). It is limited to only developers editing the user interface. It does not support run-time scripting and user interface building and customization like HyperCard and OpenDoc did.
-Don
You can certainly learn the value of the platform without paying for a seminar. The development platform is free since it's open source, and it doesn't cost anything to read the online documentation, the wiki, and get involved with the community.
Of course there are differences between the capabilities of different platforms. OpenLaszlo is most mature on Flash, which runs identically on all platform and browsers, and has great graphics and multimedia capabilities. The DHTML/JavaScript version of OpenLaszlo runtime relies on the Dojo Toolkit JavaScript AJAX library to achieve cross-browser compatibility. The J2ME version of OpenLaszlo uses the Rhino JavaScript interpreter, and its own graphics library, but it's only in the early development stages.
There's an Eclipse based IDE for OpenLaszlo (developed by IBM), and some tools for Emacs as well.
OpenLaszlo inherits the limitations of the delivery platform, so there are some limitations that apply to Flash and other limitations that apply to DHTML. But the API is purposefully designed to hide the differences between platforms, instead of exposing platform specific APIs directly (like the way Adobe's FLEX is designed to lock you into Flash).
-Don
Using XML micro-formats is a more dynamic and flexible approach than persistent objects. Your data is much too important to tie it directly to the internal implementation of one particular version of one particular class.
The approach that OpenLaszlo takes is XML data binding and declarative constraints. You design XML "micro formats" for your data, and then you can write many different views and editors of the same data, by binding different OpenLaszlo classes to the XML data with XPath constraints and JavaScript expressions. (As well as methods and event handlers written in JavaScript, declared in XML).
That way you can have many different viewers and editors that are compatible with the same XML data, and you can use constraints and JavaScript to bind and tailor off-the-shelf and custom widgets together with the XML data. JavaScript constraints are automatically updated when the values they depend on are changed. The two-way XPath data binding between the XML and the OpenLaszlo objects automatically updates the XML and all other views bond to the same data.
It's not just old-school cargo-cult MVC. OpenLaszlo uses a more powerful, general purpose, easier to use approach: data binding (XPath), declarative constraints (JavaScript), with a prototype based class system.
-Don
OpenLaszlo is a great way to write "AJAXian" dynamically downloaded componentized data driven applications, that run in the Flash player and DHTML/JavaScript browsers (and eventually the J2ME Java VM).
For many years, I've been building distributed data driven scriptable user interfaces, and evangelizing what's now called the "AJAX" architecture. Here are some old articles I wrote about X, NeWS and TCL in the 80's and 90's. Note that in this context "server" means window server (your desktop: once called the window server, now called the browser client), not web server (the remote system running the application: once called the application client, now called the web server).
-Don
From comp.windows.x, 1989 and xpert@athena, 1987:
From: Don Hopkins (don@brillig.umd.edu)
Date: Tues, Sep 19 1989 8:08 am
Groups: comp.windows.x
I think it's a pretty good idea to have the window manager, or some other process running close to the server, handle all the menus. Window managment and menu managment are separate functions, but it would be a real performance win for the window and the menu manager to reside in the same process. There should be options to deactivate either type of managment, so you could run, say, a motif window manager, and an open look menu manager at the same time. But I think that in most cases you'd want the uniform user interface, and the better performance, that you'd get by having both in one process.
I think it would be possible to implement something like this with the NDE window manager in X11/NeWS. It's written in object oriented PostScript, based on the tNt toolkit, and runs as a light weight processes inside the NeWS server. This way, selecting from a menu that invokes a window managment function only involves one process (the xnews server), instead of three (the x server and the two "outboard" managers), with all the associated overhead of paging, ipc, and context switching.
Here's a message on a related subject that I sent to xpert a couple years back (before I'd heard of the ICCCM). I never did get much response, except that one person pointed out that that was precisely the problem that NeWS was designed to solve. ;-)
c(-; Once were done forging the menu manager standard, how about we do text editors, huh?)
-Don
Date: Mon, 23 Feb 87 18:31:00 EST
From: Don Hopkins don@brillig.umd.edu
To: ru...@ucbvax.berkeley.edu
Cc: xpert@athena.mit.edu
Subject: Uwm extensions, perhaps?
I see just the same problem with XToolKit. I would like to see the ToolKit as a client that you would normally run on the same machine as the server, for speed. Interactive widgets would be much more interactive, you wouldn't have to have a copy of the whole library in every client, and there would be just one client to con
HyperCard was originally released with System Software 6 in 1987.
HyperCard was more advanced than NeXTStep in 1987, and in many important ways it is still is more advanced than Cocoa in 2006. In all the 18 years since the release of NeXTStep, it STILL does not let users edit their user interfaces the way HyperCard did. It has none of the user-customizable run-time flexibility, which was one of the most important features of HyperCard: it enabled anyone (even kids) to construct their own user interfaces.
Even OpenDoc (from 1992) and Cyberdog (from 1996) let users edit their own interfacs at run-time.
The technology behind Apple's Cocoa is old an outdated, and unimpressive and unimaginative compared to older but more advanced technologies that Apple dumped and forgot about.
-Don
Maybe the Rapture already happened -- but nobody noticed, because there weren't any Good Christians left.
If Christians really listened to Jesus, they would never vote Republican, hate gays, oppose gay marriage, nor support the war in Iraq.
-Don
Yeah - Jesus will return, and all the good Christians will be raptured to heaven.
-Don
Here's what your glorious Christian leader Ted Haggard had to say about Arrogance. Preacher, heal thyself.
I'd say it's pretty arrogant of you to proclaim that gays are sinners, and to condemn the "homosexual lifestyle". Especially since you pay to suck gay hooker cock an snort crystal meth yourself.
Arrogant Christians who think they know what's right for other people, and like to tell people how to run their lives and call them names and say they're going to hell, should Shut the Fuck Up.
-Don
Will you please explain why you publically claim that gays are "sinners", and why you condemn the "gay lifestyle"? What proof do you have? What stake do you have in this? Why do you care if gays get married?
Answer this simple question: What would you do if your kids turn out to be gay: Would you stop hating gays, or would you start hating your kids?If you can't justify and won't stand by your hate speech, then SHUT THE FUCK UP.
-Don
The reason you're afraid to discuss your beliefs is because you know they are wrong.
If you think you have a leg to stand on, then please explain why you hate gays, and shoot your mouth off in public by saying gays are sinners and condemning their so-called "lifestyle".
YOU are the one who started with the hate speech. Now the ball is in your court to justify what you've said. And you're too much of a chicken shit to stand up for what you believe in.
-Don
It's bizarre that the you, the person spreading hate speech, would accuse me of hating people. I'm just telling you to Shut the Fuck Up with your hate speech against gays. Understand? It's UNACCEPTABLE.
You are afraid to answer my question: What would YOU do if your kids turned out to be gay? Would you stop hating gays, or would you start hating your kids?
-Don
You wrote: Me personally I think we will find out when we die, God will give us what we want. And that is the horror of it all.
Well then you have a surprize waiting for you, because if Adolph Hitler wanted to be God when he died, then God isn't who you think he is.
Boy, that belief must make you feel smug and secure. While you're at it, why don't you wish for a pony, too?
-Don
Since you are prejudiced against gays, and publically call them sinners and condemn their so-called "gay lifestyle", you certainly have a lot in common with the religious right. If it walks like a duck, and quacks like a duck, it's a duck.
-Don
Since you choose not to believe the church's doctrine on Creationism, you're the type of Christian who cherry-picks their beliefs out of convenience. I have a lot of respect for people who are sensible enough to reject the flaws of the church and embrace its good parts. And I even have some respect for people who have chosen to take the untenable position that the bible is literally true, and can stick to their guns consistently.
But I have very little respect for any Cherry Picking Christian who's sensible enough to reject Creationism, but still chooses to believe there's something wrong with homosexuality. And I have contempt for anyone like you who tries to spread that false and malicious belief in public. You made it an issue. It's not your beliefs that are in question, it's your behavior.
Let's talk about beliefs versus actions, a distinction you seem to think is so important: When Mel Gibson shot off his mouth about how he hates jews, he was wrong to do that (although it's certainly possible tat he truly hates jews, and that's his right). When you claim that there's anything wrong with the "homosexual lifestyle" and claim that gays are sinners, you are wrong. Both of you need to drink a big mug of shut-the-fuck-up.
It's hillariously hypocritical that you would whine about your human rights to believe whatever you want being violated, if you don't believe that gays have the right to marry. Believe whatever you want, just stay the fuck out of other people's private lives.
The reason you can't convince people of the consequences of homosexuality, is that you are dead wrong. The problems you cite are common to heterosexual lifestyles too. Do you really require the "homosexual lifestyle" to be a "100% clean and safe alternative"? To what? Since when was the "heterosexual lifestyle" 100% clean and safe? Where do you live, Disneyland??! If your so-called "homosexual lifestyle" were 100% safe and clean, then would you drop your moral opposition and go gay yourself? If not, then what are your REAL reasons for opposing gays?
You've made and acted on the decision to believe AND SPREAD the church's hateful beliefs about gays. And you've also made a decision not to believe in creationism, so you're certanly not a true by-the-book Christian.
So why do you Cherry Pick hateful beliefs, so obviously false that you can't logically convince anyone you're right? You're worse than the consistent Christians w ho say they only hate gays because they take the bible literally: because for you it's a matter of choice.
Gays can't be "cured," because it's generically based and not a mental or physical disorder. (Reverend Haggard would tell you otherwise, but we all know about him now.) But you have a mental disorder can be cured, because your homophobia is a choice that you made, that you alone can change.
Just as it's not acceptable to post anti-Jewish and anti-Black slurs on slashdot or anywhere in public, it's unacceptable for you to post anti-gay slurs. You can agree with Ted Haggard, Osama bin Laden and Hitler's views on gays in the privacy of your own home, but shut the fuck up about it in public, because you're wrong and it's not acceptable.
-Don
Your tired old lines about "hate the sin but love the sinner" and "condemn the homosexual lifestyle" are no excuse for your actions. You personally are spreading the false and malicious belief that there's something wrong with being gay. You are wrong. Believe what you want, but shut the fuck up with the thinly disguised hate speech.
There is no such thing as a "homosexual lifestyle". Your fine distinction does not matter to the people who are the subject of your discrimination. By spreading your lies about gays, you're doing them damage, no matter how you rationalize it. I don't care if you learned those lies about gays from the Church, Osama bin Laden, Adolph Hitler, or if you came up with them all on your own. But the excuse that "I'm just doing what the scriptures tell me to" hold just about as much water as an Auschuitz guard saying he just did what his commander told him to. It's a bullshit excuse.
You're smart enough to reject the Church's ridiculous teachings on evolution. So you have no problem with cherry picking your beliefs as you find convenient. Then why the hell haven't you rejected their superstitious beliefs about gays, too? Is it so deeply ingrained in your psyche that you can't?
I ask again: what would you do if your kids turned out gay? Don't tell me you know they're not. Ted Haggard's parents didn't know until just recently. Maybe they won't tell you, because they know you'd reject them. Maybe you're setting your kids up for years of self hatred and internal conflict, like Haggard has gone through, which drive them into the sin of hypocracy and cheating on their wifes by sucking gay hooker cock on crystal meth, like Ted Haggard lives his life.
How do you think Ted Haggard would have turned out of his parents had been supportive about his homosexuality? A little less self-loathing and hypocritical, perhaps? And how do you know your own kids aren't gay? If one of your kids came out to you as gay, would you suddenly change your beliefs to conform with reality? Or would you condemn your kid's chosen lifestyle, and refuse to listen to their arguments?
-Don