MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

Nils Anders Danielsson
On Tue, 07 Mar 2006, "Brian Hulley" <[hidden email]> wrote:

(Moved from ghc-users.)

> Brian Hulley wrote:

> (time for a proper email client to be written in Haskell! ;-) )

I had the same thought yesterday, after an Emacs-Lisp session in which
I was trying to get Gnus to do exactly what I wanted it to...

Out of curiosity, how much work would it take to write an easily
configurable, decent MUA in Haskell? I don't know too much about MUAs,
but I have a feeling that we already have quite a few libraries that
are needed for the job: UIs (including HTML rendering...), plugins,
various protocols, encryption...

--
/NAD

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: MUA written in Haskell, and MTA in Haskell help?

Shae Matijs Erisson
Nils Anders Danielsson <[hidden email]> writes:

> I had the same thought yesterday, after an Emacs-Lisp session in which
> I was trying to get Gnus to do exactly what I wanted it to...

Yeah, same here. I use Gnus and it's nice, but occasionally I want to erase it
from the timestream.

> Out of curiosity, how much work would it take to write an easily
> configurable, decent MUA in Haskell? I don't know too much about MUAs,
> but I have a feeling that we already have quite a few libraries that
> are needed for the job: UIs (including HTML rendering...), plugins,
> various protocols, encryption...

It wouldn't be too hard. I'd suggest you start with Tuomo Valkonen's Riot[1]
and go for something like mutt.
I'm sure you could steal lots of useful code from Peter Simons' Postmaster[2].

Speaking of which, I've tried to use Postmaster for my own personal domain,
ScannedInAvian.com, but I've had various difficulties. Is anyone else using it
for their domain? I'd like to find anti-spam features that match those of
postfix, like greylisting, dns name checks, etc.

[1] http://modeemi.fi/~tuomov/riot/
[2] http://postmaster.cryp.to/
--
I've tried to teach people autodidactism,                | ScannedInAvian.com
but it seems they always have to learn it for themselves.| Shae Matijs Erisson

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

Brian Hulley
In reply to this post by Nils Anders Danielsson
Nils Anders Danielsson wrote:

> On Tue, 07 Mar 2006, "Brian Hulley" <[hidden email]> wrote:
>
> (Moved from ghc-users.)
>
>> Brian Hulley wrote:
>
>> (time for a proper email client to be written in Haskell! ;-) )
>
> I had the same thought yesterday, after an Emacs-Lisp session in which
> I was trying to get Gnus to do exactly what I wanted it to...
>
> Out of curiosity, how much work would it take to write an easily
> configurable, decent MUA in Haskell? I don't know too much about MUAs,
> but I have a feeling that we already have quite a few libraries that
> are needed for the job: UIs (including HTML rendering...), plugins,
> various protocols, encryption...

I'm afraid I don't know much about MUAs either.
I see there's some stuff in Network.* that may be useful...

Unfortunately I don't have time at the moment to try implementing one, but
for what it's worth here are some thoughts I had on what an "ideal" email
client, suitable for Haskell programmers, would be like:

1) Plain text based to avoid problems with viruses etc getting in via HTML.
HTML emails received could just be displayed as plain text (including all
markup)

2) "What-you-see-is-exactly-what-will-be-sent" for editing, so that when you
press "send" you don't need to worry about the text being all mangled up by
wrapping/replacement of characters etc

3) When you click "reply" or "reply all", the original text should be
indented with '>' (at the moment OE requires QuoteFix to achieve this
trivial but essential functionality)

4) An API could be exposed then the user could write scripts to put things
into correct folders etc.
The API could provide info about what is currently waiting on the server,
and the ability to download or delete without downloading (eg for big
attachments that are suspected of being viruses)

5) Ideally the scripting language would be Haskell. There is already stuff
in Language.Haskell.* for doing parsing but I can't find anything which
would allow you to compile and load functions into a running program.

So I'd imagine that the email client would contain a plain text editor that
wrapped text as it is edited (if wrapping is needed nowadays anyway?) with
email addresses and URLs in the text clickable; a tree of folders and a
folder contents window which could display the emails by date/subject/name/
or thread; and an API and way of loading scripts written in Haskell to do
all the complicated automatic stuff - which would now be completely under
the user's control.

Regards, Brian.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: MUA written in Haskell, and MTA in Haskell help?

Donald Bruce Stewart
In reply to this post by Shae Matijs Erisson
shae:

> Nils Anders Danielsson <[hidden email]> writes:
>
> > I had the same thought yesterday, after an Emacs-Lisp session in which
> > I was trying to get Gnus to do exactly what I wanted it to...
>
> Yeah, same here. I use Gnus and it's nice, but occasionally I want to erase it
> from the timestream.
>
> > Out of curiosity, how much work would it take to write an easily
> > configurable, decent MUA in Haskell? I don't know too much about MUAs,
> > but I have a feeling that we already have quite a few libraries that
> > are needed for the job: UIs (including HTML rendering...), plugins,
> > various protocols, encryption...
>
> It wouldn't be too hard. I'd suggest you start with Tuomo Valkonen's Riot[1]
> and go for something like mutt.
> I'm sure you could steal lots of useful code from Peter Simons' Postmaster[2].

Interestingly -- some may not know this -- I originally wrote hs-plugins
to provide Haskell configuration and extension to a planned mutt-like
MUA in Haskell :)

If I was actually going to write one now, I'd start with hmp3 for the
fast, portable curses ui and keystroke handling, and steal the mbox
parsing code from riot. You'd have something working in a day or two,
I'd reckon -- all the code is out there, it just needs to be assembled.

-- Don
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

Donald Bruce Stewart
In reply to this post by Brian Hulley
> 5) Ideally the scripting language would be Haskell..

> ... I can't find anything which would allow you
> to compile and load functions into a running program.

>From haskell.org:
   "hs-plugins"
        A library for compiling and loading plugins into a running Haskell program.

Have a look at:
    "Dynamic Applications From the Ground Up". Stewart and Chakravarty, 2005
    "Plugging Haskell In". Pang, Stewart, Seefried, and Chakravarty, 2004

:)

Cheers,
 Don
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

Bulat Ziganshin-2
In reply to this post by Brian Hulley
Hello Brian,

Wednesday, March 8, 2006, 10:52:28 PM, you wrote:

BH> 4) An API could be exposed then the user could write scripts to put things
BH> into correct folders etc.
BH> 5) Ideally the scripting language would be Haskell. There is already stuff

that's whole idea is similar to emacs, only with Haskell instead of
Lisp. btw, there is one such project - hIDE. although it is stalled
now afaik, it looks like good starting point for what you want

--
Best regards,
 Bulat                            mailto:[hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Re: MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

Matthias Fischmann
In reply to this post by Brian Hulley
On Wed, Mar 08, 2006 at 07:52:28PM -0000, Brian Hulley wrote:

> To: Nils Anders Danielsson <[hidden email]>
> Cc: Haskell Cafe <[hidden email]>
> From: Brian Hulley <[hidden email]>
> Date: Wed, 8 Mar 2006 19:52:28 -0000
> Subject: [Haskell-cafe] Re: MUA written in Haskell (was: Getting GHC to
> print "Done" when it's finished linking?)
>
> Nils Anders Danielsson wrote:
> >On Tue, 07 Mar 2006, "Brian Hulley" <[hidden email]> wrote:
> >
> > [...]
> [...]
>
> 5) Ideally the scripting language would be Haskell. There is already stuff
> in Language.Haskell.* for doing parsing but I can't find anything which
> would allow you to compile and load functions into a running program.
this would be cool, but i don't think it's very urgent.  i would be
perfectly happy with a config directory that is scanned for code every
time i *recompile* my MUA.  it's not gonna happen every day.  and for
those few people who like installshields and still want to plug in
code that doesn't come with the distribution, the entire program could
be shipped within ghci.  i don't think this is a very resource-hungry
application for modern hardware standards.

nice wish list.  corpus navigation is missing, though.  a large topic,
and i have lots of ideas too half-baked to put in writing.  but you
should give it a thought.



m.



ps: did anybody get the riot thing compiled with ghc-6.4?  i have the
feeling there are some changes in the packageing interface in one of
the last ghc version shifts that bit me, and i was too distracted to
figure it out.  though i am really curious.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (196 bytes) Download Attachment