Boo

booish(2) instability

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.8.1
  • Fix Version/s: 0.8.2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

There is two reproducible problems that have been reported on the mailing-list by 'Doug'.

  • a System.ArgumentOutOfRangeException is throwed when booish is run in a emacs shell.
  • entering a blank line bamboozle booish (at least on mono).

also, reported by Darius Damalakas :

  • ArgumentOutOfRangeException when number of characters > Console.BufferWidth are entered (maybe related to emacs shell error above)

Activity

Hide
Cedric Vivier added a comment -

fixed in rev. 2938

Show
Cedric Vivier added a comment - fixed in rev. 2938
Hide
Doug Morgan added a comment -

I see some changes already made to InteractiveInterpreter2.boo. I played around in the emacs shell buffer and have some suggestions for other ways to fix emac's problems with booish. This is my first time looking at anything related to .NET, mono, or boo, so don't laugh too hard.

All my changes are relative to the InteractiveInterpreter2.boo of revision 2930 of src.

In the Console for an emacs shell buffer, at least two things seem to be quite different than a standard Console:
1) Console.BufferWidth is always 0.
2) An exception is thrown if Console.ForegroundColor is set.

So, it is easy to test for lack of capabilities and set the appropriate disabling flags to true. I added this code to Initialize() after _disableColors and _disableAutocompletion were possibly set by environment variables:
#DRM - hack for emacs shell buffer not being able to set foreground color.
if not _disableColors:
try:
Console.ForegroundColor = ConsoleColor.Black
Console.ResetColor()
except:
_disableColors = true
#DRM: Hack for emacs shell buffer.
_disableAutocompletion = true if Console.BufferWidth == 0
With this change (and the next change below) you don't have to set environment variables. It just works.

One more change fixes the autocompletion-related problems with emacs. Replace the line:
if cx < len(line): #line-editing support
with the line:
if cx < len(line) and not _disableAutocompletion: #line-editing support
This is necessary because Console.BufferWidth being 0 causes cx < len(line) to be true when you would prefer it to be false.

I also fixed the blank line problem by changing the line:
_indent--
to the line:
_indent-- if _indent > 0
You probably don't need this change as some different changes probably fixed it already. With this change, every time you enter a blank line, the previous value prints out again. You may or may not like this behavior.

Finally, I do suggest doing something about the colors. As a color challenged person, I do spend time trying to turn colors off on many applications I run, but default booish colors are worse than most.

Doug

Show
Doug Morgan added a comment - I see some changes already made to InteractiveInterpreter2.boo. I played around in the emacs shell buffer and have some suggestions for other ways to fix emac's problems with booish. This is my first time looking at anything related to .NET, mono, or boo, so don't laugh too hard. All my changes are relative to the InteractiveInterpreter2.boo of revision 2930 of src. In the Console for an emacs shell buffer, at least two things seem to be quite different than a standard Console: 1) Console.BufferWidth is always 0. 2) An exception is thrown if Console.ForegroundColor is set. So, it is easy to test for lack of capabilities and set the appropriate disabling flags to true. I added this code to Initialize() after _disableColors and _disableAutocompletion were possibly set by environment variables: #DRM - hack for emacs shell buffer not being able to set foreground color. if not _disableColors: try: Console.ForegroundColor = ConsoleColor.Black Console.ResetColor() except: _disableColors = true #DRM: Hack for emacs shell buffer. _disableAutocompletion = true if Console.BufferWidth == 0 With this change (and the next change below) you don't have to set environment variables. It just works. One more change fixes the autocompletion-related problems with emacs. Replace the line: if cx < len(line): #line-editing support with the line: if cx < len(line) and not _disableAutocompletion: #line-editing support This is necessary because Console.BufferWidth being 0 causes cx < len(line) to be true when you would prefer it to be false. I also fixed the blank line problem by changing the line: _indent-- to the line: _indent-- if _indent > 0 You probably don't need this change as some different changes probably fixed it already. With this change, every time you enter a blank line, the previous value prints out again. You may or may not like this behavior. Finally, I do suggest doing something about the colors. As a color challenged person, I do spend time trying to turn colors off on many applications I run, but default booish colors are worse than most. Doug

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: