On 10 Dec 2004, at 06:28, Michael Walter wrote:
Yep - this program "sometimes" fails for me with such an error message:
Fail: : hGetLine: invalid argument (Invalid argument)
The underlying C library function 'accept' doesn't always return a
socket. Sometimes it returns '-1' if something went wro
Yep - this program "sometimes" fails for me with such an error message:
Fail: : hGetLine: invalid argument (Invalid argument)
If I omit the forkIO and do synchronous processing, I noticed that
Apache Benchmark connects a second time but closes the connection
immediately. When I added a `catch`
Conor McBride writes:
> Jan-Willem Maessen - Sun Labs East wrote:
> > Tomasz Zielonka wrote:
> >
> >>I found it useful recently, when I needed zip functions for Trees -
> >>this way I didn't have to define functions for 3 trees, 4 trees,
> >>and so on.
> >
> >
> > Note also that:
> >
> > repeat
Tomasz Zielonka writes:
> On Thu, Dec 09, 2004 at 10:02:39AM -0500, Jan-Willem Maessen - Sun
> Labs East wrote:
> >
> > And I thought that most programmers used "zipWith", which has to be
> > prefix.
>
> You can also use zipWith to simulate zipN, for any N (however, the
> following code uses inf
G'day all.
Quoting Jeremy Shaw <[EMAIL PROTECTED]>:
> I think this article is right-on when it comes to explaining why
> haskell has not yet succeeded (it even mentions haskell):
>
> http://khason.biz/blog/2004/12/why-microsoft-can-blow-off-with-c.html
I don't think so at all. Sure, Simon P-J d
At Tue, 30 Nov 2004 09:00:18 -0500, GoldPython wrote:
>> Has anyone tried presenting the language to the average rank and file
>> programming community? If so, was it successful? If not, is there
>> interest in doing so?
On Thu, Dec 09, 2004 at 04:01:32PM -0800, Jeremy Shaw wrote:
> I think this
Tomasz Zielonka wrote:
> On Thu, Dec 09, 2004 at 05:55:09PM +, Conor McBride wrote:
>
>>Funny you should choose that word:
>>
>> http://www.mail-archive.com/haskell@haskell.org/msg15073.html
>>
>>saves me banging the same old drum.
>
>
> Is ap alias <# alias <%> for [] really the same as zwApp
At Tue, 30 Nov 2004 09:00:18 -0500,
GoldPython wrote:
>
> Hi, all,
> Has anyone tried presenting the language to the average rank and file
> programming community? If so, was it successful? If not, is there
> interest in doing so?
I think this article is right-on when it comes to explaining why
On Thu, Dec 09, 2004 at 05:55:09PM +, Conor McBride wrote:
> Funny you should choose that word:
>
> http://www.mail-archive.com/haskell@haskell.org/msg15073.html
>
> saves me banging the same old drum.
Is ap alias <# alias <%> for [] really the same as zwApply? Probably
I am missing someth
Malcolm Wallace wrote:
> > > Prelude> [1..5] `zipWith (+)` [7..]
> > > :1: parse error on input `('
> >
> > is there a technical reason for this or did it just happen?
>
> If you are asking why general expressions are prohibited between
> backticks, yes, there is a reason. The expression c
Hello again,
this test program should do the relevant parts for the bug -- on
Windows it works fine, though, I'll have to check at home whether it's
reproducable using it.
- Michael
module Test where
import Control.Concurrent
import Network
import System.IO
mainLoop socket = do
(handle
Hi
Jan-Willem Maessen - Sun Labs East wrote:
Tomasz Zielonka wrote:
I found it useful recently, when I needed zip functions for Trees - this way I
didn't have to define functions for 3 trees, 4 trees, and so on.
Note also that:
repeat f `zwApply` xs = map f xs
When cooking up my own collection-y
> Robert Dockins writes:
>
> > > And I thought that most programmers used "zipWith", which has to
> > > be prefix.
>
> > [1..5] `zipWith (+)` [7..]
>
> You don't have a computer at your end of the internet? :-)
>
> Prelude> [1..5] `zipWith (+)` [7..]
> :1: parse error on input `('
> Pr
Tomasz Zielonka wrote:
> On Thu, Dec 09, 2004 at 10:02:39AM -0500, Jan-Willem Maessen - Sun Labs East
> wrote:
>
>>And I thought that most programmers used "zipWith", which has to be
>>prefix.
>
>
> You can also use zipWith to simulate zipN, for any N (however, the following
> code uses infix n
I'll do so at lunch break/from home tonight.
Thanks,
Michael
On Thu, 9 Dec 2004 16:19:20 +, Jules Bean <[EMAIL PROTECTED]> wrote:
>
> On 9 Dec 2004, at 15:30, Michael Walter wrote:
> > I continued toying with my toy web server, and I'm "sometimes" getting
> > "Invalid argument" errors in hG
Robert Dockins <[EMAIL PROTECTED]> writes:
> > Prelude> [1..5] `zipWith (+)` [7..]
> > :1: parse error on input `('
>
> is there a technical reason for this or did it just happen?
If you are asking why general expressions are prohibited between
backticks, yes, there is a reason. The express
On Thu, 2004-12-09 at 11:04 -0500, S. Alexander Jacobson wrote:
> Or is there a better way to (de-)serialize
> FiniteMaps?
There's a neat trick that we use in c2hs (at least the patched version
shipped with gtk2hs) to strictly read all the keys of the finite map but
read all the values lazily. Thi
On 9 Dec 2004, at 15:30, Michael Walter wrote:
I continued toying with my toy web server, and I'm "sometimes" getting
"Invalid argument" errors in hGetLine for a handle I retrieved from
Network.listenOn.
My first guess would be that hGetLine would return invalid argument if
it was called on a hand
I would like to read a large finitemap off of a
disk faster than the time it takes to read the
entire list of pairs.
My solution is to save it as a bunch of smaller
lists of pairs covering various key intervals (or
recency intervals). I then can readfile all of
these lists back into a bunch of fi
On Thu, Dec 09, 2004 at 10:02:39AM -0500, Jan-Willem Maessen - Sun Labs East
wrote:
>
> And I thought that most programmers used "zipWith", which has to be
> prefix.
You can also use zipWith to simulate zipN, for any N (however, the following
code uses infix notation):
Prelude> let l = words "H
On Thu, 9 Dec 2004, Robert Dockins wrote:
> > And I thought that most programmers used "zipWith", which has to be
> > prefix.
>
> Is this true? Can you not use backticks on a partially applied
> function? If so, it seems like such a thing would be pretty useful
> (although I've never actua
Ketil Malde wrote:
Robert Dockins <[EMAIL PROTECTED]> writes:
> And I thought that most programmers used "zipWith", which has to be
> prefix.
[1..5] `zipWith (+)` [7..]
You don't have a computer at your end of the internet? :-)
Yes, but I'm at work, and I try to limit the amount of time I spend
Herro,
thanks for your feedback on my last question, it helped quite a bit.
I continued toying with my toy web server, and I'm "sometimes" getting
"Invalid argument" errors in hGetLine for a handle I retrieved from
Network.listenOn.
"Sometimes", because it works fine in the browser, except when
Robert Dockins <[EMAIL PROTECTED]> writes:
> > And I thought that most programmers used "zipWith", which has to be
> > prefix.
> [1..5] `zipWith (+)` [7..]
You don't have a computer at your end of the internet? :-)
Prelude> [1..5] `zipWith (+)` [7..]
:1: parse error on input `('
Prelude
> And I thought that most programmers used "zipWith", which has to be
> prefix.
Is this true? Can you not use backticks on a partially applied
function? If so, it seems like such a thing would be pretty useful
(although I've never actually had occasion to need it, so) I'll dig
out the rep
Keith Wansbrough wrote:
> zip stops when it reaches the end of the shorter list, so you can just say
>
> zip [1 ..] lines
>
> In fact, most programmers use the infix version of zip, like this:
>
> [1..] `zip` lines
>
> which is nicely readable. (any function can be turned into an infix by
> numLines :: [Line] -> [(Int, Line)]
> numLines lines -- list of pairs of
> = zip [1 .. length lines] lines -- line no. & line
>
zip stops when it reaches the end of the shorter list, so you can just say
zip [1 ..] lines
In fact, most programmers us
Douglas Bromley <[EMAIL PROTECTED]> writes:
> I've show(n) a particular data type and it shows up as:
> [([2,6],"British"),([1],"Charles"),([1,8],"Clarke"),([2,6],"Council"),([2],"Edinburgh"),([1],"Education"),([4],"Increasingly")]
>
> What I want to do is format that nicely into a table.
> Which
I'd just like to thank everyone for helping. Its now working great!
I really appreciate your help. I only wish I'd discovered the mailing
list sooner.
All the best.
Doug
On Thu, 9 Dec 2004 10:31:52 +, Jules Bean <[EMAIL PROTECTED]> wrote:
> To amplify on the other replies you already had,
To amplify on the other replies you already had, don't use show here:
makeIndex :: Doc -> Doc -- changed so output can be written to file
makeIndex
= show .
shorten .-- [([Int], Word)] -> [([Int], Word)]
amalgamate . -- [([Int], Word)] -> [([Int], Word)]
makeLists . -- [(Int, Word)]
Douglas Bromley <[EMAIL PROTECTED]> writes:
> I've show(n) a particular data type and it shows up as:
> [([2,6],"British"),([1],"Charles"),([1,8],"Clarke"),([2,6],"Council"),([2],"Edinburgh"),([1],"Education"),([4],"Increasingly")]
Let me guess: type [([Integer],String)]?
> What I want to do is
> "Douglas" == Douglas Bromley <[EMAIL PROTECTED]> writes:
Douglas> What I want to do is format that nicely into a table. The
Douglas> best way of doing (I thought) was to: Remove the first "[("
Douglas> and final ")]" Then replace "),(" with a newline(\n)
Why don't simply write an "output"
Hi Everyone
My first post to the mailing list is a cry for help. Apologies for that.
I've seen an example of how this is done in the archives but I'm
afraid I'm a bit more behind than the person who seemed to understand
the answer so if someone could help me??
The problem is this:
I've show(n)
On Thu, Dec 09, 2004 at 02:34:09AM +0100, Sebastian Sylvan wrote:
> Anyway, I'm currently working on an article for a Swedish print
> magazine on Haskell (similar to the one linked above, but less
> argumentative) that's due out at the end of January 2005. Hopefully
> that will contribute to spark
34 matches
Mail list logo