Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  calling polymorphic function in Selenium     question
      (Brent Yorgey)
   2.  Re: Compiling C into Haskell (Juan Pedro Bolivar Puente)
   3.  Re: Compiling C into Haskell (Ertugrul Soeylemez)
   4. Re:  Re: Compiling C into Haskell (Thomas Davie)
   5. Re:  Re: Compiling C into Haskell (Thomas Davie)
   6. Re:  Re: Compiling C into Haskell (Joost Kremers)
   7.  Re: Compiling C into Haskell (Maciej Piechotka)
   8.  Re: Re: Compiling C into Haskell (Maciej Piechotka)


----------------------------------------------------------------------

Message: 1
Date: Thu, 15 Apr 2010 15:14:43 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] calling polymorphic function in
        Selenium        question
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Sun, Apr 04, 2010 at 09:25:16PM -0400, MH wrote:
> I am running the following code that is using Selenium. If you look at
> the function "start", you will see that the return type of the
> function is polymorphic. Now in main function, I call start function
> to get selenium IO monad and sequentially call selenium commands
> (open, doCommand etc...). The problem that I have here is, while I can
> call all Selenium commands with signature (String  -> Selenium
> String), I can't call commands with signature (String  -> Selenium
> Bool). As I understand it, even though "start" function shall return
> IO (Selenium a -> IO (Either String a)), it actually return IO
> (Selenium String -> IO (Either String String)).

Hmm, I must confess that I don't understand exactly what is going on
here.  One thing to try is to give an explicit type annotation at
start's call site, something like

> main = do
>     (selenium :: Selenium a -> IO (Either String a)) <- start 
> "http://www.google.com";
>     selenium $ open "/"
>     selenium $ doCommand SWindowMaximize []
>     selenium $ typeText (Name "q") "stuff"
>     selenium $ clickAndWait (Name "btnG")
>      return selenium

Does that help?

-Brent


------------------------------

Message: 2
Date: Fri, 16 Apr 2010 09:05:33 +0300
From: Juan Pedro Bolivar Puente <[email protected]>
Subject: [Haskell-beginners] Re: Compiling C into Haskell
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

I am going a bit off-topic here...

> 
> PS. Could you limit length of line to 72-80 characters? Thank you in
> advance.
> 

Please, don't impose others how to format their email. There is an
interesting reasoning in favor of not breaking lines in email: it is
better for accessibility, because of how screen-readers for visually
impaired people work. I will quote a message by the accessibility expert
Chris Hofstader:

> I forgot to mention that, when using a screen reader, many  users try to 
> maximize their line width so, if reading by line, they can often get an 
> entire paragraph with a single down arrow rather than reading through 
> superfluously narrow lines which have two problems:  1. they require more 
> keystrokes which 2. break up a user's concentration as the flow of sentences 
> are broken up by needing to take action a every few words.
> 

And what is the universally best length of line anyway? I have also seen
people sending emails with really thin columns that get annoying to
read... If you feel bad about emails sent with long lines, just enable
text wrapping in your email reader.

And yes, I wrap the text in my email because I know there are many
people like you, but maybe this message will help us in being more
tolerant about how others use their tools --I did not know about these
accessibility issues a few months ago neither!

JP



------------------------------

Message: 3
Date: Fri, 16 Apr 2010 09:20:11 +0200
From: Ertugrul Soeylemez <[email protected]>
Subject: [Haskell-beginners] Re: Compiling C into Haskell
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=US-ASCII

Juan Pedro Bolivar Puente <[email protected]> wrote:

> I am going a bit off-topic here...

Me too, but that's how mailing lists work. =)


> And what is the universally best length of line anyway? I have also
> seen people sending emails with really thin columns that get annoying
> to read... If you feel bad about emails sent with long lines, just
> enable text wrapping in your email reader.

The big problem is that some mail/news readers assume that lines are
prebroken, especially when it comes to older terminal-based readers.
This is bad, but it's the state of things.  Otherwise there is little
reason to prebreak lines and many reasons not to do it.

To answer your question, typographically you should prefer lines with no
more and no less than 80-90 characters.  Longer lines tend to distract
the reader when it comes to find the beginning of the next line.
Shorter lines are annoying to read, because you need too much
reorientation.  That's why all HTML pages I write contain something like
the following CSS statement:

  div#content {
    max-width: 80ex;
  }

I think mail/news readers like Thunderbird go into the right direction
by employing an additional header, which precisely specifies the line
breaking behaviour used in the mail.  The actual text is prewrapped, but
using the header newer readers can reconstruct the paragraphs and
display them the way the user wishes.

In fact I would love if HTML mails would be more accepted in the open
source community.  After all there is nothing bad about HTML and it
would solve the above problem.  Most reasonings against it are related
to compatibility or interoperability, which is no problem, because you
can always add a text/plain part.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://blog.ertes.de/




------------------------------

Message: 4
Date: Fri, 16 Apr 2010 08:23:19 +0100
From: Thomas Davie <[email protected]>
Subject: Re: [Haskell-beginners] Re: Compiling C into Haskell
To: Juan Pedro Bolivar Puente <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii


On 16 Apr 2010, at 07:05, Juan Pedro Bolivar Puente wrote:

> I am going a bit off-topic here...
> 
>> 
>> PS. Could you limit length of line to 72-80 characters? Thank you in
>> advance.
>> 
> 
> Please, don't impose others how to format their email. There is an
> interesting reasoning in favor of not breaking lines in email: it is
> better for accessibility, because of how screen-readers for visually
> impaired people work. I will quote a message by the accessibility expert
> Chris Hofstader:
> 
>> I forgot to mention that, when using a screen reader, many  users try to 
>> maximize their line width so, if reading by line, they can often get an 
>> entire paragraph with a single down arrow rather than reading through 
>> superfluously narrow lines which have two problems:  1. they require more 
>> keystrokes which 2. break up a user's concentration as the flow of sentences 
>> are broken up by needing to take action a every few words.
>> 
> 
> And what is the universally best length of line anyway? I have also seen
> people sending emails with really thin columns that get annoying to
> read... If you feel bad about emails sent with long lines, just enable
> text wrapping in your email reader.
> 
> And yes, I wrap the text in my email because I know there are many
> people like you, but maybe this message will help us in being more
> tolerant about how others use their tools --I did not know about these
> accessibility issues a few months ago neither!

Re your last paragraph, please don't (not that I mean to impose this upon you).

My final reason to add is that once an email is replied to sufficiently many 
times, limiting yourself to 72-80 characters can cause major problems:

This line:
12345678901234567890123456789012345678901234567890123456789012345678901234567890

Will commonly become:
> 123456789012345678901234567890123456789012345678901234567890123456789012345678
90
Which will become:
> > 1234567890123456789012345678901234567890123456789012345678901234567890123456
78
> 90
etc.

Not only is this annoying, but it's irrecoverable too.  There is no way to tell 
which new lines are some one adding hard wrapping to an email, and which are 
actual intentional newlines.

All this, simply because one user couldn't enable the softwrap option in their 
email reader.

Bob

------------------------------

Message: 5
Date: Fri, 16 Apr 2010 08:28:25 +0100
From: Thomas Davie <[email protected]>
Subject: Re: [Haskell-beginners] Re: Compiling C into Haskell
To: Ertugrul Soeylemez <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=windows-1252


On 16 Apr 2010, at 08:20, Ertugrul Soeylemez wrote:

> Juan Pedro Bolivar Puente <[email protected]> wrote:
> 
>> I am going a bit off-topic here...
> 
> Me too, but that's how mailing lists work. =)
> 
> 
>> And what is the universally best length of line anyway? I have also
>> seen people sending emails with really thin columns that get annoying
>> to read... If you feel bad about emails sent with long lines, just
>> enable text wrapping in your email reader.
> 
> The big problem is that some mail/news readers assume that lines are
> prebroken, especially when it comes to older terminal-based readers.

I'd highly recommend that you stop using such readers, or patch them to 
soft-wrap long lines, neither is difficult.

> This is bad, but it's the state of things.  Otherwise there is little
> reason to prebreak lines and many reasons not to do it.
> I think mail/news readers like Thunderbird go into the right direction
> by employing an additional header, which precisely specifies the line
> breaking behaviour used in the mail.  The actual text is prewrapped, but
> using the header newer readers can reconstruct the paragraphs and
> display them the way the user wishes.

Interesting, and useful sounding, though how does it tell the difference 
between a wrap at 80 characters and an intentional new line at 80 characters?

> In fact I would love if HTML mails would be more accepted in the open
> source community.  After all there is nothing bad about HTML and it
> would solve the above problem.  Most reasonings against it are related
> to compatibility or interoperability, which is no problem, because you
> can always add a text/plain part.

I suspect the only way this would solve the problem is by forcing people not to 
use broken email clients – you can't read an html email in an old email client, 
in the same way as you can't read a non-hard-wrapped email in an ancient email 
client.

Anyway, my basic point is that an email client that will not soft-wrap lines is 
fundamentally broken.  Emails can and do have lines longer than 80 characters, 
and a client that can't render them has a serious bug.  If your client is one 
of these, I suggest you either (a) move to a less buggy client, or (b) write a 
patch to fix the bug.  The correct solution though is not to enforce upon 
everyone else that they must write emails with a particular line length.

Bob

------------------------------

Message: 6
Date: Fri, 16 Apr 2010 10:21:14 +0200
From: Joost Kremers <[email protected]>
Subject: Re: [Haskell-beginners] Re: Compiling C into Haskell
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

On Fri, Apr 16, 2010 at 08:28:25AM +0100, Thomas Davie wrote:

> Anyway, my basic point is that an email client that will not soft-wrap lines
> is fundamentally broken.

AFAIK the relevant RFCs state that email should *not* have unwapped lines. Which
means that a mail client that doesn't soft-wrap is not broken but 
standard-conforming.

> Emails can and do have lines longer than 80
> characters, and a client that can't render them has a serious bug.

I disagree. There is a clear standard for dealing with different line lengths.
It's called 'format=flowed' and basically states that lines should be wrapped
and end in space+newline. Email thus formatted can be reformatted by the client.

> If your
> client is one of these, I suggest you either (a) move to a less buggy client,
> or (b) write a patch to fix the bug. The correct solution though is not to
> enforce upon everyone else that they must write emails with a particular line
> length.

format=flowed does exactly that: not force upon everyone to write emails with a
particular line length. See RFC 2646. IMHO email clients that send long lines
instead of using format=flowed are buggy.


-- 
Joost Kremers
Life has its moments


------------------------------

Message: 7
Date: Fri, 16 Apr 2010 10:59:24 +0200
From: Maciej Piechotka <[email protected]>
Subject: [Haskell-beginners] Re: Compiling C into Haskell
To: [email protected]
Message-ID: <1271408364.5587.9.ca...@picard>
Content-Type: text/plain; charset="utf-8"

On Fri, 2010-04-16 at 09:05 +0300, Juan Pedro Bolivar Puente wrote:
> I am going a bit off-topic here...
> 
> > 
> > PS. Could you limit length of line to 72-80 characters? Thank you in
> > advance.
> > 
> 
> Please, don't impose others how to format their email. There is an
> interesting reasoning in favor of not breaking lines in email: it is
> better for accessibility, because of how screen-readers for visually
> impaired people work. I will quote a message by the accessibility expert
> Chris Hofstader:
> 
> > I forgot to mention that, when using a screen reader, many  users try to 
> > maximize their line width so, if reading by line, they can often get an 
> > entire paragraph with a single down arrow rather than reading through 
> > superfluously narrow lines which have two problems:  1. they require more 
> > keystrokes which 2. break up a user's concentration as the flow of 
> > sentences are broken up by needing to take action a every few words.
> > 
> 

Depends on the logic of down key. Some editors make down key jump to
corresponding visual line some corresponding real line.

> And what is the universally best length of line anyway? I have also seen
> people sending emails with really thin columns that get annoying to
> read... If you feel bad about emails sent with long lines, just enable
> text wrapping in your email reader.
> 


According to RFC 1855 - 65 characters:
"- Limit line length to fewer than 65 characters and end a line with a
carriage return."
http://tools.ietf.org/html/rfc1855

So it is official. 

Traditionally the paragraphs are separated by two newlines so there is
no problem 

> And yes, I wrap the text in my email because I know there are many
> people like you, but maybe this message will help us in being more
> tolerant about how others use their tools --I did not know about these
> accessibility issues a few months ago neither!
> 
> JP
> 

Screen readers could be easily patched too (to skip whole paragraph on
key down or shift+key down). The paragraph for email has been
traditionally separated by two newlines.

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : 
http://www.haskell.org/pipermail/beginners/attachments/20100416/325535e5/attachment-0001.bin

------------------------------

Message: 8
Date: Fri, 16 Apr 2010 11:38:59 +0200
From: Maciej Piechotka <[email protected]>
Subject: [Haskell-beginners] Re: Re: Compiling C into Haskell
To: [email protected]
Message-ID: <1271410739.5587.71.ca...@picard>
Content-Type: text/plain; charset="utf-8"

On Fri, 2010-04-16 at 08:28 +0100, Thomas Davie wrote:
> On 16 Apr 2010, at 08:20, Ertugrul Soeylemez wrote:
> 
> > Juan Pedro Bolivar Puente <[email protected]> wrote:
> > 
> >> I am going a bit off-topic here...
> > 
> > Me too, but that's how mailing lists work. =)
> > 
> > 
> >> And what is the universally best length of line anyway? I have also
> >> seen people sending emails with really thin columns that get annoying
> >> to read... If you feel bad about emails sent with long lines, just
> >> enable text wrapping in your email reader.
> > 
> > The big problem is that some mail/news readers assume that lines are
> > prebroken, especially when it comes to older terminal-based readers.
> 
> I'd highly recommend that you stop using such readers, or patch them to 
> soft-wrap long lines, neither is difficult.
> 

Except that it may be a line which should not be wrapped. For example
ascii table should not be wrapped as it destroys the content. Pice of
code in Haskell or python as well.

And pre-breaking have little problems, confirms to RFC and causes no
problems (excepts in broken screen readers. I understand that software
should be accessible but it should follow the conventions that was
already established a long time ago).

> > In fact I would love if HTML mails would be more accepted in the open
> > source community.  After all there is nothing bad about HTML and it
> > would solve the above problem.  Most reasonings against it are related
> > to compatibility or interoperability, which is no problem, because you
> > can always add a text/plain part.
> 

Add quoting and size. While for 'normal' users it is not a problem it
might be problem for users which uses EDGE/GPRS/... to get their mail.
>From example from http://www.asciiribbon.org/ (not counting sound as it
lazy download) - it's 231 K. Text plain is 3K. If you can download 1 MB
via EDGE/GPRS/... or pay a lot for extra download - it HAVE a difference
(compare using 23% of limit to download a mail and 0.3%).

Personally I'd choose to always show text/plain message as:
 - Security reasons. Last time I heard about text/plain exploit was here
- http://ur1.ca/ve1h ;). Ok - I don't use Outlook Express or anything on
MSHTML but still there are exploits from time to time.
 - I cannot use terminal. Sometimes I have to use terminal to browse
web/read e-mail. I can tell that HTML engines on terminal are terribly
underdeveloped.
 - Quoting. text/plain quoting is very simple. HTML quoting can be quite
hard - how to quote a part of table? what to do with CSS?

> I suspect the only way this would solve the problem is by forcing people not 
> to use broken email clients – you can't read an html email in an old email 
> client, in the same way as you can't read a non-hard-wrapped email in an 
> ancient email client.
> 

If you mean by 'ancient' released not longer then month ago and
confirming to spec then yes ;)

> Anyway, my basic point is that an email client that will not soft-wrap lines 
> is fundamentally broken.  Emails can and do have lines longer than 80 
> characters, and a client that can't render them has a serious bug.  If your 
> client is one of these, I suggest you either (a) move to a less buggy client, 
> or (b) write a patch to fix the bug.  The correct solution though is not to 
> enforce upon everyone else that they must write emails with a particular line 
> length.
> 
> Bob

Hmm. I guess you can send to the IEFT - all I found in RFC was limits
(ok. different - 60, 78 and 80). 

Regards
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
Url : 
http://www.haskell.org/pipermail/beginners/attachments/20100416/52ecd442/attachment.bin

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 22, Issue 23
*****************************************

Reply via email to