Hello Thomas,
Sunday, July 8, 2007, 2:36:43 AM, you wrote:
This is certainly true. I've coded up in less than six months,
something that uses better algorithms and finer grained concurrency
than the software I used to work on, and the latter represented 5 or
more man-years of coding. However
Claus Reinke wrote:
ah, that suggests yet another specification, a variation of the second
version above, where the parser in control is not p1 itself, but p2,
with p1 acting as an input transformation for p2, and p3 resuming
where p1 left off. the difference being that p2's demand is supposed
Jonathan Cast wrote:
I wouldn't call rank-2 types extremely rare . . .
Well now, my parser is annoyingly clunky to use, but it *works*.
However, I just found something where it seems to be *impossible* to
write the necessary code without rank-2 types...
I tried to write this type:
bulat.ziganshin:
Hello Thomas,
Sunday, July 8, 2007, 2:36:43 AM, you wrote:
This is certainly true. I've coded up in less than six months,
something that uses better algorithms and finer grained concurrency
than the software I used to work on, and the latter represented 5 or
more
Bulat Ziganshin wrote:
i've improved memory usage of my program 3 times one month after i've
started to use Haskell, and 4 times more 1.5 years later (the last
improvement included development of ByteString-alike library and
strictifying some computations). i think that for programming-in-large
andrewcoppin:
Does anybody have any clue why ByteStrings are actually faster? (And why
this information isn't easily findable anywhere - must shorly be a VFAQ.)
It's well documented in the API documentation for bytestrings.
Start here:
Hi
Looks like there's too many packages on hackage.haskell.org now for a
single page listing:
http://hackage.haskell.org/packages/archive/pkg-list.html
Perhaps we can have a page with just the categories, with subpages
hanging off?
Please don't. With one large page I can search the
Andrew Coppin wrote:
Dave Bayer wrote:
I was beginning to accept that I might die before clearing my
pipeline of research projects I want to code up. Haskell has given me
new hope.
Indeed. ;-)
Today I hve implemented encoders and decoders for RLE, MTF, Fibonacci
codes, and LZW. Next on my
andrewcoppin:
Andrew Coppin wrote:
Dave Bayer wrote:
I was beginning to accept that I might die before clearing my
pipeline of research projects I want to code up. Haskell has given me
new hope.
Indeed. ;-)
Today I hve implemented encoders and decoders for RLE, MTF, Fibonacci
codes,
On 08/07/07, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Looks like there's too many packages on hackage.haskell.org now for a
single page listing:
http://hackage.haskell.org/packages/archive/pkg-list.html
Perhaps we can have a page with just the categories, with subpages
hanging off?
Please don't. With one large page I can search the entire page
quickly,
That's what I'm doing all the time as well.
There are more options:
Using columns ;)
Showing one category only / all packages optionally.
So I vote for keeping the existing page.
But I don't mind having also somithing
Hello Donald,
Sunday, July 8, 2007, 12:50:36 PM, you wrote:
too much quoting :(
Good work. Probably worth benchmarking against the other compression
libraries
are you really want to totally discredit Haskell? :) they should be
hundreds of times slower than any practical compression
Donald Bruce Stewart wrote:
andrewcoppin:
Does anybody have any clue why ByteStrings are actually faster? (And why
this information isn't easily findable anywhere - must shorly be a VFAQ.)
It's well documented in the API documentation for bytestrings.
Start here:
Bulat Ziganshin wrote:
Hello Donald,
Good work. Probably worth benchmarking against the other compression
libraries
are you really want to totally discredit Haskell? :) they should be
hundreds of times slower than any practical compression algorithm
(and btw, zlib/bzlib isn't good
Hi
I guess the question that's really burning in my mind is if ByteString
is so much faster than [x], why can't you just do the same optimisations
to [x]? In other words, why should I need to alter my code to get all
this fusion goodness?
You already get some benefit of fusion with lists:
*
Donald Bruce Stewart dons at cse.unsw.edu.au writes:
Give #haskell is a far larger community than:
As well as
#java
#javascript
#ruby
Try #ruby-lang instead ;) At least assuming you were talking about the
programming language ruby, and the channel on freenode.
#lua
#d
Andrew Coppin wrote:
Now, as I understand it, a ByteString is a kind of unboxed array (= big
RAM savings + big CPU time savings for not building it + big GC savings
for not processing millions of list nodes + better cache performance).
Or at least, a *strict* ByteString is; I'm very very
On Jul 8, 2007, at 3:21 , Andrew Coppin wrote:
this.) So as of now, my code uses rank-2 types - despite the fact
that I don't actually know what a rank-2 type *is* yet! o_O This is
rather troubling...
Bah --- I use monads all the time and still don't have much of a clue
about category
Brandon S. Allbery KF8NH wrote:
On Jul 8, 2007, at 3:21 , Andrew Coppin wrote:
this.) So as of now, my code uses rank-2 types - despite the fact
that I don't actually know what a rank-2 type *is* yet! o_O This is
rather troubling...
Bah --- I use monads all the time and still don't have
On Jul 7, 2007, at 7:23 , Thomas Conway wrote:
I've been working in a mostly Python shop this last year, and it
reinforces my belief that people who don't like strong static typing
are yahoos, not professionals interested in producing high quality
code. Maybe I just don't get the line between
Neil Mitchell wrote:
Hi
I guess the question that's really burning in my mind is if ByteString
is so much faster than [x], why can't you just do the same optimisations
to [x]? In other words, why should I need to alter my code to get all
this fusion goodness?
You already get some benefit of
On Jul 8, 2007, at 8:12 , Andrew Coppin wrote:
Brandon S. Allbery KF8NH wrote:
On Jul 8, 2007, at 3:21 , Andrew Coppin wrote:
this.) So as of now, my code uses rank-2 types - despite the fact
that I don't actually know what a rank-2 type *is* yet! o_O This
is rather troubling...
Bah
Brandon S. Allbery KF8NH wrote:
On Jul 8, 2007, at 8:12 , Andrew Coppin wrote:
Aye, you drive a car without knowing how it works - but it was put
together by some people who *do* know these things. Would you drive a
car you built yourself? ;-)
No :) --- but depending on what you're doing,
Neil Mitchell wrote:
data ListGT map k a
= Empt
| BraF ![k] a !(map (ListGT map k a))
| BraE ![k] !(map (ListGT map k a))
deriving( Typeable )
Not in Haskell, only in GHC.
Thanks for the suggestions from Hugh and Neil. I tried this anyway
and it doesn't work even with ghc I'm
Conrad Parker wrote:
On 08/07/07, Neil Mitchell [EMAIL PROTECTED] wrote:
Hi
Looks like there's too many packages on hackage.haskell.org now for a
single page listing:
http://hackage.haskell.org/packages/archive/pkg-list.html
Perhaps we can have a page with just the categories,
Hi Adrian,
2007/7/8, Adrian Hey [EMAIL PROTECTED]:
So it seems ghc doesn't like kinds (* - *) either :-(
Actually, AFAICT the problem seems to be with Data.Typeable
itself rather than ghc. There is no proper TypeRep for
(ListGT map k a) because map is not a type.
Have you tried using
Andrew Coppin wrote:
Oh, I don't mind not knowing how rank-2 types are *implemented*. ;-) But
it would be nice to know what they *are*... :-S
(Thus far, they just seem to be some incomprehensible syntax that makes
the compiler stop complaining. In particular, I have no idea what the
Tillmann Rendel:
As I understand it (wich may or may not be correct):
A normal Haskell string is basically [Word8]
Hm, let's see whether I understand it better or worse. Actually it is
[Char], and Char is a Unicode code point in the range 0..1114111 (at
least in GHC). Compare:
Hello apfelmus,
Sunday, July 8, 2007, 5:20:18 PM, you wrote:
Looks like there's too many packages on hackage.haskell.org now for a
it's the nicest problem i can imagine :)
For browsing libraries, I like the wiki pages much more than hackage.
Can't those two be merged into one?
may be we
Hello Andrew,
Sunday, July 8, 2007, 4:31:32 PM, you wrote:
Oh, I don't mind not knowing how rank-2 types are *implemented*. ;-) But
it would be nice to know what they *are*... :-S
concrete types are rank-0:
sin :: Double-Double
polymorphic types are rank-1:
length :: forall a . [a] - Int
Hello Malte,
Sunday, July 8, 2007, 6:38:19 PM, you wrote:
The string a, when read from a UTF-8-encoded file via readFile, has a
length of 2. Anyone with a URI to enlighten me?
if you need UTF-8 i/o, look at
http://hackage.haskell.org/packages/archive/pkg-list.html
--
Best regards,
Bulat
On Sun, Jul 08, 2007 at 04:38:19PM +0200, Malte Milatz wrote:
Tillmann Rendel:
As I understand it (wich may or may not be correct):
A normal Haskell string is basically [Word8]
Hm, let's see whether I understand it better or worse. Actually it is
[Char], and Char is a Unicode code
On Sun, Jul 08, 2007 at 01:32:08PM +1000, Donald Bruce Stewart wrote:
Looks like there's too many packages on hackage.haskell.org now for a
single page listing:
Perhaps we can have a page with just the categories, with subpages
hanging off?
perhaps support both views?
a comprehensive
On Sun, Jul 08, 2007 at 12:10:04PM +0100, Andrew Coppin wrote:
(Realistically though. My program takes a [Word8] and turns it into a
[Bool] before running a parser over it. The GHC optimiser doesn't really
stand a hope in hell of optimising that into a program that reads a machine
word into
Bulat Ziganshin wrote:
Hello Andrew,
Sunday, July 8, 2007, 3:10:04 PM, you wrote:
Indeed. I'm more interested in which algorithms produce the best
compression ratios than how to implement them fast.
algorithms you are tried so far (except for bwt+mtf) is the standard
student's set :)
Stefan O'Rear:
Char is just a code point. It's a 32 bit integer (64 on 64-bit
platforms due to infelicities in the GHC backend) with a code point.
[...]
The GHC IO functions truncate down to 8 bits. There is no way in GHC to
read or write full UTF-8, short of doing the encoding yourself
Stefan O'Rear wrote:
On Sun, Jul 08, 2007 at 12:10:04PM +0100, Andrew Coppin wrote:
(Realistically though. My program takes a [Word8] and turns it into a
[Bool] before running a parser over it. The GHC optimiser doesn't really
stand a hope in hell of optimising that into a program that
Malte Milatz wrote:
Stefan O'Rear:
[Char] is a linked list of pointers to heap-allocated fullword
integers, 20 (40) bytes per character (assuming non-latin1).
Hey, I love ByteStrings! ;-)
If only there were a way to write functions that transparently work on
both [x] and
On Sun, Jul 08, 2007 at 04:07:59PM +0100, Andrew Coppin wrote:
The way I heard it is that it *does* native code generation, but it's not
as good as the via-C version. (Can't imagine why... You would have thought
directly implementing functional primitives would be much easier than
trying to
On Sun, Jul 08, 2007 at 04:16:46PM +0100, Andrew Coppin wrote:
Malte Milatz wrote:
Stefan O'Rear:
[Char] is a linked list of pointers to heap-allocated fullword integers,
20 (40) bytes per character (assuming non-latin1).
Hey, I love ByteStrings! ;-)
If only there were a
Hello Andrew,
Sunday, July 8, 2007, 7:16:46 PM, you wrote:
[Char] is a linked list of pointers to heap-allocated fullword
integers, 20 (40) bytes per character (assuming non-latin1).
Hey, I love ByteStrings! ;-)
actually only 12 (24 for 64-but cpu) as far as you use latin-1 chars.
Hello Stefan,
Sunday, July 8, 2007, 7:22:03 PM, you wrote:
This is very true - but -fvia-C isn't really C.
If you want to see what a difference exists between true C and the NCG,
try compiling your program with -fvia-C -unreg
even better, try to to use jhc. it compiles via gcc and unlike
Gwern Branwen wrote:
Out of curiosity, why does ByteString wreck the cleanness of your BWT? It seems
to me that if you're doing
bwt :: String - Whatever
bwt arg = ...(time and space intensive ByteString operations) $
ByteString.pack arg
then your code is only modestly less clean.
Bulat Ziganshin wrote:
Hello Andrew,
Anyone have any comments on how ByteString is different from, say,
UArray Word8?
mainly, algorithms implemented. the only technical difference is that
UArray uses ByteArray# and ByteString uses PinnedByteArray#, which has
different behavior in GC
I was wittering on about stream fusion and how great it is, and I got a
message from Mr C++.
(Mr C++ develops commercial games, and is obsessed with performance. For
him, the only way to achieve the best performance is to have total
control over every minute detail of the implementation. He
On Sunday 08 July 2007, Andrew Coppin wrote:
Jonathan Cast wrote:
I wouldn't call rank-2 types extremely rare . . .
Well now, my parser is annoyingly clunky to use, but it *works*.
However, I just found something where it seems to be *impossible* to
write the necessary code without rank-2
Jonathan Cast wrote:
I think surely you're using existential data types rather than rank-2 types.
You expect *me* to know?
Existential types: each application of Encoder2 is to arguments which require
a specific value of x.
Rank-2 types (polymorphic fields, actually): each application
On Sunday 08 July 2007, Andrew Coppin wrote:
Jonathan Cast wrote:
I think surely you're using existential data types rather than rank-2
types.
You expect *me* to know?
Surely not :) That's why I tried briefly explaining the ideas again.
Existential types: each application of Encoder2
Jonathan Cast wrote:
On Sunday 08 July 2007, Andrew Coppin wrote:
Jonathan Cast wrote:
I think surely you're using existential data types rather than rank-2
types.
You expect *me* to know?
Surely not :) That's why I tried briefly explaining the ideas again.
LOL!
Hello Andrew,
Sunday, July 8, 2007, 9:38:18 PM, you wrote:
(E.g., the inverse BWT makes use of positive integers that are likely to
be way bigger than 255. But there isn't a fast packed Word16 or Word32
array I can use there...)
well, that's true as long as you swear to never use UArray :))
Hello Andrew,
Sunday, July 8, 2007, 9:40:15 PM, you wrote:
I've asked this before and nobody answered, so I take it that nobody
knows the answer... Does GHC *ever* do an in-place update on anything?
no. this will break GC's heart :) and it really breaks it as far as
you start to work with
Bulat Ziganshin wrote:
Hello Andrew,
Sunday, July 8, 2007, 9:38:18 PM, you wrote:
(E.g., the inverse BWT makes use of positive integers that are likely to
be way bigger than 255. But there isn't a fast packed Word16 or Word32
array I can use there...)
well, that's true as long as you
Hello Andrew,
Sunday, July 8, 2007, 7:12:38 PM, you wrote:
(Realistically though. My program takes a [Word8] and turns it into a
[Bool] before running a parser over it. The GHC optimiser doesn't really
stand a hope in hell of optimising that into a program that reads a machine
word into a
Hello Andrew,
Sunday, July 8, 2007, 10:41:53 PM, you wrote:
OTOH, everybody uses ByteString rather than UArray Word8. (And, in fact,
ByteString *exists* even though UArray Word8 was there first.) So one
presumes it's because ByteString has some kind of magic that makes it
faster than a
Bulat Ziganshin wrote:
Hello Andrew,
Ooo... really? That's pretty impressive...(!)
it's our collective tale for bringing new haskellers. i bet that
Stefan never seen asm code generated by ghc :)
LOL!
Once - just once - I did take a look at the C output from GHC. Now, I
Bulat Ziganshin wrote:
Hello Andrew,
Sunday, July 8, 2007, 9:40:15 PM, you wrote:
I've asked this before and nobody answered, so I take it that nobody
knows the answer... Does GHC *ever* do an in-place update on anything?
no. this will break GC's heart :)
Yeah, having only
2007/7/1, Andrew Coppin [EMAIL PROTECTED]:
I'm going to have to take some time to bend my mind around that one too...
(Does anybody else on this list frequently get the feeling their IQ is
just too low for Haskell??)
I do. Sometimes when I find myself doing some type hackery.
And that's a
On Sun, Jul 08, 2007 at 10:40:10PM +0400, Bulat Ziganshin wrote:
Hello Andrew,
Sunday, July 8, 2007, 7:12:38 PM, you wrote:
(Realistically though. My program takes a [Word8] and turns it into a
[Bool] before running a parser over it. The GHC optimiser doesn't really
stand a hope in hell
On Sun, Jul 08, 2007 at 07:52:19PM +0100, Andrew Coppin wrote:
Bulat Ziganshin wrote:
Hello Andrew,
Sunday, July 8, 2007, 9:40:15 PM, you wrote:
I've asked this before and nobody answered, so I take it that nobody
knows the answer... Does GHC *ever* do an in-place update on anything?
no.
Hi
btw, you doesn't need to use unix in
order to play with ghc HEAD - you can download compiled windows binary
Seriously? I'm pretty sure I tried to do that and couldn't...
Seriously. Thanks to Igloo, you can even download a GHC nightly
complete with an installer! It doesn't get any easier
Is it possible to have multiple windows in a glade file, and display
only one when the program starts, then show/hide the others as the
need arises ?
I can't find how...
I have a main window with a menu. One entry shows the about dialog
which is also defined in the glade file :
aboutmenu -
Hello Stefan,
Sunday, July 8, 2007, 11:03:00 PM, you wrote:
(Realistically though. My program takes a [Word8] and turns it into a
[Bool] before running a parser over it. The GHC optimiser doesn't really
stand a hope in hell of optimising that into a program that reads a
machine
word
On Jul 8, 2007, at 15:37 , D.V. wrote:
Is it possible to have multiple windows in a glade file, and display
only one when the program starts, then show/hide the others as the
need arises ?
You can but it's not well documented.
I found that it was necessary to load the window each time you
I'm not sure I understand xmlNewWithRootAndDomain, I'll make some tests.
I found that it was necessary to load the window each time you need
it. (you must re-load the XML each time)
I was hoping I could only hide the dialog and not destroy it.
___
On Jul 8, 2007, at 16:00 , D.V. wrote:
I'm not sure I understand xmlNewWithRootAndDomain, I'll make some
tests.
I found that it was necessary to load the window each time you need
it. (you must re-load the XML each time)
I was hoping I could only hide the dialog and not destroy it.
As
Oh !
Okay I tried and YOU ROCK ! Thanks a lot. Now it hides and comes back at will.
But I still can't react to that Close button that's automatically
added to that About Dialog.
Here's my latest (random) try :
aboutdialog - xmlGetWidget xml castToAboutDialog aboutdialog1
onDelete
Stefan O'Rear wrote:
Yes, GHC does in-place updates on almost everything. But probably not
in the way you wanted.
Ah yes, true...
(Try implementing that in Java. Tricky...)
I did think about compiling GHC myself once. But then I found out that it's
not actually written in Haskell - it's
Neil Mitchell wrote:
Hi
btw, you doesn't need to use unix in
order to play with ghc HEAD - you can download compiled windows binary
Seriously? I'm pretty sure I tried to do that and couldn't...
Seriously. Thanks to Igloo, you can even download a GHC nightly
complete with an installer! It
On Jul 8, 2007, at 16:24 , D.V. wrote:
But I still can't react to that Close button that's automatically
added to that About Dialog.
Here's my latest (random) try :
aboutdialog - xmlGetWidget xml castToAboutDialog aboutdialog1
onDelete aboutdialog $ \event - do
widgetHide aboutdialog
I finally got it to work with onResponse : I traced each possible
response to see which one was fired when clicking the close button
onResponse aboutdialog $ \resp - do
putStrLn onResponse!!!
case resp of
ResponseNone- putStrLn ResponseNone
ResponseReject -
On Jul 8, 2007, at 16:36 , D.V. wrote:
I finally got it to work with onResponse : I traced each possible
response to see which one was fired when clicking the close button
Great, another place where the documentation's wrong. :/
(onActivateLeaf vs. onActivateItem (and after-
On Sun, Jul 08, 2007 at 09:35:10PM +0100, Andrew Coppin wrote:
GHC HQ is considering retiring the registerised
-fvia-C path, leaving only native code for normal use and ANSI C for
porting. This is because mangled C is only about 3% faster according to
the GHC benchmark suite, and carries a
Hello Titto
2007/6/28, Pasqualino 'Titto' Assini [EMAIL PROTECTED]:
Hi Daniil,
I had a look at the paper and associated code that Oleg refers to there is no
special parsing taking place:
From Vector/read-examples.hs:
v3 = do
let m1 = $(dAM [[1,2],[3,4]])
s - readFile
Hello Oleg
2007/6/28, [EMAIL PROTECTED] [EMAIL PROTECTED]:
Daniil Elovkov wrote:
The fact that structure is mixed with properties seems to put some
limits on both doability and, even more, practilaty of encoding
complex properties.
That's why phantom types, attached via a newtype wrapper,
I'm using the Data.AltBinary package to read in a list of 4.8 million
floats and 1.6 million ints. Doing so caused the memory footprint to
blow up to more than 2gb, which on my laptop simply causes the program
to crash. I can do it on my workstation, but I'd really rather not,
because I want my
By the way, I've confirmed it doesn't even make it past the call to
coordinates - get pointsH :: IO [Float]
It just runs for about 15 seconds and then all the memory is consumed.
I'm using a laptop with 2gb of RAM and a 2.0gHz processor, so I assume
the read shouldn't take that long, since on
Hello,
I'd like to announce that I have posted a UTF-8 encoding/decoding
library to hackage. This library also includes replacements for most
of the System.IO namespace under System.IO.UTF8. This library detects
overlong sequences, and replaces invalid code-points and invalid
encodings with the
On Sun, Jul 08, 2007 at 05:26:18PM -0400, Jefferson Heard wrote:
I'm using the Data.AltBinary package to read in a list of 4.8 million
floats and 1.6 million ints. Doing so caused the memory footprint to
blow up to more than 2gb, which on my laptop simply causes the program
to crash. I can
andrewcoppin:
I was wittering on about stream fusion and how great it is, and I got a
message from Mr C++.
(Mr C++ develops commercial games, and is obsessed with performance. For
him, the only way to achieve the best performance is to have total
control over every minute detail of the
bulat.ziganshin:
Hello apfelmus,
Sunday, July 8, 2007, 5:20:18 PM, you wrote:
Looks like there's too many packages on hackage.haskell.org now for a
it's the nicest problem i can imagine :)
For browsing libraries, I like the wiki pages much more than hackage.
Can't those two be
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello everyone,
I am trying to write a generalisation of memoisation for a couple of
backtracking algorithms that I wrote (which don't specify a memoisation
technique), by keeping a local destructive update using unsafePerformIO
and IORef - neither of
Jefferson Heard write:
I'm using the Data.AltBinary package to read in a list of 4.8 million
floats and 1.6 million ints. Doing so caused the memory footprint to
blow up to more than 2gb, which on my laptop simply causes the program
to crash. I can do it on my workstation, but I'd really
dons:
Jefferson Heard write:
I'm using the Data.AltBinary package to read in a list of 4.8 million
floats and 1.6 million ints. Doing so caused the memory footprint to
blow up to more than 2gb, which on my laptop simply causes the program
to crash. I can do it on my workstation, but
You might look at this paper:
http://research.microsoft.com/Users/simonpj/Papers/weak.htm
Stretching the storage manager: weak pointers and stable names in Haskell -
Simon Peyton Jones, Simon Marlow, and Conal Elliott, IFL'99.
It describes a solution to exactly the problem you're trying to
Processing larger amounts of data, compression, serialisation and calling C.
An elaboration of the previous example:
* Build a largish structure in Haskell
* Compress it in memory
* Serialise it to disk
* Deserialise it
* Decompress
* Pass it to C
* Display the result
drtomc:
I don't know if you saw the following linked off /.
http://www.itwire.com.au/content/view/13339/53/
An amazon link for the book is here:
http://www.amazon.com/Computer-Science-Reconsidered-Invocation-Expression/dp/0471798142
The basic claim appears to be that discrete
86 matches
Mail list logo