GistTree.Com
Entertainment at it's peak. The news is by your side.

The Emacs Problem

0

Charles G. identified in an email discussion now not too lengthy ago:

Articulate mute doesn’t appear relish the beautiful language for doing text
manipulation, and nothing I’ve seen from the Emacs libraries is making
me deem any differently. It sure beats the hell out of Java
though. Presumably in some unspecified time in the future someone will write Emacs the usage of Ruby because the
embedded interpreter…

These are all big sides. I know precisely how he feels. I know
soooo precisely how Charles feels that I made up our minds to write a blog as an different
of an email answer. Because all the pieces he’s introduced up are steady,
bona-fide complications.

Articulate for Textual instruct material Processing

Let’s initiate by wrathful by the basic speak: how factual is
Articulate for text processing? That seems to be to be a worldly ask.

When we deem of “text processing”, most of us customarily deem
directly of current expressions. Unless “we” are C++ programmers,
by which case “we” relish to write 2500-line clones of the Unix ‘grep’
utility at any time when “we” must invent a text search — or so it could per chance per chance well seem,
from the candidates I’ve interviewed previously few months. Nonetheless
I deem it be protected to issue that nearly all programmers equate text processing
with current expressions.

Regexps are clearly pretty fundamental. Whenever you happen to will now not be extremely
proficient
with current expressions beautiful now, then you ought to mute
fall the entirety and race was proficient with them. I bet I take advantage of
current expressions on 350 days out of yearly: in my editor, on
the repeat-line, in my code — wherever that the usage of 1 would salvage me
time or absorb my code clearer. Oh, the draw in which it hurts to deem of all
the so-known as “programmers” available in the market who don’t know easy solutions to use
regexps. Argh. Let’s factual fall it.

Nonetheless, I learn somewhere that Lispers have regularly been a dinky bit
skeptical of current expressions, consequently of regexps are in actual fact a dinky bit
outmoded when put next with the generalized processing you have to to well be ready to invent on tree
buildings. Articulate folks build a ask to: why are you storing your files as text in
the important build? (As against storing it as Articulate.)

I dunno about you, but the important response that involves my mind is:
“duh, what about logs?” I keep in mind thinking: gosh, what a bunch of
losers; the Articulate folks don’t even know that the logs of almost all
programs are one-line entries that nearly all without speak parsed (by some distance) the usage of
regexps.

Yeah, what about logs. Those slow Lispers. Jerks. Losers.
I undoubtedly had them there.

Then I realized, no extra than three weeks ago, that in Java 1.5, my
java.util.logging output had quietly was XML. D’oh!!!
Regexps suck for processing XML. Whenever you happen to don’t know why,
please don’t uncover me that you just do now not know, or I will abominate you. Higher
to withhold restful.

Why, then, are logs switching to XML output? Effectively, er, ah, consequently of
XML offers extra extremely advantageous and generalized text-processing capabilities
than one-line log entries. I direct. I in actual fact have not pretty
gotten old to the brand new XML output structure, but I am giving it a race and
trying to learn to relish it. It be pretty verbose, which in some cases
is factual, and in others, per chance now not so factual.

Working instance:   Java stack traces in the logs have every particular particular person
stack frame entry
wrapped in its possess XML part. The stack traces
are already lengthy, but this makes them kind of crazy. Effectively, you be the
mediate. Would you comparatively have your log entries gaze relish this:

Feb 21, 2005 6: 57: 39 PM java.util.logging.LogManager$RootLogger log

SEVERE: A in actuality very awful part has came about!

java.lang.Exception

at logtest.important(logtest.java: 24)

Or relish this:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2005-02-21T18: 57: 39</date>
  <millis>1109041059800</millis>
  <sequence>1</sequence>
  <logger></logger>
  <level>SEVERE</level>
  <class>java.util.logging.LogManager$RootLogger</class>
  <method>log</method>
  <thread>10</thread>
  <message>A in actuality very awful part has came about!</message>
  <exception>
    <message>java.lang.Exception</message>
    <frame>
      <class>logtest</class>
      <method>important</method>
      <line>30</line>
    </frame>
  </exception>
</record>
</log>

I assume it kinda is dependent. If your log simplest has just a few entries,
otherwise you are factual doing like a flash-and-soiled searches, current expressions
could well even be ample. Nonetheless with a total bunch entries, XML (despite the indisputable reality that
it be five instances as verbose) becomes a terribly extremely advantageous application.

Shall we embrace, you have to to well be ready to invent XPath expressions on XML — they’re kind of
relish current expressions, but they heed the XML tree structure:
something that no regexp, irrespective of how relish, will ever be ready to
invent. With a one-line XPath expression, you per chance can (as an illustration)
capture out the total log entries which have a stack designate containing a
particular Java class (or a situation of classes). Seeking to invent
that reliably with regexps will capture you time, endurance, and
pretty a gigantic selection of auxiliary scripting. With XPath it be a snap.

(Incidentally, at the same time as you happen to will now not be already extremely proficient with XPath,
I point out you fall the entirety and race was proficient with it. Course
expressions are changing into pretty smartly-liked, and XPath is leading the pack.
They’re very extremely advantageous. Whenever you happen to don’t know easy solutions to use XPath, you can
in the waste discontinue up reinventing it badly to your XML-processing code.)

XML files additionally helps you to use XSLT transforms (or XQuery, at the same time as you happen to are
hardcore and per chance a dinky bit crazy), otherwise you have to to well be ready to merely use your
accepted SAX or DOM parser to your accepted language, and fast invent
all styles of mighty things that could well even be extremely clunky the usage of
current expressions. Clunky, nothing — you have to to well in actual fact factual be
writing your possess advert-hoc XML parser in every script. You factual
don’t must race there.

So XML is comparatively advantageous. And that kind of validates what the Articulate
folks were asserting all alongside, which is that you just in actual fact desire even your
“easy” text files to be tree-structured. In Articulate, the the same log
output could well gaze very linked to the XML:

(log
'(listing
  (date "2005-02-21T18: 57: 39")

(millis 1109041059800)

(sequence 1)

(logger nil)

(level 'SEVERE)

(class "java.util.logging.LogManager$RootLogger")

(methodology 'log)

(thread 10)

(message "A in actuality very awful part has came about!")

(exception (message "java.lang.Exception")

(frame (class "logtest")

(methodology 'important)

(line 30)))))

Effectively… linked, with the exception of for being ten instances cleaner and more straightforward to
learn. It mute has all the same metadata that the XML offers you, and
you have to to well be ready to mute course of it the usage of tools that are factual as extremely advantageous, if now not
extra so.

You would even trivially convert it to XML and use XSLT, at the same time as you happen to were
foolish ample. Nonetheless Articulate is straight executable, so you per chance can merely
absorb the heed names capabilities that automatically remodel themselves.
It might probably per chance well be loads more straightforward than the usage of XSLT, and now no more than a tenth the
size.

And to your XPath queries, effectively, there are veteran Frequent Articulate programs
that enhance them straight
on both XML and Articulate files. The
same is factual
for Device.

I construct now not care how relish your language is — C++, Ruby, Python, Java,
Perl irrespective of — I will guarantee you that although it helps
doing XPath queries on the syntax bushes for source code in that
language, which is never doubtless, I doubt very unparalleled that you just have to to well
desire to invent it. Indulge in you ever ever checked out the ANTLR or JavaCC
grammar for Java or C++? And the grammars for Python and Ruby are
nearly as complex. A requirement language cannot cloak that roughly
complexity. This can regularly be extra work to course of
the source code programmatically in syntactically complex languages.

The Textual instruct material-Processing Conundrum

So all and sundry on the earth with the exception of for the Articulate community is comparatively unparalleled
stuck with the same basic text-processing speak, which I will
summarize:

  1. You employ to have so that you just can store and course of text files.
  2. Doing this effectively requires your files to be
    tree-structured. Regexps don’t lower it for any files
    or processing that is sufficiently complex.
  3. Your simplest steady choice this demonstrate day, for most languages, is
    to use XML. It has all the finest tools and the widest
    enhance for your language.
  4. XML processing, which is intended to be easy, starts
    to was arbitrarily complex at the same time as you happen to initiate having to
    use XSLT or XQuery, or roll your possess transformations
    the usage of a SAX or DOM parser to your accepted language.
  5. Nonetheless those are your simplest alternate strategies.

In Articulate, your code is files, and your files is
code, so you per chance can have a Third choice (excluding regexps or XML)
that is now not realistically an choice in any varied language:
  you store your text files as a declare program.

Whenever you happen to merely must scan it visually, effectively, you have to to well be ready to take a seat down up for your self
in my instance above, it be more straightforward on the eyes than XML. It be additionally extra
compact, which is easier on the disks, networks, databases, and
IDEs.

Whenever you happen to employ to must demand it, you load it in and use Articulate capabilities, which
now encompass diversified flavors of path expressions, including XPath,
at the same time as you happen to relish.

And at the same time as you happen to employ to must remodel it, effectively, you have to to well be ready to write your possess
transformer, needless to claim, but it be per chance more straightforward to absorb the steady
code know easy solutions to remodel itself. After all, your transformers
will most doubtless be more straightforward to write, since they’ve all the benefits of XSLT
(i.e. transformers can themselves be auto-generated and
auto-transformed, breaking things into advantageous levels), without all the
downsides of XSLT (ugliness, surliness, no fun at parties, and loads others.)

Past Logs

Unnecessary to claim we’re now not factual talking about log files. The scenario is
even clearer for configuration files. You undoubtedly desire
them in XML, with the exception of it has the same complications, so… Hi there, wait
a minute — if your configuration file is… Articulate, then it be now not
in actuality a… configuration file anymore; it be section of your… program?
Is that beautiful?

Um, yep. You obtained it.

Your total gruesome “configuration” speak becomes extremely extra
handy in the Articulate world. No extra stanza files, apache-config,
.properties files, XML configuration files, Makefiles — all those
lame, crappy, half-language creatures that you just should were executable,
or no lower than loaded straight into your program without specialized
processing. I know, I know — all and sundry raves about the vitality of
keeping apart your code and your files. That’s consequently of they’re the usage of
languages that merely cannot invent a factual job of representing files as
code. Nonetheless it be what you in actual fact desire, or all the creepy half-languages
would now not all evolve in direction of being Turing-total, would they?

Genuinely, at the same time as you happen to suppose on code/files separation and you are
an advocate of OOP, then you are talking out of both aspect of your mouth.
If your gut response to having log entries know easy solutions to remodel or
course of themselves is “woah, that is factual low“, deem
again: you are imposing a world-glimpse on the speak that is now not
according to your notions of files encapsulation and stuffed with life objects.
This world-glimpse dates relieve to old Unix and pre-Unix days. Nonetheless
at the same time as you happen to suspect about it, there may per chance be now not any reason log entries or config files
just isn’t executable and subclassable. It might probably per chance well be greater.

And what about, oh, websites? Or observe-processor documents? Effectively, you
figure it out. Websites use HTML, which is never even extremely advantageous ample to
portray text styles, now not to mention something relish an tournament
handler. So Websites have CSS, and JavaScript, and all this varied
hooey. It be was so gruesome that folks don’t in actuality write websites
anymore, now not for manufacturing stuff. At the 2nd folks tackle the morass
of old, crufty Internet applied sciences as a kind of meeting language.
You write code to assemble your pages piecewise the usage of PHP or XML/XSLT
or Perl/Mason or Java/JSP or per chance all of them in an friendly gruesome
pipeline, which “compiles” all the draw in which down to an unreadable Internet online page structure.
Discuss about fun!

I will uncover you in all honesty: all and sundry who tries this feels pain.
And there are a lot of folks on the earth doing precisely what
I described above. Constructing manufacturing websites == pain. The arena
is gradually, very slowly, converging in direction of the usage of a diversity of
“executable XML” formats (e.g. Ant, Jelly, Cocoon) which… effectively, they
kind of ease the pain, but it get replaced with new pain: the pain of
the executable-XML language designers now not having a frigging clue what
they’re doing.

So now Ant has a macro gadget, and try/design close tags, and if-tags, and
it be gradually migrating in direction of Turing-completeness if it be now not there
already. Nonetheless it mute has all the same yucky complications it be had from
day one: properties that gaze relish variables that you just have to to well be ready to simplest situation
as soon as, and odd inconsistencies in the methodology the tags work,
and needless to claim the indisputable reality that it be automatically 10x as verbose as a
programming language consequently of it be XML. Don’t procure me low — it be
mute methodology greater than Form. Nonetheless that is now not a actually excessive bar now,
is it?

Let’s face it: a Turing-total Ant (or Jelly, or any pure-XML
processing framework) is going to be a monstrosity, consequently of it could per chance per chance well
capture years (if now not decades) for them to determine that
Turing-completeness doesn’t equal expressiveness, and they’ll
must add lexical scoping, and files forms, and a class gadget,
and top quality capabilities, and and and…

And in the discontinue, it is some distance going to mute be XML.

The Shaggy Cow

How did I procure to this point off the distinctive note of text processing? Effectively,
that is the punch line of this shaggy-dog fable: it be all text
processing! Log files, configuration files, XML files, demand strings,
mini-languages, programming languages, transformers, websites, observe
documents, the entirety… the substantial majority of your
programming work involves text processing by some capability.

What would you comparatively invent? Learn 16 varied languages and frameworks
in characterize to invent “easy” log-file and configuration-file processing?
Or factual buckle down, learn Articulate, and have all of these complications race
away without waste?

It be a rhetorical ask. The answer is patently obvious at this
point:   Articulate is sinful, and likewise you have to to well damned effectively greater
write your total code in C++ and XML and JavaScript and PL*SQL and CSS
and XSLT and current expressions and all those varied God-fearing
crimson-blooded manly patriotic all-American languages to any extent extra.
No extra of this crazy Articulate discuss, ya hear?

Welcome to my lifestyles. I am the cow in the Gary Larsen comic — the one
who seems up, shy, and says: “Hi there, wait a minute! Right here is grass!
We were drinking grass.” The quite quite loads of cows glance blankly,
munching the grass.

In actuality, I invent feel relish that cow, but I additionally feel a dinky bit relish
one of many characters in Salman Rushdie’s
Heart of the night time’s Kids.
(It be one of many most edifying fictional works ever written, and
at the same time as you happen to have not learn it, you are missing out.) There may per chance be a character
who can trot ahead and backward thru time, so he can
needless to claim watch the future. The comic part is:   all the assorted
youngsters, despite the indisputable reality that they know he can watch the future,
refuse to factor in the rest he says about it.

Yes, you are per chance boiling over with objections to my dinky
discussion above. You deem I am trivializing things, otherwise you watched
that per chance I am overstating the importance of tree-structured files
(per chance you will now not be an XML fan), or per chance you are merely exasperated at me for
causes you have to to well be ready to’t in actuality insist, varied than to issue, vaguely, that
I appear to have “Paul Graham-itis”. I heed the methodology you’re feeling.

Being ready to look on the future is truly comparatively injurious.

What About Emacs?

Inserting all ranting aside for the 2nd, let’s discuss about Charles’
2nd grief: would now not or now not it be greater if Emacs were written in Ruby?

In spite of the entirety, Emacs is designed for manipulating any faded roughly text,
now not factual tree-structured text relish XML or Articulate. And Charles was beautiful
on the designate when he acknowledged nothing in the Emacs libraries indicates that
Emacs-Articulate is terribly factual for horrifying-vanilla text manipulation.
It be missing pretty a gigantic selection of sides we have was accustomed to. Perl
has raised the bar on current/arbitrary string processing.

Though a Ruby-basically based Emacs would per chance be pretty advantageous in some
respects, I now deem (even liking Ruby as unparalleled as I invent) a Frequent Articulate
Emacs will most doubtless be even nicer. I construct now not must belabor it, consequently of at the same time as you happen to
believe me then you should no convincing, and at the same time as you happen to don’t, then you
per chance can’t be happy in any inner your capability interval of time. The
abstract is that Articulate has intrinsic, un-beatable technical benefits
stemming from its s-expression structure, and Frequent Articulate has 20+
years of maturity that give it some distance extra stability, efficiency, and
interoperability than Ruby or Python will have for a lengthy,
lengthy time (if ever.)

Effectively then, why don’t they factual convert Emacs to Frequent Articulate?

That is the rub: Emacs Articulate is even older than Frequent Articulate, and it be
obtained some dejected incompatibilities with Frequent Articulate (and Device
unparalleled extra so) that absorb porting ahead so nontrivial as to be nearing
a total rewrite.

Since Emacs is so old, there are hundreds of hundreds of traces of comparatively
effectively-debugged elisp code available in the market; it be one of many distinctive and
longest-lived commence-source capabilities, so you have to to well have a fully
big job in trying to re-put in force all of it. Most those that try
this in the waste discontinue up trying to kind a “compatibility-mode” for faded elisp
code. Guile Emacs, JEmacs and a few Frequent Articulate editors all strive
this, and none yet have succeeded at doing it effectively.

The quite quite loads of choice is to factual stay with Emacs, because it is
mute Articulate, and even has a pretty entire situation of macros that
give a wise subset Frequent Articulate’s efficiency. So it be customarily
more straightforward to hack Emacs to interoperate alongside with your language (or any
gadget, in actual fact) than it is to strive to re-put in force Emacs.

Unfortunately, this could now not in actuality be a gigantic deal if folks could well factual
race in and hack on Emacs source code and “kind things”. Shall we embrace,
I could well relish so that you just can add Perl5-appropriate current expressions, and a
reader-macro gadget to permit for raw strings (or no lower than hack in some
syntax to enhance regexps without a need to double-spoil out the entirety).

Nonetheless there are a selection of blocking off components. One is that the Emacs folks
are notoriously picky about contributions — you per chance can must present factual
paperwork asserting the work is your possess, that the FSF can use it, and loads others.
It be the basic speak that resulted in Eric Raymond’s smartly-known
“The
Cathedral and the Bazaar”
essay — GNU Emacs is the archetypal
Cathedral. So: factual luck getting your adjustments into Emacs. The Lucid
folks tried for a while, and somehow forked the code execrable to
heed XEmacs, which is a famously awful scenario.

The disadvantage of contributing extends beyond the core binary. Whenever you happen to
wished to contribute, allege, a pure-elisp String library (which Emacs
could well in actuality use), or a collections package, I am undecided you per chance can
pull it off. You will must procure it by RMS, and it seems to be comparatively
daunting. RMS is, effectively, conservative — to construct it mildly. I deem
he’s a superhero, but he doesn’t absorb it easy to contribute to Emacs.

Even though contributing weren’t this kind of pain, it be now not entirely certain to
folks that Emacs is price hacking on. It be missing many of the core
rendering-engine sides that could well absorb it in a position to doing, allege, a
Internet Browser. Getting it to the purpose where it could per chance per chance well render PostScript
seems to be an very now not doubtless job.

And a gigantic selection of newer programmers will now not be the usage of Emacs at all; they’ve been
lured away by the siren-tune of IDEs relish Eclipse, IntelliJ, Visual
Studio, etc. Emacs doesn’t have a actually comparatively face (thanks to
the easy rendering engine I mentioned above), and it undoubtedly
doesn’t have unparalleled marketing. Most programmers this demonstrate day are pretty
astonished that anyone would in actual fact mute use Emacs. In the event that they
realized how unparalleled efficiency it has, and how extremely advantageous its
extensibility model is, they’d be ten instances as astonished. It be obtained
things that Eclipse could well never have, now not in a hundred years,
and that is the explanation no exaggeration. In the event that they tried tense ample, they’d
somehow in the waste discontinue up rewriting most of it in Articulate, which will most doubtless be comparatively
ironic, all in all.

The Emacs Disaster

So! The scenario is finest described as a “predicament”. Emacs is now not
in actuality advancing, and it seems to be to be pretty a gigantic selection of work to re-put in force
it in a single other language. (No longer that folks relish the Guile folks will now not be
trying, but it be mute taking without waste). And a bunch of much less extremely advantageous
languages are in vogue; in actual fact it seems to be that a language’s
recognition is terribly almost inversely proportional to its vitality these
days. Of us factual invent now not heed what they’re missing.

So yeah. Charles is lovely. Articulate doesn’t appear relish the beautiful
language for doing text processing, no lower than at the same time as you happen to capture the comparatively
narrow glimpse that text processing draw syntax for regexps (and string
interpolation, and miscellaneous varied Perl-isms), and likewise you are simplest
looking on the libraries bundled with GNU Emacs.

And it does sure mute beat the hell out of Java — no lower than for, uh,
increasing dynamically-modifiable IDEs. I could well now not climb too some distance
up that soapbox, lest I procure lynched.

And per chance, factual per chance, someone will attain the friendly effort
to kind a usable replacement for Emacs in some varied excessive-level
language. Presumably now not any time quickly, I could well bet.

So for now, I take advantage of a total bunch tools: Perl/Python/Ruby for scripts, Java or
C for manufacturing apps (per chance with embedded languages where
appropriate!), XML for pretty a gigantic selection of my files; I even use Eclipse for some
things. And Emacs is a gigantic total-operate extensible editor and
programming atmosphere, in particular at the same time as you happen to absorb the trouble to grasp
it. Nonetheless anyone can watch that the total scenario (taking into fable
Internet programming, let’s now not put out of your mind) is often a lot greater.

Right here’s a tense speak.

(Published Feb 22, 2005)


Feedback


Talking of Articulate, XML, and files-is-code-is-files, have you ever seen this?

http://agentsheets.com/declare/XMLisp/

Seems to be relish an animated different to SAX/DOM approaches. It makes use of
the reflection-layer of the Frequent Articulate Object Machine to remodel XML
parts to and from Articulate objects on the wing.

I believe the Articulate hardcore would allege ‘Pah! Upright use sexprs — that is
what they were intended for’. Nonetheless this mute seems relish an animated
glue layer.

Posted by: Chris N. at February 22, 2005 04: 25 PM


And talking of the usage of Frequent Articulate to rewrite Emacs, have you ever taken a
gaze at Hemlock, which comes with CMUCL?

It be mute now not Emacs. Its incompleteness does an even job of proving
your point about how tense it could per chance per chance well even be to utterly rebuild the total
Emacs utilities in CL, but it *iskinda nifty.

Posted by: Brian W. at February 22, 2005 07: 54 PM


We old XML/XPath/XSLT for a mission to predicament prices from vendor internet
websites a pair years ago. It was fun in a, “I cannot factor in we’re
making this Elephant dance” roughly methodology. I cannot factor in in actual fact
trying to use that technology for something I wasn’t planning to
throw away, alternatively.

XSLT is now not a steady language (or it wasn’t then). Xalan’s xslt
extensions allowed us to embed Javascript, which we wished for
… current expressions! XPath worked big for finding the nodes we
wished, but then we wished to procure particular text in the nodes and invent
some easy cleanup. So, now we had XSLT with Javascript, being
completed by a Java program operating Xalan’s XML libaries. I factual went
relieve and learn thru the code again, and its factual as gruesome as I
remembered it being. Besides the indisputable reality that it be the usage of Xalan
extensions, so it is now not transportable anymore.

I deem you’ve hit on the basic flaw. They’re trying to create
one other declare, but this one is uglier, methodology extra verbose and now not the
slightest bit symmetric. I imply, they’ve factual intentions: XSLT is
factual executable XML, but there may per chance be now not any methodology to elongate it, in need of
vendor particular extensions. I relish the premise of getting
configuration files in Articulate. That would absorb parsing them nearly
trivial, despite the indisputable reality that I deem you per chance can mute desire same old “Perl’ish”
current expressions for the verbose bits of files on the leaves of the
tree. That can per chance well also be easy so that you just can add in a steady language though! No longer to
point out the flexibility, as you allege, to factual give an explanation for capabilities with the
same names as your nodes. You would even use macros to parameterize
them for various styles of transformations.

Sounds big, when will we initiate?

Posted by: Charles G. at February 22, 2005 08: 50 PM


> Sounds big, when will we initiate?

Upright as sooooon as I procure a Articulate that doesn’t reason nausea, diarrhea
and extreme abdominal cramps.

No longer entirely sure that this kind of part exists, but I am working on it. I
motivate having to take a seat down up for the indicators to proceed sooner than trying the
next one.

Severely, though: sooner than trying the rest with Articulate, I’ve a gigantic
checklist of criteria that it must race. (Or no lower than present some
kind of “out” so you have to to well be ready to fix it your self, e.g. by bridging to C
libraries). Stuff relish first payment concurrency enhance, asynchronous I/O,
factual tools and imperfect-platform enhance, and loads others. and loads others.

I in actuality wish someone else had performed this evaluation already. I simplest
have so unparalleled free time for it. Nonetheless I’ve found just a few fundamental hyperlinks;
Paul
Costanza’s Highly Opinionated Records to Articulate
is one (in no
minute section thanks to all the hyperlinks it has on the underside). And
Cliki
is roughly fundamental.

Nonetheless I have not yet found an evaluation of any Articulate’s suitability for
what we deem of as “manufacturing” work. In actuality be ecstatic to abet! Presumably we
must initiate a Wiki on it. Name it Blub, though, so no person will get
anxious. 🙂

Anyway…

> Sounds big, when will we initiate?

Brief resolution: now not any time quickly, I deem. Java and C++ are mute the
king and queen, respectively.

(Cloak: C++ programmers who learn that are thinking “hi there, why will now we have
to be the queen?”. That’s why. 🙂

Posted by: Steve Yegge at February 22, 2005 10: 54 PM


Brian: Yeah, Hemlock seems animated. In actuality, invent so Guile Emacs
and JEmacs.

JEmacs could well even be in actuality frigid if it ever obtained completed. It be largely a
proof-of-belief, and Per Bothner is now not working actively on it
anymore. He needs someone to capture over the attain on it. The code
is orderly but complex — Kawa (now not like comparatively unparalleled all varied JVM
“scripting” languages) goes to big lengths to absorb certain static typing
so it could per chance per chance well be efficiently compiled to bytecode. And Kawa in actual fact
helps no lower than five varied languages in its framework. So it could per chance per chance well
be a important enterprise to ramp up on the code and initiate pushing
it ahead. No longer that I construct now not deem trying! Having an cheap
Emacs that you just have to to well be ready to stride in the same JVM because the Java app you are
developing will most doubtless be nothing in need of incredible.

I will salvage Hemlock and in actual fact try it out. All in all, I customarily
employ Device to Frequent Articulate, though I wish for all of CL’s library
capabilities. I deem Per is truly planning on adding namespaces to
Kawa, and offering all the Frequent Articulate stuff to your Device code by
explicitly prefixing it, e.g.:

(cl:eq foo bar)

is a linked to the Device expression:

(eq? foo bar)

Being ready to mix and match Device libraries, CL libraries, elisp
libraries, and Java APIs together seamlessly (which he’s working on)
will absorb Kawa a important contender in the Articulate-implementations lineup
in some unspecified time in the future. By the time Arc comes out, he’ll be ready to enhance
that comparatively unparalleled too.

I am stalling, though. I in actuality must salvage CMUCL and initiate
hacking with it. All my fun hacking been elisp or procedure nowadays.

Posted by: Steve Yegge at February 22, 2005 11: 27 PM


Chris: thanks for the pointer to XMLisp! It seems in actuality
nifty. In actuality, AgentSheets itself seems roughly frigid. Backing the
link up a level:

http://agentsheets.com/declare/

I ponder if their product is all written in Articulate? There may per chance be now not any point out
of this wherever on their internet build — which I direct could well even be big
for marketing.

How’d you hear about this? Upright a Google search?

Posted by: Steve Yegge at February 22, 2005 11: 48 PM


Tree Frequent
Expressions (in SCSH Device)

XML is big stuff at the same time as you happen to are working on text with a excessive
instruct material/markup ratio, relish written documents. Glean a gaze on the
source of this blog internet page at the same time as you happen to employ to have an instance. Immense swathes of text
with just a few P and EM parts. The complications happen when the text/markup
ratio approaches zero.

Interview ask for those that inform important XML chops: Why does XML
have both attributes and parts?

Posted by: Derek U. at February 23, 2005 12: 32 AM

I motivate on listening to about how big declare is, and lispers rant on and on
about it, but sadly all the factual declare examples are badly out
of date, or in some substandard utter (emacs vs xemacs and the personal
politics of RMS), or curiously nearly fully unusable according
to your old entries on languages. So what is a programmer to invent?
If all and sundry evolves to declare, the argument is factual race straight to declare,
but if the language is so big, why is now not extra evangelism being performed
on it?

Most statements involving declare are at risk of be what the SEC would call
‘ahead looking statements’ or what i will call ‘niche
statements’. That’s folks characterize what COULD be or characterize what
works for a minute quantity of folks (why it never grows beyond that is
never in actuality talked about).

on the 2nd on my Mac, I’ve the finest UI pattern gadget ever
conceived and it was built the usage of Goal C – it be additionally shaping as a lot as
be one of many most evolved UI programming environments obtainable
interval (CoreImage – screw 8 bit integers for every RGBA, how about
FLOATS for every thing?!). In the imply time the finest face on declare
is … emacs?!

I liked your entry on languages, but I was left with the definite
feeling that you just do now not relish any programming language beautiful now, any
follow up there?

Posted by: Ryan R. at February 24, 2005 06: 18 AM


The basic speak seems to be to be a rooster-and-egg speak, or
factual a game of rooster.

Nobody must use a language unless it be rock-solid: stable, quickly,
effectively-documented, effectively-specified, malicious program free (no lower than in complying with
its specification), transportable, and loads others. Oh, and likewise you already must know
it, which limits the discipline a dinky bit. Most folks don’t must learn new
things; they’d comparatively create new things, although what they’re constructing
is something that already exists. Easier than finding out the faded
part.

I individually detest most languages so unparalleled that I’d
hesitate to use them unless fully forced into it. (Even then, it
would factual be ho-hum, and now not all THAT awful. Getting a slow language to
invent what you employ to have is often a fun grief in itself — that is obtained to be
section of why the present smartly-liked languages are so smartly-liked.)

The game-of-rooster is that a language cannot in actual fact was
rock-solid with out a gigantic community. The larger the community, the extra
solid it will get. Hence, the most smartly-liked languages are the most solid:
they’re smartly-liked consequently of they’re solid, and they’re solid consequently of
they’re smartly-liked. It feeds on itself, reinforcing the desire to use the
present languages, irrespective of how awkward the languages are at
asserting things.

I care loads about how easy or tense it is to allege things in a
programming language, consequently of I’ve made up our minds that I abominate giant
programs. They suck. The gianter a gadget, the extra bugs it is some distance going to have,
the extra difficult it is some distance going to be to learn, the extra serious its availability will most doubtless be, and
the extra folks you have to to well must rent — to absorb the gadget
even extra giant than it already is.

Increased-level languages present mechanisms that may per chance allow you to issue
certain current things (akin to: “give me all the parts of this
vector which have a customer whose name starts with an S”, despite the indisputable reality that
there are a total bunch varied examples than factual files-structure queries) unparalleled
extra with ease than you have to to well be ready to in C++ or Java. No longer that you just have to to well be ready to’t allege
them in C++ or Java — it factual takes longer. C++ infrequently helps you to
allege those things greater than Java — but then screws you over with
having to hand-situation up memory and invent all this varied hooey, and on the
steadiness, it be worse. Worthy worse.

Over time, at the same time as you happen to utilize a language that doesn’t allow you to claim things
compactly — in varied phrases, a language that lets your refactoring
absorb your code execrable smaller, then your gadget will develop
giant, and then a total bunch complications will happen: longer builds, slower
ramp-up, slower innovation, extra bugs, lower availability, and loads others. Many
builders (junior and senior) invent now not heed that it doesn’t in actuality
must be this methodology; it be one of many explanations I write this blog in the
first build.

My build for the time being is that I could well relish to study groups use the
absolute best-level language that they’ll factual barely tolerate. If all and sundry
switched from C++ to Java, I will most doubtless be overjoyed, and in no minute section
consequently of slow-ass porting initiatives relish RHEL3 would proceed,
freeing up engineers to invent, you know, engineering, comparatively
than a bunch of frigging porting work. Be pleased, duh. Can not anyone at this
company watch how unparalleled pain C++ is inflicting us? No, consequently of you per chance can don’t have any
accountability for porting your programs. Let dev-products and services invent it… as
if that’ll work. There are half a dozen varied causes that are factual as
legitimate because the porting one. C++ is killing us. It be a scourge that, as soon as
it be entered your company, will develop except it pushes the entirety else
out, and likewise you can was anxious. You all know this at some level,
but you let it happen anyway.

Java factual could well even be the simplest language available in the market on the present time that is
elevated-level than C++ and mute factual for constructing a terribly big
service relish CMS. That’s consequently of it be rock-solid (it in actuality is,
amazingly so for the time being), which stems from its recognition. I trash on
J2EE loads, consequently of I am squarely in the “Higher, Sooner, Lighter Java”
camp, which is a subset of the “use minute, reusable tools, now not
giant-ass frameworks”. That’s a lengthy discussion that you just have to to well be ready to have with
Peter D., who agrees and feels unparalleled extra strongly about it than I
invent. 🙂

Nonetheless Java customarily is a rattling factual language platform. Is at risk of be greater,
sure, but there’s loads to be acknowledged for it. And two or three very
promising inclinations in Java absorb it unparalleled extra compelling: Java 1.5
(which adds some in actuality advantageous sides), AspectJ (which adds some very
extremely advantageous sides and now seems to be veteran ample for manufacturing, if
approached comparatively), and the JVM scripting languages, which if old
cautiously, can tremendously enhance your skill to invent things
relish unit checking out, builds, debugging, configuration, scripting,
prototyping, and varied *auxiliarywork that we all invent all the
time.

If all and sundry switched to Java here, I could well even be one contented camper. I could well allege the
same part about Perl, with the exception of that Perl is so excruciatingly
inferior (and broken in many ways) that I could now not dangle to point out
it. Nonetheless I could well secretly mute be comparatively contented about Perl over C++.

Shifting up the language vitality ladder, Python and Ruby are big for
many obligations, and I deem lets initiate the usage of them comparatively. I
picked Ruby a dinky bit arbitrarily, because it seems to be a dinky bit cleaner, but
they’re both factual. Python is extra “solid” by the definitions I gave
above. All the pieces else — the ML household, Haskell, Smalltalk, and a
bunch of others — none of them appear relish they’re solid ample for any
manufacturing work at all here.

Python and Ruby are solid ample to use for auxiliary coding, but I am
now not happy both of them is solid ample (by which, again, I imply
veteran, stable, quickly, and loads others.) to write (allege) OMS or CMS. Java is solid
ample, despite the indisputable reality that you just have to to well mute have your fragment of important engineering
complications which have dinky to invent with the language — distribution,
scaling, and loads others. Unless per chance you make use of a language relish Erlang that
makes these complications section of the language, but I stay a dinky bit
skeptical there.

So Java. Java is what I could well point out. And Ruby or Python for the rest
you have to to well be ready to procure away with constructing the usage of them. Nothing elevated up the vitality
curve is factual on the present time…

…with the exception of for Articulate. Articulate is the one (possible) exception. It seems to be
comparatively solid, and it happens to be very arrangement (or at) the discontinue of the
vitality continuum. I am keeping out hope that some version of Articulate will
be solid ample to use here. I am looking at them. These items capture
time. What I desire could well finest be described as “Frequent
Device”. Failing that, Frequent Articulate seems to be relish the important contender.

Our interviewing course of hires C++ programmers; that’s what it be been
comparatively tuned to invent (whether we deliberately situation out to invent that or
now not), and most of them don’t know Articulate, now not to mention the rest between
Articulate and C++. The speak with Articulate, needless to claim, is that it be to this point up
there that nearly all programmers deem of it as a total joke, now not even
price declaring in the same breath as “work that one will get paid
for”.

And you are beautiful, Emacs is the most easy utility most folks accomplice
with Articulate. Nonetheless, you do now not procure to look on the manufacturing code from most
firms. There are pretty a gigantic selection of firms the usage of Articulate, but it seems to be
that comparatively than trumpeting this, they cloak the truth very
comparatively. They glimpse it as a secret strategic advantage, and they
don’t desire anyone (with the exception of possible hires) to know they’re the usage of
it. Furthermore, it doesn’t invent a part to your product marketing at the same time as you happen to claim
it be written in Articulate — that is extra at risk of apprehension folks away than
procure them to use it. So Articulate in actual fact seems to be to be a spruce secret
in the business.

At the least it seems to be to be. I have not written the rest big in
it, so I will simplest advise from a kind of investigative standpoint. It
is often a 365 days, or even five years, sooner than I in actuality know. In the
intervening time, switching to Java is a fully smartly-known part for
folks to invent. There are no doubts about it, no mysteries — it be as
rock-solid as you should it to be. And it be now not even upsetting.

Posted by: Steve Yegge at February 25, 2005 04: 47 AM


“Frequent Device” being an industrial-energy, transportable Device
implementation with current enhance? Already satirized (and by Guy
Steele no much less):


http://zurich.ai.mit.edu/pipermail/rrrs-authors/1998-Can also impartial/002343.html

The thread is an argument between the minimalist and maximalist groups
of Device language designers.

Posted by: Derek U. at February 25, 2005 05: 56 PM


In this entry you contemporary us with a erroneous predicament. Both we write our
configuration files in advert-hoc languages that somehow was
turing-total monstrosities, or we write them in
s-expressions. Both our logfiles are XML and we are consigned to the
world of XSLT/XPath, or they are declare capabilities that know easy solutions to
invent themselves.

I’d relish to contemporary a Third different:

logEntry = {

"date" => "2005-02-21T18: 57: 39",

"millis" => 1109041059800,

"sequence" => 1,

"logger" => nil,

"level" => :SEVERE,

"class" => "java.util.logging.LogManager$RootLogger",

"methodology" => "log"

"thread" => 10,

"message" => "A in actuality very awful part has came about!",

"exception" => {

"message" => "java.lang.Exception",

"frame" => {

"class" => "logtest",

"methodology" => :important,

"line" => 30

}

}

}

LISP is now not the most easy language that has hierarchical files buildings.

No, a hash desk is now not executable and cannot remodel itself relish a
LISP program could well, but it be undecided to me why it’ll mute. A stack
designate is now not inherently an executable part, to any extent extra than my license
plate quantity is. No, I cannot subclass a hash desk, but I will subclass
this:

class LogfileEntry

def initialize(files)

@files = files

discontinue

discontinue

So: yeah, confidently we’re going to invent greater than XML/XSLT. Nonetheless what makes
LISP the resolution? And what does it in actuality steal you when your files, which
by itself is now not meaningfully executable, is expressed in a syntax
that could well be executable?

Posted by: Josh H. at February 25, 2005 06: 00 PM


I had never heard the time frame “s-expression” sooner than. I saw this text
on Google though. Looks a dinky bit linked.

XML is now not S-Expressions

Posted by: Joel H. at February 25, 2005 10: 54 PM


The sections “Starting with Syntax” and “Redundancy Is Moral” argue
that XML is finest for doc processing—-which is factual.

The “Family Issues” fragment argues that, consequently of (as an illustration) XSLT
is a domain-particular language for processing XML documents, it be a
greater different than a total language for processing
s-expressions. Nonetheless every of the listed applied sciences is getting expanded
and expanded consequently of they don’t enhance “steady” programming language
concepts:

“Many customers have requested the flexibility to attain a conditional label
basically based on a boolean expression. XPath 2.0 MUST present a conditional
expression…”

“As section of the XSLT 1.1 work performed on extension capabilities, a proposal
to creator XSLT extension capabilities in XSLT itself was deferred for
reconsideration in XSLT 2.0. This could allow the capabilities in an
extension namespace to be applied in “pure” XSLT, without
ensuing to exterior programming languages.”

“If a ::marker pseudo-part has its ‘instruct material’ property situation to
traditional, the following algorithm must be old to generate the
computed label of the property.”

“It’s the ideal time beautiful now for the W3C XPath 2.0 working community to
absorb the resolution to give the mandatory enhance for elevated-characterize
capabilities as section of the usual XPath 2.0 specification. In case
this golden opportunity is missed, then generic templates and
libraries will most doubtless be old in the future years.”

(http://fxsl.sourceforge.ranking/articles/FuncProg/9.html)

Posted by: Derek U. at February 26, 2005 07: 16 AM


I deem Derek pegged it greater than anyone when he commented earlier
that XML is finest for excessive instruct material/markup ratio, and Articulate is finest
when it be largely markup. I hadn’t belief of it this methodology sooner than, but
it directly rang factual.

By methodology of background, you per chance can must take into account that Paul Prescod is a
one who is trying to let the arena know, in no unsure phrases,
that Python folks could well even be even snottier than Articulate folks. He’s one of
the handful of folks that stretch to mind after I characterize the Python
community as “cool”.

So needless to claim he will try very tense to dissociate XML with
s-expressions, consequently of if XML is de facto s-expressions (and likewise you fail to
capture Derek’s commentary into fable), then you per chance can without speak design the
conclusion that Articulate beats Python for XML processing, and Paul would
very unparalleled relish for no person to design that conclusion.

The XSLT-article guy is factual whacked out on acid. He seems to be to deem
that by zooming out to a satellite tv for pc’s-detect glimpse in his XSLT examples, he
will give the affect that XSLT is as compact as Haskell. I cannot
abet but feel, looking at all those minute colored blobs, that I am about
to plunge twenty thousand feet to my loss of life, impaled on angle brackets,
and that the colors are the spatters of all and sundry else who’s fallen on
them to this point — including blue-blooded XSLT aficionados.

Posted by: Steve Yegge at February 28, 2005 11: 05 PM


Josh: at the same time as you happen to simplest focal point on logfiles and varied similarly inert-seeming
files clumps, then Ruby’s graceful, and the answer you point out seems to be
graceful.

The finest nitpick I could well absorb is that defining the log entries as a
language-particular hash makes it extra tense to course of the entries
in some varied language, whereas with XML and Articulate, both of them are
syntactically comparatively easy, and likewise you have to to well be ready to in actual fact convert
trivially and lexically between the 2 of them. Nonetheless it be largely
splitting hairs.

For extra complex documents, e.g. websites or observe-processor
documents, I could well even be inclined to trudge with a Articulate dialect, if I were
designing it from scratch. Nonetheless who is aware of. Ruby’s very advantageous too. If
simplest it had native-code compilers and preemptive multithreading and a
macro gadget and all those varied goodies Articulate has…

Posted by: Steve Yegge at February 28, 2005 11: 20 PM


p.s. it be crucial to admire that you just have to to well be ready to comparatively cleanly divide
programming languages into “scripting languages” and “programming
languages”, and I in actuality heed the excellence now. Scripting
languages are all a bunch of sorrowful hacks: Perl, Python, Ruby,
Groovy, Tcl, Rexx… you name it. They all initiate lifestyles without a formal
grammar or parser, no formal bytecode or native-code technology on the
backend, no lexical scoping, no formal semantics, no kind gadget,
nothing. And that’s where most of them in the waste discontinue up. They could well develop and
evolve in the beautiful directions, and they all somehow was
beautiful to work with, after ample hacks piled on, but all of
them are plagued with basic complications.

C, C++, Java, Goal-C, C#, Pascal, Articulate, and Device (to name a
few) are all REAL languages, in all the senses I mentioned in the
old paragraph.

Device that in “steady” languages, you per chance can or could well now not have factual
string-processing, or garbage sequence, or OOP constructs, or
top quality capabilities, or the rest. All those considerations are
orthogonal as to if the language was built with a compiler framework
in mind or now not. And there may per chance be fully no reason someone just isn’t
ready to kind a “scripting language” that has a solid foundation.

What’s the variation? Why invent all those formal doo-hickeys topic?

Performance! Compiled languages are quickly. Articulate is WAY faster than
Ruby, over the lengthy haul. Smokes it.

I care about varied stuff besides efficiency, needless to claim, and
compilation offers you varied benefits as effectively. Nonetheless most of all, it
offers me this sense of security, involving that the formal syntax and
semantics are all effectively-specified. I deem that’s what I imply by
“solid”. (And irrespective of the total ugliness of XML and chums, its
formal specification is comparatively factual.)

Posted by: Steve Yegge at February 28, 2005 11: 38 PM

Read More

Leave A Reply

Your email address will not be published.