login
Header Space

 
 

Syntax highlighting (oh, that handcrafted programming)

April 7, 2008 - 5:17pm
Submitted by olecom on April 7, 2008 - 5:17pm.
User-Agent: jed (x86_64-pc-linux-glibc-debian)

Value of syntax highlighting for programming in text editors is hard to
overestimate. I recall one my buddy, a keen school olympic competitor on
programming, who said, that move from Borland Pascal 5 to 6 and 7 was a
great thing because of highlighting.

Many syntax and logic errors just popped up right before one's eyes.
Monotony strains. OTOH, Reading the book isn't like programming.
Programming requires great thinking efforts and no distractions. Those
LISP coders also track those parenthesis and think this is a cool thing.

So, i didn't see something quite comprehensive even in the great Emacs.
Unreadable regexs, reinventing parsing, small efficiency wrt CPU
burning. Not saying about *no* highlighting of regexs themselves, non
stupid highlight of `sh` scripts, `sed`, etc.

Maybe in 70x, where all "modern UNIX/Linux userspace software" stuck,
there was no computation and brain power, money and programmer's
imagination to implement that in a rational way.

The Right Thing(R) IMHO is to have any parser `sh`, `sed`, `awk`, `gcc`
etc. (yea, stupid XML!) implementing interface for highlighting of the
input. Isn't that those parsers know and do all their syntax handling?
Inventing unreadable regex's/broken highlight engines (emacs, mcedit,
etc.) over and over again?

Yet more than a decade x86 clones in terminal emulators are waiting
infinite microseconds between user's key presses...
--
sed 'sed && sh + olecom = love' << ''
-o--=O`C
 #oo'L O
<___=E M

relevant LKML messages

April 7, 2008 - 7:15pm

This all was by exploration of LKML. Now i know what it is, and what
it is not. Userspace sucks, and no kernel hacker will help it. Yet they
all do the job with userspace.

Why i didn't do anything so far? Well, why 10-20-30 years of computer
science didn't do anything? Handcrafted programmers?

I search colleagues on mind. I just am too lone whole my stupid life.

Kernel building environment:
http://article.gmane.org/gmane.linux.kernel/583340

Colored kernel output (run2)" + "`Subject:' usage":
http://article.gmane.org/gmane.linux.kernel/588224
(this one was on lwn.net article once, stupid misunderstanding)

Userspace sucks (i forgive kernel developers)
http://article.gmane.org/gmane.linux.kernel/588315

aiding text editing + RFC:[...]
http://article.gmane.org/gmane.linux.usb.general/632
_____

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
speck-geostationary