Hi Sergey,
I can't explain this; maybe it's a bug in enumWith? I'll look into it.
Thanks,
John
Message: 20
Date: Thu, 2 Jun 2011 02:46:32 +0400
From: Sergey Mironov ier...@gmail.com
Subject: [Haskell-cafe] [iteratee] how to do nothing .. properly
To: haskell-cafe@haskell.org
Message-ID:
Ok. I've checked iteratee-0.8.3.0 and 0.8.4.0. Results are same.
Sergey
2011/6/2 John Lato jwl...@gmail.com:
Hi Sergey,
I can't explain this; maybe it's a bug in enumWith? I'll look into it.
Thanks,
John
Message: 20
Date: Thu, 2 Jun 2011 02:46:32 +0400
From: Sergey Mironov
Since frequency counts are an important use of map-like data structures,
I did a brief test of the available options. First using regular
strings for input, and Data.Map.fromListWith - i.e. the operational bit being:
freqs :: [String] - M.Map String Int
freqs = M.fromListWith (+) . map (,1)
By the way, what is the advantage of using iteratees here? For my
testing, I just used:
main = printit . freqs . B.words = B.readFile words
(where 'printit' writes some data to stdout just to make sure stuff is
evaluated, and you've already seen some 'freqs' examples)
I have a bunch of old
On Thursday 02 June 2011 01:12:37, Tom Murphy wrote:
How about this:
myFoldr :: (a - b - b) - b - [a] - b
myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z
Cheers,
Ivan
Great! Now I really can say Come on! It's fun! I can write foldr with
foldl!
Unfortunately, you
Hi Ketil,
By the way, what is the advantage of using iteratees here? For my
testing, I just used:
My initial move to iteratees was more a clutch call I made when I was still
using bytestring-trie, and was having immense memory consumption problems.
bytestring-trie uses strict byte strings as
I often find while using attoparsec and attoparsec-text that I need to
match a number of text parsers consecutively and concatenate the
result. By text parser I mean Parser ByteString for attoparsec and
Parser Text for attoparsec-text.
It seems the best I can do is to collect them all in a list
Hi Sergey,
I've got an explanation; quite surprisingly it's a bug in enumPure1Chunk.
Even though it is an odd case, I'm surprised that it hasn't come up before
now since enumPure1Chunk appears frequently.
I've just uploaded 0.8.5.0 which has the fix. There's now an additional
Monoid constraint
I am glad to help! Looks like upgrading to 0.8.5.0 also fixes initial
problem that involved me into testing!
I'll take the opportunity and ask another thing about iteratee: Is it
expected behavior that throwErr consumes all data in current chunk? I
wish it to stop in place and let after-checkErr
On Thu, Jun 2, 2011 at 7:02 AM, Yitzchak Gale g...@sefer.org wrote:
It seems the best I can do is to collect them all in a list and then
apply concat. But that still copies the text several times.
Right. I'd like a no-copy combinator for the same reasons, but I think it's
impossible to do
Dmitry,
I'm not directly familiar with Takusen or its use with OracleDB, but I
would hazard a guess that the withSession is doing FFI resource management
and that resources obtained inside the withSession environment are no
longer valid outside of the withSession.
If this is the case
Alberto G. Corona agocor...@gmail.com wrote:
Haskell is an academic asset as well as a fun asset.
I cannot agree with this for practical reasons. I'm using Haskell for
real world commercial applications, and I'm very productive with it.
There is however a variation of this statement, with
Ivan Tarasov ivan.tara...@gmail.com wrote:
myFoldr :: (a - b - b) - b - [a] - b
myFoldr f z xs = foldl' (\s x v - s (x `f` v)) id xs $ z
That's not foldr. It's a function similar to foldr in Haskell and equal
to foldr in a different language, which lacks bottom.
Greets,
Ertugrul
--
Learning Haskell will pay off much less than learning PHP, if your goal is
to find a job.
Amen.
I cannot agree with this for practical reasons. I'm using Haskell for
real world commercial applications, and I'm very productive with it.
I wish so much I could say that... Out of curiosity,
On 3 June 2011 05:35, Kevin Quick qu...@sparq.org wrote:
Dmitry,
I'm not directly familiar with Takusen or its use with OracleDB, but I would
hazard a guess that the withSession is doing FFI resource management and
that resources obtained inside the withSession environment are no longer
At Thu, 02 Jun 2011 13:52:52 +0200,
Ketil Malde wrote:
I have a bunch of old code, parsers etc, which are based on the
'readFile' paradigm:
type Str = Data.ByteString.Lazy.Char8.ByteString -- usually
decodeFoo :: Str - Foo
encodeFoo :: Foo - Str
readFoo = decodeFoo . readFile
Yves Parès limestr...@gmail.com wrote:
I cannot agree with this for practical reasons. I'm using Haskell
for real world commercial applications, and I'm very productive with
it.
I wish so much I could say that... Out of curiosity, what are you
using Haskell for?
I use the Yesod web
I just uploaded a new package called fix-imports.
Maintaining the import block is one of the less fun things I do while
writing haskell. So I wrote a little program to do that for me.
Basically, I edit source, then hit ,a in vim, and it figures out which
modules need to be imported, which
Hi Jon all,
I've decided that I'm OK with re-licensing hslogger, HDBC, and well all
of my Haskell libraries (not end programs) under 3-clause BSD.
My schedule is extremely tight right now but if someone wants to send me
patches for these things I will try to apply them within the week.
--
I disagree. I'm by no means proficient in Haskell. And, I never
bothered learning PHP. I will when I need to. PHP programmers are a
dime a dozen. It's been my experience that Haskell is a tool one may
use to distinguish oneself from the hoi-poloi. This is important when
you live in an area where
Casey McCann schrieb:
One drastic approach I've used in personal libraries--operator-heavy
EDSLs specifically--is to define everything first with alphanumeric
names, then put operators in their own modules. In some cases I'd have
three such modules: One providing a minimal set of operators
On 2 June 2011 22:20, John Goerzen jgoer...@complete.org wrote:
Hi Jon all,
I've decided that I'm OK with re-licensing hslogger, HDBC, and well all of
my Haskell libraries (not end programs) under 3-clause BSD.
Awesome, thanks very much!
___
2011/6/2 John Goerzen jgoer...@complete.org:
Hi Jon all,
I've decided that I'm OK with re-licensing hslogger, HDBC, and well all of
my Haskell libraries (not end programs) under 3-clause BSD.
My schedule is extremely tight right now but if someone wants to send me
patches for these things
Thanks for these instructions, John. I had to adapt to my 32-bit ghc by
adding +universal to the 'port install' lines. I did not find a
gtkglext.dpatch. Has it been roled into the gtkglext darcs repo? I guess
not, since the last update was Nov 7 (Tag 0.12.0), according to 'darcs
changes'.
I got hired at a company because one of the interviewers was impressed that
I taught myself Haskell. I basically never use it at work, but I did in my
old job.
Dave
On Thu, Jun 2, 2011 at 2:23 PM, Michael Litchard mich...@schmong.orgwrote:
I disagree. I'm by no means proficient in Haskell.
Being able to use Haskell at such an early stage of my programming
career has given me high expectations of what comes next.
On Thu, Jun 2, 2011 at 3:22 PM, David Leimbach leim...@gmail.com wrote:
I got hired at a company because one of the interviewers was impressed that
I taught myself
On Thu, Jun 2, 2011 at 10:02 AM, Yitzchak Gale g...@sefer.org wrote:
I often find while using attoparsec and attoparsec-text that I need to
match a number of text parsers consecutively and concatenate the
result. By text parser I mean Parser ByteString for attoparsec and
Parser Text for
On 6/2/11 8:59 AM, Aleksandar Dimitrov wrote:
Hi Ketil,
By the way, what is the advantage of using iteratees here? For my
testing, I just used:
My initial move to iteratees was more a clutch call I made when I was still
using bytestring-trie, and was having immense memory consumption
28 matches
Mail list logo