[ANN] Aeditor-0.1 is unleashed

Aeditor is a editor-widget written in Ruby. The primary
goal is to make a programmers-editor which is suitable
for pair-programming. Other important goals is:

  • fully scriptable in Ruby.
  • nice visual output.
  • many kinds of frontends: Gtk, Qt, Ncurses.
    Aeditor is a rival to scintilla. It is meant to be
    embedded into other applications, eg: FreeRIDE.

WARNING: It is in a very early state… so don’t expect much.
Basic editing is working. Advanced editing is on my TODO list.

download:
http://prdownloads.sourceforge.net/metaeditor/aeditor-ruby-0.1.tar.gz?download

screenshot:

homepage:
http://metaeditor.sourceforge.net/

This is first time I release a ruby-package. I am therefore very curious
about install issues… Tell me if installation works for you :slight_smile:
Please tell me your ideas/opinions/suggestions/flames ?

···


Simon Strandgaard

Is there any Rubyists-volunteers who would like to test Aeditor ?

Is the tarball ‘packaged’ correct ? Is there anything missing ?

Can I bundle ‘Ncurses-4-ruby’ within the tarball ?
Ncurses is LGPL licensed ?

‘install.rb’ is LGPL too… should I add a LGPL-licence file ?

When releasing new versions of pacages, is it possible to ‘auto-update’
the RAA entry, with current data ? has anyone done it before?

···

On Tue, 01 Jul 2003 15:32:24 +0200, Simon Strandgaard wrote:

download:
Download aeditor-ruby-0.1.tar.gz (AEditor [Ruby BSD])

This is first time I release a ruby-package. I am therefore very curious
about install issues… Tell me if installation works for you :slight_smile:
Please tell me your ideas/opinions/suggestions/flames ?


Simon Strandgaard

Hello,

I wish this project will progress well, because we
really need a ruby IDE, and everything depends on a
good editor. Scintilla has I18N problems, i.e.,
it doesn’t support portuguese accents (I am sure
it affects other languages as well), so it doesn’t
cut it for me.

What worries me about this project is the GUI
independence that you are targeting, because it
may become more difficult to support I18N well.

Will it support unicode ?

What is the current status of the support for GTK+2 ?

All the best,
Joao

···

Em Ter, 2003-07-01 às 09:49, Simon Strandgaard escreveu:

Aeditor is a editor-widget written in Ruby. The primary
goal is to make a programmers-editor which is suitable
for pair-programming. Other important goals is:

  • fully scriptable in Ruby.
  • nice visual output.
  • many kinds of frontends: Gtk, Qt, Ncurses.
    Aeditor is a rival to scintilla. It is meant to be
    embedded into other applications, eg: FreeRIDE.

WARNING: It is in a very early state… so don’t expect much.
Basic editing is working. Advanced editing is on my TODO list.

download:
Download aeditor-ruby-0.1.tar.gz (AEditor [Ruby BSD])

screenshot:
http://metaeditor.sourceforge.net/graphics/editor_shot6_blur_sharpen.png

homepage:
http://metaeditor.sourceforge.net/

This is first time I release a ruby-package. I am therefore very curious
about install issues… Tell me if installation works for you :slight_smile:
Please tell me your ideas/opinions/suggestions/flames ?


Simon Strandgaard

OK… I hope I have fixed most of the install issues.
So it migth be working this time :slight_smile:

Tell me if version 0.2 is working better for you ?

download:
http://prdownloads.sourceforge.net/metaeditor/aeditor-ruby-0.2.tar.gz?download

Any volunteers who dare try it ?

···


Simon Strandgaard

Hi,

I had to add ‘aeditor/’ to the require statements. I then had an error
when I tried to run it.

Regards,

Mark Wilson

···

On Tuesday, July 1, 2003, at 07:33 PM, Simon Strandgaard wrote:

On Tue, 01 Jul 2003 15:32:24 +0200, Simon Strandgaard wrote:

download:
AEditor [Ruby BSD] - Browse Files at SourceForge.net
0.1.tar.gz?download

This is first time I release a ruby-package. I am therefore very
curious
about install issues… Tell me if installation works for you :slight_smile:
Please tell me your ideas/opinions/suggestions/flames ?
[snip]

I wish this project will progress well, because we
really need a ruby IDE, and everything depends on a
good editor.

:wink:

Scintilla has I18N problems, i.e.,
it doesn’t support portuguese accents (I am sure
it affects other languages as well), so it doesn’t
cut it for me.

Scintilla is one of the less great editors.
I have been browsing its source code and it looks quite hackish
compared to VIM.

What worries me about this project is the GUI
independence that you are targeting, because it
may become more difficult to support I18N well.

Rendering of unicode glyphs is interesting :slight_smile:
The ‘rigth2left’ direction, should be possible too.

Will it support unicode ?

yes. This is a new area for me im entering. I don’t know which unicode
standard(s) I should support: utf-8, utf-16. … others?

What is the current status of the support for GTK+2 ?

I am conducting experiments with writting a Qt-GUI fontend in
C++ in order to achive fast rending of glyphs. Even though I dislike
closed source applications. I embed Ruby into C++ and uses SWIG.

I started out with experimenting with Gtk1.2, but it was too strange
writting custom widgets for. If there is any GTK/GTK2 experts they are
welcome to join :slight_smile:

···

On Wed, 02 Jul 2003 12:27:20 +0900, Joao Pedrosa wrote:


Simon Strandgaard

Hi,

OK… I hope I have fixed most of the install issues.
So it migth be working this time :slight_smile:

Tell me if version 0.2 is working better for you ?

download:
Download aeditor-ruby-0.2.tar.gz (AEditor [Ruby BSD])

It doesn’t work when RUBYLIB is set.

$ type aeditor
aeditor is hashed (/usr/bin/aeditor)
$ echo $RUBYLIB
/home/nobu/lib/ruby
$ aeditor
/usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:1:in require': No such file to load -- misc (LoadError) from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:1 from /usr/bin/aeditor:3:in require’
from /usr/bin/aeditor:3

You’d better to replace require’s.

···

At Thu, 3 Jul 2003 00:20:04 +0900, Simon Strandgaard wrote:


Nobu Nakada

Same problem here - running your “aeditor” script doesn’t work (
it’s unable to find the files required from main.rb ). What does work
is changing to the installed aeditor directory and running “main.rb”
manually.

A few other things that I noticed fairly quickly:

  1. How should I quit? - I found many ways to “quit” through
    unhandled exceptions (escape enter, shift-fkey, ctrl-c enter etc
    :slight_smile:
  2. Running in a large xterm, the top status bar seems to have a hard
    coded width
  3. No backspace (or foward-delete)? ctrl-h didn’t work either
  4. the “play” action raises an uncaught exception if nothing has been
    recorded yet. On that note, it might be nice to change “record” to
    “stop” during the record operation
  5. Single line is fairly sluggish (I know, I know, premature
    optimisation :slight_smile:

Looks promising tho, I’ll be keeping an eye on development. I quite
like the period as an EOL marker - hadn’t seen that before.

···

On Wed, 2 Jul 2003 08:39:16 +0900 Mark Wilson mwilson13@cox.net wrote:

This is first time I release a ruby-package. I am therefore very
curious
about install issues… Tell me if installation works for you :slight_smile:
Please tell me your ideas/opinions/suggestions/flames ?
[snip]

Hi,

I had to add ‘aeditor/’ to the require statements. I then had an error

when I tried to run it.


Stephen Lewis
slewis@paradise.net.nz

OK… I hope I have fixed most of the install issues.
So it migth be working this time :slight_smile:

Tell me if version 0.2 is working better for you ?

download:
Download aeditor-ruby-0.2.tar.gz (AEditor [Ruby BSD])

It doesn’t work when RUBYLIB is set.

I totally forgot about $RUBYLIB… Therefore my hardcoding
to $:[0] is a bad idea.

$:.unshift $:[0]+File::SEPARATOR+“aeditor”

How do I obtain the install location, in a clean way ?

You’d better to replace require’s.

I don’t quite follow ?

···

On Thu, 03 Jul 2003 01:46:13 +0900, nobu.nokad wrote:

At Thu, 3 Jul 2003 00:20:04 +0900, Simon Strandgaard wrote:


Simon Strandgaard

This is first time I release a ruby-package. I am therefore very
curious
about install issues… Tell me if installation works for you :slight_smile:
Please tell me your ideas/opinions/suggestions/flames ?
[snip]

Hi,

I had to add ‘aeditor/’ to the require statements. I then had an error

when I tried to run it.

Same problem here - running your “aeditor” script doesn’t work (
it’s unable to find the files required from main.rb ). What does work
is changing to the installed aeditor directory and running “main.rb”
manually.

Interesting, running the ‘aeditor’ script works here?
I guess I have an earlier installation, where I didn’t have any
‘lib/aeditor’ dir is screwing up here. I better reinstall ruby+aeditor
on my machine and look closer at the problem.

A few other things that I noticed fairly quickly:

  1. How should I quit? - I found many ways to “quit” through
    unhandled exceptions (escape enter, shift-fkey, ctrl-c enter etc
    :slight_smile:

Escape (ascii code 27) should terminate the application. The story about
Ncurses and the escape key is wierd: I think it is trying to compose a
escape code, if no cobination key is pressed within a second, the ascii
code 27 should be omitted ?

At the moment ascii-code 27 is the only way to terminate it.

  1. Running in a large xterm, the top status bar seems to have a hard
    coded width

Admitted… This is hardcoded, I will fix it later.

  1. No backspace (or foward-delete)? ctrl-h didn’t work either

The delete-key is not yet supported.

The backspace-key (ascii code 9) should be bound to cmd_backspace.
Maybe your backspace-key is generating something else ?

Can tell me what happens in the ‘log’ file if you press Escape ?
The message should look like the following:

Control#dispatch: Unknown event occured
ncurses-event = xxx

  1. the “play” action raises an uncaught exception if nothing has been
    recorded yet. On that note, it might be nice to change “record” to
    “stop” during the record operation

Oh… my fault, will fix it :slight_smile:

  1. Single line is fairly sluggish (I know, I know, premature
    optimisation :slight_smile:

three lines is the minimum: 2 lines containing menues, 1 line containing
text.
Rigth now it raises an exception if one attempt to make the window smaller
than 3 lines.

I assume you are in this ‘3 line’ situation ?

‘sluggish’ => slow ?
Is it slower than a window spanning multiple lines ?

Looks promising tho, I’ll be keeping an eye on development. I quite
like the period as an EOL marker - hadn’t seen that before.

EOL markers should be an enable/disable option :slight_smile:

···

On Wed, 02 Jul 2003 14:58:45 +0900, Stephen Lewis wrote:

On Wed, 2 Jul 2003 08:39:16 +0900 > Mark Wilson mwilson13@cox.net wrote:


Simon Strandgaard

Hi,

I totally forgot about $RUBYLIB… Therefore my hardcoding
to $:[0] is a bad idea.

$:.unshift $:[0]+File::SEPARATOR+“aeditor”

How do I obtain the install location, in a clean way ?

You’ll be possible by hook files.

You’d better to replace require’s.

I don’t quite follow ?

I meant files under aeditor should be required as under
aedtior, and replaced files under lib/aeditor as:

$ ruby -pi~ -e “sub!(/^(require ‘)(?=#{Dir.glob(’*.rb’).map{|s|s.chomp(‘.rb’)}.join(‘|’)})/o, '\1aeditor/)” *.rb

But still it errs at exit.

/usr/lib/ruby/site_ruby/1.8/aeditor/control.rb:219:in dispatch': unhandled exception from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:26:in run’
from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:24:in loop' from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:27:in run’
from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:36:in `launch’
from /usr/bin/aeditor:4

···

At Thu, 3 Jul 2003 01:20:48 +0900, Simon Strandgaard wrote:


Nobu Nakada

  1. No backspace (or foward-delete)? ctrl-h didn’t work either

The delete-key is not yet supported.

The backspace-key (ascii code 9) should be bound to cmd_backspace.
Maybe your backspace-key is generating something else ?

Can tell me what happens in the ‘log’ file if you press Backspace ?

···

On Wed, 02 Jul 2003 09:58:13 +0200, Simon Strandgaard wrote:

On Wed, 02 Jul 2003 14:58:45 +0900, Stephen Lewis wrote:

The message should look like the following:

Control#dispatch: Unknown event occured
ncurses-event = xxx


Simon Strandgaard

[snip]

A few other things that I noticed fairly quickly:

  1. How should I quit? - I found many ways to “quit” through
    unhandled exceptions (escape enter, shift-fkey, ctrl-c enter
    etc:)

Escape (ascii code 27) should terminate the application. The story
about Ncurses and the escape key is wierd: I think it is trying to
compose a escape code, if no cobination key is pressed within a
second, the ascii code 27 should be omitted ?
^^^^^^^ → emitted?

See below for what happens for me when I hit escape :slight_smile:

As to the delay, the ncurses man page mentions this in its environment
variables section:

ESCDELAY
Specifies the total time, in milliseconds, for which ncurses will
await a character sequence, e.g., a function key. The default
value, 1000 milliseconds, is enough for most uses. However, it is
made a variable to accommodate unusual applications.

  1. No backspace (or foward-delete)? ctrl-h didn’t work either

The delete-key is not yet supported.

The backspace-key (ascii code 9) should be bound to cmd_backspace.
Maybe your backspace-key is generating something else ?

Hitting backspace generates this in the log:

Control#dispatch: Unknown event occured
ncurses-event = 263

ctrl-h generates the same… :confused:

Can tell me what happens in the ‘log’ file if you press Escape ?
The message should look like the following:

Control#dispatch: Unknown event occured
ncurses-event = xxx

— [0] --------------------------------------------------
Fatal-Error in program!
please report this bug.
EXCEPTION:
RuntimeError
MESSAGE:

BACKTRACE:
./control.rb:218:in dispatch' main.rb:26:in run’
main.rb:24:in loop' main.rb:27:in run’
main.rb:36:in `launch’
main.rb:51

Given that in control.rb, lines 217-218:
when 27 # escape key
raise

:wink:

  1. Single line is fairly sluggish (I know, I know, premature
    optimisation :slight_smile:

three lines is the minimum: 2 lines containing menues, 1 line
containing text.
Rigth now it raises an exception if one attempt to make the window
smaller than 3 lines.

Sorry, I forgot the word “scrolling” - scrolling by a single line is
quite slow, but it is the same speed as scrolling by a page so I
imagine it can be sped up in the future. It wasn’t really a big thing,
just thought I’d mention it:)

···

On Wed, 2 Jul 2003 15:54:59 +0900 “Simon Strandgaard” 0bz63fz3m1qt3001@sneakemail.com wrote:

On Wed, 02 Jul 2003 14:58:45 +0900, Stephen Lewis wrote:


Stephen Lewis
slewis@paradise.net.nz

Hi,

I totally forgot about $RUBYLIB… Therefore my hardcoding
to $:[0] is a bad idea.

$:.unshift $:[0]+File::SEPARATOR+“aeditor”

How do I obtain the install location, in a clean way ?

You’ll be possible by hook files.

If so should I then create a ‘bin/post-setup.rb’ file ?
Or a ‘bin/post-install.rb’ file ?

I don’t like this approach. I much better like the ‘require’ approach.

You’d better to replace require’s.

I don’t quite follow ?

I meant files under aeditor should be required as under
aedtior, and replaced files under lib/aeditor as:

$ ruby -pi~ -e “sub!(/^(require ‘)(?=#{Dir.glob(’*.rb’).map{|s|s.chomp(‘.rb’)}.join(‘|’)})/o, '\1aeditor/)” *.rb

So every file which requires another file in the project, should say:
require ‘aeditor/file2require’

I have to figure out how make this fit into my cvs-repository.
I could make symlink hack… any ideas how to do this simplest ?

But still it errs at exit.

/usr/lib/ruby/site_ruby/1.8/aeditor/control.rb:219:in dispatch': unhandled exception from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:26:in run’
from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:24:in loop' from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:27:in run’
from /usr/lib/ruby/site_ruby/1.8/aeditor/main.rb:36:in `launch’
from /usr/bin/aeditor:4

Yes I gotta find a more gentle way to shutdown the application :slight_smile:

···

On Thu, 03 Jul 2003 03:48:50 +0900, nobu.nokad wrote:

At Thu, 3 Jul 2003 01:20:48 +0900, > Simon Strandgaard wrote:


Simon Strandgaard

[snip]

A few other things that I noticed fairly quickly:

  1. How should I quit? - I found many ways to “quit” through
    unhandled exceptions (escape enter, shift-fkey, ctrl-c enter
    etc:)

Escape (ascii code 27) should terminate the application. The story
about Ncurses and the escape key is wierd: I think it is trying to
compose a escape code, if no cobination key is pressed within a
second, the ascii code 27 should be omitted ?
^^^^^^^ → emitted?

‘omitted’ → ‘emitted’ :slight_smile:

See below for what happens for me when I hit escape :slight_smile:

As to the delay, the ncurses man page mentions this in its environment
variables section:

ESCDELAY
Specifies the total time, in milliseconds, for which ncurses will
await a character sequence, e.g., a function key. The default
value, 1000 milliseconds, is enough for most uses. However, it is
made a variable to accommodate unusual applications.

OK… I wasn’t aware of this environment variable.
I wonder if its possible to locally setenv to another value, so that it
only affects Aeditor ?

  1. No backspace (or foward-delete)? ctrl-h didn’t work either

The delete-key is not yet supported.

The backspace-key (ascii code 9) should be bound to cmd_backspace.
Maybe your backspace-key is generating something else ?

Hitting backspace generates this in the log:

Control#dispatch: Unknown event occured
ncurses-event = 263

ctrl-h generates the same… :confused:

Doing some decimal2octal conversion:

#define KEY_BACKSPACE 0407 /* backspace key */

I have now added this keybinding :slight_smile:

Can tell me what happens in the ‘log’ file if you press Escape ?
The message should look like the following:

Given that in control.rb, lines 217-218:
when 27 # escape key
raise

:wink:

I must find a more gentle way to terminate this application :slight_smile:

  1. Single line is fairly sluggish (I know, I know, premature
    optimisation :slight_smile:

three lines is the minimum: 2 lines containing menues, 1 line
containing text.
Rigth now it raises an exception if one attempt to make the window
smaller than 3 lines.

Sorry, I forgot the word “scrolling” - scrolling by a single line is
quite slow, but it is the same speed as scrolling by a page so I
imagine it can be sped up in the future. It wasn’t really a big thing,
just thought I’d mention it:)

Yes vertical-movement is extremly slow. This is because of the undo/redo
system, which takes a full snapshot of the buffer everytime.
I have not yet implemented a Buffer#get_state_xy… which is suppose only
to take a snapshot of the (X, Y) position.

I follow the idiom: make it work, make it right, make it fast.
Right now its about getting things working :slight_smile:

···

On Wed, 02 Jul 2003 18:07:02 +0900, Stephen Lewis wrote:

On Wed, 2 Jul 2003 15:54:59 +0900 > “Simon Strandgaard” 0bz63fz3m1qt3001@sneakemail.com wrote:

On Wed, 02 Jul 2003 14:58:45 +0900, Stephen Lewis wrote:


Simon Strandgaard

Thanks Nobu, require ‘aeditor/’ is indeed nicer than $:.hacking.
I have just committed these changes into cvs.

I would like to make aeditor installable via ‘raa-install’.

begin
require ‘raainstall’
RAAInstall.install( [ ‘ncurses-ruby’ ] )
rescue LoadError?
# No dependencies
end

But Ncurses doesn’t seem to be visible to raa-install ?
I looked on its RAA entry and it doesn’t point to a tarball, I guess its
the reason why it doesn’t work with raa-install ?
http://raa.ruby-lang.org/list.rhtml?name=ncurses-ruby

Alternative: Can I legaly bundle ‘ncurses-ruby’ within my tarball ?
Should I add any license files ?

Any advices/hints ?

···

On Wed, 02 Jul 2003 22:17:47 +0200, Simon Strandgaard wrote:

On Thu, 03 Jul 2003 03:48:50 +0900, nobu.nokad wrote:

I meant files under aeditor should be required as under
aedtior, and replaced files under lib/aeditor as:

$ ruby -pi~ -e “sub!(/^(require ‘)(?=#{Dir.glob(’*.rb’).map{|s|s.chomp(‘.rb’)}.join(‘|’)})/o, '\1aeditor/)” *.rb

So every file which requires another file in the project, should say:
require ‘aeditor/file2require’


Simon Strandgaard

I have made a 3rd file release, containing this new stuff!!
Plus its now terminating much more gently.

http://raa.ruby-lang.org/list.rhtml?name=aeditor

Open questions:
1: Which direction do you think Aeditor should go ?
2: Should I use xml/yaml/pstore for storing customization ?
3: Which xml/yaml library should I use ?
4: Should I care about raa-install ?

Tell me your opinion ?

···

On Wed, 02 Jul 2003 23:48:50 +0200, Simon Strandgaard wrote:

Thanks Nobu, require ‘aeditor/’ is indeed nicer than $:.hacking.
I have just committed these changes into cvs.


Simon Strandgaard