On 26 April 2011 00:53, Ryan Ingram 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 ... -- rest of r
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
-- 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
-- Since it uses lists it is no faster than the divide and conquer approach.
-- I might try to convert this v
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
On Tue, Apr 26, 2011 at 12:06 AM, John Millikin 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 sure that j
*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
wrote:
> [CC'ing John Millikin, enum
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
wrote:
> [CC'ing John Millikin, enumerator's maintainer]
>
> On Mon, Apr 25, 2011 at
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 -
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
[CC'ing John Millikin, enumerator's maintainer]
On Mon, Apr 25, 2011 at 7:10 PM, Skirmantas Kligys
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
> in the file, and it does
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 beh
On 26 April 2011 11:03, Daniel Fischer 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?
works, but it is a bit dumb.
Changing is on my wish list to
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.
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
>
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
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
On 26 April 2011 00:20, Rogan Creswick 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:
http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/JSONb
Bas
_
On Mon, Apr 25, 2011 at 3:10 PM, Michael Litchard 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 nice to figure out w
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 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 and start over.
>
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
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 wrote:
> On Mon, Apr 25, 2011 at 2:44 PM, Michael Litchard wrote:
>> So it appears this i
On Mon, Apr 25, 2011 at 2:44 PM, Michael Litchard 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 newer version (yes
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 wrote:
> Following the install trail I run into this problem
>
> mlitchard@apotheosis:~$ cab install JSONb-1.0.2
> Resolv
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 ( T
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 http-enumerator-0.3.1-719bcd77e1dc
Roel van Dijk wrote:
> On 24 April 2011 01:49, wren ng thornton 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 doing the seco
Hi,
On 25/04/11 14:21, Stephen Tetley wrote:
On 25 April 2011 14:11, Angel de Vicente 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, curr
Hi,
On 25/04/11 14:20, Ozgur Akgun wrote:
On 25 April 2011 14:11, Angel de Vicente 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 in ...
On 25 April 2011 14:11, Angel de Vicente 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 syntax looks
On 25 April 2011 14:11, Angel de Vicente 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
res
On 25 April 2011 14:11, Angel de Vicente 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
http://www.haskell.org/mailman/listinfo/
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 pa
Gracjan Polak schrieb:
> Hi all,
>
> I have a project with a .cabal file listing package dependencies using
> the usual version constraints ==X.Y.* =K.J syntax.
> Standard route cabal configure; cabal build works correctly as it is able
> to select working set of package versions.
You can manuall
On 24/04/2011 06:33 PM, Jason Dagit wrote:
On Sun, Apr 24, 2011 at 2:05 AM, Andrew Coppin
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 the
result of applying
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 t
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; o
36 matches
Mail list logo