[ANN] Aeditor-0.1 is unleashed

Discussion in 'Ruby' started by Simon Strandgaard, Jul 1, 2003.

  1. 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 ?

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 1, 2003
    #1
    1. Advertising

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

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

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #2
    1. Advertising

  3. Simon Strandgaard

    Joao Pedrosa Guest

    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:
    > 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 ?
    >
    > --
    > Simon Strandgaard
    >
    >
    Joao Pedrosa, Jul 2, 2003
    #3
  4. --=.ZIN7HU.AVb,p+L
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: 7bit

    On Wed, 2 Jul 2003 08:39:16 +0900
    Mark Wilson <> 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 :)
    > >> 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


    --=.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--
    Stephen Lewis, Jul 2, 2003
    #4
  5. On Wed, 02 Jul 2003 14:58:45 +0900, Stephen Lewis wrote:

    > On Wed, 2 Jul 2003 08:39:16 +0900
    > Mark Wilson <> 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 :)
    >> >> 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 :)

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #5
  6. On Wed, 02 Jul 2003 12:27:20 +0900, Joao Pedrosa wrote:

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

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #6
  7. --=.Al)EDmBL5N_AQE
    Content-Type: text/plain; charset=US-ASCII
    Content-Transfer-Encoding: 7bit

    On Wed, 2 Jul 2003 15:54:59 +0900
    "Simon Strandgaard" <> wrote:

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

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

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

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


    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

    ;)

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


    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


    --=.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--
    Stephen Lewis, Jul 2, 2003
    #7
  8. On Wed, 02 Jul 2003 18:07:02 +0900, Stephen Lewis wrote:

    > On Wed, 2 Jul 2003 15:54:59 +0900
    > "Simon Strandgaard" <> wrote:
    >
    >> On Wed, 02 Jul 2003 14:58:45 +0900, Stephen Lewis wrote:

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


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


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

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


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


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


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

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

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #8
  9. Simon Strandgaard

    Guest

    Hi,

    At Thu, 3 Jul 2003 00:20:04 +0900,
    Simon Strandgaard wrote:
    > 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.

    --
    Nobu Nakada
    , Jul 2, 2003
    #9
  10. On Thu, 03 Jul 2003 01:46:13 +0900, nobu.nokad wrote:
    > At Thu, 3 Jul 2003 00:20:04 +0900, Simon Strandgaard wrote:
    >> 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.


    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 ?

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #10
  11. Simon Strandgaard

    Guest

    Hi,

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

    --
    Nobu Nakada
    , Jul 2, 2003
    #11
  12. On Thu, 03 Jul 2003 03:48:50 +0900, nobu.nokad wrote:

    > Hi,
    >
    > At Thu, 3 Jul 2003 01:20:48 +0900,
    > Simon Strandgaard wrote:
    >> 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 :)

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #12
  13. 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'


    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 ?

    --
    Simon Strandgaard
    Simon Strandgaard, Jul 2, 2003
    #13
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Strandgaard

    [ANN] Aeditor 0.6, feedback wanted

    Simon Strandgaard, Jul 11, 2003, in forum: Ruby
    Replies:
    4
    Views:
    151
    Simon Strandgaard
    Jul 13, 2003
  2. Recheis Meinrad

    AW: [ann] AEditor 0.10, folding added

    Recheis Meinrad, Aug 12, 2003, in forum: Ruby
    Replies:
    1
    Views:
    94
    Simon Strandgaard
    Aug 12, 2003
  3. Jim Weirich
    Replies:
    1
    Views:
    83
    Gavin Sinclair
    Aug 16, 2003
  4. Simon Strandgaard

    [ANN] AEditor 0.12 released

    Simon Strandgaard, Apr 1, 2004, in forum: Ruby
    Replies:
    0
    Views:
    87
    Simon Strandgaard
    Apr 1, 2004
  5. Simon Strandgaard

    [ANN] aeditor 1.0 released

    Simon Strandgaard, Jul 5, 2004, in forum: Ruby
    Replies:
    23
    Views:
    307
    Neil Hodgson
    Jul 8, 2004
Loading...

Share This Page