[#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: Ryan Pavlik <rpav@...>
Date: 2003-10-08 20:28:23 UTC
List: ruby-talk #83803
On Thu, 9 Oct 2003 05:06:32 +0900
Nikolai Weibull <ruby-talk@pcppopper.org> wrote:

> OK.  So I'm going to write a text editor for my masters' thesis.  The
> general idea of it is fixed but the extension language has not been
> settled on, yet.
<snip>

The thing with lisp, though, is that everyone has used lisp already,
and while I love lisp, there wouldn't be much of a reason to switch
from XEmacs and its twenty million extensions.

> Anyway, what I'm getting at is:
> 
> Do you figure Ruby to be a good extension language for a text
> editor?

YES.  I've been wanting "erubs" (Editor for Ruby Scripts ;-) for
awhile; something like emacs, but s/lisp/ruby.  Same design otherwise.

> * What would be easier to do using Ruby?

Well, the main thing is that ruby has a lot of very convenient pattern
and text matching functionality, and a boatload of extensions.  And
it's a very easy language, so anyone can pick it up and start
extending the editor, unlike emacs, where fewer brave the waters.

For instance, I recently wrote a bit of code to align things:

a = b            ___\         a   = b
foo = bar           /         foo = bar

This was a few simple lines of ruby.  Not counting comments, it's 44
lines of lisp that don't quite work perfectly.

> * LISP?

As much as I love lisp, I can't really think of things that would be
easier to in any of the above scheme flavors that wouldn't be easier
in ruby.

> * What language allows the most of the editing commands to be written in
>   the given language?

Ruby certainly allows this.  It's extremely trivial to extend and use
Ruby in C.  They go hand-in-hand.  Plus there are existing GUI
packages you could interface to if you wanted to provide UI handling
in ruby without a lot of work.

> * Is Ruby good enough for the task at the moment, performance wise?
> * Resource wise?  Does anyone have any statistics on this?

This is a decent benchmark:

   http://www.bagley.org/~doug/shootout/craps.shtml

Is ruby at the top of that list?  No.  (Note that most of the
languages above it are compiled, including the bigloo scheme
implementation).  But XEmacs elisp falls near the bottom, and I use
that for editing tasks daily.  Tcl and Rep both fall below.

So, I wouldn't worry about performance.  And, memory-wise, I can't
really offer benchmarks, but I have a system managing tens of
thousands of objects that doesn't present a problem.

> I'm not talking about the ease of implementing a web browser in the
> target language, rather the ease of structuring an extensible framework
> in it.

Then Ruby is ideal.  Extending and embedding it is extremely easy.
It's a really great scripting framework, even though many people
including myself use it for entire applications.

> Also, is there any way of redefining the // operator for constructing
> regular expression objects?  I'm planning on implementing a new regex
> syntax for the editor (to make searches/substitutions easier to
> describe).

No, but I would encourage you leave the existing regular expression
format intact, as, while somewhat write-only, is familiar to most
people who will be using your editor.  Redefining // would break a lot
of extension code, and alienate a large part of your audience.

However, that's not to say you can't make your own matching format.
I'm not sure what you have in mind, but there are a number of ways to
bend the syntax to integrate such things.

> thanks in advance,

If you write a ruby editor... thank _you_. ;-)

hth,

-- 
Ryan Pavlik <rpav@mephle.com>

"You'd be surprised what a platoon of heartless ninja lawyers
 can do in favor of a position." - 8BT

In This Thread