Hello,
I don't want to write kludgy Haskell code!
typedef struct blah
{
int val1;
union {
int val2;
struct {
int val3;
int val4;
}
}
}C_type;
question: in Haskell, can I embed definition of
Yes, you must write them seperately as something like
data A = A Int B
data B = B1 Int
| B2 Int Int
one of the many wonders of Haskell -- it encourages you to split up
your code into nice small chunks.
Bob
On 30 May 2008, at 08:46, Galchin, Vasili wrote:
Hello,
I don't want
Duncan Coutts [EMAIL PROTECTED] writes:
Because I'm writing the Unicode-friendly ByteString =p
He's designing a proper Unicode type along the lines of ByteString.
So - storing 22.5 bit code points instead of 8-bit quantities? Or
storing whatever representation from the input, and providing a
On 29 May 2008, at 11:46 PM, Galchin, Vasili wrote:
Hello,
I don't want to write kludgy Haskell code!
typedef struct blah
{
int val1;
union {
int val2;
struct {
int val3;
int val4;
}
}
}
compactness in writing and also namespace pollution .. ;^)
Vasili
On Fri, May 30, 2008 at 2:12 AM, Jonathan Cast [EMAIL PROTECTED]
wrote:
On 29 May 2008, at 11:46 PM, Galchin, Vasili wrote:
Hello,
I don't want to write kludgy Haskell code!
typedef struct blah
{
int val1;
On behalf of the many, many contributors, we are pleased to announce
that the
Haskell Communities and Activities Report
(14th edition, May 2008)
http://www.haskell.org/communities/
is now available from the Haskell Communities home page in PDF
Hello Ketil,
Friday, May 30, 2008, 11:00:10 AM, you wrote:
I guess this is where I don't follow: why would you need more short
strings for Unicode text than for ASCII or 8-bit latin text?
BS package require too much memory for storing short strings.
alternative package that minimizes memory
On Fri, May 30, 2008 at 9:00 AM, Ketil Malde [EMAIL PROTECTED] wrote:
Duncan Coutts [EMAIL PROTECTED] writes:
The reason we do not want to re-use ByteString as the underlying
representation is because they're not good for short strings and we
expect that for Unicode text (more than arbitrary
On 30 May 2008, at 12:29 AM, Galchin, Vasili wrote:
compactness in writing and also namespace pollution .. ;^)
I know what the advantages of C's notation are. But getting the best
notation out of Haskell generally doesn't happen by trying to make
your code look like C.
So the general
Peter Gavin schrieb:
Has anyone else tried implementing type-level integers using type families?
I tried using a couple of other type level arithmetic libraries
(including type-level on Hackage) and they felt a bit clumsy to use. I
started looking at type families and realized I could pretty
Johan Tibell [EMAIL PROTECTED] writes:
I guess this is where I don't follow: why would you need more short
strings for Unicode text than for ASCII or 8-bit latin text?
But ByteStrings are neither ASCII nor 8-bit Latin text!
[...]
The intent of the not-yet-existing Unicode string is to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
apt-get install zlib1g-dev
Tony Morris
http://tmorris.net/
Real-world problems are simply degenerate cases of pure mathematical
problems.
Thomas Hartman wrote:
Tried to install
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/zlib
Hi!
On Fri, May 30, 2008 at 10:38 AM, Ketil Malde [EMAIL PROTECTED] wrote:
Johan Tibell [EMAIL PROTECTED] writes:
The intent of the not-yet-existing Unicode string is to represent
text not bytes.
Right, so this will replace the .Char8 modules as well? What confused
me was my
On Fri, 2008-05-30 at 10:38 +0200, Ketil Malde wrote:
Johan Tibell [EMAIL PROTECTED] writes:
I guess this is where I don't follow: why would you need more short
strings for Unicode text than for ASCII or 8-bit latin text?
But ByteStrings are neither ASCII nor 8-bit Latin text!
Actually, the link now points to the following URL (updated by John Melesky):
http://www.eecs.usma.edu/webs/people/okasaki/pfds-haskell.tar.gz
instead of the following URL (set by Henk-Jan van Tuyl):
http://web.archive.org/web/2818044004/http://www.cs.columbia.edu/~cdo/pfds-haskell.tar.gz
On Thu, 2008-05-29 at 20:12 -0700, Philip Neustrom wrote:
I'm having issues trying to get cabal-install (latest darcs)
installed, as well. I'm seeing the message:
Hackage/Types.hs:19:29:
Module `Distribution.Version' does not export `Dependency'
which was mentioned on this list
it makes me wonder: can we support concatenation with sharing (e.g. the
rope data structure)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Manuel M T Chakravarty wrote:
Peter Gavin:
will work if the non-taken branch can't be unified with anything. Is
this planned? Is it even feasible?
I don't think i entirely understand the question.
Maybe he wants, given
cond :: Cond x y z = x - y - z
tt :: True
true_exp :: a
Duncan Coutts [EMAIL PROTECTED] wrote:
So I fully appreciate this packaging stuff is sometimes frustrating. I
hope you appreciate that it is actually improving.
I already was pleasantly surprised when discovering cabal-install, I
think it deserves some more prominence, or even integration into
Johan Tibell [EMAIL PROTECTED] writes:
Lazy I/O comes with a penalty in terms of correctness!
Is there a page describing this in more detail? I believe my programs
to be correct, but would like to know if there are additional
pitfalls, beyond hClosing a handle with outstanding (unevaluated)
I have been thinking about to what extent you could cleanly do I/O
without explicit use of the I/O monad, and without uniqueness types
(which are the main alternative to monads in pure functional
programming, and are used in the Concurrent Clean programming language).
Suppose you have a main
Hello,
Does anyone know if it is possible to specify a default definition for an
associated type synonym? When I tried:
class A a where
type B a = a
GHC (version 6.9.20080309) told me: Type declaration in a class must be a
kind signature or synonym default. However, when I look at the
On Fri, May 30, 2008 at 03:09:37PM +0100, Robin Green wrote:
I have been thinking about to what extent you could cleanly do I/O
without explicit use of the I/O monad, and without uniqueness types
(which are the main alternative to monads in pure functional
programming, and are used in the
Robin Green wrote:
I have been thinking about to what extent you could cleanly do I/O
without explicit use of the I/O monad, and without uniqueness types
(which are the main alternative to monads in pure functional
programming, and are used in the Concurrent Clean programming language).
Suppose
2008/5/30 Achim Schneider [EMAIL PROTECTED]:
I already was pleasantly surprised when discovering cabal-install, I
think it deserves some more prominence, or even integration into cabal
itself, to make everyone aware of the fact that there's such a thing as
automatic installation and tempt
On Fri, 30 May 2008 15:23:46 +0100
Andrew Butterfield [EMAIL PROTECTED] wrote:
Robin Green wrote:
I have been thinking about to what extent you could cleanly do I/O
without explicit use of the I/O monad, and without uniqueness types
(which are the main alternative to monads in pure
On Thu, May 29, 2008 at 8:58 PM, Jonathan Cast
[EMAIL PROTECTED] wrote:
It's not French
'tis so! Two dictionaries I've now checked say it entered English from
Hebrew via French 'cabale'. But that has to be the last I say on this
as it's now well off topic.
--
Dan
Am Freitag, 30. Mai 2008 16:09 schrieb Robin Green:
[…]
I'm primarily interested in embedded system and desktop UIs,
Than you should take a look at http://haskell.org/haskellwiki/FRP.
[…]
Best wishes,
Wolfgang
___
Haskell-Cafe mailing list
Ketil Malde wrote:
I guess this is where I don't follow: why would you need more short
strings for Unicode text than for ASCII or 8-bit latin text?
Because ByteString is optimised for dealing with big blobs of binary
data, its performance when you split a big ByteString into a pile of
words is
On May 30, 2008, at 9:09 AM, Robin Green wrote:
eventMain :: (Event, SystemState AppState) - (Command, SystemState
AppState)
The first thing I would do with this type is probably wrap it up in a
State monad so I don't have to keep track of the SystemState AppState
stuff myself, which
Am Donnerstag, 29. Mai 2008 17:38 schrieb Achim Schneider:
[…]
Rationale: We need […] grapefruit authors that commit to hackage
Our reason to not commtting Grapefruit to Hackage so far was that this would
mean making an official release and we thought that Grapefruit is not yet
ready for
Am Donnerstag, 29. Mai 2008 17:47 schrieb Neil Mitchell:
[…]
grapefruit authors that commit to hackage
Or someone to help show the grapefruit authors the light. I helped put
smallcheck on hackage, others have done other packages. Perhaps you
could do grapefruit?
What do you mean with
Robin Green wrote:
I have been thinking about to what extent you could cleanly do I/O
without explicit use of the I/O monad, and without uniqueness types
Here's a way to see I/O as a pure functional data structure. To keep
things simple, we model only Char I/O:
data Program
= Quit
| Output
Hello Neil,
Friday, May 30, 2008, 8:41:43 PM, you wrote:
Our reason to not commtting Grapefruit to Hackage so far was that this would
mean making an official release and we thought that Grapefruit is not yet
ready for this.
Release it on hackage. Releasing to hacking means other people
My $0.02 is to say
-- O(1)
longList ++ [5]
Yay. I've got a thunk. Oh wait, I need to access the '5'? No
different than doing so for
-- O(n)
until ((==5) . head) [l,o,n,g,L,i,s,t,5]
It's not the (++) that's O(n). It's the list traversal. I can
further beat this pedantic point to
wojtowicz.norbert:
I'm pleased to publically announce a little project I've worked on.
Based on a recent research paper [0] that claims fluid intelligence
could be improved by training working memory, I wrote up a dual n-back
test memory game in Haskell and gtk2hs. This is still essentially an
I think the reason it took longer to build HAppS-Server is that
previously, when I was installing the MyProject example from happs.org
I was using searchpath.
I guess searchpath doesn't compile every single haskell module,
whereas runghc Setup build and cabal install does.
2008/5/29 Spencer
On Wed, 28 May 2008, Ketil Malde wrote:
Bulat Ziganshin [EMAIL PROTECTED] writes:
well, i don't understand difference between your idea and lazybs
implementation
HT said earlier that:
This would still allow the nice tricks for recursive Fibonacci
sequence definition.
Which I guess
Lanny Ripple wrote:
My $0.02 is to say
-- O(1) longList ++ [5]
Yay. I've got a thunk. Oh wait, I need to access the '5'? No
different than doing so for
-- O(n) until ((==5) . head) [l,o,n,g,L,i,s,t,5]
It's not the (++) that's O(n). It's the list traversal.
Lets look at the actual
On Fri, 2008-05-30 at 16:33 +0200, Chaddaï Fouché wrote:
2008/5/30 Achim Schneider [EMAIL PROTECTED]:
I already was pleasantly surprised when discovering cabal-install, I
think it deserves some more prominence, or even integration into cabal
itself, to make everyone aware of the fact that
Wolfgang Jeltsch [EMAIL PROTECTED] wrote:
Am Donnerstag, 29. Mai 2008 17:38 schrieb Achim Schneider:
[…]
Rationale: We need […] grapefruit authors that commit to hackage
Our reason to not commtting Grapefruit to Hackage so far was that
this would mean making an official release and we
Tillmann Rendel [EMAIL PROTECTED] writes:
Hi! (Cool, another guy from DAIMI on haskell-cafe!)
Another (n - 1) reduction steps for the second ++ to go away.
last (o ++ l)
A) ~ last ('o' : ++ l))
L) ~ last ( ++ l)
A) ~ last (l)
L) ~ 'l'
And the third and fourth ++ go away
I don't suppose this will surprise anybody greatly, but...
Apparently if you write a Haskell module that is 400 KB in size and
defines a single CAF consisting of a 45,000-element [String], GHCi
panics when attempting to load it interpretted, and hits a stack
overflow attempting to load it
andrewcoppin:
I don't suppose this will surprise anybody greatly, but...
Apparently if you write a Haskell module that is 400 KB in size and
defines a single CAF consisting of a 45,000-element [String], GHCi
panics when attempting to load it interpretted, and hits a stack
overflow
I'm pleased to announce the availability of a fast Bloom filter library
for Haskell. A Bloom filter is a probabilistic data structure that
provides a fast set membership querying capability. It does not give
false negatives, but has a tunable false positive rate. (A false
positive arises when
Bryan O'Sullivan [EMAIL PROTECTED] wrote:
A Bloom filter is a probabilistic data
structure that provides a fast set membership querying capability.
It does not give false negatives, but has a tunable false positive
rate. (A false positive arises when the filter claims that an
element is
Yeah, this sounds really similar to functionally reactive programming.
I recommend you start by reading this paper:
http://haskell.cs.yale.edu/frp/genuinely-functional-guis.pdf
On Fri, May 30, 2008 at 11:34 AM, Wolfgang Jeltsch
[EMAIL PROTECTED] wrote:
Am Freitag, 30. Mai 2008 16:09 schrieb
Allright, this is a definitely a newbie question.
I'm learning Haskell and going through the exercises in the
beautiful Hutton book, and one of them requires for me to
write a loop that queries a line from the user (stdin),
looping until the user enters a valid integer (at least
that's how I want
On Fri, May 30, 2008 at 5:28 PM, Martin Blais [EMAIL PROTECTED] wrote:
Allright, this is a definitely a newbie question.
I'm learning Haskell and going through the exercises in the
beautiful Hutton book, and one of them requires for me to
write a loop that queries a line from the user
blais:
Allright, this is a definitely a newbie question.
I'm learning Haskell and going through the exercises in the
beautiful Hutton book, and one of them requires for me to
write a loop that queries a line from the user (stdin),
looping until the user enters a valid integer (at least
philip.weaver:
1. How do I catch the exception that is raised from read?
I think you want readIO, which yields a computation in the IO monad,
so it can be caught.
Ah, that's a third option, sequence the effect using readIO,
import System.IO
import qualified Control.Exception as C
On May 30, 2008, at 5:32 AM, Benjamin L. Russell wrote:
Actually, the link now points to the following URL (updated by John
Melesky):
http://www.eecs.usma.edu/webs/people/okasaki/pfds-haskell.tar.gz
instead of the following URL (set by Henk-Jan van Tuyl):
On Fri, 30 May 2008 16:54:18 -0700, Philip Weaver
[EMAIL PROTECTED] said:
1. How do I catch the exception that is raised from read?
I think you want readIO, which yields a computation in the IO monad,
so it can be caught.
Holy schmoly, there it is, words of wisdom, written as clearly as can
On Fri, May 30, 2008 at 5:14 PM, Martin Blais [EMAIL PROTECTED] wrote:
On Fri, 30 May 2008 16:54:18 -0700, Philip Weaver
[EMAIL PROTECTED] said:
1. How do I catch the exception that is raised from read?
I think you want readIO, which yields a computation in the IO monad,
so it can be
On Fri, 30 May 2008 17:19:54 -0700, Philip Weaver
[EMAIL PROTECTED] said:
Dear Philip, could you point your virtual finger towards a
reference/paper/book/any-bleeping-thing that would help this simple
beginner understand why it doesn't work in this case? I'm trying to
picture why a read
I think I would like to make another note: when we talk about the complexity
of a function, we are talking about the time taken to completely evaluate
the result. Otherwise any expression in haskell will be O(1), since it just
creates a thunk.
And then the user of the program is to be blamed for
On 2008.05.28 20:11:54 -0700, Benjamin L. Russell [EMAIL PROTECTED]
scribbled 2.5K characters:
Although all the source code for the pdf version
(http://www.cs.cmu.edu/~rwh/theses/okasaki.pdf) of Purely Functional Data
Structures is provided in Standard ML, not Haskell, I found a broken link
57 matches
Mail list logo