Hi,
(I also sent this to libraries@, but without response; I'm posting here
for a wider audience.)
I'm somewhat of a beginner in Haskell, so take what I say with a grain
of salt, please.
The ListZipper implementation seems very odd to me, and #haskell seemed
to agree with me. The current
This traverses the list three times (reverse, init and last are each
linear time):
fromListEnd xs = Zipper (reverse $ init xs) (last xs) []
But we only need to do it once:
fromListEnd xs = let x:xs' = reverse xs in Zipper xs' x []
I don't *think* this has an effect on strictness/laziness, since
On Sat, 2009-01-17 at 10:44 -0800, Max Rabkin wrote:
This traverses the list three times (reverse, init and last are each
linear time):
fromListEnd xs = Zipper (reverse $ init xs) (last xs) []
But we only need to do it once:
fromListEnd xs = let x:xs' = reverse xs in Zipper xs' x []
I
On Sat, 2009-01-17 at 21:55 +0100, Jean-Philippe Bernardy wrote:
I think it should admit empty, and the traversable instance should
traverse the first list in reverse.
I fixed the latter issue so that the behavior is correct (I think).
I tested it like this:
forM (next $ next $ fromList
On Sat, Jan 17, 2009 at 4:32 PM, Jeff Wheeler j...@nokrev.com wrote:
On Sat, 2009-01-17 at 21:55 +0100, Jean-Philippe Bernardy wrote:
I think it should admit empty, and the traversable instance should
traverse the first list in reverse.
I fixed the latter issue so that the behavior is
matti.niemenmaa+news:
Announcing the release of Coadjute, version 0.0.1!
Web site: http://iki.fi/matti.niemenmaa/coadjute/
Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Coadjute
Here's an Arch Linux package for it,
http://aur.archlinux.org/packages.php?ID=23237
On Sat, 2009-01-17 at 17:41 -0500, David Menendez wrote:
That's correct, but I think you'd be better off defining OpApplicative
(or Backward, as I call it) locally and avoiding the two reverses.
I'll have to look into this more; I don't really understand applicatives
right now, so I can't use
On Sat, Jan 17, 2009 at 7:49 PM, Jeff Wheeler j...@nokrev.com wrote:
On Sat, 2009-01-17 at 17:41 -0500, David Menendez wrote:
That's correct, but I think you'd be better off defining OpApplicative
(or Backward, as I call it) locally and avoiding the two reverses.
I'll have to look into this
G'day all.
Quoting Max Rabkin max.rab...@gmail.com:
Good to have a recommendation -- my future CT lecturer has a hard time
recommending anything not written by Mac Lane.
One more suggestion: Conceptual Mathematics by Lawvere and Schanuel is
the gentlest introduction that you're going to
On Sat, 17 Jan 2009, David Menendez wrote:
instance Applicative f = Applicative (Backwards f) where
pure = B . pure
f * x = B (unB f ** unB x)
probably should be f * x = B (unB x ** unB f)
anyhow, this should be part of Control.Applicative.
This may be terminological confusion. I
Hackage is about to reach the 1000 release mark, 2 years after it went
live.
That's right: in 2 years we've gone from having only a handful of
released projects, to one thousand! Well done everyone!
I did some quick visualisation of the rate of new releses, diversity of
packages, and community
There has been a lot of spam on HaskellWiki. Since anonymous edits have
been switched off, a spammer tactic has been to create hundreds of
accounts to evade individual account blocks.
To combat this, I have
1. deleted all user accounts that have made no edits;
2. switched off account
On Sat, Jan 17, 2009 at 9:13 PM, rocon...@theorem.ca wrote:
On Sat, 17 Jan 2009, David Menendez wrote:
instance Applicative f = Applicative (Backwards f) where
pure = B . pure
f * x = B (unB f ** unB x)
probably should be f * x = B (unB x ** unB f)
I always get that backwards.
#2962: Fix space leak in genericLength
-+--
Reporter: thorkilnaur | Owner:
Type: bug | Status: new
Priority: normal| Component:
#2951: Add support for amd64-solaris2 platform
+---
Reporter: kgardas |Owner: simonmar
Type: feature request | Status: new
Priority: normal |Milestone:
#2962: Fix space leak in genericLength
--+-
Reporter: thorkilnaur | Owner:
Type: bug | Status: new
Priority: normal| Milestone:
#2953: deriving Functor, Foldable, Traversable
--+-
Reporter: twanvl| Owner: twanvl
Type: feature request | Status: new
Priority: normal|
#2951: Add support for amd64-solaris2 platform
+---
Reporter: kgardas |Owner: simonmar
Type: feature request | Status: new
Priority: normal |Milestone:
#2951: Add support for amd64-solaris2 platform
+---
Reporter: kgardas |Owner: simonmar
Type: feature request | Status: new
Priority: normal |Milestone:
#2753: GHC 6.10.1 cannot compile Crypto-4.1.0
-+--
Reporter: thoughtpolice |Owner:
Type: bug | Status: new
Priority: normal|
I think you need to remove your users database (and rebuild
it). Compatibility was broken in version 0.3.4 (not sure of number).
HTH
--
Arnaud Bailly, PhD
OQube - Software Engineering
http://www.oqube.com
___
Haskell-Cafe mailing list
On Fri, Jan 16, 2009 at 3:10 PM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello david48,
Friday, January 16, 2009, 4:16:51 PM, you wrote:
Upon reading this thread, I asked myself : what's a monoid ? I had no
idea. I read some posts, then google haskell monoid.
it would be
On Fri, Jan 16, 2009 at 4:04 PM, Jonathan Cast
jonathancc...@fastmail.fm wrote:
On Fri, 2009-01-16 at 14:16 +0100, david48 wrote:
Part of the problem is that something like a monoid is so general that
I can't wrap my head around why going so far in the abstraction.
For example, the writer
Hello,
2009/1/16 Immanuel Litzroth immanuel...@gmail.com:
I don't understand your comment.
1) If XMonad already uses it the problem is solved, without giving Haskell
import new semantics?
Right, but there are some restrictions.
2) These guys refer to a method to do plugin work in Haskell
Cory Knapp wrote:
Actually, that was part of my point: When I mention Haskell to people,
and when I start describing it, they're generally frightened enough by
the focus on pure code and lazy evaluation-- add to this the
inherently abstract nature, and we can name typeclasses
cuddlyKitten,
The great that's why is as follows: when you have an abstraction,
then it is sufficient to hold the abstraction in mind instead of the
whole concrete implementation. That's the whole purpose of
abstraction, after all, be it maths or programming.
Let me illustrate this.
Suppose you are developing
2009/1/17 Andrew Coppin andrewcop...@btinternet.com:
Cory Knapp wrote:
Actually, that was part of my point: When I mention Haskell to people, and
when I start describing it, they're generally frightened enough by the focus
on pure code and lazy evaluation-- add to this the inherently abstract
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert a structure over X to a structure over
Y, given a function X - Y, while preserving
2009/1/17 Andrew Coppin andrewcop...@btinternet.com:
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert a structure over X to a
On Sat, Jan 17, 2009 at 5:04 AM, Andrew Coppin
andrewcop...@btinternet.comwrote:
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert
Hello Luke,
Saturday, January 17, 2009, 3:16:06 PM, you wrote:
fmap id = id
fmap (f . g) = fmap f . fmap g
The first property is how we write preserving underlying
structure, but this has a precise, well-defined meaning that we can
say a given functor obeys or it does not (and if it
On Sat, Jan 17, 2009 at 1:41 AM, david48
dav.vire+hask...@gmail.comdav.vire%2bhask...@gmail.com
wrote:
On Fri, Jan 16, 2009 at 3:10 PM, Bulat Ziganshin
bulat.zigans...@gmail.com wrote:
Hello david48,
Friday, January 16, 2009, 4:16:51 PM, you wrote:
Upon reading this thread, I asked
/opt/local/bin/ghc +RTS -RTS -c tools/hierarchyGen/TypeGen.hs -o
tools/hierarchyGen/TypeGen.o -O -itools/hierarchyGen -package-conf
package.conf.inplace -hide-all-packages -package base
package.conf.inplace: openBinaryFile: does not exist (No such file or directory)
/opt/local/bin/ghc +RTS -RTS -c
Thinking that Functor allows you to apply a function to all elements
in a collection is a good intuitive understanding. But fmap also
allows applying a function on elements of things that can't really
be called collections, e.g., the continuation monad.
-- Lennart
On Sat, Jan 17, 2009 at
On Sat, Jan 17, 2009 at 7:33 AM, Lennart Augustsson
lenn...@augustsson.netwrote:
Thinking that Functor allows you to apply a function to all elements
in a collection is a good intuitive understanding. But fmap also
allows applying a function on elements of things that can't really
be called
There's however still no framework which supports both HTTP client and
server functions using the same Request and Response data type, right? I
don't know whether I am the only one who needs this (e.g. for the Real
Monad Transformer). E.g. a proxy would need this, too.
I've wanted this for a
Hi,
I¹ve been thinking about factoring constants out of iterations and have
spotted another place in my code where I can make use of this.
See the two examples below the first example iterates over the mcSimulate
function this has changed a little bit but essentially still recurses
around
On Sat, Jan 17, 2009 at 9:46 AM, Phil pbeadl...@mail2web.com wrote:
In the second example we probably have something like 6 'JMP' statements
in machine code – 3 to jump in to each function, and 3 to jump back out. In
the first we have 2 – one to jump us into mcSimulate and one to return. So
On Fri, 2009-01-16 at 17:57 +0300, Bulat Ziganshin wrote:
Hello Sigbjorn,
Friday, January 16, 2009, 5:42:06 PM, you wrote:
first question: are these packages (http, curl, curl-shell, webclient)
windows-compatible? second - that is advantages of using http (or
webclient) over curl?
I
On Sat, Jan 17, 2009 at 4:08 PM, David Leimbach leim...@gmail.com wrote:
So you're saying it should be better documented in Haskell what a Monoid is.
Did you say you searched for C++ class why not Haskell Monoid then?
The first correct google hit that didn't think I meant Monads, takes you
Hello,
When I try to render a byteString template using outputFPS like this :
outputBsTemplate :: StringTemplate ByteString - CGI CGIResult
outputBsTemplate template = let bs = renderFPS template in
outputFPS bs
I get this error :
Couldn't match expected type
On Sat, Jan 17, 2009 at 11:09 AM, Pieter Laeremans pie...@laeremans.orgwrote:
Hello,
When I try to render a byteString template using outputFPS like this :
outputBsTemplate :: StringTemplate ByteString - CGI CGIResult
outputBsTemplate template = let bs = renderFPS template in
Just started up a blog on my own random lumberings through Haskell and
the visualizations I've produced in Haskell. Have plenty of content
on backlog, so I should be updating regularly. That's about all!
http://vis.renci.org/jeff/
-- Jeff
___
On Fri, 2009-01-16 at 21:17 +, Chris Kuklewicz wrote:
And regex-posix has a very old school Setup.hs file with a small addition:
#!/usr/bin/env runhaskell
-- I usually compile this with ghc --make -o setup Setup.hs
import Distribution.Simple(defaultMainWithHooks,
On 17/01/2009 16:55, Luke Palmer lrpal...@gmail.com wrote:
Wow. I strongly suggest you forget about efficiency completely and become a
proficient high-level haskeller, and then dive back in. Laziness changes
many runtime properties, and renders your old ways of thinking about
efficiency almost
A very short time ago Simon Marlow (if I recall correctly) commented
on this topic: he told that this transformation usually improves
efficiency pretty much, but sometimes it leads to some problems and it
shouldn't be done by the compiler automatically. Search the recent
messages for 'map' and one
Hi,
Somebody told me about Parsec 3, which uses a Stream type class so it
can parse any data type. This sounded like the right way to do
encoding independent parsing, so I decided to see how it would work to
parse UTF8 JSON.
Sadly I could not use Text.JSON.Parsec directly, because it
On Sat, Jan 17, 2009 at 9:16 AM, david48
dav.vire+hask...@gmail.comdav.vire%2bhask...@gmail.com
wrote:
On Sat, Jan 17, 2009 at 4:08 PM, David Leimbach leim...@gmail.com wrote:
So you're saying it should be better documented in Haskell what a Monoid
is.
Did you say you searched for C++
On Sat, Jan 17, 2009 at 1:47 AM, david48 dav.vire+hask...@gmail.com wrote:
why would I
need to write a running count this way instead of, for example, a non
monadic fold, which would probably result in clearer and faster code?
Maybe my post here will answer some questions like that:
Hi guys:
I don´t know how difficult really is, but it seens that it could be done
because all the necessary elements are there (except perhaps the mapping
package name-hackage url): Why hasn´t been done yet Is unknown to me.
It would be very useful and a big save of time to have a cabal commad
Am Samstag, 17. Januar 2009 23:20 schrieb Alberto G. Corona:
Hi guys:
I don´t know how difficult really is, but it seens that it could be done
because all the necessary elements are there (except perhaps the mapping
package name-hackage url): Why hasn´t been done yet Is unknown to me.
It
It occurs to me you could also use attoparsec, which is specifically
optimised for bytestring processing.
sjoerd:
Hi,
Somebody told me about Parsec 3, which uses a Stream type class so it
can parse any data type. This sounded like the right way to do
encoding independent parsing, so I
Jeff,
I'm not sure if this is causing the problem you're referring to,
but MacPorts is at GHC 6.10 while Gtk2Hs doesn't support
that yet.
Regards,
Yitz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
That would probably be the problem, then, yes. I'm still using GHC
6.8.3 in most of my code, but MacPorts doesn't respect the existing
installation of GHC 6.8.3 that I installed via the DMG package on
http://haskell.org/ghc
On Sat, Jan 17, 2009 at 5:56 PM, Yitzchak Gale g...@sefer.org wrote:
On 17/01/2009 20:45, Eugene Kirpichov ekirpic...@gmail.com wrote:
A very short time ago Simon Marlow (if I recall correctly) commented
on this topic: he told that this transformation usually improves
efficiency pretty much, but sometimes it leads to some problems and it
shouldn't be done by
I personally spurned MacPorts for this reason (and others). I've had
good success using the GTK+ Aqua framework from http://www.gtk-
osx.org/ and manually compiling pkg-config and gtk2hs from the darcs
repository. The only trick was to set PKG_CONFIG_PATH appropriately
before running
Attoparsec does not have something like the Stream class, so I do not
see how I could do UTF8 parsing easily.
On Jan 17, 2009, at 11:50 PM, Don Stewart wrote:
It occurs to me you could also use attoparsec, which is specifically
optimised for bytestring processing.
sjoerd:
Hi,
Somebody
I'm pleased to announce another hledger release. Happy new year, all!
hledger is a partial haskell clone of John Wiegley's ledger text-based
accounting tool. It generates transaction balance reports from a
plain
text ledger file, and demonstrates a functional implementation of
ledger.
For
Announcing the release of Coadjute, version 0.0.1!
Web site: http://iki.fi/matti.niemenmaa/coadjute/
Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Coadjute
Coadjute is a generic build tool, intended as an easier to use and more
portable replacement for make. It’s not
2009/1/18 Matti Niemenmaa matti.niemenmaa+n...@iki.fi:
Announcing the release of Coadjute, version 0.0.1!
Hi,
trying to build on GHC 6.10.1 I get:
Building regex-dfa-0.91...
Text/Regex/DFA/Common.hs:6:7:
Could not find module `Data.IntMap':
it is a member of package
matti.niemenmaa+news:
Announcing the release of Coadjute, version 0.0.1!
Web site: http://iki.fi/matti.niemenmaa/coadjute/
Hackage: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/Coadjute
Here's an Arch Linux package for it,
http://aur.archlinux.org/packages.php?ID=23237
ilmari.vacklin:
2009/1/18 Matti Niemenmaa matti.niemenmaa+n...@iki.fi:
Announcing the release of Coadjute, version 0.0.1!
Hi,
trying to build on GHC 6.10.1 I get:
Building regex-dfa-0.91...
Text/Regex/DFA/Common.hs:6:7:
Could not find module `Data.IntMap':
it is a member
G'day all.
Quoting Gracjan Polak gracjanpo...@gmail.com:
I remember my early CS algebra courses. I met cool animals there: Group,
Ring, Vector Space. Those beasts were very strong, but also very calm at
the same time. Although I was a bit shy at first, after some work we
became friends.
I
On Saturday 17 January 2009 8:28:05 am Bulat Ziganshin wrote:
Hello Luke,
Saturday, January 17, 2009, 3:16:06 PM, you wrote:
fmap id = id
fmap (f . g) = fmap f . fmap g
The first property is how we write preserving underlying
structure, but this has a precise, well-defined
Hi Sigbjorn,
On Thu, Jan 15, 2009 at 10:36:35PM -0800, Sigbjorn Finne wrote:
I've yet to gain access to www.haskell.org and update
http://www.haskell.org/http,
Perhaps this would be a good point to move the website to the community
server?
Thanks
Ian
G'day all.
Quoting John Goerzen jgoer...@complete.org:
If I see Appendable I can guess what it might be. If I see monoid, I
have no clue whatsoever, because I've never heard of a monoid before.
Any sufficiently unfamiliar programming language looks like line noise.
That's why every new
Hackage is about to reach the 1000 release mark, 2 years after it went
live.
That's right: in 2 years we've gone from having only a handful of
released projects, to one thousand! Well done everyone!
I did some quick visualisation of the rate of new releses, diversity of
packages, and community
G'day all.
Dan Weston wrote:
Richard Feinman once said: if someone says he understands quantum
mechanics, he doesn't understand quantum mechanics.
But what did he know...
Presumably not quantum mechanics.
Cheers,
Andrew Bromage
___
On Thu, 2009-01-15 at 13:40 +0100, Apfelmus, Heinrich wrote:
Eugene Kirpichov wrote:
Well, your program is not equivalent to the C++ version, since it
doesn't bail on incorrect input.
Oops. That's because my assertion
show . read = id
is wrong. We only have
read . show = id
Hi everyone,
I'm pleased to announce a new package I've just uploaded to hackage:
language-sh. It's a set of modules for parsing, manipulating, and
printing sh-style shell scripts. It's being developed alongside shsh,
the Simple Hakell Shell (available at http://code.haskell.org/shsh/,
but it's
Maybe. Handling the common cases reasonably well is
probably worth doing first (+profiling) before opting for
a heartlung transplant..
To wit, I've trivially improved the handling of string and
integer lits in version 0.4.3 (just released.) It cuts down
the running times by a factor of 2-3 on
On Sun, Jan 18, 2009 at 00:00, Ashley Yakeley ash...@semantic.org wrote:
Bjorn Buckwalter wrote:
leapseconds-announced is a pragmatic, if imperfect, improvement over
my past practices. It provides a LeapSecondTable with all leap seconds
announced to date (hence the name). Once the IERS
On Sun, 2009-01-18 at 00:34 -0500, Bjorn Buckwalter wrote:
Thanks for the pointer. My source is the Earth Orientation Parameter
(EOP) data at http://www.celestrak.com/SpaceData/; specifically I
autogenerate the module from
http://www.celestrak.com/SpaceData/eop19620101.txt. Probably looks
On Sat, 2009-01-17 at 12:04 +, Andrew Coppin wrote:
Eugene Kirpichov wrote:
No, a functor is a more wide notion than that, it has nothing to do
with collections.
An explanation more close to truth would be A structure is a functor
if it provides a way to convert a structure over X to
On Sat, 2009-01-17 at 11:07 +, Andrew Coppin wrote:
Anton van Straaten wrote:
Niklas Broberg wrote:
I still think existential quantification is a step too far though. :-P
Seriously, existential quantification is a REALLY simple concept, that
you would learn week two (or maybe three)
On Sat, 2009-01-17 at 10:47 +0100, david48 wrote:
On Fri, Jan 16, 2009 at 4:04 PM, Jonathan Cast
jonathancc...@fastmail.fm wrote:
On Fri, 2009-01-16 at 14:16 +0100, david48 wrote:
Part of the problem is that something like a monoid is so general that
I can't wrap my head around why going
Andrew Coppin andrewcop...@btinternet.com wrote:
I would suggest that ExistentiallyQuantifiedTypeVariables would be an
improvement [...]
That must be a joke. Typing the long extension names in LANGUAGE
pragmas over and over again is tiring and annoying enough already. We
really don't need
Duncan Coutts wrote:
It may well be tempting to plague maintainers until they fix their
packages however in practise it will not work. We want a low barrier to
entry for packages on hackage and we do not want to annoy package
maintainers to the point where they decide to stop using hackage at
Ketil Malde wrote:
Sjoerd Visscher sjo...@w3future.com writes:
JSON is a UNICODE format, like any modern format is today. ByteStrings
are not going to work.
Well, neither is String as used in the code I responded to. I'm not
intimately familiar with JSON, but I believe ByteStrings would
On Sat, Jan 17, 2009 at 11:19 PM, Dan Piponi dpip...@gmail.com wrote:
On Sat, Jan 17, 2009 at 1:47 AM, david48 dav.vire+hask...@gmail.com wrote:
why would I
need to write a running count this way instead of, for example, a non
monadic fold, which would probably result in clearer and faster
80 matches
Mail list logo