On 23 April 2011 19:29, Maciej Piechotka uzytkown...@gmail.com wrote:
Iteratee-compress provides compressing and decompressing enumerators
including flushing (using John Lato's implementation). Currently only
gzip and bzip is provided but LZMA is planned.
Changes from previous version:
-
I have been reading Foreign.C.String but it does not seem to provide
the functionality I was looking for.
Let 'c2h' convert CStrings to Haskell Strings, and 'h2c' convert
Haskell Strings to CStrings. (If I understand correctly, c2h . h2c
=== id, but h2c . c2h is not the identity on all inputs;
Edward Z. Yang wrote:
Laziness can be viewed as a form of controlled mutation, where
we overwrite a thunk with its actual value, thus only running
the code once and reaping great time benefits.
[..]
Hash tables take advantage of this fact by simply chaining together values
in a linked list if
On 24/04/2011 06:33 PM, Jason Dagit wrote:
On Sun, Apr 24, 2011 at 2:05 AM, Andrew Coppin
andrewcop...@btinternet.com mailto:andrewcop...@btinternet.com wrote:
So I was a little surprised to discover that... Darcs doesn't
actually support doing this. Darcs is only really interested in
Gracjan Polak schrieb:
Hi all,
I have a project with a .cabal file listing package dependencies using
the usual version constraints ==X.Y.* Z.W or =K.J syntax.
Standard route cabal configure; cabal build works correctly as it is able
to select working set of package versions.
You can
Hi,
I'm reading The Craft of Functional Programming and I found something
I don't understand in page 185.
It says:
Suppose first that we want to write a curried version of a function g,
which is itself uncurried and of type (a,b) - c.
curry g
This funtion expects its arguments as a pair,
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
is the same as:
curry :: ((a,b) - c) - a - b - c
HTH,
Ozgur
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
curry g x y = g (x,y)
Is expressing curry this way more illuminating?
curry :: ((a,b) - c) - (a - b - c)
curry g = \x y - g (x,y)
That is, curry is a function taking one argument that produces a
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es wrote:
OK, I have tried it and it works, but I don't understand the syntax for
curry. Until now I have encountered only functions that take the same number
of arguments as the function definition or less (partial application), but
this
Hi,
On 25/04/11 14:20, Ozgur Akgun wrote:
On 25 April 2011 14:11, Angel de Vicente ang...@iac.es
mailto:ang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
is the same as:
curry :: ((a,b) - c) - a - b - c
thanks, it makes sense now. Somehow I thought that adding the
parenthesis
Hi,
On 25/04/11 14:21, Stephen Tetley wrote:
On 25 April 2011 14:11, Angel de Vicenteang...@iac.es wrote:
curry :: ((a,b) - c) - (a - b - c)
curry g x y = g (x,y)
Is expressing curry this way more illuminating?
curry :: ((a,b) - c) - (a - b - c)
curry g = \x y - g (x,y)
That is,
Roel van Dijk wrote:
On 24 April 2011 01:49, wren ng thornton w...@freegeek.org wrote:
I would *love* there to be a tool which (a) automatically saves failing
QuickCheck values to disk, and (b) automates using HUnit to load those in
and test them. I'm not so sure that QuickCheck should be
I started mindlessly pasting in the output, and the following lept out at me:
,
package authenticate-0.8.2.2-cc3ed2c523ecbf1ad123c3468785149e is
unusable due to missing or recursive dependencies:
http-enumerator-0.3.1-719bcd77e1dcb62efc9cf9b4f0b72271
package
Following the install trail I run into this problem
mlitchard@apotheosis:~$ cab install JSONb-1.0.2
Resolving dependencies...
Configuring JSONb-1.0.2...
Preprocessing library JSONb-1.0.2...
Preprocessing executables for JSONb-1.0.2...
Building JSONb-1.0.2...
[1 of 7] Compiling Text.JSON.Escape (
So it appears this is a bug with JSONb-1.0.2. There's a new version
out. IS the answer to use that, or to patch this version?
On Mon, Apr 25, 2011 at 1:48 PM, Michael Litchard mich...@schmong.org wrote:
Following the install trail I run into this problem
mlitchard@apotheosis:~$ cab install
On Mon, Apr 25, 2011 at 2:44 PM, Michael Litchard mich...@schmong.org wrote:
So it appears this is a bug with JSONb-1.0.2. There's a new version
out. IS the answer to use that, or to patch this version?
If there is a new version, and you indeed need JSONb for something,
then you should use the
I think something that yesod uses, uses JSONb. Also, I think I have
borked my haskell environment to the point where it may be best to
zap it and start over.
On Mon, Apr 25, 2011 at 3:05 PM, Rogan Creswick cresw...@gmail.com wrote:
On Mon, Apr 25, 2011 at 2:44 PM, Michael Litchard
Hi,
I am learning iteratees, and as a starter project I wanted to use expat-
enumerator to parse a 2 gigabyte XML file.
I expected to be able to do what SAX does in Java, i.e. to avoid loading the
whole 2 gigabytes into memory. For warm-up, I wrote an iteratee to count lines
in the file, and it
Oh yeah, this began while trying to install by hand
authenticate-0.8.2.2
On Mon, Apr 25, 2011 at 3:10 PM, Michael Litchard mich...@schmong.org wrote:
I think something that yesod uses, uses JSONb. Also, I think I have
borked my haskell environment to the point where it may be best to
zap it
On Mon, Apr 25, 2011 at 3:10 PM, Michael Litchard mich...@schmong.org wrote:
I think something that yesod uses, uses JSONb.
Odd. I just checked the transitive dependencies of yesod-0.8.0 (with
cab) and it doesn't seem to have that dependency. It could be
system-specific, though.
It would be
On 26 April 2011 00:20, Rogan Creswick cresw...@gmail.com wrote:
It would be nice to figure out what is depending on that version of
JSONb so we could better determine if upgrading will break anything.
Maybe the following helps:
On Friday 22 April 2011 12:40:17, Hamish Mackenzie wrote:
Yesterday we uploaded our official 0.10.0 release (0.10.0.4) to Hackage
I'm trying to try it, but I run into a couple of problems.
Most are probably me looking in the wrong places, so let's begin with
those.
By default, the editor pane
I've been working on Haskell for quite a while and it's not too often that a
beginner shows me a new trick--this trick with trace seems really cool and I
hadn't seen it before.
f x | trace (f ++ show x) False = undefined
f ... -- rest of regular definition
Makes it really easy to add the trace
Daniel Fischer wrote:
On Friday 22 April 2011 12:40:17, Hamish Mackenzie wrote:
Yesterday we uploaded our official 0.10.0 release (0.10.0.4) to Hackage
I'm trying to try it, but I run into a couple of problems.
Most are probably me looking in the wrong places, so let's begin with
those.
In case this ever gets googled ...
I'm pretty sure this problem had to do with my environment. I removed
$HOME/.cabal and $HOME/.ghc, and upgraded to the latest stable haskell
platform. yesod 0.8 has installed fine. I'm not sure what the exact
problem was however.
On 26 April 2011 11:03, Daniel Fischer daniel.is.fisc...@googlemail.com wrote:
Decreasing indentation via backspace goes one column per backspace, how can
I configure it to go to the next (previous) tab position on backspace in
the leading whitespace of a line?
shifttab works, but it is a bit
As far as I can tell, with classic FRP implementations (those which
use behaviors as a first-class abstraction), the only way to create a
behavior or
event based on some external input (for instance keypresses or
microphone input) is to do something with unsafePerformIO or
unsafeInterleaveIO. A
[CC'ing John Millikin, enumerator's maintainer]
On Mon, Apr 25, 2011 at 7:10 PM, Skirmantas Kligys
skirmantas.kli...@gmail.com wrote:
I expected to be able to do what SAX does in Java, i.e. to avoid loading the
whole 2 gigabytes into memory. For warm-up, I wrote an iteratee to count
lines
Of course, you could have the 'interpretation' function be non-pure.
For example:
-- Library functions for a hypothetical FRP system
pollEvent :: IO [a] - Event a
behavior :: a - Event a - Behavior a
accumB :: b - (b - a - b) - Event a - Behavior b
accumE :: b - (b - a - b) - Event a - Event b
Mail fail, haha. Code fixed.
For example:
-- Library functions for a hypothetical FRP system
pollEvent :: IO [a] - Event a
behavior :: a - Event a - Behavior a
accumB :: b - (b - a - b) - Event a - Behavior b
accumE :: b - (b - a - b) - Event a - Event b
union :: Event a - Event a - Event a
Yay, much better!
Now iterLinesWc works within 4 kilobytes, and iterLinesMine within 22
kilobytes, both nicely bounded.
Thanks a lot for your help, Felipe!
On Mon, Apr 25, 2011 at 7:03 PM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
[CC'ing John Millikin, enumerator's maintainer]
On
*sigh*
Another fine entry for john-millikin-is-an-idiot.txt
Thank you for the patch Felipe, and for the bug report Skirmantas. I
have uploaded 0.4.10 to Hackage.
My sincere apologies for the inconvenience.
On Mon, Apr 25, 2011 at 19:03, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
On Tue, Apr 26, 2011 at 12:06 AM, John Millikin jmilli...@gmail.com wrote:
*sigh*
Another fine entry for john-millikin-is-an-idiot.txt
Thank you for the patch Felipe, and for the bug report Skirmantas. I
have uploaded 0.4.10 to Hackage.
My sincere apologies for the inconvenience.
But I am
John,
Thanks for a very quick fix, and thanks for making the enumerator library.
I tried to learn iteratees first from iteratee library but got
hopelessly confused within minutes. Now with your library and
Snoyman's 3 part tutorial
(http://www.yesodweb.com/blog/enumerators-tutorial-part-1) I at
-- Extension for Pearls of Functional Algorithm Design by Richard Bird,
-- 2010, page 25 #Haskell
-- This version assumes 3 disjoint ordered sets represented as lists.
-- So either: xy XOR xy
-- Since it uses lists it is no faster than the divide and conquer approach.
-- I might try to convert
Hi all,
I'm experimenting with using the plugins package for yesod devel
server. The basic approach is to use cabal for building the object
files, and then load them with plugins. I can get everything to work
when I compile with ghc --make, but I believe name mangling is
getting in the way with
On 26 April 2011 00:53, Ryan Ingram ryani.s...@gmail.com wrote:
I've been working on Haskell for quite a while and it's not too often that
a beginner shows me a new trick--this trick with trace seems really cool and
I hadn't seen it before.
f x | trace (f ++ show x) False = undefined
f ...
37 matches
Mail list logo