* [sup-talk] sup on opensolaris
[not found] <1249059559-sup-8960@matrix>
@ 2009-08-04 9:56 ` Tomas Carnecky
0 siblings, 0 replies; 4+ messages in thread
From: Tomas Carnecky @ 2009-08-04 9:56 UTC (permalink / raw)
I hate mailing lists that force me to subscribe. Luckily I have a
friend who was already subscribed and forwarded me the emails.
>
>> I have an ugly patch for lib/sup/textfield.rb that uses its own
>> string
>> buffer instead of relying on field_buffer(). It's not perfect, but it
>> at least allows me to write emails and assign tags.
>
> If it's not too much work to clean up, I'd be interested in this
> patch.
> The field buffer stuff is broken in weird ways anyways (the history
> never seems to be quite right), and anything that reduces the reliance
> on ncurses is always the right approach.
I never programed in ruby before and I don't intend to learn it. Feel
free to look at the last commit in the solaris-fixes:curses-form-
buffer branch. It is the simplest possible solution to the problem at
hand that didn't require me to learn too much ruby. It still needs a
considerable amount of work before it is useful (like, being able to
delete characters in the stringio buffer etc). I'm not planing to work
on the patch in the foreseeable future, but someone else might find
the patch useful as a starting point.
>
>> - strftime("%P") is a GNU extension, I work around this by using
>> strftime("%p").downcase.
>
> Submit a patch! I'm fine with this.
>
>> - Iconv.iconv(target + "//IGNORE", charset, text + " ") <- the "//
>> IGNORE" is causing an InvalidEncoding exception, removing it didn't
>> seem to cause any regressions
>
> Hm, this is a trickier one. Allegedly the //IGNORE reduces the
> exceptions thrown by Iconv, but since we're catching them all anyways,
> we might be able to get away with removing this. Or we could
> special-case it to your arch.
Both patches are available in the solaris-fixes master branch.
tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-talk] sup on opensolaris
@ 2009-07-30 18:31 Tomas Carnecky
2009-07-31 15:56 ` William Morgan
0 siblings, 1 reply; 4+ messages in thread
From: Tomas Carnecky @ 2009-07-30 18:31 UTC (permalink / raw)
Kids, don't try this at home, it kills kittens! Well, not directly,
but trying to get sup running will drive you so mad you will try to
kill everything that moves. In other words: it doesn't work and the
fact that I'm trying this on opensolaris doesn't make it any easier.
The biggest issue is that the ruby binary from the package manager is
linked against the ancient solaris curses.so but ruby-ncurses needs
ncurses.so (which, to make the issue even more complicated, is in /usr/
gnu/lib). When both libraries are liked into one application, they
don't play along well (=segfaults). I had to compile ruby from source
and make sure it's not liked with curses.so, and also patch ruby-
ncurses slightly. I then managed to get sup to start up and read my
mails. However, there is one issue left that I'm not able to fix:
Ncurses.field.field_buffer() is returning garbage, and that makes is
impossible to write mails, search and set tags etc. The problem is
somewhere inside sup, as the ruby-ncurses example form2.rb is working
just fine (maybe it has something to do with encoding/locale?).
I have an ugly patch for lib/sup/textfield.rb that uses its own string
buffer instead of relying on field_buffer(). It's not perfect, but it
at least allows me to write emails and assign tags.
Other issues:
- strftime("%P") is a GNU extension, I work around this by using
strftime("%p").downcase.
- Iconv.iconv(target + "//IGNORE", charset, text + " ") <- the "//
IGNORE" is causing an InvalidEncoding exception, removing it didn't
seem to cause any regressions
tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-talk] sup on opensolaris
2009-07-30 18:31 Tomas Carnecky
@ 2009-07-31 15:56 ` William Morgan
2009-07-31 16:59 ` Ben Walton
0 siblings, 1 reply; 4+ messages in thread
From: William Morgan @ 2009-07-31 15:56 UTC (permalink / raw)
Hi Tom,
Thanks for the report! It's nice to have another system "supported", at
least technically.
Reformatted excerpts from Tomas Carnecky's message of 2009-07-30:
> However, there is one issue left that I'm not able to fix:
> Ncurses.field.field_buffer() is returning garbage, and that makes is
> impossible to write mails, search and set tags etc. The problem is
> somewhere inside sup, as the ruby-ncurses example form2.rb is working
> just fine (maybe it has something to do with encoding/locale?).
The ncurses field stuff is some hellish bullshit that I hate with all my
heart. It may very well be a locale problem... I really don't want to
debug it.
> I have an ugly patch for lib/sup/textfield.rb that uses its own string
> buffer instead of relying on field_buffer(). It's not perfect, but it
> at least allows me to write emails and assign tags.
If it's not too much work to clean up, I'd be interested in this patch.
The field buffer stuff is broken in weird ways anyways (the history
never seems to be quite right), and anything that reduces the reliance
on ncurses is always the right approach.
> - strftime("%P") is a GNU extension, I work around this by using
> strftime("%p").downcase.
Submit a patch! I'm fine with this.
> - Iconv.iconv(target + "//IGNORE", charset, text + " ") <- the "//
> IGNORE" is causing an InvalidEncoding exception, removing it didn't
> seem to cause any regressions
Hm, this is a trickier one. Allegedly the //IGNORE reduces the
exceptions thrown by Iconv, but since we're catching them all anyways,
we might be able to get away with removing this. Or we could
special-case it to your arch.
--
William <wmorgan-sup at masanjin.net>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [sup-talk] sup on opensolaris
2009-07-31 15:56 ` William Morgan
@ 2009-07-31 16:59 ` Ben Walton
0 siblings, 0 replies; 4+ messages in thread
From: Ben Walton @ 2009-07-31 16:59 UTC (permalink / raw)
Excerpts from William Morgan's message of Fri Jul 31 11:56:52 -0400 2009:
> Thanks for the report! It's nice to have another system "supported", at
> least technically.
I'm the ruby maintainer for OpenCSW, which provides binary packages
for solaris 8+ linked against a modern curses. Everything lives in
/opt/csw/, so it's self contained except where linking to system
stuff.
I _think_ this should all work on opensolaris (but I don't use it) if
you're interested in trying it. That won't help things like %P (%z is
another common offender I come across), but it may make part of your
life easier.
You'll get a modern libiconv too, although the version in opensolaris
shouldn't be that old?
http://www.opencsw.org/
HTH
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302
GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu
Contact me to arrange for a CAcert assurance meeting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/sup-talk/attachments/20090731/84805c4a/attachment.bin>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-04 9:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1249059559-sup-8960@matrix>
2009-08-04 9:56 ` [sup-talk] sup on opensolaris Tomas Carnecky
2009-07-30 18:31 Tomas Carnecky
2009-07-31 15:56 ` William Morgan
2009-07-31 16:59 ` Ben Walton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox