[#83328] tcltklib and not init'ing tk — aakhter@... (Aamer Akhter)

Hello,

13 messages 2003/10/01

[#83391] mixing in class methods — "Mark J. Reed" <markjreed@...>

Okay, probably a dumb question, but: is there any way to define

22 messages 2003/10/01
[#83392] Re: mixing in class methods — Ryan Pavlik <rpav@...> 2003/10/01

On Thu, 2 Oct 2003 06:02:32 +0900

[#83397] Re: mixing in class methods — Gavin Sinclair <gsinclair@...> 2003/10/01

On Thursday, October 2, 2003, 7:08:00 AM, Ryan wrote:

[#83399] Re: mixing in class methods — "Mark J. Reed" <markjreed@...> 2003/10/02

On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83404] Re: mixing in class methods — "Gavin Sinclair" <gsinclair@...> 2003/10/02

> On Thu, Oct 02, 2003 at 07:37:25AM +0900, Gavin Sinclair wrote:

[#83416] C or C++? — "Joe Cheng" <code@...>

I'd like to start writing Ruby extensions. Does it make a difference

32 messages 2003/10/02
[#83435] Re: C or C++? — "Aleksei Guzev" <aleksei.guzev@...> 2003/10/02

[#83448] xml in Ruby — paul vudmaska <paul_vudmaska@...> 2003/10/02

The biggest problem i have with Ruby is the sleepness

[#83455] Re: xml in Ruby — Chad Fowler <chad@...> 2003/10/02

On Thu, 2 Oct 2003, paul vudmaska wrote:

[#83464] Re: xml in Ruby or no xml it's just a question — paul vudmaska <paul_vudmaska@...> 2003/10/02

>>--------

[#83470] Re: xml in Ruby — paul vudmaska <paul_vudmaska@...>

>>>

15 messages 2003/10/02

[#83551] xml + ruby — paul vudmaska <paul_vudmaska@...>

>>---------

20 messages 2003/10/03
[#83562] Re: xml + ruby — Austin Ziegler <austin@...> 2003/10/03

On Fri, 3 Oct 2003 16:11:46 +0900, paul vudmaska wrote:

[#83554] hash of hashes — Paul Argentoff <argentoff@...>

Hi all.

18 messages 2003/10/03

[#83675] fox-tool - interactive gui builder for fxruby — henon <user@...>

hi fellows,

15 messages 2003/10/05

[#83730] Re: Enumerable#inject is surprising me... — "Weirich, James" <James.Weirich@...>

> Does it surprise you?

17 messages 2003/10/06
[#83732] Re: Enumerable#inject is surprising me... — nobu.nokada@... 2003/10/07

Hi,

[#83801] Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...>

OK. So I'm going to write a text editor for my masters' thesis. The

35 messages 2003/10/08
[#83803] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 05:06:32 +0900

[#83806] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/08

* Ryan Pavlik <rpav@mephle.com> [Oct, 08 2003 22:30]:

[#83812] Re: Extension Language for a Text Editor — Ryan Pavlik <rpav@...> 2003/10/08

On Thu, 9 Oct 2003 06:09:29 +0900

[#83955] Re: Extension Language for a Text Editor — Nikolai Weibull <ruby-talk@...> 2003/10/09

* Ryan Pavlik <rpav@mephle.com> [Oct, 09 2003 09:10]:

[#84169] General Ruby Programming questions — Simon Kitching <simon@...>

21 messages 2003/10/15
[#84170] Re: General Ruby Programming questions — Florian Gross <flgr@...> 2003/10/15

Simon Kitching wrote:

[#84172] Re: General Ruby Programming questions — Simon Kitching <simon@...> 2003/10/15

Hi Florian..

[#84331] Re: Email Harvesting — Greg Vaughn <gvaughn@...>

Ryan Dlugosz said:

17 messages 2003/10/21
[#84335] Re: Email Harvesting — Hugh Sasse Staff Elec Eng <hgs@...> 2003/10/21

On Wed, 22 Oct 2003, Greg Vaughn wrote:

[#84343] Re: Email Harvesting — Ruben Vandeginste <Ruben.Vandeginste@...> 2003/10/22

On Wed, 22 Oct 2003 08:35:32 +0900, Hugh Sasse Staff Elec Eng

[#84341] Ruby-oriented Linux distro? — Hal Fulton <hal9000@...>

There's been some talk of something like this in the past.

15 messages 2003/10/22
[#84348] Re: Ruby-oriented Linux distro? — Gavin Sinclair <gsinclair@...> 2003/10/22

On Wednesday, October 22, 2003, 6:01:16 PM, Hal wrote:

[#84351] Re: Ruby-oriented Linux distro? — Andrew Walrond <andrew@...> 2003/10/22

On Wednesday 22 Oct 2003 11:02 am, Gavin Sinclair wrote:

[#84420] Struggling with variable arguments to block — "Gavin Sinclair" <gsinclair@...>

Hi -talk,

18 messages 2003/10/24
[#84428] Re: Struggling with variable arguments to block — matz@... (Yukihiro Matsumoto) 2003/10/24

Hi,

[#84604] ruby-dev summary 21637-21729 — Takaaki Tateishi <ttate@...>

Hello,

21 messages 2003/10/30
[#84787] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Fri, Oct 31, 2003 at 07:01:28AM +0900, Takaaki Tateishi wrote:

[#84789] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

[#84792] Re: ruby-dev summary 21637-21729 — Paul Brannan <pbrannan@...> 2003/11/06

On Thu, Nov 06, 2003 at 11:17:59PM +0900, Yukihiro Matsumoto wrote:

[#84794] Re: ruby-dev summary 21637-21729 — matz@... (Yukihiro Matsumoto) 2003/11/06

Hi,

Re: Extension Language for a Text Editor

From: Nikolai Weibull <ruby-talk@...>
Date: 2003-10-09 17:36:25 UTC
List: ruby-talk #83955
* Ryan Pavlik <rpav@mephle.com> [Oct, 09 2003 09:10]:
[stuff about Emacs and Vim]
> Well, whichever, just be aware that emacs is designed as an extensible
> editor, and vim is not, even though such things have crept in with
> varying degrees of usefulness.
Yes, that, as I see it, is Emacs biggest win.  The big problem I see
with Vim is that it hasn't undergone a major overhaul.  It is basically
Emacs written in C now.  Vim is, in my opinion, probably the best editor
that exists right now.  It is, however, going to reach a point where
adding new features will demand some sort of rewrite.  With Emacs,
things like these are easy to alter.  Anyway, Vim is extensible, it is,
however, not _changable_.  By that I mean that, if you want to change
the way folding works, you must rewrite the core of Vim.  And, as Bram
pointed out in some interview, that means altering basically every file
in the Vim distribution.  To Vim's salvation comes the ability to easily
define new syntax definitions and indentation definitions, which one has
to agree, are a lot easier to create and alter than with Emacs (Emacs
being perhaps more powerful though).
[stuff about Ruby libraries and such]
> Right.  They're there, people can write extensions that interface to
> the web, or whatever.
Yes, but I don't want an Operating System.  I guess, to a certain degree
the library you get helps you, but it can also detract you from the
central topic, namely editing text.
> See http://ogmo.mephle.org/tabular-alignment.org for the Lisp
> version.  The ruby one I deleted, as it was pretty simple to
> reproduce, I'm sure someoone can whip up an example.
Yeah, OK.  I see your point.  It is, however, very easy to alter to fit
your own needs.  Change some global variables and you can make it work
for almost anything.  I can't tell, but I'm guessing your code in Ruby
wouldn't allow for this?  I'm not trying to contract you, only point out
that Emacs extensions are, as oposed to Vim extensions, very flexible
and well thought out.  This does, of course, not mean that it can't be
done in Ruby.  I just get the feeling that Lisp excels at this.
[stuff about functional vs. OO being more well suited for editing text]
> I don't really find that.  I don't think functional programming is any
> easier for editor-related tasks.  I'm not even sure how you would come
> up with such an assumption. ;)
My real point was that having OO around doesn't really help either.  It
doesn't add anything.  Sure, you can make classes like Buffer and Window,
were is the real gain?  I have tried to envision some OO structure for
implementing Emacs like Major/Minor Modes and such, but I haven't been
able to come to any satisfactory results.  I mean, how is a Major Mode
an object?  Really?  I guess it has a syntax definition, a separate
keybinding mapping, an indentation callback, maybe something else?  I
just don't feel it adds anything though.  I am, of course open to
suggestions ;-).
> Right, tiny C core like emacs, everything higher-level in the language
> of choice.  Ruby is highly suited for this task.
Yeah, this is true.  Ruby would be well suited for this I do believe.
But note that Emacs C core isn't very small ;-)
> People could even write high-performance ruby extensions in C...
Yeah, this would be easy to do as well.  There is, of course, the
inherent risk of not being portable enough.  Vim supports this in a way,
and I have never seen it used to date.
[stuff about regular expressions]
> Well, to be blunt, whatever you come up with won't be as popular or
> useful as the existing regular expressions, just because they'll be a
> nonstandard replacement of something already very common.  PCRE
> regexps are extremely flexible and well-known.
As useful?  Please, my dear sir, there has to be something better than
the way we describe regular expressions now.  At least for searching
text.  The syntax we have today for regular expressions is basically the
same, only extended, as that that Ken Thompson uses in his 1968 paper on
it.  Or that of _real_ regular expressions long before it.  And
remember, real regular expressions only have * (Kleene star) and no +.
There has to be a simpler syntax that can be useful for interactive text
search-and-replaces.  Look at Vim, Emacs, and Perl (and thus,
basically, Ruby)'s syntax.  They are all extensions of this, adding new
short cryptic ways of saying things that you often don't need, and if
you did you wouldn't want to do it that way anyway.  The real example of
how it has gotten out of hand is the overuse of backslash (\).  It is
everywhere.  having to move my hand to the upper right corner of my
keyboard all the time is a real pain.
Of course we'll have to see if I'm actually able to come up with
anything better.  It's probably not going to be as easy as I'd like to
suggest here.  However, look at the Perl 6 Apocalypse 5[1] to see one way
of moving away from cryptic (?:...) metasyntaxes.
> That isn't to say people won't use them, especially if they're
> simpler, but it probably won't be the main selling point of your
> editor to _other people_.
Nah OK.  You've got a point.  But, as with most free software, this
one's for me ;-).  If anyone wants to tag along later on, fine.  But I
won't care if no one is interested, Emacs and Vim are fine editors.
Even notepad has its uses.  It can, for example, tell you if a file is
smaller or greater than 65535 bytes very easily ;-).
I have, perhaps, failed to describe the real winning here.  (Alas, I
realize I forgot to mention it.)  As you perhaps know, Vim, and most
other UNIX software, operate on a line-by-line basis.  This restriction
would not impede the command language I'm contemplating.  If you take a
look at the Sam editor[2], this is its main selling point, and this is
another one I want to include.
> > but then you wind up with the string interpolation problems (\n and
> > friends). :-(
> I'm not sure how that's a problem.  The same applies to // regexps.
> They're just basically strings, except stored in a different type of
> object with a few flags.
Nono, they don't do string escapes.  \n in a regex (//) means match a
newline, not substitute this for 0x0a.  So, you don't have to quote it
with an extra backslash to get that meaning.  Eh, maybe I'm not making
myself clear.  See, in Emacs, you have to write it as
	"\\n"
since, otherwise you get the mentioned effect.  This may be OK most of
the time, but it has implications.  Also, if you want to match a word
boundary in Emacs you'll have to write
	"\\<"
and to match a backslash itself:
	"\\\\"
which is horrendous.  In a Ruby regex, /\\/ suffices.
	nikolai

[1] http://www.perl.com/pub/a/2002/06/04/apo5.html
[2] http://plan9.bell-labs.com/sys/doc/sam/sam.html or as PostScript:
    http://plan9.bell-labs.com/sys/doc/sam/sam.ps

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

In This Thread