Re: [Haskell-cafe] Fun with the ST monad

2011-02-25 Thread Andrew Coppin
On 25/02/2011 02:16 AM, wren ng thornton wrote: Given only this specification, the problem is overconstrained, which is why you get too much strictness. That is, your types are too general to allow you to do what you want (e.g., they allow the first Word16 to depend on the last Word8). Hmm,

[Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Andrew Coppin
OK, so I had a function that looks like transform :: [Word8] - [Word16] It works nicely, but I'd like to use mutable state inside. No problem! Use the ST monad. Something like transform :: [Word8] - [Word16] transform xs = runST (work xs) where work :: [Word8] - ST s [Word16]

Re: [Haskell-cafe] Fun with the ST monad

2011-02-24 Thread Andrew Coppin
Anybody have any hints on how to get around this? Use a lazy state monad? That's not going to work. It still needs to read the input to determine which monadic action comes next, and hence what the final result will be. So whether it forces the result or not, it still has to scan the

Re: [Haskell-cafe] Unable to get parallelism using `par`

2011-02-20 Thread Andrew Coppin
On 19/02/2011 04:57 PM, Edward Amsden wrote: But note that with GHC 7.x, the RTS *automatically* chooses the correct number of threads now. You no longer need to specify this manually (unless you specifically want to use some other number of threads for some reason). Is that stated in the

Re: [Haskell-cafe] Unable to get parallelism using `par`

2011-02-20 Thread Andrew Coppin
For what it's worth, you can also use GHC.Conc.Sync.numCapabilities to find out how many cores are actually being used, if you wanted to check. (I thought this was also exported from Control.Concurrent, but apparently not...) ___ Haskell-Cafe

Re: [Haskell-cafe] Sub-optimal [code]

2011-02-20 Thread Andrew Coppin
On 16/02/2011 11:09 PM, Max Bolingbroke wrote: Thinking about it some more, this example is actually quite interesting because if you *prevent* the list from being floated the forM gets foldr/build fused into a totally listless optimal loop. It really does seem like a shame to disable that

Re: [Haskell-cafe] Unable to get parallelism using `par`

2011-02-19 Thread Andrew Coppin
On 17/02/2011 05:20 PM, Brandon Moore wrote: If you are using ghc 7.01, you need to compile with -rtsopts for the compiled program to parse +RTS options. That's true. I don't know of any way to provide a default value at compile time. That would be -with-rtsopts=-N2 (or whatever)

Re: [Haskell-cafe] Sub-optimal [code]

2011-02-16 Thread Andrew Coppin
On 16/02/2011 06:31 PM, James Andrew Cook wrote: Doesn't Control.Monad.replicateM_ do exactly that? 10 points to Gryffindore. (Now, if only there was a version that feeds an integer to the monadic action as well... Still, it's not hard to implement.)

Re: [Haskell-cafe] Sub-optimal [code]

2011-02-15 Thread Andrew Coppin
I tried -O2 -fno-cse. No difference. I also tried -O2 -fno-full-laziness. BIG DIFFERENCE. See also the very old GHC ticket at http://hackage.haskell.org/trac/ghc/ticket/917 I don't know if that's the problem or not, but it might plausibly be. Here's the smallest version of the program that

Re: [Haskell-cafe] On hGetContents semi-closenesscloseness

2011-02-15 Thread Andrew Coppin
In a way, it's analogous to the situation with garbage collection and closing file handles in finalizers; but the details are different and the unpredictable file closing comes from lazy evaluation rather than garbage collection. Except that lazy evaluation can affect *when* the data becomes

Re: [Haskell-cafe] Sub-optimal [code]

2011-02-15 Thread Andrew Coppin
On 15/02/2011 08:35 PM, Daniel Fischer wrote: The result is that the list [1 .. 10*1024*1024*k] from the penultimate line of random_file is shared between the four iterations of the inner loop in file_batch (for k = 1 .. 4). Oops. Ouch! That's gotta sting in the morning... o_O I suppose

Re: [Haskell-cafe] Sub-optimal

2011-02-14 Thread Andrew Coppin
Is this a known bug? (GHC 6.10.x) It's known to happen when optimising shares what shouldn't be shared. Try compiling with -O2 -fno-cse (if that doesn't help, it doesn't necessarily mean it's not unwanted sharing, though). And, please, let us see some code to identify the problem. I tried -O2

Re: [Haskell-cafe] How large is the Haskell community ?

2011-02-13 Thread Andrew Coppin
On 12/02/2011 08:18 PM, Aaron Gray wrote: I was wondering if anyone had an idea or estimate as to how large the Haskell community is ? http://steve-yegge.blogspot.com/2010/12/haskell-researchers-announce-discovery.html (Sorry, I couldn't resist...)

[Haskell-cafe] Sub-optimal

2011-02-12 Thread Andrew Coppin
I have a small program that fills a file with random numbers. If I compile it without optimisation, it runs in constant space. And yet, if I supply -O2 (or even just -O1), for large output files the program gobbles large amounts of RAM. Is this a known bug? (GHC 6.10.x)

Re: [Haskell-cafe] Byte Histogram

2011-02-07 Thread Andrew Coppin
Haskell en Clean are very much alike. From what I could determine from a basic Clean introduction, Clean is very *unlike* Haskell, having a far more verbose and low-level syntax. (E.g., the compiler can't even determine whether a binding is recursive or not for itself. You have to say that

Re: [Haskell-cafe] Byte Histogram

2011-02-07 Thread Andrew Coppin
I think haskell2010's type system is just not expressive enough to create interface generic enough. It's not possible to create type class which will work for both ByteStrings (or IntSet) and lists. It seems that most people agree: The reason why we don't have container classes is that it's

Re: [Haskell-cafe] Byte Histogram

2011-02-06 Thread Andrew Coppin
On 06/02/2011 09:13 AM, Roel van Dijk wrote: Haskell en Clean are very much alike. From what I could determine from a basic Clean introduction, Clean is very *unlike* Haskell, having a far more verbose and low-level syntax. (E.g., the compiler can't even determine whether a binding is

Re: [Haskell-cafe] Byte Histogram

2011-02-06 Thread Andrew Coppin
Random fact: Data.Map.insertWith' exists. Data.IntMap.insertWith' does *not* exist. The containers library is a mess. I'm inclined to agree. In particular, I get strange looks from people in the OOP community when I say I'm using a language that doesn't have any abstractions at all for

Re: [Haskell-cafe] Byte Histogram

2011-02-05 Thread Andrew Coppin
On 03/02/2011 09:37 PM, Daniel Fischer wrote: To illustrate your prediction about the side-issues: On Thursday 03 February 2011 22:10:51, Andrew Coppin wrote: Consider for a moment the original implementation with Data.Map. Adding a seq or two here will do no good at all; seq reduces to WHNF

Re: [Haskell-cafe] Byte Histogram

2011-02-05 Thread Andrew Coppin
That got me thinking... What would happen if, instead of Integer, we had two types, evaluated Integer and possibly unevaluated Integer? What if the strictness or otherwise of a data structure were exposed at the type level? Oh, you mean like !Int and Int in Clean? I used to find bang *types*

Re: [Haskell-cafe] Byte Histogram

2011-02-05 Thread Andrew Coppin
On 03/02/2011 10:15 PM, Johan Tibell wrote: First, we need to stop pretending that you can use Haskell effectively without first learning to reason about program evaluation order. Writing a program in *any* language without understanding the performance implications of different language

Re: [Haskell-cafe] Byte Histogram

2011-02-05 Thread Andrew Coppin
For what it's worth I saw the problems in your counting examples right away, without reading the explanatory text below. Yes, they were pretty obvious with enough experience. For beginners I expect it to be a rather insidious trap. Beginners or anybody coding Haskell while not completely

Re: [Haskell-cafe] Byte Histogram

2011-02-05 Thread Andrew Coppin
On 04/02/2011 07:30 AM, Johan Tibell wrote: Right. It can still be tricky. I think we can get rid of a large number of strictness issues by using strict data structures more often, this should help beginners in particular. For the rest better tooling would help. For example, a lint tool that

Re: [Haskell-cafe] Concurrency best practices?

2011-02-05 Thread Andrew Coppin
On 05/02/2011 12:56 PM, Jesper Louis Andersen wrote: On Sat, Feb 5, 2011 at 10:46, wren ng thorntonw...@freegeek.org wrote: Sometimes I need those threads to do some IO like printing logging info. Logging is easy, especially if you don't mind a performance hit. Create an STM.TChan and throw

[Haskell-cafe] Byte Histogram

2011-02-03 Thread Andrew Coppin
There now follows a small grab-bag of miscelaneous but related thoughts. (Which probably means that this post will spawn a 2000 message thread discussing one tiny side-issue, rather than the main thrust of the message...) First of all, benchmarking. We have The Great Language Shootout,

Re: [Haskell-cafe] Byte Histogram

2011-02-03 Thread Andrew Coppin
On 03/02/2011 09:37 PM, Daniel Fischer wrote: To illustrate your prediction about the side-issues: On Thursday 03 February 2011 22:10:51, Andrew Coppin wrote: Consider for a moment the original implementation with Data.Map. Adding a seq or two here will do no good at all; seq reduces to WHNF

Re: [Haskell-cafe] [darcs-users] Darcs failure

2010-12-24 Thread Andrew Coppin
On 24/12/2010 09:58 AM, Miles Gould wrote: Hi Andrew, Others have probably told you this, Actually no... but you should look into the pkill command, which allows you to kill processes (including sending signals other than SIGTERM) by name. It's installed by default on Ubuntu. Mmm, OK.

Re: [Haskell-cafe] [darcs-users] Darcs failure

2010-12-22 Thread Andrew Coppin
On 22/12/2010 11:08 AM, Eric Kow wrote: Andrew, Thanks for your report. Indeed, please direct future reports to darcs-users or b...@darcs.net That would require me to sign up to yet another mailing list just to report one bug. And given that we're talking about a prebuilt binary being

[Haskell-cafe] Darcs failure

2010-12-21 Thread Andrew Coppin
I'm running a VM with Ubuntu 10.10 (Maverick Meerkat). I installed Darcs 2.4.4 using apt-get, but it keeps CONSTANTLY failing with the error message darcs: bug at src/URL.hs:246 compiled Sep 12 2010 20:24:56 Another possible bug in URL.waitNextUrl: curl_multi_perform() - no running handles

Re: [Haskell-cafe] OT: Monad co-tutorial: the Compilation Monad

2010-12-18 Thread Andrew Coppin
On 17/12/2010 12:59 AM, Gregg Reynolds wrote: This is a little off-topic, since it isn't specifically about Haskell, but since Haskell is the home of the monad tutorial it isn't completely irrelevant. The monad tutorial genre is well-known; it's often written somebody who has just learned the

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-09 Thread Andrew Coppin
On 09/12/2010 12:48 PM, Simon Marlow wrote: On 08/12/2010 16:34, Andrew Coppin wrote: It appears that with GHC 7, you can just say something like |-with-rtsopts=-H128m -K1m| while compiling your program, and now that will forever be the default RTS settings for your program. Nice! I didn't

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-12-08 Thread Andrew Coppin
On 08/12/2010 03:29 PM, Brandon S Allbery KF8NH wrote: Then build your CGIs restricted. Restricting the runtime by default, *especially* when setting runtime options at compile time is so much of a pain, is just going to cause problems. I'm already thinking that I may have to skip ghc7. With

Re: [Haskell-cafe] [Haskell] ANNOUNCE: genprog-0.1

2010-12-08 Thread Andrew Coppin
On 08/12/2010 02:40 PM, Alberto G. Corona wrote: A change to a gene does not make you to have a extra bone. It can make you to have your hand slighltly longer. or shorter. Actually I suspect it does - or at least can do. It's just a rather rare event. In fact there are metalevels of

[Haskell-cafe] Trying out GHC 7

2010-12-06 Thread Andrew Coppin
OK, so the other day I decided to take GHC 7.0.1 for a spin. Suffice it to say, it definitely compiles stuff. So far, I've only tried running it in a Windows XP virtual machine with a single core, so I haven't been able to test what multicore performance is like. One thing that did interest

Re: [Haskell-cafe] Trying out GHC 7

2010-12-06 Thread Andrew Coppin
On 06/12/2010 06:04 PM, Don Stewart wrote: Andrew, if you have a bug report, please use the bug tracker: From what I've seen, the GHC devs already have vastly more bug reports than they know what to do with. I tend to hessitate filing tickets until I'm sure I'm looking at an actual bug,

Re: [Haskell-cafe] the beginning of the end

2010-12-05 Thread Andrew Coppin
On 05/12/2010 05:34 PM, Daniel Peebles wrote: Oh yeah, the 2.0 stuff that snobby techies love to hate :) hrrmpf back in my day we programmed in binary using a magnetized needle on the exposed tape! I don't need any of this newfangled bull. I'm still just miffed that people are trying to

[Haskell-cafe] Type families again

2010-12-02 Thread Andrew Coppin
Yes, it's me. And yes, I come with yet more questions. With Haskell 98 (or, indeed, Haskell 2010) it is impossible to define a polymorphic version of head that works for [], Set and ByteString. You can use a higher-kinded type class for [], but that fails for Set (because you can't specify

Re: [Haskell-cafe] Digests

2010-12-02 Thread Andrew Coppin
On 02/12/2010 09:17 PM, Permjacov Evgeniy wrote: The data integrity checks is well-known problem. A common soluting is use of 'checksums'. Most of them , however, are built in quite obfuscated manner (like md5) that results in ugly and error-prone implementations (see reference implementation

Re: [Haskell-cafe] DPH and GHC 7.0.1

2010-12-01 Thread Andrew Coppin
On 29/11/2010 01:42 AM, Manuel M T Chakravarty wrote: Andrew Coppin: I was wondering about this myself, actually. I'm especially surprised since I thought the DPH implementation was hard-wired into the compilter itself (in which case, how can you distribute it seperately?) Then again, I've

Re: [Haskell-cafe] DPH and GHC 7.0.1

2010-11-25 Thread Andrew Coppin
On 19/11/2010 11:39 PM, David Peixotto wrote: There were some problems getting DPH to work well with the changes in GHC 7. There is more info in this mail: http://www.haskell.org/pipermail/cvs-ghc/2010-November/057574.html The short summary is that there will be a patch level release of GHC

Re: [Haskell-cafe] Musings on type systems

2010-11-23 Thread Andrew Coppin
On 20/11/2010 08:42 AM, Tillmann Rendel wrote: Hi Andrew, Andrew Coppin wrote: Now, what about type variables? What do they do? Well now, that seems to be slightly interesting, since a type variable holds an entire type (whereas normal program variables just hold a single value), and each

[Haskell-cafe] GitIt

2010-11-19 Thread Andrew Coppin
The other day, I did a slightly foolish thing. I uttered the command cabal install gitit Actually, while I was foolish, it actually worked better than you'd think. It wanted to install several thousand billion packages, but all of them compiled without issue. Well, all except one. You

Re: [Haskell-cafe] Impredicative Types

2010-11-19 Thread Andrew Coppin
On 19/11/2010 08:09 PM, Simon Peyton-Jones wrote: read the QML paper! that's the trick. simpler, but with a heavier annotation burden than the more sophisticated approaches Use the Force, read the... citation? Hmm, doesn't have quite the same ring, does it? Use the Force, read the

Re: [Haskell-cafe] GitIt

2010-11-19 Thread Andrew Coppin
On 19/11/2010 08:32 PM, Judah Jacobson wrote: Two possible fixes come to mind: 1) In the .cabal file for cautious-file, it says: Flag posix description: Use POSIX-specific features default: True Ah. I hadn't seen this bit. Yes, what's probably happened is that I altered the build

[Haskell-cafe] Musings on type systems

2010-11-19 Thread Andrew Coppin
OK, so how do types actually work? Musing on this for a moment, it seems that declaring a variable to have a certain type constrains the possible values that the variable can have. You could say that a type is some sort of set, and that by issuing a type declaration, the compiler statically

[Haskell-cafe] Re: Haskell is a scripting language inspired by Python.

2010-11-12 Thread Andrew Coppin
On 11/11/2010 04:12 PM, Simon Marlow wrote: On 04/11/2010 22:38, Lennart Augustsson wrote: The smallest Haskell I know of is Gofer/Hugs; it originally ran on a 640k PCs. Before that languages like SASL and KRC ran on PDP-11 with 64k memory. None of these had a compiler that was bootstrapped,

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-12 Thread Andrew Coppin
On 11/11/2010 08:43 PM, Richard O'Keefe wrote: If length, map, and so on had always been part of a Sequence typeclass, people would not now be talking about We have a winner... It's always puzzled me that Haskell's standard containers almost completely lack any way to use them

Re: Better Records was Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-12 Thread Andrew Coppin
On 11/11/2010 11:48 PM, John Lask wrote: again quoting http://research.microsoft.com/en-us/um/people/simonpj/Haskell/records.html Haskell lacks a serious record system. (The existing mechanism for named fields in data types was always seen as a stop-gap measure.) isn't it about time this

Re: [Haskell-cafe] Serialization of (a - b) and IO a

2010-11-12 Thread Andrew Coppin
On 11/11/2010 08:07 PM, C. McCann wrote: Having a full serialization function without some restriction along those lines would be like renaming unsafePerformIO to runIO, moving it to Control.Monad.IO, and telling people hey, just don't misuse this and everything will be okay. There's been a

Re: [Haskell-cafe] Type Directed Name Resolution

2010-11-12 Thread Andrew Coppin
On 12/11/2010 08:33 PM, Malcolm Wallace wrote: On 12 Nov 2010, at 20:21, Andrew Coppin wrote: It's always puzzled me that Haskell's standard containers almost completely lack any way to use them polymorphically. On the contrary, there is the Edison package ...which sounds quite interesting

Re: [Haskell-cafe] Finding the contents of haskell platform?

2010-11-06 Thread Andrew Coppin
On 05/11/2010 09:05 PM, Stephen Tetley wrote: On 5 November 2010 20:08, Andrew Coppinandrewcop...@btinternet.com wrote: Would it be hard to replace - with a real Unicode arrow character? It should be quite easy - whether a given font has an arrow readily available is a different matter. I

Re: [Haskell-cafe] Finding the contents of haskell platform?

2010-11-05 Thread Andrew Coppin
On 05/11/2010 02:59 PM, Don Stewart wrote: The changelog now lists all the versions: http://hackage.haskell.org/platform/changelog.html This is quite optimal. It would still be nice if one could easily answer the question which HP release was the one that contained process-1.0.1.1,

Re: [Haskell-cafe] Re: Haskell is a scripting language inspired by Python.

2010-11-04 Thread Andrew Coppin
On 04/11/2010 02:16 PM, Jonathan Geddes wrote: Regardless of which languages got which features for which other languages, Haskell is surely NOT a scripting language inspired by python... Affirmative. It's a full-scale programming language (although I gather folks do use it for scripting

Re: [Haskell-cafe] Re: Haskell is a scripting language inspired by Python.

2010-11-04 Thread Andrew Coppin
On 04/11/2010 08:17 PM, Henning Thielemann wrote: On Thu, 4 Nov 2010, Andrew Coppin wrote: On a somewhat tangental note: It seems increadible to me that Haskell was invented in 1990, and Miranda way back in 1985. At the same time, Commodore Business Machines released the iconic Commodore 64

Re: [Haskell-cafe] Re: Haskell is a scripting language inspired by Python.

2010-11-04 Thread Andrew Coppin
On 04/11/2010 08:47 PM, Ketil Malde wrote: Andrew Coppinandrewcop...@btinternet.com writes: On a somewhat tangental note: It seems increadible to me that Haskell was invented in 1990, and Miranda way back in 1985. At the same time, Commodore Business Machines released the iconic Commodore 64

Re: [Haskell-cafe] Mysterious fact

2010-11-02 Thread Andrew Coppin
On 01/11/2010 10:40 PM, Jeremy Shaw wrote: Looks a lot like Church encoding to me: http://en.wikipedia.org/wiki/Church_encoding It was first discovered by the guy who invented lambda calculus :p Yes, well, the various Church encodings and the lambda calculus in general are where I got the

Re: [Haskell-cafe] Parsing workflow

2010-11-01 Thread Andrew Coppin
On 31/10/2010 04:15 PM, Nils Schweinsberg wrote: This is exactly what gives me headaches. It's hard to tell where you need try/lookAhead and where you don't need them. And I don't really feel comfortable wrapping everything into try blocks... I vaguely recall somebody mentioning a parser

[Haskell-cafe] Mysterious fact

2010-11-01 Thread Andrew Coppin
The other day, I accidentally came up with this: |{-# LANGUAGE RankNTypes #-} type Either x y= forall r. (x - r) - (y - r) - r left :: x - Either x y left x f g= f x right :: y - Either x y right y f g= g y | This is one example; it seems that just about any algebraic type can

Re: [Haskell-cafe] concurrency vs. I/O in GHC

2010-10-28 Thread Andrew Coppin
On 28/10/2010 09:25 AM, Erik Hesselink wrote: On Wed, Oct 27, 2010 at 23:09, Andrew Coppin andrewcop...@btinternet.com wrote: GHC has a _parallel_ GC implementation, meaning that the GC event runs in parallel on several cores. But it does not (yet) have _concurrent_ GC, meaning that a GC event

[Haskell-cafe] Edit Hackage

2010-10-28 Thread Andrew Coppin
Today I uploaded a package to Hackage, and rediscovered something that you already know: I'm an idiot. More specifically, I copied the Cabal description from another package and then updated all the fields. Except that I forgot to update one. And now I have a package which I've erroneously

Re: [Haskell-cafe] Red links in the new haskell theme

2010-10-28 Thread Andrew Coppin
On 28/10/2010 12:30 PM, Sebastian Fischer wrote: Maybe we can keep at least the docs without red links. Pick the Classic style in the style menu. It will remember your choice. Yes, at least with new Haddock you can *change* the style without having to actually patch (and recompile) Haddock

Re: [Haskell-cafe] concurrency vs. I/O in GHC

2010-10-27 Thread Andrew Coppin
On 27/10/2010 05:00 PM, John Lato wrote: I am somewhat surprised that all capabilities must be ready for GC; I thought with the parallel GC that wouldn't be necessary. But I don't know much about GC implementations so I try not to let their behavior surprise me too much. GHC has a

[Haskell-cafe] Where has GDK.GC gone?

2010-10-27 Thread Andrew Coppin
Today I noticed a small but interesting fact: Under Gtk2hs 0.10.x, the module Graphics.UI.Gtk re-exports (amoung countless others) the module Graphics.UI.Gtk.Gdk.GC. However, under Gtk2hs 0.11.x, it does not. After downloading the darcs repo (with took forever, by the way), I discovered that

Re: [Haskell-cafe] In what language...?

2010-10-26 Thread Andrew Coppin
On 25/10/2010 11:01 PM, Lauri Alanko wrote: On Mon, Oct 25, 2010 at 10:10:56PM +0100, Andrew Coppin wrote: Type theory doesn't actually interest me, I just wandered what the hell all the notation means. That sounds like an oxymoron. How could you possibly learn what the notation means without

Re: [Haskell-cafe] Parsec in Haskell platform

2010-10-26 Thread Andrew Coppin
On 26/10/2010 11:33 AM, Joachim Breitner wrote: Hi, Until this is offered in an official position, this might be helpful if you ignore the Debian-related columns: http://people.debian.org/~nomeata/platform.html That's quite useful. It doesn't list the version numbers for GHC itself or for

Re: [Haskell-cafe] In what language...?

2010-10-26 Thread Andrew Coppin
On 26/10/2010 07:54 PM, Benedict Eastaugh wrote: On 26 October 2010 19:29, Andrew Coppinandrewcop...@btinternet.com wrote: I don't even know the difference between a proposition and a predicate. A proposition is an abstraction from sentences, the idea being that e.g. Snow is white, Schnee ist

Re: [Haskell-cafe] Parsec in Haskell platform

2010-10-25 Thread Andrew Coppin
On 25/10/2010 03:49 PM, Brandon S Allbery KF8NH wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/24/10 06:59 , Andrew Coppin wrote: now I can't seem to find it. Instead, I had to navigate to the Unix download page, download the source tarball, untar it (non-trivial under Windows

Re: [Haskell-cafe] In what language...?

2010-10-25 Thread Andrew Coppin
On 15/10/2010 09:42 PM, Gregory Collins wrote: Andrew Coppinandrewcop...@btinternet.com writes: Does anybody have any idea which particular dialect of pure math this paper is speaking? (And where I can go read about it...) It's pretty garden-variety programming language/type theory.

Re: [Haskell-cafe] Parsec in Haskell platform

2010-10-24 Thread Andrew Coppin
On 24/10/2010 09:10 AM, Roman Cheplyaka wrote: It would be convenient to have a page which would list all the HP packages with their versions. The release page [2] only has a list of packages whose versions has changed since the last release, as I understood. It would be nice to have a page

Re: [Haskell-cafe] Parsec in Haskell platform

2010-10-24 Thread Andrew Coppin
On 24/10/2010 11:10 AM, Johan Tibell wrote: On Sun, Oct 24, 2010 at 11:57 AM, Andrew Coppin andrewcop...@btinternet.com wrote: It would be nice to have a page that lists everything included in every HP release, together with their version numbers. (So that, e.g., I can see at a glance what

Re: [Haskell-cafe] JavaScript in a browser as a Windows GUI?

2010-10-22 Thread Andrew Coppin
On 21/10/2010 07:00 PM, Jeremy Shaw wrote: But, you are correct that happstack does not currently have support for running CGI executables. I imagine that you could write a CGI handler (with out modifying the core code) in a few hours (maybe less). Mostly just a matter of turning the values in

Re: [Haskell-cafe] JavaScript in a browser as a Windows GUI?

2010-10-21 Thread Andrew Coppin
On 21/10/2010 01:28 AM, Anton van Straaten wrote: Andrew Coppin wrote: I'd like to have a go at writing CGI in Haskell. ... Does anybody know of a solution that works on Windows? I've previously run Happstack on Windows. That was a couple of years ago, though, so I don't know whether its

Re: [Haskell-cafe] JavaScript in a browser as a Windows GUI?

2010-10-20 Thread Andrew Coppin
On 20/10/2010 09:48 PM, Anton van Straaten wrote: It's pretty easy to get the basics going. There are a bunch of options. Start here: http://www.haskell.org/haskellwiki/Web For what you're asking about, I'd suggest looking at the following options from that page. All of these options

Re: [Haskell-cafe] Haskellers.com skills list moderation?

2010-10-19 Thread Andrew Coppin
On 18/10/2010 09:59 PM, Magnus Therning wrote: On 18/10/10 21:56, Andrew Coppin wrote: ...I thought *I* was the only person who's ever heard of Rexx? Every amiga user is very likely to have heard of rexx, as a close relative to it was included in AmigaOS at some point. ...and I had

Re: [Haskell-cafe] Haskellers.com skills list moderation?

2010-10-18 Thread Andrew Coppin
On 18/10/2010 07:47 PM, Daniel Peebles wrote: Hi all, Might it be worthwhile to take the elected superusers on haskellers.com http://haskellers.com and let them police the skills list? It's become rather messy, with overly broad terms like Mathematics in it, as well as overly specific ones

Re: [Haskell-cafe] An interesting paper on VM-friendly GC

2010-10-16 Thread Andrew Coppin
On 15/10/2010 11:50 PM, Gregory Crosswhite wrote: On 10/15/2010 03:15 PM, Andrew Coppin wrote: On the other hand, their implementation uses a modified Linux kernel, and no sane person is going to recompile their OS kernel with a custom patch just to run Haskell applications, so we can't do

Re: [Haskell-cafe] A rant against the blurb on the Haskell front page

2010-10-16 Thread Andrew Coppin
On 16/10/2010 09:02 AM, Stephen Tetley wrote: On 16 October 2010 08:09, Colin Paul Adamsco...@colina.demon.co.uk wrote: And purely functional programming language? If they mean anything to many people, it's that the language works (i.e. functions). What language wouldn't work? I think Ben

Re: [Haskell-cafe] Strict Core?

2010-10-16 Thread Andrew Coppin
On 16/10/2010 09:57 AM, Max Bolingbroke wrote: I do not have plans to add it. I think it would be worth it - perhaps worth a few % points in runtime - but I've started researching supercompilation instead, which has more impressive effects :-) From what I've seen, strict core makes several

[Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Andrew Coppin
http://k1024.org/~iusty/papers/icfp10-haskell-reagent.pdf I'm sure some of you have seen this already. For those who lack the time or inclination to read through the (six) pages of this report, here's the summary... We [i.e., the report authors] took a production Python system and rewrote

[Haskell-cafe] In what language...?

2010-10-15 Thread Andrew Coppin
Yesterday I read a rather interesting paper: http://www.cl.cam.ac.uk/~mb566/papers/tacc-hs09.pdf It's fascinating stuff, and I *think* I understand the gist of what it's saying. However, the paper is utterly festooned with formulas that look so absurdly over-the-top that they might almost be

Re: [Haskell-cafe] Strict Core?

2010-10-15 Thread Andrew Coppin
On 15/10/2010 10:27 PM, Gregory Crosswhite wrote: Hey everyone, Out of curiosity, are there any plans for GHC to eventually use the Strict Core language described in http://www.cl.cam.ac.uk/~mb566/papers/tacc-hs09.pdf? Is that because I just mentioned the paper? Regardless, I'd be quite

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Andrew Coppin
On 15/10/2010 10:43 PM, Iustin Pop wrote: On Fri, Oct 15, 2010 at 09:28:09PM +0100, Andrew Coppin wrote: http://k1024.org/~iusty/papers/icfp10-haskell-reagent.pdf I'm sure some of you have seen this already. For those who lack the time or inclination to read through the (six) pages

[Haskell-cafe] An interesting paper on VM-friendly GC

2010-10-15 Thread Andrew Coppin
Somebody showed me this the other day, and I thought it was interesting: http://www.cs.umass.edu/~emery/pubs/f034-hertz.pdf Basically, we designed a garbage collector which tries to avoid touching memory pages that have been swapped out to disk just because we need to do a GC sweep. Which is

Re: [Haskell-cafe] Strict Core?

2010-10-15 Thread Andrew Coppin
On 15/10/2010 11:10 PM, Gregory Crosswhite wrote: Yes, I had seen this paper before and wondered the same thing at the time, but it was only just now when you brought the paper up that I realized I could ask people about it here. :-) I wonder if anybody has a list somewhere of really cool

Re: [Haskell-cafe] An interesting paper from Google

2010-10-15 Thread Andrew Coppin
On 15/10/2010 11:18 PM, Iustin Pop wrote: I know about zipWith. And if the profile tells me I spend too much time in zipWith, it means a few things: - zipWith might have to force evaluation of the results, hence the incorrect attribution of costs - if even after that zipWith is the culprit,

Re: [Haskell-cafe] Coding conventions for Haskell?

2010-10-01 Thread Andrew Coppin
On 30/09/2010 02:56 PM, Henning Thielemann wrote: Andrew Coppin schrieb: On 29/09/2010 02:18 PM, Henning Thielemann wrote: The truth is: Given the separator style of constructor definition, there is no correct way to format those declarations. :-) The correct way would be to allow

Re: [Haskell-cafe] Coding conventions for Haskell?

2010-09-29 Thread Andrew Coppin
On 29/09/2010 02:18 PM, Henning Thielemann wrote: Andrew Coppin wrote: Tastes do indeed vary. To me, both of these are incorrect, and the correct way is data Foo a b = Fooa | Bar b | Foobar a b deriving (Eq, Ord) The truth is: Given the separator style

Re: [Haskell-cafe] I still cannot seem to get a GUI working under Windows.

2010-09-29 Thread Andrew Coppin
On 29/09/2010 07:33 PM, Steve Schafer wrote: The issue isn't that there aren't a lot of Windows developers who have an interest in Haskell+GUI development. The issue is that nearly every Windows developer who looks into Haskell+GUI says, This stuff sucks, and walks away, because they're

Re: [Haskell-cafe] Coding conventions for Haskell?

2010-09-27 Thread Andrew Coppin
On 27/09/2010 02:44 PM, Daniel Fischer wrote: On Monday 27 September 2010 14:52:18, Henning Thielemann wrote: data Foo a b = Fooa | Bar b | Foobar a b avoids this, at least for the type name Foo. Tastes vary, but I find that ugly. I much rather have the '=' aligned

Re: [Haskell-cafe] capture of idioms and patterns

2010-09-23 Thread Andrew Coppin
On 22/09/2010 09:14 AM, Luc TAESCH wrote: in real life I am doing architecture (appication and system) and I tend to see things differently with my haskell background. when reading what system XYZ does, I see folds, maps, lazy sort, memoisation , monads, etc...ie my mind apply idioms learned

Re: [Haskell-cafe] Re: capture of idioms and patterns

2010-09-23 Thread Andrew Coppin
On 22/09/2010 10:20 AM, Johannes Waldmann wrote: - are there any prior art in documenting idioms and patterns in FP [...] you got this backwards: what some folks call idioms and (design) patterns actually *is* FP, because it is just this: higher order functions. And it's been there some

Re: [Haskell-cafe] Web development work

2010-09-16 Thread Andrew Coppin
On 16/09/2010 08:52 AM, Michael Snoyman wrote: Hi all, Often times when trying to pitch Haskell to potential clients the concern is the lack of qualified developers willing to take on projects. As I'm sure many of you are familiar with, clients prefer not to be locked in to a single

Re: [Haskell-cafe] Haddock again

2010-09-13 Thread Andrew Coppin
Andrew Coppin wrote: Also, I commented that the links generated were broken, but it appears that if you have a sufficiently new version of Haddock, the links work just fine. (In other words, this particular bug is already fixed.) Heh, nope. The correct information is actually this: It *always

Re: [Haskell-cafe] benchmarking c/c++ and haskell

2010-09-12 Thread Andrew Coppin
Vo Minh Thu wrote: Hi, I would like to benchmark C/C++ and Haskell code. The goal is to improve the Haskell port[0] of smallpt[1]. To make sure my approach was reliable, I got the code of two programs (one in C, the other in Haskell) from a post[2] by Don. The code is reproduced below. When

[Haskell-cafe] Haddock again

2010-09-11 Thread Andrew Coppin
Some time ago (I can't find the thread now), I wrote about the fun and games I had with Haddock. After much experimentation, I have discovered that if you have a sufficiently new version of cabal-install, the configuration file has a field entitled document-index: or similar. If you uncomment

Re: [Haskell-cafe] Haddock again

2010-09-11 Thread Andrew Coppin
Andrew Coppin wrote: After much experimentation, I have discovered that if you have a sufficiently new version of cabal-install, the configuration file has a field entitled document-index: or similar. If you uncomment this and use its default value, you get a documentation index generated

[Haskell-cafe] Relative files paths

2010-09-11 Thread Andrew Coppin
Suppose that I'm in foo/bar/box1/top and I want to access a file in foo/bar/box2/side. How do I construct the shortest possible relative path from one to the other? The filepath package doesn't seem to provide a function to do this. (The correct answer is obviously ../../box2/side in this

Re: [Haskell-cafe] help me evangelize haskell.

2010-09-05 Thread Andrew Coppin
Michael Litchard wrote: I'll be starting a new job soon as systems tool guy. The shop is a perl shop as far as internal automation tasks go. But I am fortunate to not be working with bigots. If they see a better way, they'll take to it. So please give me your best arguments in favor of using

Re: [Haskell-cafe] Missing documentation in Haskell Platform on Windows

2010-09-03 Thread Andrew Coppin
Don Stewart wrote: andrewcoppin: Almost every release of GHC that I can remember has had the links for the mtl package broken. (The Control.Monad.XXX modules are mostly from mtl. But, for example, Control.Monad.Fix is from base. I bet you'll find it works just fine.) Well

Re: [Haskell-cafe] Missing documentation in Haskell Platform on Windows

2010-09-02 Thread Andrew Coppin
Arnaud Bailly wrote: Hello, I installed (succesfully) HAskell Platform 2010.2 on windows and have a small but annoying issue: Some links in HTML documentation lead to broken links. I did not investigate all the links, but I have seen that all doc under Control.Monad.XXX is missing. What am I

<    1   2   3   4   5   6   7   8   9   10   >