Subject: Re: [sup-devel] turnsole alpha preview

From: William Morgan <[email-masked]>
Date: Sat, 02 Apr 2011 20:40:39 +0000

Reformatted excerpts from Michael Stapelberg's message of 2011-04-02:
> It looks very promising! It’s fast and I very much like the parallel loading of
> threads for example. So, keep it up, I’m looking forward to actually using it :).

Great!

> BTW: I still get some UTF-8 stacktraces in heliotrope (with latest master). Is
> that something you are interested in fixing right now or should I report these
> later (should they still exist then)?

I've love a stacktrace for both that and the gpg key thing in turnsole. Thanks!
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Mariano Mara <[email-masked]>
Date: Sat, 2 Apr 2011 18:32:09 -0300

On 02.04.11 18:15, William Morgan wrote:
> Ok, if you've managed to get Heliotrope running, you can now try a super-alpha
> preview of Turnsole, the curses client.
>
> Get it by cloning
>   https://[email-masked]/wmorgan/turnsole.git
> and then following the instructions in HACKING. You will have to update your
> Heliotrope repo to the latest master as well.
>
> Things that work: searching, getting results from the server, viewing threads,
> changing labels in thread-view-mode. (The very, very basics.)
>
> Things that don't work: almost everything else. Any by "don't work" I mean will
> crash with a backtrace. Lots of code still needs to be updated. I've also
> ripped out various hooks and config options when they've gotten in my way.
>
> But generally this should be a faster, leaner experience. It's at roughly 1/3
> the sup codebase and I'm hoping it won't grow too much more.
>
> For fun, run two turnsoles at the same time and marvel at your power.
> --

Hi there,
ncursesw is giving me a hard time ("invalid value for @cert_chain" being the error).
I tried ncursesw 1.2.4.1, 1.2.4.2 and 1.2.4.3 but all failed with the
same error. Since I know nothin' about Ruby I was hoping somebody can
suggest a way to fix this so that I can try turnsole (find below what
I did).

TIA,
Mariano

mariano@kafka:~/Sandbox/turnsole$ ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
mariano@kafka:~/Sandbox/turnsole$ gem --version
1.7.1
mariano@kafka:~/Sandbox/turnsole$ sudo gem install trollop ncursesw console
Successfully installed trollop-1.16.2
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::FormatException)
ncursesw-1.2.4.3 has an invalid value for @cert_chain
mariano@kafka:~/Sandbox/turnsole$ sudo gem install ncursesw --version '<1.2.4.3'
Fetching: ncursesw-1.2.4.2.gem (100%)
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::FormatException)
ncursesw-1.2.4.2 has an invalid value for @cert_chain

_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: William Morgan <[email-masked]>
Date: Sun, 03 Apr 2011 20:52:08 +0000

Hi Matthieu,

Thanks for the detailed bug reports.

Reformatted excerpts from Matthieu Rakotojaona's message of 2011-04-02:
> >/home/rakoo/src/turnsole/lib/turnsole/ncurses-patches.rb:19:in `block in <module:Curses>': undefined method `color!' for Curses:Module (NoMethodError)

I think this is fixed in the latest turnsole master. Can you please try it?

> >/home/rakoo/src/turnsole/lib/turnsole/accounts.rb:39:in `block in add_account': undefined method `gpgkey' for nil:NilClass (NoMethodError)

Also should be fixed in the latest turnsole master.

> Now with heliotrope, I have the problems with the encoding :
> - When I search for words with "é", I have an error :
> 
> >HeliotropeServer::RequestError - can't parse query: parse error: line 1: syntax error, unexpected $end, expecting WORD:

Good bug! I didn't test this at all. This one I am going to have to spend a
little bit of time on.

> >ArgumentError - invalid byte sequence in UTF-8:
> > /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/parser.rb:217:in `split'

Can you try the latest heliotrope master? I think I've fixed this.

> But I do think everyone should use UTF-8.

I kind of agree. Heliotrope is utf-8 specific. But in Turnsole I am trying to
be nice and support the system encoding.

> In a totallly unrelated note, do you plan on syncing back heliotrope work
> with the maildir directory ? Just to know.

No. Since Heliotrope is a server, I plan on avoiding that class of problem
entirely by a) making it easy to extract your email from Heliotrope, if you
decide to not use it any more, and b) eventually adding an IMAP emulation
layer, if you want to use other clients.

So you would entrust Heliotrope to both store, as well as index, your email, in
whatever way it wants to.
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: William Morgan <[email-masked]>
Date: Sat, 02 Apr 2011 18:15:48 +0000

Get it by cloning

---

From: William Morgan <[email-masked]>
Date: Sun, 03 Apr 2011 20:44:17 +0000

> I've love a stacktrace for both that and the gpg key thing in turnsole.

I think I've fixed both of these. Can you try with the latest heliotrope
and the latest turnsole master?
-- 
William <[email-masked]>
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Michael Stapelberg <[email-masked]>
Date: Sat, 02 Apr 2011 21:00:55 +0200

Hi William,

I just tried turnsole/heliotrope and was able to import one of my maildirs.
After fixing a complaint in lib/turnsole/accounts.rb:39 about calling gpgkey on
nil, I could run it.

Best regards,
Michael

---

From: Matthieu Rakotojaona <[email-masked]>
Date: Sun, 3 Apr 2011 00:39:41 +0200

Hello there,

I'd like to give you some backtraces of the problems that occur when I
use heliotrope/turnsole. I have absolutely no knowledge in ruby, so I
hope this will help everyone who is developing

I'd like to point out a few problems about turnsole :
- you need to install the 'locale' gem
- I happen to have a 256colors terminal (rxvt-unicode-256color), and
the "color!" method in ncurses-patch.rb seems to fail :

>rakoo@Otokar % ruby -Ilib -I ../heliotrope/lib bin/turnsole
>	from /home/rakoo/src/turnsole/lib/turnsole/ncurses-patches.rb:19:in `times'
>	from /home/rakoo/src/turnsole/lib/turnsole/ncurses-patches.rb:19:in `<module:Curses>'
>	from /home/rakoo/src/turnsole/lib/turnsole/ncurses-patches.rb:1:in `<top (required)>'
>	from <internal:lib/rubygems/custom_require>:29:in `require'
>	from <internal:lib/rubygems/custom_require>:29:in `require'
>	from /home/rakoo/src/turnsole/lib/turnsole.rb:16:in `<top (required)>'
>	from <internal:lib/rubygems/custom_require>:29:in `require'
>	from <internal:lib/rubygems/custom_require>:29:in `require'
>	from bin/turnsole:5:in `<main>'

- When I switch back to xterm with 8 colors, the previous error
doesn't occur (the if test fais), but I have a problem with "gpgkey" :

rakoo@Otokar % ruby -I lib -I ../heliotrope/lib bin/turnsole
>        from /home/rakoo/src/turnsole/lib/turnsole/accounts.rb:39:in `each'
>        from /home/rakoo/src/turnsole/lib/turnsole/accounts.rb:39:in `add_account'
>        from /home/rakoo/src/turnsole/lib/turnsole/accounts.rb:25:in `initialize'
>        from /home/rakoo/src/turnsole/lib/turnsole.rb:96:in `new'
>        from /home/rakoo/src/turnsole/lib/turnsole.rb:96:in `setup!'
>        from bin/turnsole:75:in `<main>'

These happened with ruby v1.8 and 1.9.2, and gems v1.3.7.

Now with heliotrope, I have the problems with the encoding :
- When I search for words with "é", I have an error :

> bin/heliotrope-server:137:in `rescue in block in <class:HeliotropeServer>'
> bin/heliotrope-server:114:in `block in <class:HeliotropeServer>'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:1126:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:1126:in `block in compile!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:in `instance_eval'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:in `route_eval'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:693:in `block (2 levels) in route!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:741:in `block in process_route'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:in `catch'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:in `process_route'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:692:in `block in route!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:in `each'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:in `route!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:826:in `dispatch!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:in `block in call!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `instance_eval'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `block in invoke'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `catch'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `invoke'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:in `call!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:604:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/showexceptions.rb:21:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
> /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
> /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
> /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
>127.0.0.1 - - [03/Apr/2011 00:24:50] "GET /search?q=%22%C3%A9%22 HTTP/1.1" 500 82586 0.0504
>Otokar - - [03/Apr/2011:00:24:50 CEST] "GET /search?q=%22%C3%A9%22 HTTP/1.1" 500 82586
>http://localhost:8042/search?q=%22zegzaegsg%22 -> /search?q=%22%C3%A9%22

- an error also happens when I want to see some messages, that doesn't
happen when I use ruby v1.8 instead :

> /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/parser.rb:217:in `parse_header'
> /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/parser.rb:194:in `parse_low'
> /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/parser.rb:183:in `parse'
> /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/parser.rb:331:in `parse'
> /usr/lib/ruby/gems/1.9.1/gems/rmail-1.0.0/lib/rmail/parser.rb:345:in `read'
> /home/rakoo/src/heliotrope/lib/heliotrope/message.rb:17:in `parse!'
> bin/heliotrope-server:292:in `load_actual_message'
> bin/heliotrope-server:297:in `message_to_html'
> bin/heliotrope-server:209:in `block in <class:HeliotropeServer>'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:1125:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:1125:in `block in compile!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:in `instance_eval'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:709:in `route_eval'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:693:in `block (2 levels) in route!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:741:in `block in process_route'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:in `catch'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:738:in `process_route'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:692:in `block in route!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:in `each'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:691:in `route!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:826:in `dispatch!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:in `block in call!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `instance_eval'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `block in invoke'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `catch'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:791:in `invoke'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:619:in `call!'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/base.rb:604:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/sinatra-1.2.1/lib/sinatra/showexceptions.rb:21:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:48:in `_call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/lint.rb:36:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/showexceptions.rb:24:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/commonlogger.rb:18:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/content_length.rb:13:in `call'
> /usr/lib/ruby/gems/1.9.1/gems/rack-1.2.2/lib/rack/handler/webrick.rb:52:in `service'
> /usr/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
> /usr/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
> /usr/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'

These problems seem to happen because of my mails being encoded in
UTF-8. When the charset is "ISO-8859-1" or "US-ASCII", they appear
fine. But I do think everyone should use UTF-8.

In a totallly unrelated note, do you plan on syncing back heliotrope
work with the maildir directory ? Just to know.

Thank you for your sweet coding,

-- 
Matthieu RAKOTOJAONA