Hi All,
To amuse myself while waiting for test-runs to complete, I was
thinking about random terrain generation. I came across a bunch of
nice posts by Torben Mogensen, where he describes a neat way of
constructing random terrains by recursively subdividing right angled
isosceles triangles. It
|power_list :: [a] - [[a]]
|power_list = foldr (\x ~(_:xs) - []:xs = \ys - [ys, x:ys]) [[]]
|
| I loved how short and sweet this version is, but sadly with GHC it's
| noticeably slower than Bertram's first, more directly coded, version
| (1.32 seconds vs 0.55 seconds for power_list
| Anything involving sharing file descriptors between processes becomes
| similarly broken if the GHC runtime starts using a file descriptor as a
| Handle. You're not the only one to be surprised by this behaviour, but
| unfortunately it's not trivial to work around.
|
| Simon Marlow was going to
Thomas Conway wrote:
To amuse myself while waiting for test-runs to complete, I was
thinking about random terrain generation. I came across a bunch of
nice posts by Torben Mogensen, where he describes a neat way of
constructing random terrains by recursively subdividing right angled
isosceles
With the functional dependency, you can't work with the view datatypes
at all. Once you write
type Typ
data TypView = Unit | Arrow Typ Typ
instance View Typ TypView where
view = ...
you're no longer allowed to take apart a TypView at all!
E.g. you can't write
outUnit :: TypView - Bool
On Jul30, Claus Reinke wrote:
one could turn that promise into a type-checked guarantee by using
explicit sum types (and thus structural rather than name-based typing),
but that gets awkward in plain haskell.
I don't think the choice of whether you label your variants with names
or with
apfelmus apfelmus at quantentunnel.de writes:
Thomas Conway wrote:
To amuse myself while waiting for test-runs to complete, I was
thinking about random terrain generation. I came across a bunch of
nice posts by Torben Mogensen, where he describes a neat way of
constructing random
ChrisK [EMAIL PROTECTED] writes:
And the readability is destroyed because you cannot do any type inference in
your head.
If you see
{
Matrix m = ;
Matrix x = m * y;
...;
}
Then you know very little about the possible types of y
since can only conclude that:
[snippage] This
On Monday 30 July 2007 09:51:48 apfelmus wrote:
Thomas Conway wrote:
To amuse myself while waiting for test-runs to complete, I was
thinking about random terrain generation. I came across a bunch of
nice posts by Torben Mogensen, where he describes a neat way of
constructing random
Can someone clarify what's going on with the standard library in
Haskell?
As of right now, I can download, say, GHC from haskell.org/ghc and get a
set of libraries with it. I can visit
http://haskell.org/ghc/docs/latest/html/libraries/, linked from the
haskell.org home page, and see
Hi,
I was also wandering between these different db-libs and thanks for your
information.
I tried several (HDBC, HSQL, HaskellDB) and made only small trials.
HaskellDB has quite many examples on wiki that gave a quick start to further
trials.
But, I wasn't able to tell that some of the fields
Chris Smith cdsmith at twu.net writes:
Can someone clarify what's going on with the standard library in
Haskell?
...
sites for the thousandth time before realizing that so-and-so's GUI
library hasn't actually been touched since they finished their class
Short answer: Our system is very
Hi,
I apologize if this is off-topic or stupid. I'm not very familiar (at all)
with Windows programming...
I have a Haskell program that I want to get called when someone sends a
message on Windows. This sending a message will happen from various
programs that call MAPI. It doesn't seem
On Mon, 2007-07-30 at 09:19 -0600, Chris Smith wrote:
Can someone clarify what's going on with the standard library in
Haskell?
As of right now, I can download, say, GHC from haskell.org/ghc and get a
set of libraries with it. I can visit
On 7/30/07, Martin Lütke [EMAIL PROTECTED] wrote:
It uses a chaotic function (ergodic?) that works on integers. In the case of
Terrain it uses 2. One for the x and one for y coordinate. It should be
infinite
for Zooming out. When zooming in one uses interpolation. The drawback(?) is
when
On Mon, Jul 30, 2007 at 05:27:21PM +0100, Duncan Coutts wrote:
We have tools to solve the downloading and installing all deps problem.
It's called cabal-install. It's sort-of almost ready for wider testing.
duncan - will this have an interactive prompt?
i have found perl -MCPAN -e shell
On Mon, 2007-07-30 at 11:05 -0700, brad clawsie wrote:
On Mon, Jul 30, 2007 at 05:27:21PM +0100, Duncan Coutts wrote:
We have tools to solve the downloading and installing all deps problem.
It's called cabal-install. It's sort-of almost ready for wider testing.
duncan - will this have an
(moved to Haskell-cafe)
On Wednesday 25 July 2007 12:52, Gregory Wright wrote:
On Jul 25, 2007, at 6:39 AM, Chris Kuklewicz wrote:
Alberto Ruiz wrote:
I have included a binding to gsl_sf_gamma in the darcs repo of
GSLHaskell:
On Mon, Jul 30, 2007 at 05:31:40AM -0400, Dan Licata wrote:
With the functional dependency, you can't work with the view datatypes
at all. Once you write
type Typ
data TypView = Unit | Arrow Typ Typ
instance View Typ TypView where
view = ...
you're no longer allowed to take apart a
On 2007-07-30, Dave Bayer [EMAIL PROTECTED] wrote:
My pet example is a PDF library. No language should have its own PDF
library, when Postscript is so easy to write, and Ghostscript is a
cross-platform conversion tool maintained by thousands of our best and
brightest.
Except, of course, that
Two pieces of news regarding AngloHaskell:
1) We've been offered WiFi access at Microsoft Research for any attendees
who want it. We'll need a name, email address and company/institution
affiliation where appropriate - see wiki for details.
2) We're being given lunch on Friday!
Finally, a
I'm trying to do something I thought would be pretty simple, but it's
giving me trouble.
Given a list, say [1,2,3], I'd like to be able to generate an infinite
list of random elements from that list, in this case maybe
[1,2,1,3,2,1,3,2,3,1,2,...]. I'm using IO for random purely due to
laziness
On Mon, Jul 30, 2007 at 02:40:35PM -0700, Chad Scherrer wrote:
I'm trying to do something I thought would be pretty simple, but it's
giving me trouble.
Given a list, say [1,2,3], I'd like to be able to generate an infinite
list of random elements from that list, in this case maybe
On 30/07/07, Chad Scherrer [EMAIL PROTECTED] wrote:
I'm trying to do something I thought would be pretty simple, but it's
giving me trouble.
Given a list, say [1,2,3], I'd like to be able to generate an infinite
list of random elements from that list, in this case maybe
On Mon, Jul 30, 2007 at 02:40:35PM -0700, Chad Scherrer wrote:
Given a list, say [1,2,3], I'd like to be able to generate an infinite
list of random elements from that list, in this case maybe
[1,2,1,3,2,1,3,2,3,1,2,...]. I'm using IO for random purely due to
laziness (my own, not Haskell's).
Why this obsession with IO? There should be no IO involved in this, except
for getting the initial generator.
Using IO just confuses what is going on.
-- Lennart
On 7/30/07, Cale Gibbard [EMAIL PROTECTED] wrote:
On 30/07/07, Chad Scherrer [EMAIL PROTECTED] wrote:
I'm trying to do
On 30/07/07, Lennart Augustsson [EMAIL PROTECTED] wrote:
Why this obsession with IO? There should be no IO involved in this, except
for getting the initial generator.
Using IO just confuses what is going on.
Indeed. Here's my version:
-- first define a shuffle function, completely pure!
Hello,
On Wednesday 25 July 2007 01:42, Thorkil Naur wrote:
Hello Melissa,
On Tuesday 24 July 2007 19:09, Melissa O'Neill wrote:
...
(See ONeillPrimes.hs in http://www.cs.hmc.edu/~oneill/code/haskell-
primes.zip for the complete code. I've also added Thorkil Naur's
code from
Hi.
I have a set of problems in the field of constaint satisfaction and
I'm looking for a tool for this. In simplest form, these task are like
Sudoku puzzle solver, school schedule creator, etc.
Prolog language comes to mind at first.
But if to choose Haskell? Can be these tasks defined in Haskell
I have a set of problems in the field of constaint satisfaction and
I'm looking for a tool for this. In simplest form, these task are like
Sudoku puzzle solver, school schedule creator, etc.
Prolog language comes to mind at first.
Have you seen Eclipse? http://eclipse.crosscoreop.com/ - it
Haskell is certainly up for the challenge. You may be interested in
this paper, for example: http://citeseer.ist.psu.edu/335780.html
On 7/30/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
I have a set of problems in the field of constaint satisfaction and
I'm looking for a tool for this. In
Thanks for your responses.
Stefan, I appreciate your taking a step back for me (hard to judge
what level of understanding someone is coming from), but the example
you gave doesn't contradict my intuition either. I don't consider the
output [IO a] a list of tainted a's, but, as you suggest, a list
On Mon, Jul 30, 2007 at 06:57:25PM -0700, Michael Vanier wrote:
When I try to build lambdabot, I get this:
Configuring lambdabot-4.0...
configure: Dependency base-any: using base-2.1.1
configure: Dependency unix-any: using unix-2.1
configure: Dependency network-any: using network-2.0.1
Thanks, but this doesn't answer the question. I can load up the Control.Arrow module fine in ghci.
Is there a problem with the packaging information?
I did a google search, and this problem has come up on IRC, but nobody figured out what was causing
it as far as I can tell.
Mike
Stefan
mvanier:
Thanks, but this doesn't answer the question. I can load up the
Control.Arrow module fine in ghci. Is there a problem with the packaging
information?
It needs the 'arrows' package from hackage, not just Control.Arrow.
You'll get by fine by just removing the 'arrows' dependency :
OK, Stefan was right. The arrows package is an extension of Control.Arrow, not a from-scratch
implementation. The name confused me. Perhaps a better name would be arrows-ext or something
like that.
Mike
Michael Vanier wrote:
Thanks, but this doesn't answer the question. I can load up the
So, now that I've got all the libraries installed, the compile fails like this:
Building lambdabot-4.0...
[13 of 91] Compiling Lib.Parser ( Lib/Parser.hs,
dist/build/lambdabot/lambdabot-tmp/Lib/Parser.o )
Lib/Parser.hs:19:39:
Module `Language.Haskell.Syntax' does not export `as_name'
On Mon, Jul 30, 2007 at 08:54:12PM -0700, Michael Vanier wrote:
So, now that I've got all the libraries installed, the compile fails like
this:
Building lambdabot-4.0...
[13 of 91] Compiling Lib.Parser ( Lib/Parser.hs,
dist/build/lambdabot/lambdabot-tmp/Lib/Parser.o )
i am having a problem with hxt, i was wondering if anyone here has
experience with it. in particular, i find that the xread function
chokes on xml files with xml declarations, and i am not sure why.
consider this sample script:
module Main where
import Text.XML.HXT.Parser
main = do
xml -
39 matches
Mail list logo