Hi all,
After using zippers for a while, I wanted to dig a bit deeper into them.
I found there is some relation between Zipper and Comonad, but this
confuses me somewhat.
After reading a bit more about Comonads [1] and [2], I think I
understand them somewhat, and I see how they too are useful
Congrats on the release!
I would like to help out with the full comparison since I have some
knowledge and experience on the subject. Because of the different
approach, I think there's definitely room for two libraries.
Cheers,
Jasper
On Tue, May 22, 2012 at 2:23 AM, Felipe Almeida Lessa
Dear cafe,
I have just upgraded to GHC 7.4, and now I run into some compilation
problems. Specifically, I have a package that needs both Data.Array.Unboxed
and System.IO.Unsafe. But I cannot enable both base and haskell98 in a
cabal file. is there any way out of this?
If I enable both haskell98
Apologies, I fixed this. It only affects the really old Array module, which
I can live without. Data.Array.Unboxed is fine.
Tom
On Tue, May 22, 2012 at 10:41 AM, Tom Nielsen taniel...@gmail.com wrote:
Dear cafe,
I have just upgraded to GHC 7.4, and now I run into some compilation
problems.
Hi Mathijs
On 22 May 2012, at 07:42, Mathijs Kwik wrote:
Hi all,
After using zippers for a while, I wanted to dig a bit deeper into them.
I found there is some relation between Zipper and Comonad, but this
confuses me somewhat.
After reading a bit more about Comonads [1] and [2], I
Has anyone ever worked on implementing something like this in Haskell?
http://www.cs.hmc.edu/~stone/papers/ocm-unpublished.pdf
The outline of the idea:
- Concurrent programming is really hard with the popular frameworks
today.
- For most purposes parallel programming is hard, in some part
Hej,
I'm using the LDAP package by John Goerzen to retrieve some information from an
Active Directory database. Part of this information are the full names of my
company's employees.
Many of these names contain characters which aren't part of the standard ASCII
set, for example ä å ü ê and so
Hi all,
I've been teaching myself Haskell lately (I come from the C#/Python
world). I wrote a simplistic lexer, and I was hoping I could get a
code review or two. The code that follows is a stand-alone app that
works under GHC.
A few concerns of mine:
- My `consume` function seems basic enough
Hi Mathijs,
On Tue, May 22, 2012 at 8:42 AM, Mathijs Kwik wrote:
After using zippers for a while, I wanted to dig a bit deeper into them.
I found there is some relation between Zipper and Comonad, but this
confuses me somewhat.
You might also take a look at:
Comonadic functional attribute
John Simon, Tue 2012-05-22 @ 10:13:07-0500:
- My `consume` function seems basic enough that it should be library
code, but my searches turned up empty. Did I miss anything?
consume = span . flip elem
- Is creating data structures with simple field names like `kind`,
`offset`, etc a good
Sounds great!
I have some vague ideas about what the comparison might reveal -- but
I expect to learn quite a bit in the process, and use that to improve
reform. There is definitely room for more than one form validation
library. They all have shortcomings, and I am hoping something even
better
Another suggestion is to use pattern matching at the function level:
doLex' lexer loc [] = [makeToken EOF]
doLex' lexer loc (x:xs) = case x of
' ' - more (locInc loc 1) xs
'\n'- more (locNL loc) xs
...
_ -
That saves you from having to deconstruct repeatedly in your
From: Richard O'Keefe
Sent: Monday, May 21, 2012 6:54 PM
On 22/05/2012, at 4:15 AM, Isaac Gouy wrote:
Actually, I/O bound is *good*.
Why would that be good or bad?
The context here is a UNIX-style topological sorting program.
Being I/O bound means that the program is limited by how
For high-performance computing you want to avoid such software engineering
abstractions as classes, objects, etc
Therefore, I would say, since Haskell makes possible many fine-levels of
abstraction, if the compiler can strip most of these away, then it would
come close to the speed of C (i.e.
Ertugrul Söylemez es at ertes.de writes:
Note about []: Don't even mention foldl. The folding combinator
for lists is foldr, period.
Amen.
I ignore foldl in teaching but it will appear
under the name of IEnumerableT.Aggregate(z, f) (from Linq).
Note, the Linq designers got
In ghci 7.4.1:
Prelude :t (+1)
(+1) :: Num a = a - a
Prelude let inc=(+1)
Prelude :t inc
inc :: Integer - Integer
Why the difference?
Thanks,
Greg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/haskellwiki/Monomorphism_restriction
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, May 22, 2012 at 9:34 PM, Artyom Kazak wrote:
http://www.haskell.org/**haskellwiki/Monomorphism_**restrictionhttp://www.haskell.org/haskellwiki/Monomorphism_restriction
+
http://www.haskell.org/ghc/docs/latest/html/users_guide/interactive-evaluation.html#extended-default-rules
Thanks!
$ ghci -XNoMonomorphismRestriction
Prelude :t (+1)
(+1) :: Num a = a - a
Prelude let inc=(+1)
Prelude :t inc
inc :: Num a = a - a
Cool.
-Greg
On Tue, May 22, 2012 at 12:34 PM, Artyom Kazak artyom.ka...@gmail.comwrote:
Hello Cafe,
This is just FYI.
We Hasekell community in Japan will have an event called Haskell Day
2012 on 27th May to cerebrate the publication of the Japanese version
of Learn you. 180+ people have already registered:
# This page is written in Japanese.
Thank you. I was trying to register an account on the trac today to file a
bug report but the account registration seems to be broken. I'll wait to
file my bug till I can use github's much nicer tracker.
Thanks,
Jason
On Wed, May 16, 2012 at 8:45 PM, Bryan O'Sullivan b...@serpentine.comwrote:
On 23/05/2012, at 4:54 AM, Isaac Gouy wrote:
There may be very little one can do about the I/O part.
Maybe you could say how the Java I/O is being done.
For 50,000 nodes and 8,385,254 edges,
Java (first version) ran out of memory after 89.54 seconds (default heap)
Java (2nd
On 5/21/12 10:51 AM, Yves Parès wrote:
I do think we have the opposite problem, however, in much Haskell code --
people are using the clean, obviously correct, but inefficient code even in
standard library functions that really should be optimized like crazy!
And even before optimizing like
On 5/22/12 10:30 AM, Vincent Ambo wrote:
Hej,
I'm using the LDAP package by John Goerzen to retrieve some information from an
Active Directory database. Part of this information are the full names of my
company's employees.
Many of these names contain characters which aren't part of the
On 5/22/12 11:13 AM, John Simon wrote:
- Is `case _ of x:xs - x:xsr where xsr = something xs` a common
idiom? It happened twice in my code, and it seems odd to split the
first element away from the rest of the list as it's processed.
I don't know how common it is in practice, but that's fmap
Personally, I think cooperative concurrency is making a big comeback.
Especially in a compiler-supporting form that relies on limited CPS
(continuation-passing-style) transformation. There are server and web
services applications that motivate it (i.e. in Scala, F# async work flows).
In Haskell
On 5/22/12 12:54 PM, Isaac Gouy wrote:
On 5/21/2012 6:54 PM, Richard O'Keefe wrote:
For 50,000 nodes and 8,385,254 edges,
Java (first version) ran out of memory after 89.54 seconds (default heap)
Java (2nd version) 13.31 seconds -- avoid Integer boxing!
Java (3rd
So I wanted to find the first index in a vector whose running sum is
greater than a given number.
The straightforward way is to create the running sum and then search:
Vector.findIndex (=target) (Vector.scanl' (+) 0 vector)
But vectors are strict so it could do extra work, and what if I don't
28 matches
Mail list logo