david48 [EMAIL PROTECTED] writes:
Didn't work for me : Installs fine, ghci works fine, but I get linking
problems. ld complains about -lgmp
Did you try installing any of these?
% apt-cache search libgmp
libgmp3-dev - Multiprecision arithmetic library developers tools
libgmp3c2 -
Hi Mike,
It looks as if hoogle isn't working. I get 404s whenever I try to do any
search on hoogle.
Hoogle works for performing searches, but the documentation links are
incorrect. Expect this fixed by this evening!
Thanks
Neil
___
Haskell-Cafe
Thanks that is the x86 binary is exactly what I need!
On 06/11/2007, Brian P. O'Hanlon [EMAIL PROTECTED] wrote:
On Nov 6, 2007 5:10 PM, Tim Clark [EMAIL PROTECTED] wrote:
Has anyone got GHC 6.8.1 building on Leopard? Unfortunately macports
isn't even letting me build GHC 6.6.1 since the
[I changed the subject, so (hopefully) rare people who just follow the
thread may miss it, but I couldn't look at the name of Fibonacci with
two errors in it anymore...]
Andrew Bromage rebukes me once more that the fl. point solution diverges
from the integer one [as if I didn't know that...],
Peter Verswyvelen wrote:
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL.
I know GTK2HS has support for loading images, but does a standalone
Haskell (wrapper) module exists for loading images?
See the message PNG files by Tim Newsham, sent to haskell-cafe on the
On Tue, 2007-11-06 at 19:20 -0800, Michael Vanier wrote:
It looks as if hoogle isn't working. I get 404s whenever I try to do any
search on hoogle.
Mike
Yes, that's because the ghc-docs now have been slightly reorganized.
Neil said he's working on it.
Hello all,
I use tar.bz2 binary distribution of GHC compiler as my distro does
not use any supported packaging system. Everything is fine, but... I
want to install the new version of the GHC compiler. Is there any (easy)
way, how to get information about what was copied and where during
Alberto Ruiz wrote:
If you don't use the foreign function interface I think that you only need
the -L option:
ghc --make -L/usr/local/lib/ghc-6.8.1/gmp -O2 -o edimail Main.hs
Something similar worked for me, but this new behavior is not very reasonable.
Could it be a bug?
It looks like a
Thomas Schilling wrote:
Levi Stephen wrote:
I'm was wondering how most people work during when designing a functional
program. Do you create data structures/types first? Do you work from some type
signatures?
But there's a third thing that you can
do, other than start implementing: think
On Wed, Nov 07, 2007 at 10:41:53AM +0100, Dusan Kolar wrote:
I use tar.bz2 binary distribution of GHC compiler as my distro does not
use any supported packaging system. Everything is fine, but... I want to
install the new version of the GHC compiler. Is there any (easy) way, how
to get
On Nov 7, 2007 10:44 AM, Simon Marlow [EMAIL PROTECTED] wrote:
/usr/local/lib/ghc-6.8.1 (or wherever you installed it). Alternatively you
can install a suitable gmp package using your OS's package manager (you
didn't say which flavour of Linux you're on).
This is what I did, following an
G'day all.
Quoting [EMAIL PROTECTED]:
Andrew Bromage rebukes me once more that
the fl. point solution diverges
from the integer one [as if I didn't know that...],
Sorry if it came across as that. I just meant it as a segue into a way
to make the algorithm practical.
I do note that nobody
On Nov 7, 2007 9:05 AM, Ketil Malde [EMAIL PROTECTED] wrote:
david48 [EMAIL PROTECTED] writes:
Didn't work for me : Installs fine, ghci works fine, but I get linking
problems. ld complains about -lgmp
Did you try installing any of these?
% apt-cache search libgmp
libgmp3-dev -
The Haskell home page hasn't been updated since 23rd September, even
though a Haskell Weekly News came out on October 25th.
Paul.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Paul Johnson wrote:
The Haskell home page hasn't been updated since 23rd September, even
though a Haskell Weekly News came out on October 25th.
Not to mention GHC 6.8.1.
-Yitz
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Justin Bailey wrote:
The other day I decided to implement a ring buffer with a current
element (i.e. a doubly-linked zipper list). In order to allow inserts
(and, in the future, deletes and updates), I have a special sentinel
element called Join in the structure. When inserting, I find the
join
BridgeSupport [1] is new functionality in Leopard that makes the
current Haskell Objective-C bindings (HOC) obsolete (almost).
---
The metadata is intended to be a resource for use beyond bridging.
Most frameworks on the system provide two chunks of XML BridgeSupport
metadata; succinct and
Hi Mike,
It looks as if hoogle isn't working. I get 404s whenever I try to do any
search on hoogle.
I have fixed quite a lot of the links, some will still be broken, but
hopefully not too many. Really, hoogle needs upgrading to use the new
base library etc - I'll try and do that sometime
On Tue, 6 Nov 2007 [EMAIL PROTECTED] wrote:
However, this is still an O(log n) algorithm, because that's the
complexity of raising-to-the-power-of. And it's slower than the
simpler integer-only algorithms.
You mean computing the matrix power of
/1 1\
\0 1/
?
On Nov 6, 2007 10:15 PM, David Benbennick [EMAIL PROTECTED] wrote:
What about using hGetContents to just read ALL of the input, as a lazy
string? Then you look through that string for success or failure. In
other words,
readACL2Answer pout = do
s - hGetContents pout
parse s here
Haskell is conspicuously absent from the languages used to tackle Tim
Bray's Wide Finder problem (http://www.tbray.org/ongoing/When/200x/
2007/10/30/WF-Results?updated).
So far we have Ocaml, Erlang, Python, Ruby, etc...
Bryan quickly wrote a program on his blog (http://www.serpentine.com/
Hello all,
maybe I'm just not used enough to Windows, but let me explain my woes of
today. It seems to me to be *much* too hard to get a full install of
GHC + GTK2Hs
going on Windows, going from the idea that I want the currently
released stable
versions of everything.
So, this is the way
The other day I decided to implement a ring buffer with a current
element (i.e. a doubly-linked zipper list). In order to allow inserts
(and, in the future, deletes and updates), I have a special sentinel
element called Join in the structure. When inserting, I find the
join first, insert and then
I have been working on a little Java project lately at work, by way
of an introduction to the language, and naturally I often have cause
to regret that it isn't Haskell instead.
But in the specific matter I'm wrestling with, the Java library's OOP
model is, to its credit, allowing me to do some
Andrew Bromage:
I do note that nobody has tried it with continued fractions yet.
Now, it depends... If we take the PHI expansion as a CF: 1,1,1,1,1,... then
the convergents constitue the (rations of) Fibonaccis, but it goes through
the standard recurrence, so it is not so fancy.
But we can
On Wed, 2007-11-07 at 17:34 +0100, Arthur van Leeuwen wrote:
Hello all,
maybe I'm just not used enough to Windows, but let me explain my woes of
today. It seems to me to be *much* too hard to get a full install of
GHC + GTK2Hs
going on Windows, going from the idea that I want the
Hi Arthur,
The correct steps to take are:
1) install GHC from the windows installer - trivial
2) install Gtk2hs from the windows installer
Unfortunately Gtk2hs hasn't been updated to work with GHC 6.8.1, so
step 2 will fail. The person who is going to do this is Duncan. He
usually breaks down
Data.Maybe has functions for processing Maybe's but nothing useful
for creating maybe. I think the following would be a very useful
addition, a guarded function:
guarded :: (a - Bool) - (a - b) - a - Maybe b
guarded p f x | p x = Just (f x)
| otherwise = Nothing
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of manu
Haskell is conspicuously absent from the languages used to tackle Tim
Bray's Wide Finder problem
(http://www.tbray.org/ongoing/When/200x/2007/10/30/WF-Results?updated).
So far we have Ocaml, Erlang, Python, Ruby, etc...
On Wed, Nov 07, 2007 at 10:36:05AM +0100, Thomas Schilling wrote:
On Tue, 2007-11-06 at 19:20 -0800, Michael Vanier wrote:
It looks as if hoogle isn't working. I get 404s whenever I try to do any
search on hoogle.
Mike
Yes, that's because the ghc-docs now have been slightly
When discussing the complexity of fib don't forget that integer
operations for bignums are no longer constant time.
-- Lennart
On Nov 7, 2007 6:55 AM, Henning Thielemann
[EMAIL PROTECTED] wrote:
On Tue, 6 Nov 2007 [EMAIL PROTECTED] wrote:
However, this is still an O(log n) algorithm,
There are some nice formulae for the Fibonacci numbers that relate f_m
to values f_n where n is around m/2. This leads to a tolerably fast
recursive algorithm.
Here's a complete implementation:
fib 0 = 0
fib 1 = 1
fib 2 = 1
fib m | even m = let n = m `div` 2 in fib n*(fib (n-1)+fib (n+1))
I've packaged up the fast Boyer-Moore and Knuth-Morris-Pratt code that
Chris Kuklewicz posted a few months ago:
http://article.gmane.org/gmane.comp.lang.haskell.libraries/7363
The consensus at the time was that the code was not ready for rolling
into the bytestring package, but now it's
Peter Verswyvelen wrote:
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL.
I know GTK2HS has support for loading images, but does a standalone Haskell
(wrapper) module exists for loading images?
See the message PNG files by Tim Newsham, sent to haskell-cafe on the
On 7 Nov 2007, at 11:26 AM, Donn Cave wrote:
I have been working on a little Java project lately at work, by way
of an introduction to the language, and naturally I often have cause
to regret that it isn't Haskell instead.
But in the specific matter I'm wrestling with, the Java library's OOP
If you're willing to have an extra Typeable constraint, this does what you want:
import Data.Typeable (Typeable, cast)
import Data.Maybe (fromMaybe)
toString :: (Show a, Typeable a) = a - String
toString x = fromMaybe (show x) (cast x)
*Main toString blah
blah
*Main toString 1
1
*Main
On Nov 7, 2007 5:12 AM, Denis Bueno [EMAIL PROTECTED] wrote:
Ironically, this was my first problem. First of all, I don't think I
want the semi-closed state -- I want to be able to read and write
freely later on (I may be misunderstanding semi-closed, however).
I don't think that makes sense.
On 7 Nov 2007, at 12:40 PM, Tim Newsham wrote:
Data.Maybe has functions for processing Maybe's but nothing useful
for creating maybe. I think the following would be a very useful
addition, a guarded function:
guarded :: (a - Bool) - (a - b) - a - Maybe b
guarded p f x | p x =
Is there such a thing as memory-mapped arrays in GHC?
I'm looking for something that would let me memory-map a file of
floats and access it as an array.
Thanks, Joel
--
http://wagerlabs.com
___
Haskell-Cafe mailing list
joelr1:
Is there such a thing as memory-mapped arrays in GHC?
I'm looking for something that would let me memory-map a file of
floats and access it as an array.
There's a commented out mmapFile for ByteString in Data.ByteString's
source. Use that, and then extract the ForeignPtr from the
On 7-Nov-07, at 5:14 PM, Joel Reymont wrote:
BridgeSupport [1] is new functionality in Leopard that makes the
current Haskell Objective-C bindings (HOC) obsolete (almost).
Almost here means about five to ten percent of the code ;-). If the
BridgeSupport files really contain all the
Joel Reymont wrote:
Is there such a thing as memory-mapped arrays in GHC?
In principle, there could be an IArray instance to memory-mapped files.
(There could also be a mutable version, but just the IArray version
would be useful).
I noticed just the other day that there are some 'obvious'
On 7-nov-2007, at 17:43, Neil Mitchell wrote:
Hi Arthur,
The correct steps to take are:
1) install GHC from the windows installer - trivial
2) install Gtk2hs from the windows installer
Unfortunately Gtk2hs hasn't been updated to work with GHC 6.8.1, so
step 2 will fail. The person who is
bos:
I've packaged up the fast Boyer-Moore and Knuth-Morris-Pratt code that
Chris Kuklewicz posted a few months ago:
http://article.gmane.org/gmane.comp.lang.haskell.libraries/7363
The consensus at the time was that the code was not ready for rolling
into the bytestring package, but
Don Stewart wrote:
Do we have any benchmarks, for say, 1G files, versus linear, naive
(strict) search?
Chris mentioned that he did, but I haven't had time to write anything
benchmarky yet.
b
___
Haskell-Cafe mailing list
On Nov 7, 2007 2:21 PM, Bryan O'Sullivan [EMAIL PROTECTED] wrote:
Chris mentioned that he did, but I haven't had time to write anything
benchmarky yet.
I used the attached program to benchmark the various functions against
endo.dna[1], a 7 MB file that came with this year's ICFP contest. It
On Nov 7, 2007 10:16 AM, apfelmus [EMAIL PROTECTED] wrote:
Do you really need to realize the cycle by sharing? I mean, sharing
doesn't go well with insertion / updates / deletion since each of these
operations breaks it and needs to restore it everywhere. In other words,
your insert takes
On 11/8/07, Tim Newsham [EMAIL PROTECTED] wrote:
Data.Maybe has functions for processing Maybe's but nothing useful
for creating maybe. I think the following would be a very useful
addition, a guarded function:
guarded :: (a - Bool) - (a - b) - a - Maybe b
guarded p f x | p x
Bulat Ziganshin wrote:
Hello Andrew,
Tuesday, November 6, 2007, 10:55:58 PM, you wrote:
for me, abstraction is anything that i want to be an abstraction. i
just write code in the close-to-natural language and it becomes
Haskell program when appropriate syntax applied.
Well, in my
Donn Cave wrote:
But in the specific matter I'm wrestling with, the Java library's OOP
model is, to its credit, allowing me to do some things. I'm using their
standard LDAP client library, but swapping in my own function to read
X509 certificates for the SSL. Actually, swapping in my own SSL
So I'm the one user in a thousand that will want to provide my own I/O
functions, for example. In the old world, I guess I would be looking
for some extended API where my I/O functions are parameters to the open
or init function, and the IMAP functions take over from there. In a
more pure
levi.stephen wrote:
I have similar questions about Haskell abstracting away
implementations behind interfaces as well. I have become
used to an approach where I will not worry about
databases/persistence when beginning. I will create an
interface to a database layer (e.g., save(object),
On Wed, 2007-11-07 at 23:20 +0100, Arthur van Leeuwen wrote:
With kind regards, Arthur. (Who will surely do more Windows development
with Haskell soonish)
Good! We need more developers to help us with windows stuff. We're in
this difficult situation where half of our users use Windows
Don't shoot me...
The last exchange with Andrew Bromage made me recall a homework which was
given to some students by a particularly nasty teacher I happen to know.
The question is to generate the whole infinite Rabbit Sequence in one
shot (co-recursive, selbstverständlich).
The Rabbit
levi.stephen wrote:
My concern (which may be inexperience ;) ) is with the monads here
though. What if I hadn't seen that the IO monad (or any other Monad)
was going to be necessary in the type signatures?
You'd have some refactoring to do :-) But actually, it's not possible
to create an
G'day all.
Quoting [EMAIL PROTECTED]:
This nasty acquaintance of mine asked the students to write down a simple
procedure which generates the sequence after the infinite number of units
of time.
Cool problem! Simple is, of course, in the eye of the beholder.
zipWith (!!) (fix (([1]:).map(=
On 06/11/2007, Peter Verswyvelen [EMAIL PROTECTED] wrote:
I would like to load 32-bit images (RGB+alpha) for use with GLUT/OpenGL.
I know GTK2HS has support for loading images, but does a standalone Haskell
(wrapper) module exists for loading images?
PNG or TGA would be enough for me.
The
On 11/8/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Would somebody try to solve it, before I unveil the solution? It isn't
difficult.
*** SPOILER WARNING ***
Here's my attempt, which I wrote without peeking:
let fibs' = 1 : 2 : zipWith (+) fibs' (tail fibs')
rabbits = 1 : 0 :
Hello emacsen users,
Here is a setting to check your Haskell code /on-the-fly/
with 'flymake-mode'.
(require 'flymake)
;; flymake for Haskell
(defun flymake-Haskell-init ()
(flymake-simple-make-init-impl
'flymake-create-temp-with-folder-structure nil nil
vigalchin:
Hello,
I was watching Simon Peyton-Jones' video on A Taste of Haskell
Part 1. .. Is there any paper discussing the architecture? I am not afraid
to read code but sometimes a paper overview is good ...
Regards, Vasya
There's one quick paper describing the
Tim Docker wrote:
levi.stephen wrote:
My concern (which may be inexperience ;) ) is with the monads here
though. What if I hadn't seen that the IO monad (or any other Monad)
was going to be necessary in the type signatures?
You'd have some refactoring to do :-) But actually, it's not
Hi,
sorry my english is not the best :(
2007/11/5, gitulyar [EMAIL PROTECTED]:
Please help me. I'm new in Haskell programming, but wrote some things in
Scheme. I make so function:
fib 1 = 1
fib 2 = 2
fib n = fib (n-1) + fib (n-2)
And when I call fib 30 it works about 5 seconds. As for me
On Thu, 8 Nov 2007, Stuart Cook wrote:
On 11/8/07, Tim Newsham [EMAIL PROTECTED] wrote:
Data.Maybe has functions for processing Maybe's but nothing useful
for creating maybe. I think the following would be a very useful
addition, a guarded function:
guarded :: (a - Bool) - (a -
On Wed, Nov 07, 2007 at 10:10:16PM +, Jules Bean wrote:
Joel Reymont wrote:
Is there such a thing as memory-mapped arrays in GHC?
In principle, there could be an IArray instance to memory-mapped files.
(There could also be a mutable version, but just the IArray version would
be
On Wed, Nov 07, 2007 at 10:41:53AM +0100, Dusan Kolar wrote:
Hello all,
I use tar.bz2 binary distribution of GHC compiler as my distro does not
use any supported packaging system. Everything is fine, but... I want to
install the new version of the GHC compiler. Is there any (easy) way, how
Haskell offers a few different annotations, for example
strictness, to optimize programs. It would sure be nice if there
were a way to pull the annotations out and put them somewhere
else, enabling them, or not, at compile time. There could be
several different annotation sets, even -- you could
On Thu, Nov 08, 2007 at 12:56:46AM +0100, [EMAIL PROTECTED] wrote:
This nasty acquaintance of mine asked the students to write down a simple
procedure which generates the sequence after the infinite number of units
of time. Of course, any finite prefix of it.
rabbit = let rs = 0 : [x | r - rs,
G'day all.
I wrote:
However, this is still an O(log n) algorithm, because that's the
complexity of raising-to-the-power-of. And it's slower than the
simpler integer-only algorithms.
Quoting Henning Thielemann [EMAIL PROTECTED]:
You mean computing the matrix power of
/1 1\
\0 1/
?
I
Tim Docker wrote:
levi.stephen wrote:
I have similar questions about Haskell abstracting away
implementations behind interfaces as well. I have become
used to an approach where I will not worry about
databases/persistence when beginning. I will create an
interface to a database layer (e.g.,
On Wed, 7 Nov 2007, Justin Bailey wrote:
So I'm the one user in a thousand that will want to provide my own I/O
functions, for example. In the old world, I guess I would be looking
for some extended API where my I/O functions are parameters to the open
or init function, and the IMAP
I need to pick among the usual list of suspects for a commercial
product that I'm writing. The suspects are OCaml, Haskell and Lisp and
the product is a trading studio. My idea is to write something like
TradeStation [1] or NinjaTrader, only for the Mac.
It would be quite nifty to use
How about this,
infiniteRS :: [Int]
infiniteRS = let acum a1 a2 = a2 ++ acum (a1++a2) a1 in 1 : acum [1] [0]
it certainly fits in one line but it's not really elegant
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Nov 7, 2007, at 9:57 PM, Wolfgang Thaller wrote:
One big piece of information we need that is currently missing from
the BridgeSupport files is which declaration comes form which header
file. HOC's module structure currently follows Apple's .h files, and
we need the module system for
You mean:
Jonh Hughes. The Design of a Pretty-printing Library.
:)
/ Emil
On 2007-11-07 05:16, apfelmus wrote:
Paul Hudak. The Design of a Pretty-printing Library.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
G'day all.
Quoting [EMAIL PROTECTED]:
zipWith (!!) (fix (([1]:).map(= \x-if x==0 then [1] else [1,0]))) [0..]
This was the shortest variant I could manage in the time allotted:
zipWith(!!)(fix(([1]:).map(= \x-1:[0|x==1])))[0..]
Cheers,
Andrew Bromage
Hello,
I was watching Simon Peyton-Jones' video on A Taste of Haskell Part
1. .. Is there any paper discussing the architecture? I am not afraid to
read code but sometimes a paper overview is good ...
Regards, Vasya
___
Haskell-Cafe mailing list
Is this what you are looking for:
mrs = [0] : [1] : zipWith (++) (tail mrs) mrs
then you can get the one you want with:
mrs !! index
given a suitable value for index
It seems I didn't read the question carefully - you want the infinite
list.
You can recover the solution from mrs
Kind thanks, Don.
Vasya
On Nov 7, 2007 9:40 PM, Don Stewart [EMAIL PROTECTED] wrote:
vigalchin:
Hello,
I was watching Simon Peyton-Jones' video on A Taste of
Haskell
Part 1. .. Is there any paper discussing the architecture? I am not
afraid
to read code but
Joel Reymont:
I need to pick among the usual list of suspects for a commercial
product that I'm writing. The suspects are OCaml, Haskell and Lisp
and the product is a trading studio. My idea is to write something
like TradeStation [1] or NinjaTrader, only for the Mac.
It would be quite
On Wed, 7 Nov 2007, Tim Newsham wrote:
Data.Maybe has functions for processing Maybe's but nothing useful
for creating maybe. I think the following would be a very useful
addition, a guarded function:
guarded :: (a - Bool) - (a - b) - a - Maybe b
guarded p f x | p x = Just
80 matches
Mail list logo