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

2006-01-09 Thread Donald Bruce Stewart
bertram.felgenhauer: The flop machinery can still be made faster, stealing an idea from the icc entry (namely, treating the first entry separately): Great. This pushes the pure version up a notch. I've updated the wiki, showing how the code has progressed: Author Time in

Re: [Haskell-cafe] Fannkuch timings

2006-01-10 Thread Donald Bruce Stewart
daniel.is.fischer: Am Dienstag, 10. Januar 2006 19:11 schrieben Sie: Hello Daniel, Tuesday, January 10, 2006, 7:40:24 PM, you wrote: DF These are user/MUT times, at the moment, my machine is busy, so that elapsed DF time is about double that, otherwise these times are rather

Re: [Haskell-cafe] multiline strings in haskell?

2006-01-11 Thread Donald Bruce Stewart
Oh, like this (by Stefan Wehr): http://www.cse.unsw.edu.au/~dons/code/icfp05/tests/unit-tests/VariableExpansion.hs $ ghci -fth VariableExpansion.hs *VariableExpansion let x = 7 in $( expand ${x} ) 7 *VariableExpansion let url = http://www.google.com; *VariableExpansion $( expand Here is

[Haskell-cafe] Shootout rankings

2006-01-14 Thread Donald Bruce Stewart
:D Haskell now ranked 2nd overall, only a point or so behind C: http://shootout.alioth.debian.org/gp4/benchmark.php?test=alllang=all And still a bit more we can squeeze out... -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Shootout rankings

2006-01-15 Thread Donald Bruce Stewart
sebastian.sylvan: On 1/15/06, Isaac Gouy [EMAIL PROTECTED] wrote: Haskell now ranked 2nd overall, only a point or so behind C: It was always obvious that the Write the program as-if lines of code were not being measured clause relied too heavily on contributors willingness to

Re: [Haskell-cafe] Shootout rankings

2006-01-15 Thread Donald Bruce Stewart
sebastian.sylvan: On 1/15/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: sebastian.sylvan: On 1/15/06, Isaac Gouy [EMAIL PROTECTED] wrote: Haskell now ranked 2nd overall, only a point or so behind C: It was always obvious that the Write the program as-if lines

Re: [Haskell-cafe] Shootout rankings

2006-01-15 Thread Donald Bruce Stewart
jupdike: Maybe we finally have enough motivation to move to some other measurement of program volume :-) I'm not sure how you could do this better, though... Maybe counting the number of tokens (not sure how you'd define that though) I was thinking the same thing for the past few

Re: [Haskell-cafe] Known Unknowns

2006-01-25 Thread Donald Bruce Stewart
haskell: There is a new combined benchmark, partial sums that subsumes several earlier benchmarks and runs 9 different numerical calculations: http://haskell.org/hawiki/PartialSumsEntry Ah! I had an entry too. I've posted it on the wiki. I was careful to watch that all loops are compiled

Re: [Haskell-cafe] Known Unknowns

2006-01-26 Thread Donald Bruce Stewart
haskell: Donald Bruce Stewart wrote: haskell: There is a new combined benchmark, partial sums that subsumes several earlier benchmarks and runs 9 different numerical calculations: http://haskell.org/hawiki/PartialSumsEntry Ah! I had an entry too. I've posted it on the wiki. I

Re: [Haskell-cafe] Known Unknowns

2006-01-31 Thread Donald Bruce Stewart
joelkoerwer: Thanks Chris. I was actually asking about analyzing Core output in general. I'm well aware of the problems we're having with the nbody entry. I'm convinced my list based version can go faster than it is now. That's why I was asking if Don could put together a few

[Haskell-cafe] Number 1, at least for now

2006-01-31 Thread Donald Bruce Stewart
Haskell is now ranked number 1 on the Great Language Shootout! http://shootout.alioth.debian.org/gp4/benchmark.php?test=alllang=all Hooray :) -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Known Unknowns

2006-02-02 Thread Donald Bruce Stewart
haskell: Joel Koerwer wrote: Don, that's a great little mini tutorial, exactly what I was hoping for. I'm looking forward to learning more tricks. On an unrelated note, I have an STUArray nbody. I haven't really looked closely at the chris+dons version, but I suspect they amount to

[Haskell-cafe] Language shootout (reloaded)

2006-02-09 Thread Donald Bruce Stewart
Just so we can feel that we're doing the right things :) On the great language shootout, as of last night, we're: * Ranked overall number 1, by a good margin: * Ranked number 1 on lines of code * Ranked number 2 on speed.

Re: [Haskell-cafe] Sorting Integers

2006-02-13 Thread Donald Bruce Stewart
jamie.edwards: I have 3 integers, a b c that I want to pass to a function, and I want the function to return the 3 integers sorted, from largest to smallest - any idea how to do this? Prelude let sort3 x y z = List.sort [x,y,z] Prelude sort3 8 2 0 [0,2,8] Cheers, Don

Re: [Haskell-cafe] Sorting Integers

2006-02-13 Thread Donald Bruce Stewart
sebastian.sylvan: On 2/13/06, Sebastian Sylvan [EMAIL PROTECTED] wrote: On 2/13/06, JimpsEd [EMAIL PROTECTED] wrote: I have 3 integers, a b c that I want to pass to a function, and I want the function to return the 3 integers sorted, from largest to smallest - any idea how to do

Re: [Haskell-cafe] Haskell as scripting language?

2006-02-15 Thread Donald Bruce Stewart
jupdike: For scenario (a) you can use hs-plugins and ghc http://www.cse.unsw.edu.au/~dons/hs-plugins/ With hs-plugins you can get an eval command, or you can dynamically load Haskell modules (from source or pre-compiled .o files). GHC (= 6.5) has an API that you can access from Haskell

Re: [Haskell-cafe] haskell programming guidelines

2006-02-20 Thread Donald Bruce Stewart
maeder: Hi, haskell admits many programming styles and I find it important that several developers of a prject agree on a certain style to ease code review. I've set up guidelines (still as plain text) for our (hets) project in Perhas you'd like to put up a Style page on thew new Haskell

Re: [Haskell-cafe] Constructor classes implementation

2006-02-21 Thread Donald Bruce Stewart
sean.seefried: I still don't see clearly. So you've implemented the type inference algorithm from Jones' paper, good. But is there any significance or gain, apart from it being a nice and interesting exercise? No. Nor did I state that there was. There's a reason I posted this to

[Haskell-cafe] Code snippet, a `trace' with line and column numbers

2006-02-28 Thread Donald Bruce Stewart
Suggested by a question from sethk on #haskell irc channel. Solves an FAQ where people have often resorted to cpp or m4: a `trace' that prints line numbers. module Location (trace, assert) where import qualified Control.Exception as C (catch) import System.IO.Unsafe (unsafePerformIO)

Re: [Haskell-cafe] afrp code base

2006-03-03 Thread Donald Bruce Stewart
instinctive: I've been coming up to speed on afrp, and I see the code base is almost two years old. Is this the state of the art? Thanks. Also, a practical application appeared this year with Frag -- Mun Hon Cheong's implementation of a Quake-like game in

Re: [Haskell-cafe] Re: MUA written in Haskell, and MTA in Haskell help?

2006-03-08 Thread Donald Bruce Stewart
shae: Nils Anders Danielsson [EMAIL PROTECTED] writes: I had the same thought yesterday, after an Emacs-Lisp session in which I was trying to get Gnus to do exactly what I wanted it to... Yeah, same here. I use Gnus and it's nice, but occasionally I want to erase it from the timestream.

Re: [Haskell-cafe] Re: MUA written in Haskell (was: Getting GHC to print Done when it's finished linking?)

2006-03-08 Thread Donald Bruce Stewart
5) Ideally the scripting language would be Haskell.. ... I can't find anything which would allow you to compile and load functions into a running program. From haskell.org: hs-plugins A library for compiling and loading plugins into a running Haskell program. Have a look at:

Re: [Haskell-cafe] Reading files efficiently

2006-03-19 Thread Donald Bruce Stewart
1: I've got another n00b question, thanks for all the help you have been giving me! I want to read a text file. As an example, let's use /usr/share/dict/words and try to print out the last line of the file. First of all I came up with this program: import System.IO main = readFile

Re: [Haskell-cafe] Reading files efficiently

2006-03-19 Thread Donald Bruce Stewart
dons: 1: I've got another n00b question, thanks for all the help you have been giving me! I want to read a text file. As an example, let's use /usr/share/dict/words and try to print out the last line of the file. First of all I came up with this program: import System.IO

Re: [Haskell-cafe] Re: Returning a list element?

2006-03-21 Thread Donald Bruce Stewart
dominic.steinitz: Robert Dockins robdockins at fastmail.fm writes: FYI, putStrLn will automatically insert a newline for you, and the final 'return ()' is unnecessary. My favorite idiom for this kind of thing is: mainMenu = putStr $ unlines [ line 1 , line 2 ,

Re: [Haskell-cafe] Bit streams programs in Haskell

2006-03-22 Thread Donald Bruce Stewart
per.gustafsson: Haskell gurus, We have made a proposal to extend the Erlang `binary' data type from being a sequence of bytes (a byte stream) to being a sequence of bits (a bitstream) with the ability to do pattern matching at the bit level. Our experience in writing efficient (and

Re: [Haskell-cafe] Code Review: Sudoku solver

2006-04-03 Thread Donald Bruce Stewart
bulat.ziganshin: Hello it seems that sudoku solver may be a good candidate for nofib suite / language comparison shootout It would also be nice to see some example sudoku solvers posted on an `Idioms' page on haskell.org: http://www.haskell.org/haskellwiki/Category:Idioms someone could

[Haskell-cafe] Re: Indent for haskell

2006-04-04 Thread Donald Bruce Stewart
patc: Is there an equivalent of an indent program for haskell? I have a bit of code I want to clean up ... You could run your code through ghc, with -ddump-parsed turned on. Then with a little bit of sed magic, you could recover the original code Before: $ cat B.hs main = do {

Re: [Haskell-cafe] Creating a profiling version of FPS

2006-04-04 Thread Donald Bruce Stewart
With a recent snapshot of Cabal you can build a profiled version of any library as follows (including for FPS): $ ./Setup.hs configure -p You'll then see ./Setup.hs build build the lib twice, once with and once without profiling. /usr/bin/ar: creating dist/build/libHSfps-0.1.a

Re: [Haskell-cafe] Re: [Haskell] reading binary files

2006-04-07 Thread Donald Bruce Stewart
akamaus: Hello, Bulat I'm currently working on some kind of program for analysing FAT partitions. Don't ask why did I chose to implement it in Haskell :) Just for fun. My program needs to read scattered chunks of binary data from a huge file and to do a good amount of deserialisation.

[Haskell-cafe] 1G strings in Haskell

2006-04-20 Thread Donald Bruce Stewart
Question: Can I manipulate 1G strings in Haskell? Short answer: Yes! Mostly. Doing some stress testing of FPS, here are some results for 1G strings. 3.2Ghz box, 2G physical mem. Size of input string: 1G N.B. 2G of physical ram is not enough when trying to benchmark functions that copy

Re: [Haskell-cafe] 1G strings in Haskell

2006-04-20 Thread Donald Bruce Stewart
dagit: On 4/19/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: Question: Can I manipulate 1G strings in Haskell? Failed due to memory exhaustion. Almost made it though, just need a tad more ram than I had. filter ! unlines ! unwords

Re: [Haskell-cafe] Independent component analysis and RDF

2006-04-23 Thread Donald Bruce Stewart
joelr1: Howdy folks! Does anyone have sample code for independent component analysis (ICA), singular value decomposition (SVD) aka spectral graph partitioning, or semidiscrete decomposition (SDD)? I'm trying to learn this rocket science and apply it to RDF graph analysis. Hey

Re: [Haskell-cafe] database access recommendation

2006-04-28 Thread Donald Bruce Stewart
bulat.ziganshin: Hello Brock, Thursday, April 27, 2006, 7:45:16 PM, you wrote: I looked at http://www.haskell.org/haskellwiki/Libraries_and_tools, and suffice it to say that this page don't reflects current state of the art. during many years it was not updated and when it was moved to

[Haskell-cafe] Re: [Haskell] how to 'accumulate' values efficiently (time and space) ?

2006-05-08 Thread Donald Bruce Stewart
noteed: Hi all, the problem is simple but i can't do it : I want to generate some values and 'accumulate' them. The meaning of 'accumulating' is not so important. The only point is that to 'accumulate' the values, I only have to know one value and the accumulator (and not all the

Re: [Haskell-cafe] develop new Haskell shell?

2006-05-10 Thread Donald Bruce Stewart
johanj: Who wants to try devloping a new shell with me? Also: http://www.cse.unsw.edu.au/~dons/h4sh.html And (in Clean): Rinus Plasmeijer and Arjen van Weelden. A functional shell that operates on typed and compiled applications. In Varmo Vene and Tarmo Uustalu, editors,

Re: [Haskell-cafe] [newbie] processing large logs

2006-05-13 Thread Donald Bruce Stewart
martine: On 5/14/06, Eugene Crosser [EMAIL PROTECTED] wrote: main = printMax . (foldr processLine empty) . lines = getContents [snip] The thing kinda works on small data sets, but if you feed it with 250,000 lines (1000 distinct), the process size grows to 200 Mb, and on 500,000 lines I get

Re: [Haskell-cafe] [newbie] processing large logs

2006-05-13 Thread Donald Bruce Stewart
dons: martine: On 5/14/06, Eugene Crosser [EMAIL PROTECTED] wrote: main = printMax . (foldr processLine empty) . lines = getContents [snip] The thing kinda works on small data sets, but if you feed it with 250,000 lines (1000 distinct), the process size grows to 200 Mb, and on 500,000

Re: [Haskell-cafe] dumb monad syntax question

2006-05-14 Thread Donald Bruce Stewart
mvanier: I've been reading Phil Wadler's monad papers from the early '90s, and it's been interesting to see how the monad concept evolved over the course of those years. But I haven't been able to track down the first use of the do notation for monads. Can anyone tell me where that came

[Haskell-cafe] Re: [Haskell] installing streams library

2006-05-21 Thread Donald Bruce Stewart
chad.scherrer: On 5/20/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: Data.ByteString is in the base libraries now. For a bit of the flavour, see: [2]http://haskell.org/haskellwiki/Wc In this message [3]http://article.gmane.org

Re: [Haskell-cafe] Re: [Haskell] (.) . (.)

2006-05-29 Thread Donald Bruce Stewart
brianh: [moved to cafe] Dominic Steinitz wrote: Taral wrote: On 5/28/06, Dominic Steinitz [EMAIL PROTECTED] wrote: Is this defined in some library? Thanks, Dominic. Don't think so. I use: \a b - f (g a b) Taral, Thanks. What prompted this question is that I find myself writing

Re: [Haskell-cafe] c2hs and gtk+hs problem

2004-05-18 Thread Donald Bruce Stewart
swest3: Sven Panne wrote: scott west wrote: Hello all, I've recently attempted to get the gtk+hs bindings operational, with evidently no success. They both compile fine, but when trying to make all the examples in the gtk+hs tree, it gives up with:

Re: [Haskell-cafe] Roman Numerals and Haskell Syntax abuse

2004-07-05 Thread Donald Bruce Stewart
ajb: Quoting George Russell [EMAIL PROTECTED]: The following declaration for a function for converting positive integers to Roman numerals is 181 characters long. Is there a shorter one? Being a judge, I can't write your obfuscated haskell contest entry for you. However, as a

Re: [Haskell-cafe] Compiling GHC for AIX5.1L

2004-09-29 Thread Donald Bruce Stewart
jgoerzen: Hello, Following the directions at http://www.haskell.org/ghc/docs/6.2.1/html/building/sec-porting-ghc.html#UNREGISTERISED-PORTING... I have a Debian unstable system on i386 as the host machine and an IBM PowerPC system as the target. I have configured the files as specified

Re: [Haskell-cafe] Re: Compiling GHC for AIX5.1L

2004-09-30 Thread Donald Bruce Stewart
jgoerzen: On 2004-09-30, Donald Bruce Stewart [EMAIL PROTECTED] wrote: You can use make -k to keep going, I seem to remember, or use -pgmltrue, Those tricks got me farther. Now I'm on the target and stuck at: gmake[5]: Entering directory `/home/jgoerzen/programs/unreg/ghc-6.2.1/ghc/rts

Re: [Haskell-cafe] Re: Compiling GHC for AIX5.1L

2004-10-01 Thread Donald Bruce Stewart
jgoerzen: In gmane.comp.lang.haskell.cafe, you wrote: jgoerzen: /mpn' It could be that gmp is a bit too old for your platform. This has been Turns out that both ghc and gmp are confused about the true nature of the platform. It is AIX on PowerPC64, running in 32-bit mode. After

Re: [Haskell-cafe] executable scripts?

2004-10-22 Thread Donald Bruce Stewart
velman: One of the nice things about perl (for example) is that you can put together a script with #!/usr/local/perl (in bash for example) as the first line of a file and run it immediately. I've used perl a lot this way with simple 'throw away' scripts to do special filtering on a file, or

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

2007-03-05 Thread Donald Bruce Stewart
0xbadcode: On 2/10/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: 1) Use Hscolour to pretty-ifiy the Core so its more parsable: ghc -O Foo.hs -ddump-simpl | HsColour -tty | less -r will colourise the Core, and pipe it into less (which will display the metachars). A screenshot

Re: [Haskell-cafe] open a browser from the command line, wait a few seconds, and shut it. (ie, translate forking from bash to haskell)

2007-03-08 Thread Donald Bruce Stewart
tphyahoo: I have a bash script that opens a browser for a few seconds, and then closes it. Could someone point me up the equivelant(s) in haskell, h4sh, hsh, etc,0 and friends? I reckon this amounts to, what's the process for translating forking from bash to haskell.

[Haskell-cafe] Re: HS-Plugins 1.0 chokes on simple test, WinXP GHC-6.6

2007-03-09 Thread Donald Bruce Stewart
Is this using the darcs repository version of hs-plugins? That's the only versions that works with 6.6 alistair: Does anyone have hs-plugins working on WinXP with ghc-6.6? When I run the simple test below I get this error: Main: c:/ghc/ghc-6.6/HSbase.o: unknown symbol `_free' Main: user

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-10 Thread Donald Bruce Stewart
bulat.ziganshin: Hello Claus, Saturday, March 10, 2007, 4:36:22 AM, you wrote: ah, ok, i'm not used to thinking in such scales;-) (perhaps you should get in touch with those SAC people, after all - i don't know what their state of play is, but many years ago, they started in an

Re: [Haskell-cafe] Program Command Line Arguments

2007-03-10 Thread Donald Bruce Stewart
Dave: My apologies if this is a question with a trivial answer. Command line args in C are accessed via argc and argv[] defined as arguments to main();. How are command line arguments to a ghc-compiled program accessed in Haskell? Or is that even possible? Simplest:

[Haskell-cafe] Re: Simple benchmark of list operations?

2007-03-10 Thread Donald Bruce Stewart
bulat.ziganshin: Hello haskell-cafe, Page http://community.livejournal.com/ru_lambda/44716.html contains three very simple but long-working benchmark functions: dummy :: [Int] - [Int] dummy [] = [] dummy (x:xs) = x:dummy (dummy xs) dummy2 :: [Int] - [Int] dummy2 = dum [] where

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

2007-03-11 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070312 Issue 59 - March 12, 2007 --- Welcome to issue 59 of HWN, a weekly newsletter

Re: [Haskell-cafe] Re: [Haskell] Haskell Weekly News: March 12, 2007

2007-03-13 Thread Donald Bruce Stewart
ithika: Quoth Conrad Parker, nevermore, Besides, tshirtIf it's not open source, it's not computer science/tshirt. Science demands repeatable results, computer science demands literate programming. The solution is not to shy away from including code, or else the IP lawyers have won,

Re: [Haskell-cafe] c2hs and pthreadtypes.h

2007-03-13 Thread Donald Bruce Stewart
magnus: I'm trying to use c2hs but get stuck when including sys/types.h (though the problem really resides in pthreadtypes.h): % ./Setup.hs build -v Preprocessing executables for kowasu-0.1... /usr/bin/c2hs -C -D__GLASGOW_HASKELL__=606 -C -Icsrc -o src/Kowasu/PTrace.hs

Re: [Haskell-cafe] Lazy IO and closing of file handles

2007-03-14 Thread Donald Bruce Stewart
pete-expires-20070513: When using readFile to process a large number of files, I am exceeding the resource limits for the maximum number of open file descriptors on my system. How can I enhance my program to deal with this situation without making significant changes? Read in data strictly,

Re: [Haskell-cafe] Re: Lazy IO and closing of file handles

2007-03-14 Thread Donald Bruce Stewart
pete-expires-20070513: [EMAIL PROTECTED] (Donald Bruce Stewart) writes: pete-expires-20070513: When using readFile to process a large number of files, I am exceeding the resource limits for the maximum number of open file descriptors on my system. How can I enhance my program to deal

Re: [Haskell-cafe] Lazy IO and closing of file handles

2007-03-14 Thread Donald Bruce Stewart
donn: When using readFile to process a large number of files, I am exceeding the resource limits for the maximum number of open file descriptors on my system. How can I enhance my program to deal with this situation without making significant changes? I note that if you use mmap(2) to

Re: [Haskell-cafe] Lazy IO and closing of file handles

2007-03-15 Thread Donald Bruce Stewart
claus.reinke: Not necessarily so, since you are making assumptions about the timeliness of garbage collection. I was similarly sceptical of Claus' suggestion: Claus Reinke: in order to keep the overall structure, one could move readFile backwards and parseEmail forwards in the pipeline,

Re: [Haskell-cafe] Make strict (IO String) lazy

2007-03-15 Thread Donald Bruce Stewart
lemming: On the one hand, in the standard libraries there are functions like readFile, getContents, hGetContents which read a file lazily. This is often a nice feature, but sometimes lead to unexpected results, say when reading a file and overwriting it with modified contents. Unfortunately

Re: [Haskell-cafe] Typical?

2007-03-16 Thread Donald Bruce Stewart
hthiel.char: Hello All, Us who're learning Haskell have a lot in common... that is, if Amazon has it right... We recommend: STAR TREK-USS ENTERPRISE D by Corgi Classics Recommended because you purchased or rated: * The Haskell School of Expression:

Re: [Haskell-cafe] Using external programs with Haskell in windows.

2007-03-17 Thread Donald Bruce Stewart
christian.lean2: I'm looking for a way to run an external program and get the results in haskell. Something similar to HSH but that will work in windows. I don't need anything too complex, just to provide the command to be run as a string and get the result as a string. Is this possible?

Re: [Haskell-cafe] Using external programs with Haskell in windows.

2007-03-18 Thread Donald Bruce Stewart
christian.lean2: Donald Bruce Stewart wrote: christian.lean2: I'm looking for a way to run an external program and get the results in haskell. Something similar to HSH but that will work in windows. I don't need anything too complex, just to provide the command to be run as a string

[Haskell-cafe] Re: [Haskell] Haskell Chess

2007-03-18 Thread Donald Bruce Stewart
smazanek: Hello again, I got a lot of interesting and useful comments on my posting about Haskell Chess. Somebody suggested using the program for benchmarks. Several people asked me to open the program for contributions. And others were just interested in the exercises. It is probably

Re: [Haskell-cafe] Why the Prelude must die

2007-03-23 Thread Donald Bruce Stewart
stefanor: This is a ranty request for comments, and the more replies the better. Use -fno-implicit-prelude and roll your own Prelude. Stick it on hackage and everyone can use it. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Why the Prelude must die

2007-03-25 Thread Donald Bruce Stewart
ajb: G'day all. Quoting Neil Mitchell [EMAIL PROTECTED]: Yes. It will break 100's of applications. That sounds like a challenge! Find me 100 applications that use Data.Map.map and I will eat crow. Well, it'll break 100s of modules :-) $ find . -name '*.hs' -exec grep -l

Re: [Haskell-cafe] cost of modules

2007-03-27 Thread Donald Bruce Stewart
jeremy.shaw: At Tue, 27 Mar 2007 23:10:21 +0200, Fawzi Mohamed wrote: If someone has an idea on how else I can improve timings please tell me. I believe you are seeing a speed decrease, because GHC is not inlining functions as much when you split them into modules. If you add explicit

[Haskell-cafe] Mutable variables eliminated from .NET | Lambda the Ultimate

2007-04-01 Thread Donald Bruce Stewart
As seen on reputable language news site, Lambda the Ultimate. http://lambda-the-ultimate.org/node/2164 Mutable variables eliminated from .NET Redmond, WA: At an unusual press conference held this Sunday morning, Bill Taylor, Microsoft's General Manager of Platform Strategy,

Re: [Haskell-cafe] Yi Source

2007-04-08 Thread Donald Bruce Stewart
dfeustel: Is the full source of Yi suitable for building on non-linux platforms (ie OpenBSD) (going to be) available? Yes, it is *always* available via darcs. I use yi on openbsd too :-) See here, http://www.cse.unsw.edu.au/~dons/yi.html -- Don

Re: [Haskell-cafe] Function call by string

2007-04-08 Thread Donald Bruce Stewart
pvolgger: Hello everybody! Can me somebody say how I can call a function by string? Thus I want to have a function that has as argument a string (name of a function to call) and then tries to call that function, a kind of: functionCall :: String - [String] - RetVal functionCall

Re: [Haskell-cafe] Why Perl is more learnable than Haskell

2007-04-11 Thread Donald Bruce Stewart
kynnjo: Perhaps Haskell will never lend itself to something like a Perl one-liner, but still I wish that there were books on Haskell that focused on making Haskell useful to the learner as quickly as possible... If such already exist and I've missed it, please let me know. There's some

[Haskell-cafe] Haskell Weekly News: April 12, 2007

2007-04-11 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070412 Issue 60 - April 12, 2007 --- Welcome to issue 60 of HWN, a weekly newsletter

Re: [Haskell-cafe] k-minima in Haskell

2007-04-11 Thread Donald Bruce Stewart
mrvr84: What's the best way to implement the following function in haskell: Given a list and an integer k as input return the indices of the least k elements in the list. The code should be elegant and also, more importantly, must not make more than the minimum

[Haskell-cafe] xmonad window manager mailing list

2007-04-12 Thread Donald Bruce Stewart
I'm pleased to announce that the xmonad window manager now has a mailing list set up: http://www.haskell.org/mailman/listinfo/xmonad For those who don't know, xmonad is a tiling window manager written in Haskell. You can find more about it at: http://xmonad.org and Lennart

Re: [Haskell-cafe] Efficient use of ByteString and type classes in template system

2007-04-15 Thread Donald Bruce Stewart
johan.tibell: Hi Haskell Caf?! I'm writing a perl/python like string templating system which I plan to release soon: darcs get http://darcs.johantibell.com/template The goal is to provide simple string templating; no inline code, etc.. An alternative to printf and ++. Ok. You might

Re: [Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Donald Bruce Stewart
pete-expires-20070615: Simon Peyton-Jones [EMAIL PROTECTED] writes: My guess is that they'll be Linux/Perl/Ruby types, and they'll be practitioners rather than pointy-headed academics. Suggest concrete examples of programs that are * small *

[Haskell-cafe] Re: Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Donald Bruce Stewart
joelr1: On Apr 16, 2007, at 9:29 PM, Donald Bruce Stewart wrote: It's interesting to note that QuickCheck generalises unit testing: zero-arity QC properties are exactly unit tests. I don't think this works very well. I rely quite heavily on being able to compare expected output

[Haskell-cafe] Re: Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Donald Bruce Stewart
: Are there any examples of such custom drivers? On Apr 16, 2007, at 10:09 PM, Donald Bruce Stewart wrote: That's just the default driver. Plenty of custom drivers exist which compare the output. The QC driver is just a function you implement, after all. -- http://wagerlabs.com

Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread Donald Bruce Stewart
david: Ah... so the secret is in the hidden variables. On some level I am beginning to fear that Monads resurrect some of the scariest aspects of method overriding from my OO programming days. Do you (all) ever find that the ever changing nature of = makes code hard to

Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread Donald Bruce Stewart
clifford.beshers: Donald Bruce Stewart wrote: david: Ah... so the secret is in the hidden variables. On some level I am beginning to fear that Monads resurrect some of the scariest aspects of method overriding from my OO programming days. Do you (all) ever find

[Haskell-cafe] Re: [C2hs] anyone interested in developing a Language.C library?

2007-04-20 Thread Donald Bruce Stewart
chak: Duncan Coutts wrote: If anyone is interested in developing a Language.C library, I've just completed a full C parser which we're using in c2hs. It covers all of C99 and all of the GNU C extensions that I have found used in practise, including the __attribute__ annotations. It can

Re: [Haskell-cafe] Program optimisation

2007-04-20 Thread Donald Bruce Stewart
droundy: In any case, in my opinion Haskell desperately needs more strict data types, as strict types can go a long way towards eliminating all sorts of Yes! Haskell is a combined strict and lazy language, after all. In particular, the ability to precisely combine strictness and laziness in a

Re: [Haskell-cafe] Program optimisation

2007-04-20 Thread Donald Bruce Stewart
ahey: David Roundy wrote: I remember once going through all sorts of pain trying to avoid stack overflows when using Data.Map to compute a histogram, which all would have been avoided if there were a strict version of Data.Map (or even just strict functions on the lazy Data.Map). Then

[Haskell-cafe] QuickCheck subsumes unit testing

2007-04-20 Thread Donald Bruce Stewart
Just to walk the walk, and not just talk the talk, here's a quick unit testing 'diff' driver I hacked up for QuickCheck. When run, it 'diffs' (well, just prints ;-) the incorrect values from the unit test: $ runhaskell T.hs sort unit test : Falsifiable after 0 tests: -

Re: [Haskell-cafe] Program optimisation

2007-04-20 Thread Donald Bruce Stewart
ahey: Donald Bruce Stewart wrote: ahey: David Roundy wrote: I remember once going through all sorts of pain trying to avoid stack overflows when using Data.Map to compute a histogram, which all would have been avoided if there were a strict version of Data.Map (or even just strict functions

[Haskell-cafe] New HaskODell user groups

2007-04-26 Thread Donald Bruce Stewart
I've created a new wiki page documenting all the new user groups for Haskell that are springing up! http://haskell.org/haskellwiki/User_groups If you're starting a new group, please add it here, and publicise. -- Don P.S. Some obvious user group candidates, in my opinion, would be a

[Haskell-cafe] Haskell Weekly News: April 27, 2007

2007-04-26 Thread Donald Bruce Stewart
--- Haskell Weekly News http://sequence.complete.org/hwn/20070427 Issue 61 - April 27, 2007 --- Welcome to issue 61 of HWN, a weekly newsletter

Re: [Haskell-cafe] Re: Creating pseudo terminals

2007-04-30 Thread Donald Bruce Stewart
tomahawkins: On 4/29/07, Georg Sauthoff [EMAIL PROTECTED] wrote: On 2007-04-29, Tom Hawkins [EMAIL PROTECTED] wrote: Hi, [..] I haven't done this before in any language, so any tips would be appreciated. From what I gather, a call to posix_openpt or openpty returns a master and a

Re: [Haskell-cafe] Bloom Filter

2007-04-30 Thread Donald Bruce Stewart
ajb: Quoting tom [EMAIL PROTECTED]: This looks cool: bytes2int = foldr ((. (256 *)) . (+)) 0 . (map toInteger) but I'm not smart enough to parse it. This is both more readable and shorter: bytes2int = foldr (\x r - r*256 + fromInteger x) 0 Integer log2's are probably better

Re: [Haskell-cafe] what exactly does deriving (Functor, Monad, MonadIO) do?

2007-05-01 Thread Donald Bruce Stewart
tphyahoo: I was trying to follow the reasoning in Don's article on using haskell for shell scripting http://cgi.cse.unsw.edu.au/~dons/blog/2007/03/10 In the source listing at the end we is newtype Shell a = Shell { runShell :: ErrorT String IO a } deriving (Functor, Monad,

Re: [Haskell-cafe] Is Hs-Plugins dead?

2007-05-01 Thread Donald Bruce Stewart
pvolgger: Is Hs-Plugins still under develeopment; is there still somebody who is updating it? It's in stasis. It will likely get a little bit more updating when I finish my phd. It's needed for lambdabot in #haskell, so that's enough pressure to keep it working :-) For the longer term, a

Re: FW: [Haskell-cafe] RE:Cross-over from Haskell.org [Haskell] Re: Newbie: what are the advantages of Haskell?

2007-05-02 Thread Donald Bruce Stewart
ajb: G'day all. Quoting Michael T. Richter [EMAIL PROTECTED]: Ummm... Udo? Just what the fuck did you hope to accomplish with this kind of talk? Guys, could we keep it civil on the list, please? And for the record: http://www.perl.com/pub/2000/12/advocacy.html I'd like

Re: [Haskell-cafe] outputing .hs file without comments

2007-05-03 Thread Donald Bruce Stewart
jmvilaca: Hi all, Is there a simple tool or command to remove all comments from a Haskell file, i.e. something that outputs the input file but without any comments on it? Using Language.Haskell, such a program is almost trivial: -- -- strip comments from haskell

[Haskell-cafe] Programming in Haskell made it to RegDeveloper

2007-05-03 Thread Donald Bruce Stewart
http://www.regdeveloper.co.uk/2007/05/03/programming_haskell/ Mmm... mainstream exposure. -- Don ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Debugging

2007-05-05 Thread Donald Bruce Stewart
monang: On 5/5/07, Stefan O'Rear [EMAIL PROTECTED] wrote: On Fri, May 04, 2007 at 10:44:15PM -0700, Ryan Dickie wrote: I've only written trivial applications and functions in haskell. But the title of this thread got me thinking. In an imperative language you have clear steps, states,

[Haskell-cafe] The Functional Pearls

2007-05-05 Thread Donald Bruce Stewart
I've created a wiki page collecting the 'functional pearl' papers that have appeared in JFP and ICFP and other places over the last 20 odd years. http://haskell.org/haskellwiki/Research_papers/Functional_pearls Lots of lovely functional programs there. There's also a list on that page of

Re: [Haskell-cafe] Is Excel a FP language?

2007-05-05 Thread Donald Bruce Stewart
andrewcoppin: I just had a thought... Why doesn't somebody implement a spreadsheet where Haskell is the formula language? 8-) I have already been struggling (unsuccessfully) to write a program to graph functions, but why not go the whole hog and make an entire spreadsheet

Re: [Haskell-cafe] Problems with Hs-Plugins

2007-05-05 Thread Donald Bruce Stewart
pvolgger: I tried following very simple program: module Main where import System.Eval.Haskell main = do i - eval 1 + 6 :: Int [] :: IO (Maybe Int) if isJust i then putStrLn (show (fromJust i)) else return () I compile it with ghc -c Main.hs and everything seems fine. When I run

Re: [Haskell-cafe] The Functional Pearls

2007-05-05 Thread Donald Bruce Stewart
ithika: On 05/05/07, Donald Bruce Stewart [EMAIL PROTECTED] wrote: I've created a wiki page collecting the 'functional pearl' papers that have appeared in JFP and ICFP and other places over the last 20 odd years. http://haskell.org/haskellwiki/Research_papers/Functional_pearls Lots

<    1   2   3   4   5   6   >