[ANN] Aeditor-0.1 is unleashed

  • Thread starter Simon Strandgaard
  • Start date
S

Simon Strandgaard

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:
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 :)
Please tell me your ideas/opinions/suggestions/flames ?
 
S

Simon Strandgaard

download:
http://prdownloads.sourceforge.net/metaeditor/aeditor-ruby-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 :)
Please tell me your ideas/opinions/suggestions/flames ?


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?
 
J

Joao Pedrosa

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:
 
S

Stephen Lewis

--=.ZIN7HU.AVb,p+L
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

This is first time I release a ruby-package. I am therefore very
curious
about install issues.. Tell me if installation works for you :)
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.

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
:)
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 :)

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.

--
Stephen Lewis
(e-mail address removed)

--=.ZIN7HU.AVb,p+L
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/AmZ0IgTEtLC7U/IRArYLAJ4ipiWGmcR4W7xlDetbxMoydySMuACdE9zn
WNQRx7+HjFAWPsX6sUcO0WA=
=0DMx
-----END PGP SIGNATURE-----

--=.ZIN7HU.AVb,p+L--
 
S

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 :)
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
:)

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.

2) 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.

3) 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

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

Oh... my fault, will fix it :)

5) Single line is fairly sluggish (I know, I know, premature
optimisation :)

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 :)
 
S

Simon Strandgaard

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.

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 :)
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 :)
 
S

Stephen Lewis

--=.Al)EDmBL5N_AQE
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

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 :)

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.
...
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... :/

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

;)
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:)

--
Stephen Lewis
(e-mail address removed)

--=.Al)EDmBL5N_AQE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/ApJcIgTEtLC7U/IRAqyjAKCj8DJtBe3/etszU/Z6Lg8eimZe4ACfQvvw
yRuz9yZlbYjIfxup9JpzNr4=
=Mvoj
-----END PGP SIGNATURE-----

--=.Al)EDmBL5N_AQE--
 
S

Simon Strandgaard

^^^^^^^ --> emitted?

'omitted' -> 'emitted' :)

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

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 ?

Hitting backspace generates this in the log:

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

ctrl-h generates the same... :/

Doing some decimal2octal conversion:

#define KEY_BACKSPACE 0407 /* backspace key */

I have now added this keybinding :)

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

;)

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

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 :)
 
N

nobu.nokada

Hi,

At Thu, 3 Jul 2003 00:20:04 +0900,
Simon said:
OK.. I hope I have fixed most of the install issues.
So it migth be working this time :)

Tell me if version 0.2 is working better for you ?

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

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.
 
S

Simon Strandgaard

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 ?
 
N

nobu.nokada

Hi,

At Thu, 3 Jul 2003 01:20:48 +0900,
Simon said:
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.
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
 
S

Simon Strandgaard

Hi,

At Thu, 3 Jul 2003 01:20:48 +0900,
Simon said:
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.

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 :)
 
S

Simon Strandgaard

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

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 ?
 

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

Similar Threads


Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top