The Semicolon Wars as a software industry and human condition

J

jmckitrick

What's more of a waste of time:

1. The 30 minutes he took to write his vacuous essay.
2. The 15 seconds it took to skim it and see nothing worth reading.
3. The 30 seconds it took to write this post.

Tough call.
 
I

Iain King

Xah said:
Of interest:

• The Semicolon Wars, by Brian Hayes. 2006.
http://www.americanscientist.org/template/AssetDetail/assetid/51982

in conjunction to this article, i recommend:

• Software Needs Philosophers, by Steve Yegge, 2006
http://xahlee.org/Periodic_dosage_dir/_p/software_phil.html

• What Languages to Hate, Xah Lee, 2002
http://xahlee.org/UnixResource_dir/writ/language_to_hate.html

Xah
(e-mail address removed)
∑ http://xahlee.org/

I'm confused - I thought Xah Lee loved Perl? Now he's bashing it?
Huh?

Iain
 
J

Jürgen Exner

Iain said:
I'm confused - I thought Xah Lee loved Perl? Now he's bashing it?

He only loves himself.
Aside of that:


+-------------------+ .:\:\:/:/:.
| PLEASE DO NOT | :.:\:\:/:/:.:
| FEED THE TROLLS | :=.' - - '.=:
| | '=(\ 9 9 /)='
| Thank you, | ( (_) )
| Management | /`-vvv-'\
+-------------------+ / \
| | @@@ / /|,,,,,|\ \
| | @@@ /_// /^\ \\_\
@x@@x@ | | |/ WW( ( ) )WW
\||||/ | | \| __\,,\ /,,/__
\||/ | | | jgs (______Y______)
/\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
==============================================================

jue
 
G

Greg R. Broderick

I'm confused - I thought Xah Lee loved Perl? Now he's bashing it?
Huh?

That's his other personality.

--
---------------------------------------------------------------------
Greg R. Broderick (e-mail address removed)

A. Top posters.
Q. What is the most annoying thing on Usenet?
---------------------------------------------------------------------
 
M

Michele Dondi

Of interest:

• The Semicolon Wars, by Brian Hayes. 2006.
http://www.americanscientist.org/template/AssetDetail/assetid/51982 [snip]
• What Languages to Hate, Xah Lee, 2002
http://xahlee.org/UnixResource_dir/writ/language_to_hate.html

Cool! From the former:

: Today's missionaries take an upbeat approach, spending more time in promoting their own religion and less in dissing the other person's beliefs. The message is no longer "You'll burn in hell if you write C." It's "Look what a paradise Python offers you!" (I think maybe I liked the old sermons better.)


Michele
 
X

Xah Lee

can anyone give me a guide about writing a short elisp function? (for
non-emacs readers, this message will describe a editor feature i think
will be very beneficial to spread this concept.)

i want to write a function such that, when run, highlight a region
between the nearest left and right delimiters. Delimiters are any of
parenthesis, square brackets, or single and double quotes etc. When the
function is run again, it extends the selection to the next enclosing
delimiters.

So, in this way, a user can repeatedly press a keyboard shortcut and
extend the selection.

This is feature of BBEdit/TextWrangler on the Mac, which extend
selection to the nearest outer parenthesis. This is also a feature of
the Mathematica editor, which actually extend selection to the nearest
syntactical unit in the language, not just paired delimiters.

What i wanted this for is mostly in editing HTML/XML, where one press
can select the content, another press will include the enclosing tags,
another press extends the selection to the next outer content, and
another press include that tags too, and so on.

I'm a elisp newbie. Here's a simple code i have so far:

(defun d ()
"extend selection to nearest enclosing delimiters"
(interactive)
(skip-chars-backward "^<>()“â€{}[]")
(push-mark)
(skip-chars-forward "^<>()“â€{}[]")
(exchange-point-and-mark 1)
)

.... i think i have quite a lot to go... I think this would be a great
feature for any mode, where the a keypress will highlight more
syntactical units in any language's mode. For example, suppose in
C-like language:

function f (arg1, arg2) {
line1;
line2;
}

if the cursor is at arg1, then first press will highlight the content
of the args, another press includes the parens, another press will
include the whole function. If the cursor is at line1, then it selects
that word in the line, then the line, then the whole function def body,
then including {}, then the whole function... etc in many languages.

For a xml language example, suppose we have this RSS/Atom example:

<entry>
<title>Gulliver's Travels</title>
<id>tag:xahlee.org,2006-08-21:030437</id>
<updated>2006-08-20T20:04:41-07:00</updated>
<summary>Annotated a chapter of Gulliver's Travels</summary>
<link rel="alternate" href="../p/Gullivers_Travels/gt3ch05.html"/>
</entry>

If the cursor is inside a tag's enclosing content, say, on the T in
Gulliver's Travels inside the <title> tag, then the repeated extension
is obvious. But however, suppose the cursor is at t in the
“alternate†inside the “link†tag, then it would first select
the whole “alternate†word, then the whole “rel="alternate"â€,
then the whole link tag, then the whole content of the entry tag, then
including the “<entry>†tags itself.

(in short, the selection extends according to the language's syntax
tree)

Xah
(e-mail address removed)
∑ http://xahlee.org/
 
L

limodou

can anyone give me a guide about writing a short elisp function? (for
non-emacs readers, this message will describe a editor feature i think
will be very beneficial to spread this concept.)

i want to write a function such that, when run, highlight a region
between the nearest left and right delimiters. Delimiters are any of
parenthesis, square brackets, or single and double quotes etc. When the
function is run again, it extends the selection to the next enclosing
delimiters.

So, in this way, a user can repeatedly press a keyboard shortcut and
extend the selection.

This functionality can be found in NewEdit
(http://wiki.woodpecker.org.cn/moin/NewEdit), first put the caret in
middle of delimeters, such as ''""(){}[], then press Ctrl+E, the text
between delimeters will be selected. And there are two direction of
selection, left first and right first(Ctrl+Shift+E). If you press
Ctrl+Alt+E again, the the delimeters will be selected.
This is feature of BBEdit/TextWrangler on the Mac, which extend
selection to the nearest outer parenthesis. This is also a feature of
the Mathematica editor, which actually extend selection to the nearest
syntactical unit in the language, not just paired delimiters.

What i wanted this for is mostly in editing HTML/XML, where one press
can select the content, another press will include the enclosing tags,
another press extends the selection to the next outer content, and
another press include that tags too, and so on.
NewEdit can not support this feature now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top