Re: [Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-01-31 Thread Donald Bruce Stewart
magnus: All I'm trying to say is that imperative thinking is so common outside of CS/math and we learn it so early on in life that we probably can consider it the natural thinking way. foldl (\water dish - wash water dish) soapywater dishes :: [Dishes] :)

[Haskell-cafe] Haskell Weekly News: January 31, 2007

2007-01-31 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070131 Issue 57 - January 31, 2007 --- Welcome to issue 57 of HWN, a weekly newsletter

Re: [Haskell-cafe] Haskell Cookbook?

2007-01-31 Thread Donald Bruce Stewart
ithika: Quoth Paul Moore, nevermore, why a newcomer like me shouldn't do this - in many ways, it's better to start with some examples from a newcomer's perspective (these are the sort of things I found useful) to show the more experienced people what we're looking for. I agree with

[Haskell-cafe] Re: [Haskell] Haskell Weekly News: January 31, 2007

2007-01-31 Thread Donald Bruce Stewart
Correct. Link #35. should be http://article.gmane.org/gmane.comp.lang.haskell.libraries/6109 Well spotted. xana: Hi, I think link 35. is not correct... Can you please point to the correct one? Best regards, Alexandra Donald Bruce Stewart wrote

[Haskell-cafe] Let's welcome the Ruby hackers!

2007-01-31 Thread Donald Bruce Stewart
As seen here, reports from 'Rails Edge': http://notes-on-haskell.blogspot.com/2007/01/haskell-open-secret.html It seems like everyone is turning onto Haskell these days. At Rails Edge last week, I saw a few telltale signs that some of the speakers (including a few members of the

Re: [Haskell-cafe] Re: Channel9 Interview: Software Composability and theFu ture of Languages

2007-02-01 Thread Donald Bruce Stewart
neil: The question is --- how would an expert describe such a process? Would a professional chef give instructions in the functional or imperative style? I think a sufficiently expert chef would not even need the functional style. Everything would be declarative. Dave Thomas (of

[Haskell-cafe] strict bytestring fun

2007-02-01 Thread Donald Bruce Stewart
High performance strings on the shootout: http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcollang=all interesting alternative programs 0.5 Haskell GHC #5 1.2990,880270 1.0 Clean 2.77600 136 2.0 C gcc

Re: [Haskell-cafe] mixing wxhaskell state and file io

2007-02-04 Thread Donald Bruce Stewart
martindemello: I'm having a lot of trouble mixing file io and wxhaskell's varCreate/Get/Set functions. I have functions readWords :: String - IO WordMap wordGrid :: WordMap - Layout And within my GUI code, the following compiles (ignores the variable, basically): words - varCreate

Re: [Haskell-cafe] Strange behaviour with writeFile

2007-02-04 Thread Donald Bruce Stewart
cmb21: fo/haskell-cafe, mailto:[EMAIL PROTECTED] Errors-To: [EMAIL PROTECTED] Status: O Content-Length: 778 Lines: 27 Hi, I am observing some rather strange behaviour with writeFile. Say I have the following code: answer - AbstractIO.readFile filename let (answer2,

Re: [Haskell-cafe] nested maybes

2007-02-04 Thread Donald Bruce Stewart
u.stenzel: J. Garrett Morris wrote: On 2/4/07, Udo Stenzel [EMAIL PROTECTED] wrote: exists s wmap = isJust $ Map.lookup (sort s) wmap = find (== s) . snd If you're going to write it all on one line, I prefer to keep things going the same direction: Hey, doing it this way saved me a

Re: [Haskell-cafe] How is laziness defined?

2007-02-04 Thread Donald Bruce Stewart
tjay.dreaming: On 2/5/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Quoting TJ [EMAIL PROTECTED]: I would think that with 100% laziness, nothing would happen until the Haskell program needed to output data to, e.g. the console. Quite obviously that's not it. So how is laziness defined

[Haskell-cafe] Final issues to fix for the shootout entries (Was: no subject)

2007-02-05 Thread Donald Bruce Stewart
Yeah, have a look on the shootout: http://shootout.alioth.debian.org/gp4/benchmark.php?test=recursivelang=all Has an ackerman. More detailed comparisions, across the 19 benchmarks on the shootout, with notes on which of the 19 GHC Haskell is significantly slower (4x) at: Haskell verus

Re: [Haskell-cafe] strict bytestring fun

2007-02-06 Thread Donald Bruce Stewart
bertram.felgenhauer: Donald Bruce Stewart wrote: High performance strings on the shootout: http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcollang=all interesting alternative programs 0.5 Haskell GHC #5 1.2990,880270 1.0 Clean

Re: [Haskell-cafe] haskell and releasing resources

2007-02-06 Thread Donald Bruce Stewart
fmohamed: I am just coming to haskell, and I wrote a simple command to get some input from a pdf file I just wanted the output of the command so I did something like import System.Process (runInteractiveCommand) import IO (hGetContents) -- | returns the text of the first page of the

Re: [Haskell-cafe] haskell and releasing resources

2007-02-06 Thread Donald Bruce Stewart
davve: Wait for the process to terminate, using waitForProcess pid I've a sketch for a nice wrapper for the low level process code here, http://www.cse.unsw.edu.au/~dons/code/newpopen/ What's missing? I'd like to use it, but I don't like unreleased libraries :) Last time I

Re: [Haskell-cafe] haskell and releasing resources

2007-02-06 Thread Donald Bruce Stewart
mail: Hi, Am Dienstag, den 06.02.2007, 15:56 +0100 schrieb Fawzi Mohamed: I am replying to myself, but anyway with it seems (from the documentation) that forkIO (do{ waitForProcess pid; return () }) is the best solution, and does not seem to lead to wasted resources.

[Haskell-cafe] Tricks for making low level haskell hacking easier

2007-02-09 Thread Donald Bruce Stewart
For those of you who like your Haskell code fast, then, if you're like me, reading Core output all day can give you headaches. Here's a couple of tricks I use to make optimising low level stuff easier. 1) Use Hscolour to pretty-ifiy the Core so its more parsable: ghc -O Foo.hs -ddump-simpl

Re: [Haskell-cafe] What's wrong with cgi-undecidable?

2007-02-10 Thread Donald Bruce Stewart
haskell: [EMAIL PROTECTED] said: Then another problem,after I unregistered cgi-2006.9.6,the fastcgi-2006.10.9could't work well with cgi-1.0 . You might need fastcgi-1.0: http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi Actually,I was trying my best to install hope:

Re: [Haskell-cafe] FFI basics

2007-02-10 Thread Donald Bruce Stewart
bulat.ziganshin: Hello Yitzchak, Friday, February 9, 2007, 3:23:53 PM, you wrote: I would like to use FFI for the first time. Can someone give me a really, really simple complete example? nothing can be easier main = print (c_mysin 1.0) foreign import ccall mysin.h mysin

[Haskell-cafe] Very fast loops. Now!

2007-02-10 Thread Donald Bruce Stewart
The following C program was described on #haskell #include stdio.h int main() { double x = 1.0/3.0; double y = 3.0; int i= 1; for (; i=10; i++) { x = x*y/3.0; y = x*9.0; } printf(%f\n, x+y); }

Re: [Haskell-cafe] Very fast loops. Now!

2007-02-10 Thread Donald Bruce Stewart
dons: The following C program was described on #haskell #include stdio.h int main() { double x = 1.0/3.0; double y = 3.0; int i= 1; for (; i=10; i++) { x = x*y/3.0; y = x*9.0; }

Re: [Haskell-cafe] Haskell vs Ruby as a scripting language

2007-02-10 Thread Donald Bruce Stewart
joelr1: Is anyone using Haskell as a scripting language in their app? I'm thinking of viable it would be to embed ghc in a Mac (Cocoa) app. TextMate [1] uses Ruby as the extension language and quite successfully at that. Everybody loves Ruby since it's simple. I need a trading systems

Re: [Haskell-cafe] Foldr tutorial, Inspired by Getting a Fix from a Fold

2007-02-12 Thread Donald Bruce Stewart
pixel: Chris Moline [EMAIL PROTECTED] writes: dropWhile p = foldr (\x l' - if p x then l' else x:l') [] invalid: dropWhile ( 5) [1, 10, 1] should return [10, 1] Prelude Test.QuickCheck Text.Show.Functions quickCheck $ \p xs - dropWhile p xs == foldr (\x l' - if p x then l' else x:l')

Re: [Haskell-cafe] Re: Very fast loops. Now!

2007-02-12 Thread Donald Bruce Stewart
ewilligers: Eric Willigers wrote: Do the two programs implement the same algorithm? The C program updates x and y in sequence. The Haskell program updates x and y in parallel and can be easier for the compiler to optimize. Hi Don, Expressing this in other words, do we want the new y

Re: [Haskell-cafe] Summer of Code

2007-02-12 Thread Donald Bruce Stewart
bryan.burgers: Hello, Yes, I realize it's mid-February right now and the summer is still months away, but it's probably not too early to think about the future. I am wondering if there are any Summer of Code projects that I would be able to do for the Haskell community. I will be

[Haskell-cafe] ANNOUNCE: urlcheck 0.1, (smp) parallel link checker

2007-02-12 Thread Donald Bruce Stewart
This little tool has been kicking around on my harddrive for a month or two now, so time to release! I'm pleased to announce the first release of urlcheck, an parallel link checker, written in Haskell. Frustrated with the resources and time consumed by 'linkchecker', when preparing the weekly

Re: [Haskell-cafe] Strange memory consumption problems in something that should be tail-recursive

2007-02-13 Thread Donald Bruce Stewart
duncan.coutts: On Tue, 2007-02-13 at 15:27 -0500, Jefferson Heard wrote: Hi, I am running the following code against a 210 MB file in an attempt to determine whether I should use alex or whether, since my needs are very performance oriented, I should write a lexer of my own. I thought

Re: [Haskell-cafe] Suggestion for hackage

2007-02-13 Thread Donald Bruce Stewart
benjamin.franksen: Hi It would be a nice feature if one could look online at the documentation of a package, i.e. w/o downloading and building the package first. Fr instance, haddock generated API docs can give you a much better idea what you can expect from a library package than the mere

Re: [Haskell-cafe] Summer of Code

2007-02-13 Thread Donald Bruce Stewart
bulat.ziganshin: Hello Bryan, Tuesday, February 13, 2007, 2:24:21 AM, you wrote: I am wondering if there are any Summer of Code projects that I would be able to do for the Haskell community. of 9 projects started last year, only 1 or 2 was successful. so i think that retaking one of

Re: [Haskell-cafe] How to solve this problem?It's quite easy in PHP.

2007-02-13 Thread Donald Bruce Stewart
keepbal: The code and template are separated in the PHP example,so designers can design with out too much PHP knowledge.This is actually what I want to solve. I'd use one of the Html/XML pretty printing libraries then, xhtml:

Re: [Haskell-cafe] Difference between Lazy ByteStrings and Strings in alex

2007-02-13 Thread Donald Bruce Stewart
jeff: It was suggested that I might derive some performance benefit from using lazy bytestrings in my tokenizer instead of regular strings. Here's the code that I've tried. Note that I've hacked the basic wrapper code in the Lazy version, so the code should be all but the same. The only

Re: [Haskell-cafe] How to solve this problem?It's quite easy in PHP.

2007-02-14 Thread Donald Bruce Stewart
ndmitchell: Hi Eeek, a solution that does monadic maps and require's rank 2 types! arr = [('a',1), ('b',2), ('c',3)] showAll = lines (map showItem arr) showItem (a,n) = a : = ++ show n main = putStr showAll I've broken this up a bit more than usual - most people would probably just

Re: [Haskell-cafe] Data.ByteString.Lazy.Char8 and finding substrings

2007-02-14 Thread Donald Bruce Stewart
magnus: I'm curious, why doesn't Data.ByteString.Lazy.Char8 have the functions for searching for substrings that Data.ByteString.Char8 has (isPrefixOf, isSuffixOf, isSubstringOf, findSubstring and findSubstrings)? Sorry for the delay. The reason they're missing is that no one implemented

Re: [Haskell-cafe] Summer of Code

2007-02-15 Thread Donald Bruce Stewart
haskell: This project may be a success: 4. Project: Fast Mutable Collection Types for Haskell Caio Marcelo de Oliveira Filho Completed, and part of pugs. http://perlcabal.org/~audreyt/darcs/pugs/third-party/HsJudy/ But there is no way to pull this out of

Re: [Haskell-cafe] Summer of code and spam

2007-02-16 Thread Donald Bruce Stewart
magnus: There seems to be a serious problem with spam on Haskell's SoC page: http://tinyurl.com/fl2dw Or maybe that's a general problem for hackage? Nope. Why would it be? You have to authenticate yourself to a real person to upload to hackage. The plan for SoC is to update to a

Re: [Haskell-cafe] Application Level server state in Haskell Web server

2007-02-17 Thread Donald Bruce Stewart
pieter: Hello, I'm trying to write a simple module for the haskell web server (hws- cgi). And I would like to write a simple module that maintains some kind of state for a session. But I'm I write I cannot do this in pure Haskell ? Without adopting the sources of the Haskell web

Re: [Haskell-cafe] Recursion in Haskell

2007-02-17 Thread Donald Bruce Stewart
prstanley: Hi I understand the basic principle of recursion but have difficulty with the following: -- a recursive function -- for calculating the length of lists myLen [] = 0 myLen (x:xs) = 1 + myLen xs So this is a definition for the 'length' function on lists. The list data structure

Re: [Haskell-cafe] speeding up fibonacci with memoizing

2007-02-18 Thread Donald Bruce Stewart
Would someone please update the entries on our 'archive of fibs' page? http://www.haskell.org/haskellwiki/The_Fibonacci_sequence Cheers. stefanor: Prior art trumps all. (by a few %) granted it doesn't do much memoizing anymore :) gs ajb f d u, it, z s n [EMAIL

[Haskell-cafe] ANNOUNCE: nobench: Haskell implementaion benchmarks. GHC v Hugs v Yhc v NHC v ...

2007-02-19 Thread Donald Bruce Stewart
Following recent discussion about a cross-implementation performance benchmark suite, based on nofib, I've gone and combined nofib with the great language shootout programs, and rewritten the build system to support cross implementation measurements. The result is: nobench

Re: [Haskell-cafe] ANNOUNCE: nobench: Haskell implementaion benchmarks. GHC v Hugs v Yhc v NHC v ...

2007-02-19 Thread Donald Bruce Stewart
felipe.lessa: On 2/19/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: results are quite interesting. The most recent run is available: http://www.cse.unsw.edu.au/~dons/nobench/bench.results http://www.cse.unsw.edu.au/~dons/nobench/bench.log Maybe I'm missing something, but how

Re: [Haskell-cafe] ANNOUNCE: nobench: Haskell implementaion benchmarks. GHC v Hugs v Yhc v NHC v ...

2007-02-19 Thread Donald Bruce Stewart
ithika: Quoth Ketil Malde, nevermore, Wouldn't it be better to benchmark a more idiomatically correct codebase? I suppose the ideal way to do it would be benchmarks for the (1) idiomatic and (2) the highly tuned implementations. Then the compiler writers can push 1 towards 2, while

Re: [Haskell-cafe] ANNOUNCE: nobench: Haskell implementaion benchmarks. GHC v Hugs v Yhc v NHC v ...

2007-02-19 Thread Donald Bruce Stewart
Ketil.Malde: Donald Bruce Stewart wrote: Following recent discussion about a cross-implementation performance benchmark suite, based on nofib, I've gone and combined nofib with the great language shootout programs, and rewritten the build system to support cross implementation measurements

Re: [Haskell-cafe] Map list of functions over a single argument

2007-02-20 Thread Donald Bruce Stewart
p.f.moore: I'm after a function, sort of equivalent to map, but rather than mapping a function over a list of arguments, I want to map a list of functions over the same argument. The signature would be [a - b] - a - [b], but hoogle didn't come up with anything. Prelude map ($ 3)

[Haskell-cafe] nobench: now with hbc support (!)

2007-02-20 Thread Donald Bruce Stewart
Just a quick note. I've tweaked the benchmarks some more, adding support for Lennart's hbc compiler. (Go hbc!). Also, we have nice html output (thanks to Text.XHtml!). http://www.cse.unsw.edu.au/~dons/nobench/results.html Pretty :-) Remaining tasks left are to port the rest of the 'real'

Re: [Haskell-cafe] Re: Haskell vs Ruby as a scripting language

2007-02-21 Thread Donald Bruce Stewart
simonmarhaskell: Neil Mitchell wrote: Hi Simon Benchmarks please! Let's see some comparisons on the nofib suite. If there's a factor of 2 or less between GHC -O2 and YHC for any of the nofib programs, I'll eat my keyboard for lunch :-)

Re: [Haskell-cafe] Leaves of a Tree

2007-02-21 Thread Donald Bruce Stewart
tomahawkins: Hello, Any recommendations for speeding up extracting the set of leaves from a tree? data Tree = Branch Tree Tree | Leaf Int deriving (Eq, Ord) My slow, naive function: leaves :: Tree - Set Int leaves (Leaf n) = singleton n leaves (Branch left right) = union (leaves

Re: [Haskell-cafe] Re: process

2007-02-23 Thread Donald Bruce Stewart
h._h._h._: I have in mind something as connections via pipes to the chils's stdin, stdout and stderr, but the stream library just supports internal pipes, and posix require Unix. By this means it's not possible to request, receive and than respond,... with the process. Does there exist an

[Haskell-cafe] How you can help improve Haskell implementations!

2007-02-26 Thread Donald Bruce Stewart
Just a quick note to say that the Haskell implementation shootout is progressing, now supporting jhc, fixing a range of bugs, and providing more benchmark programs. Nice average numbers are also reported for the relative performance of each compiler or interpreter. On x86:

Re: [Haskell-cafe] How you can help improve Haskell implementations!

2007-02-26 Thread Donald Bruce Stewart
ndmitchell: Hi And also I guess the compilers will do more optimisations, etc. So this suggests an obvious extra feature for nobench which would be the ability to view a graph of each compiler's performance over a period of time, obviously this probably wouldn't be useful for at least a few

Re: bytestring vs polymorphic contiguous lists Re: [Haskell-cafe] Re: Using loop fusion for writing efficenthigh-level code Re[2]:[Haskell] [Fwd: Re: Computer Language Shootout]

2007-02-28 Thread Donald Bruce Stewart
claus.reinke: The main example of course is ByteString fusion as presented in our recent paper: http://www.cse.unsw.edu.au/~dons/papers/CSL06.html btw, why did you restrict yourself to improving [Char], rather than [a]? naively, it would seem to me that most of the framework should work

Re: [Haskell-cafe] Very Basic IO question

2007-03-02 Thread Donald Bruce Stewart
olivasj: I am VERY new to Haskell, and just getting my feet wet with functional programming in general. I've been going over a few examples online, but I can't figure out the behavior I'm seeing on a very basic example: --- module Main where import System.IO main :: IO () main =

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-04 Thread Donald Bruce Stewart
There's some nice one liners bundled with h4sh: http://www.cse.unsw.edu.au/~dons/h4sh.html For example: http://www.cse.unsw.edu.au/~dons/h4sh.txt If you recall, h4sh is a set of unix wrappers to the list library. I still use them everyday, though probably should put out a new release

Re: [Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-04 Thread Donald Bruce Stewart
configure: Dependency Cabal-any: using Cabal-1.1.6 Setup.lhs: cannot satisfy dependency haskell-src-any [EMAIL PROTECTED]:~/haskellInstalls/hs-plugins$ Advice? 2007/3/4, Donald Bruce Stewart [EMAIL PROTECTED]: There's some nice one liners bundled with h4sh: http

Re: [Haskell-cafe] Re: ANN: HSH 1.2.0

2007-03-04 Thread Donald Bruce Stewart
dfeustel: On 2007-03-04, [EMAIL PROTECTED], Feustel dfeustel@mindspring.com [EMAIL PROTECTED] wrote: The Makefile in the HSH distribution should do this for you. But you can say: ghc --make -o setup -package Cabal Setup.lhs A40:/home/daf/Hsh/hsh}ghc --make -o setup

Re: [Haskell-cafe] Haskell 6.6 problem

2007-03-04 Thread Donald Bruce Stewart
dfeustel: make and make install of ghc 6.6 completed successfully, but exe generated by ghc fails to load. ===test.hs=== main :: IO() main =putStr This is a test\n = ghc test.hs compilation IS NOT required /usr/bin/ld: cannot find -lgmp collect2: ld returned 1

[Haskell-cafe] Haskell Weekly News: March 05, 2007

2007-03-04 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070305 Issue 58 - March 05, 2007 --- Welcome to issue 58 of HWN, a weekly newsletter

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Donald Bruce Stewart
mark: I was wondering about the possibility of using Haskell for developing device drivers that would be kernel modules for Linux. If nothing else, it would be quite an educational experience for me, as I've not yet experimented with either the Linux kernel or Haskell FFI, nor have I had to

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Donald Bruce Stewart
community, not me personally :} You have the hOp and House developers to thank for this stuff. On Mon, 21 Mar 2005, Donald Bruce Stewart wrote: mark: I was wondering about the possibility of using Haskell for developing device drivers that would be kernel modules for Linux. If nothing else

Re: [Haskell-cafe] Linux device drivers

2005-03-20 Thread Donald Bruce Stewart
developers to thank for this stuff. On Mon, 21 Mar 2005, Donald Bruce Stewart wrote: mark: I was wondering about the possibility of using Haskell for developing device drivers that would be kernel modules for Linux. If nothing else, it would be quite an educational experience for me, as I've

Re: [Haskell-cafe] Haskell with Apache?

2005-04-14 Thread Donald Bruce Stewart
gk: I'm interested in running Haskell code invoked from an Apache web server request. I discovered the mod_haskell project [1] which looks prima facie v. promising. Does anyone have any recent experience of using this (there apparently being no recent activity on this project)? I

Re: [Haskell-cafe] Problem linking against Data.Graph

2005-07-15 Thread Donald Bruce Stewart
A.M.Gimblett: Hi all, I'm something of a Haskell newbie, and this is my first post to this list. I'm trying to do some very basic things with graphs, but can't get started with Data.Graph. In particular, linking fails - I'm wondering if something's wrong with my install. (For the

[Haskell-cafe] Re: Random matrices

2005-08-22 Thread Donald Bruce Stewart
Chad.Scherrer: Ah ha. That'll do. Lesson: avoid hidden space leaks in monads. Hmm, I'm still missing something. It seems a good lesson, but practically speaking, it doesn't help me any more than saying write efficient programs. What could I have looked for in the original code to

Re: [Haskell-cafe] Concurrency question

2005-09-04 Thread Donald Bruce Stewart
akamaus: Hi, everyone! I have a function, which sometimes takes a long time to compute or even may loop forever. So I want to limit it in time somehow. I tried to run it in another thread in order to kill it after its time lapsed. But it seems to lock out other threads so they can't

Re: [Haskell-cafe] Concurrency question

2005-09-04 Thread Donald Bruce Stewart
akamaus: Donald Bruce Stewart wrote: Maybe your loop does no allocations, so the scheduler can't get in and do a context switch. You could put the computation in an external program, and run it over a fork, using unix signals in the external program to kill the computation after a period

Re: [Haskell-cafe] pre-built ghc 6.4.1 crashes building FPS

2005-10-17 Thread Donald Bruce Stewart
joelr1: Folks, I downloaded and installed the pre-built ghc 6.4.1 on Windows XP and Win2k. I tried building FastPackedStrings but ghc crashes soon after starting. Any tips? I'm gonna try with a hand-built ghc but somehow doubt it will help. Oh, now that's interesting. Do you have a

Re: [Haskell-cafe] Interactively used EDSLs

2005-10-17 Thread Donald Bruce Stewart
la: Hello. Are there any embedded domain specific languages that are meant to be used interactively from a Hugs or GHCi prompt without requiring the user to be acquainted with Haskell in general, only the DSL library? For instance, a Haskell shell DSL that provided combinators for

Re: [Haskell-cafe] FPS lib

2005-10-18 Thread Donald Bruce Stewart
ekarttun: On 18.10 10:44, Bulat Ziganshin wrote: 2) as i say you before, i need to sort filenames in windows fashion (case-ignoring), so if you will include case-ignoring comparision operators - i will be glad Case ignoring comparisons make only sense on characters - not on bytes. And

Re: [Haskell-cafe] FPS lib

2005-10-18 Thread Donald Bruce Stewart
simonmar: On 18 October 2005 10:08, Krasimir Angelov wrote: I am curious why FPS is implemented on top of ForeignPtr. ByteArray# based implementation should be faster and more space efficient. Actually there's not much difference between ForeignPtr and ByteArray#, at least in GHC 6.5+

Re: [Haskell-cafe] FPS lib

2005-10-18 Thread Donald Bruce Stewart
kr.angelov: Hello Guys, I tried my own version of PackedStrings and the results are very nice. It is entirely based on ByteArray# and Int#. I have made two tests: Elapsed time | | FastPackedString | PackedString | +-+--+--+ |test1| 99.26s |

Re: [Haskell-cafe] FPS lib

2005-10-18 Thread Donald Bruce Stewart
john: On Wed, Oct 19, 2005 at 10:07:37AM +1000, Donald Bruce Stewart wrote: kr.angelov: Hello Guys, I tried my own version of PackedStrings and the results are very nice. It is entirely based on ByteArray# and Int#. I have made two tests: Elapsed time

Re: [Haskell-cafe] FPS lib

2005-10-18 Thread Donald Bruce Stewart
dons: john: On Wed, Oct 19, 2005 at 10:07:37AM +1000, Donald Bruce Stewart wrote: kr.angelov: Hello Guys, I tried my own version of PackedStrings and the results are very nice. It is entirely based on ByteArray# and Int#. I have made two tests: Elapsed time

Re: [Haskell-cafe] FPS lib

2005-10-18 Thread Donald Bruce Stewart
kr.angelov: Hello Guys, I tried my own version of PackedStrings and the results are very nice. It is entirely based on ByteArray# and Int#. I have made two tests: As an aside, Yi used to use ByteArray#'s for buffers, I then switched to ForeignPtrs (a la FastPackedString) -- and the code got

Re: [Haskell-cafe] Zlib bindings

2005-10-18 Thread Donald Bruce Stewart
joelr1: Folks, Are there any zlib bindings for Haskell? The docs for HDirect mention the examples directory with the bindings but I cannot find the examples directory in the source distro. The MissingH code works with gzipped files apparently but not with memory buffers. Check out

Re: [Haskell-cafe] FPS lib

2005-10-19 Thread Donald Bruce Stewart
bulatz: Hello John, Wednesday, October 19, 2005, 4:23:00 AM, you wrote: JM can we add Data.PackedString and my PackedString (in the jhc repo) to JM the testing lineup? JM actually, is the test code available somewhere? i think, that larger testsuite for string-implementation

[Haskell-cafe] Re: [Haskell] Read Instances for Data.Map and Data.Set

2005-10-19 Thread Donald Bruce Stewart
mai99dgf: Hi folks, I was really annoyed by the fact that for Data.Map and Data.Set are no Read instances declared, but Show instances are! I believe there should be some kind of unwritten rule that in the standart lib the Show and Read instances come pairwise and are fully compatible.

Re: [Haskell-cafe] FPS lib

2005-10-20 Thread Donald Bruce Stewart
bulatz: Hello Donald, Thursday, October 20, 2005, 5:00:15 AM, you wrote: i think, that larger testsuite for string-implementation libraries need to be established. this testsuite must, of course, include testing of individual operations and more complex scenarios which can be seen as

Re: [Haskell-cafe] FastString a misnomer

2005-10-20 Thread Donald Bruce Stewart
bulatz: Hello John, Thursday, October 20, 2005, 4:12:36 AM, you wrote: JM FastString seems to be a misnomer for this library. JM what it provides is a fast _byte array_ with a lot of useful JM operations, but it does not provide strings since it does not enforce JM character encodings

Re: [Haskell-cafe] FastString a misnomer

2005-10-20 Thread Donald Bruce Stewart
john: On Thu, Oct 20, 2005 at 10:45:28AM +0100, Simon Marlow wrote: I think when this is ready it should replace Data.PackedString. I don't necessarily mean put it into fptools/libraries/base - we could just remove the existing Data.PackedString from there and your separate package can

Re: [Haskell-cafe] FPS lib

2005-10-21 Thread Donald Bruce Stewart
kr.angelov: 2005/10/19, Simon Marlow [EMAIL PROTECTED]: On 19 October 2005 01:08, Donald Bruce Stewart wrote: Ah!! So what's going on on Linux, I wonder. Could it be something about 6.4.1? Are we seeing the difference between ForeignPtrs from 6.4 to 6.5? I will investigate. I

Re: [Haskell-cafe] FastString a misnomer

2005-10-21 Thread Donald Bruce Stewart
simonmar: On 21 October 2005 02:53, Donald Bruce Stewart wrote: john: On Thu, Oct 20, 2005 at 10:45:28AM +0100, Simon Marlow wrote: I think when this is ready it should replace Data.PackedString. I don't necessarily mean put it into fptools/libraries/base - we could just remove

Re: [Haskell-cafe] hs-plugins runtime loading issue

2005-10-25 Thread Donald Bruce Stewart
joelr1: Folks, I'm using hs-plugins to compile and load haskell code on Mac OSX. This works perfectly. Once I try this on Windows, though, I'm getting an error when it tries to load HSBase again. This happens when calling a function from within ghci. Any ideas? Does the code work

[Haskell-cafe] Re: FPS: Finalizers not running (was Memory usage outside of the Haskell heap)

2005-11-06 Thread Donald Bruce Stewart
joelr1: David, I followed your suggestion and I think the finalizers for FPS are not running. Hmm. Is this on Windows only though? Or also on unix? Please take a look at http://wagerlabs.com/Bar.hs to see what I mean. I had to modify the FPS export list to expose the constructor but

[Haskell-cafe] Re: FPS: Finalizers not running (was Memory usage outside of the Haskell heap)

2005-11-06 Thread Donald Bruce Stewart
joelr1: David, I followed your suggestion and I think the finalizers for FPS are not running. Here are some experiments. Sometimes I can get the finalizers to run as expected, but only when putting memory pressure on the Haskell heap with normal haskell values. Works with 6.4.1 and 6.5 on

Re: [Haskell-cafe] Re: FPS: Finalizers not running (was Memory usageoutside of the Haskell heap)

2005-11-07 Thread Donald Bruce Stewart
simonmar: Finalizers aren't guaranteed to be run. In particular, if the main thread exits, then we don't run any outstanding finalizers. This change was made recently, but it turned out that even prior to 6.4 we couldn't guarantee to run all outstanding finalizers. Does this explain it,

Re: [Haskell-cafe] Strictness that GHC infers for functions

2005-12-09 Thread Donald Bruce Stewart
Check section 6.2 of the ghc user's guide, under How do I find out a function's strictness :) It's in the .hi files. joelr1: Duncan, How do you find out the strictness that ghc infers for functions? Thanks, Joel On Dec 8, 2005, at 8:09 PM, Duncan Coutts wrote: For example it's

Re: [Haskell-cafe] Re: Announcing Djinn, version 2004-12-11, a coding wizard

2005-12-14 Thread Donald Bruce Stewart
Or some TH... $(djinn [t| a - a |]) or something like it. lennart: I've certainly thought of providing the functionality you want, but I've not done that yet. Internally djinn uses some kind of ASTs, it might be possible to use GADTs to do what you want in a type safe way. If not

Re: [Haskell-cafe] QuickCheck arbitrary/co-arbitrary

2005-12-15 Thread Donald Bruce Stewart
joelr1: Folks, I'm collecting examples of QuickCheck arbitrary/co-arbitrary definitions, the more complex the better. Please point me to any or send them if you are willing to! Also, is there a cood explanation of co-arbitrary someplace? Check the QuickCheck paper for the definition

Re: [Haskell-cafe] Haskell trickery

2005-12-20 Thread Donald Bruce Stewart
joelr1: Folks, How is one to interpret the following? I'm particularly interested in the IO $ \ s - notatoin as I have never seen that before. allocaBytes :: Int - (Ptr a - IO b) - IO b allocaBytes (I# size) action = IO $ \ s - case newPinnedByteArray# size s of { (# s,

Re: [Haskell-cafe] binary IO

2005-12-26 Thread Donald Bruce Stewart
mcqueenorama: How is this different from the (un)pickle process that has been discussed here recently? Recently I've seen the Binary discussions, and the pickeling discussions, and I noticed they seemed to be talking about the same process. Yep, same thing. -- Don

Re: [Haskell-cafe] Re: Chameneos

2006-01-06 Thread Donald Bruce Stewart
haskell: Simon Marlow wrote: Hi Chris, Rather than try to explain what I'm going on about, I decided to tweak the code a bit myself. My version is about 10% faster than yours, and doesn't use any explicit unboxery. I've put it in the wiki after your version.

[Haskell-cafe] Re: Shootout summary

2006-01-06 Thread Donald Bruce Stewart
haskell: Summary of things entered and of things being worked on. Things that are on the wiki at http://haskell.org/hawiki/ShootoutEntry but that have not been submitted: Fannkuch entry by Bertram Felgenhauer Mandelbrot entry I've done some benchmarking of the current entries for

Re: [Haskell-cafe] Re: Shootout summary

2006-01-06 Thread Donald Bruce Stewart
dons: haskell: Summary of things entered and of things being worked on. Things that are on the wiki at http://haskell.org/hawiki/ShootoutEntry but that have not been submitted: Fannkuch entry by Bertram Felgenhauer Mandelbrot entry I've done some benchmarking of the current

[Haskell-cafe] Re: Shootout summary

2006-01-06 Thread Donald Bruce Stewart
haskell: Summary of things entered and of things being worked on. Donald Bruce Stewart wrote: haskell: Simon Marlow wrote: Hi Chris, Rather than try to explain what I'm going on about, I decided to tweak the code a bit myself. My version is about 10% faster than yours

Re: [Haskell-cafe] Re: Shootout summary

2006-01-06 Thread Donald Bruce Stewart
dons: haskell: Summary of things entered and of things being worked on. Donald Bruce Stewart wrote: haskell: Simon Marlow wrote: Hi Chris, Rather than try to explain what I'm going on about, I decided to tweak the code a bit myself. My version is about 10% faster than

Re: [Haskell-cafe] Re: Shootout summary

2006-01-06 Thread Donald Bruce Stewart
bmaxa: This pidigit program is not mine, but original authors of algorithm. I've just added print function. It is idiomatic Haskell, pi is pure function that generates inifinite list of digits, and on two machinas I've tested p4 2.4 ghz and amd athlon 64 3000 it's about some small

Re: [Haskell-cafe] Re: Shootout summary

2006-01-07 Thread Donald Bruce Stewart
neubauer: [EMAIL PROTECTED] (Donald Bruce Stewart) writes: Fannkuch entry by Bertram Felgenhauer Mandelbrot entry I've done some benchmarking of the current entries for fannkuch and mandelbrot, and have proposed final entries for these two tests. Using = of the list monad

Re: [Haskell-cafe] fastest Binary library!

2006-01-07 Thread Donald Bruce Stewart
bulatz: Hello yes, i did it! today i spend time to optimize my own Binary library and got the (de)serialization speed about 50 mb/s with my 1 ghz cpu. it is a peek speed for unboxed arrays, in real life GC times and other overhead expenses will need much more time than (de)serialization

Re: [Haskell-cafe] x86 code generation going wrong?

2006-01-08 Thread Donald Bruce Stewart
bmaxa: From: Chris Kuklewicz [EMAIL PROTECTED] To: [EMAIL PROTECTED], Haskell Cafe haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] x86 code generation going wrong? Date: Sun, 08 Jan 2006 20:33:57 + Brian Sniffen wrote: The first couldn't even complete on my 2.26 GHz

Re: [Haskell-cafe] In for a penny, in for a pound.

2006-01-08 Thread Donald Bruce Stewart
d: Regarding the Fannkuch Shootout Entry: If we are willing to specialize flop in the way shown on the wiki, another 8% can be gained by similarly specializing rotate: rotate 2 (x1:x2:xs) = x2:x1:xs rotate 3 (x1:x2:x3:xs) = x2:x3:x1:xs ... Cheers, I've updated the proposed entry on the

Re: [Haskell-cafe] In for a penny, in for a pound.

2006-01-09 Thread Donald Bruce Stewart
ekarttun: On 09.01 12:56, Donald Bruce Stewart wrote: Entries that may currently be worth submitting: takfp - http://www.haskell.org/hawiki/TakfpEntry Committed. pidigits (currently 2nd!) - http://www.haskell.org/hawiki/PidigitsEntry Committed

<    1   2   3   4   5   6   >