Patch for gnu readline support library and input port.

Bug #363947 reported by Kurt Stephens
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
New
Undecided
Unassigned

Bug Description

I've decided to work on a readline library for ikarus. Why, because I *love* Ikarus :), but I hate the default REPL :(.

Attached is a basic implementation. There are some issues with filling the port string buffer, but I should have that fixed shortly.

I'm not sure how to (import ikarus.string) to get access to string-copy! so I created a softlink: ln -s ../../scheme/ikarus.string.ss lib/ikarus/string.ss . Anybody know the correct way to import definitions from the ikarus.*.ss files under scheme/?

I get a segmentation fault upon CTRL-D, probably due to C readline() returning a NULL. I don't think the 'char* return type correctly coerces NULL to #f.

Can anybody recommend a place to host bzr repos?

Revision history for this message
Kurt Stephens (kurt-launchpad) wrote :
Revision history for this message
Kurt Stephens (kurt-launchpad) wrote :

BTW: This patch works under Ubuntu. I didn't bother with Cygwin or OS X.

description: updated
Revision history for this message
Derick Eddington (derick-eddington) wrote : Re: [Bug 363947] [NEW] Patch for gnu readline support library and input port.

On Mon, 2009-04-20 at 02:28 +0000, Kurt Stephens wrote:
> I've decided to work on a readline library for ikarus. Why, because I
> *love* Ikarus :), but I hate the default REPL :(.

JTMI, you can use rlwrap. See this thread:
http://groups.google.com/group/ikarus-users/browse_thread/thread/2cc1f989b218e4c2

Or my "inferior Scheme" Emacs mode (which is a lot better than
readline):
https://code.launchpad.net/~derick-eddington/scheme-mode/derick-.emacs.d

> I'm not sure how to (import ikarus.string) to get access to
> string-copy!

string-copy! is exported from the (ikarus) library.

> so I created a softlink: ln -s ../../scheme/ikarus.string.ss
> lib/ikarus/string.ss . Anybody know the correct way to import
> definitions from the ikarus.*.ss files under scheme/?

If they're not exported from the (ikarus) library, it's intentional,
because they're not intended to be public. You can do:

(list-sort (lambda (a b) (string<? (symbol->string a) (symbol->string b)))
           (environment-symbols (environment '(ikarus))))

to get a (sorted) list of all the exports from (ikarus) (which is a
superset of the standard R6RS (rnrs) library). You can also look at the
definition of identifier->library-map in ikarus.dev/scheme/makefile.ss .

> Can anybody recommend a place to host bzr repos?

Yes: launchpad.net . I recommend following the "Read the guide" link.
Also look at https://launchpad.net/ikarus-libraries to see how some of
us (including me) have been using LaunchPad.

--
: Derick
----------------------------------------------------------------

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.