[Haskell-cafe] Re: Getting my feet wet - small browser game

2006-12-20 Thread Joachim Durchholz
Marc A. Ziegert schrieb: software upgrades: use Read/Show classes instead of Foreign.Marshal, I'm having second thoughts here. Wouldn't Show evaluate all thunks of the data Shown? That would mean I couldn't use infinite data structures in data that goes out to disk. I don't think this would

Low-level Haskell profiling [Was: Re: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project]

2006-12-20 Thread Andy Georges
Hi, The GHC head can currently build against PAPI[1], a library for gathering CPU statistics. I did not know that. I know PAPI, though I prefer using perfctr directly, at least for what I'm doing (stuff in a JVM) [1], [2], [3]. At the moment you can only gather such statistics for AMD

[Haskell-cafe] Versioning

2006-12-20 Thread Joachim Durchholz
As written in my other post, I will need to update data structures that were marshalled to disk. Now I'm wondering how to best prepare for the situation. E.g. one of the common situations is that a single data item gets replaced by a list of items. Now assume that there's a SomeData type

Re: [Haskell-cafe] Re: Getting my feet wet - small browser game

2006-12-20 Thread Donald Bruce Stewart
jo: Marc A. Ziegert schrieb: software upgrades: use Read/Show classes instead of Foreign.Marshal, I'm having second thoughts here. Wouldn't Show evaluate all thunks of the data Shown? That would mean I couldn't use infinite data structures in data that goes out to disk. Btw, if you're

Re[2]: [Haskell-cafe] Re: A suggestion for the next high profile Haskell project

2006-12-20 Thread Bulat Ziganshin
Hello ls-haskell-developer-2006, Tuesday, December 19, 2006, 9:32:13 PM, you wrote: why you (and Donald) don't want to understand me. i say that imperative Haskell code is more efficient Second: Bulat, I think your generalization is, that performance matters so much and all the time i

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread Bulat Ziganshin
Hello Imam, Wednesday, December 20, 2006, 6:53:35 AM, you wrote: * clean categorical hierarchy of type classes i've tried to write alternative Base library. one caveat is that you can't redefine standard classes, such as Num, without changing ghc itself -- Best regards, Bulat

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-20 Thread Henning Thielemann
On Tue, 19 Dec 2006, Neil Mitchell wrote: () -- 0 element tuple (,) a b -- 2 element tuple (,,) a b c -- 3 element tuple The problem is that the separator approach (comma) doesn't scale well: http://haskell.org/haskellwiki/Terminator_vs._separator

Re: [Haskell-cafe] A suggestion for the next high profile Haskell project

2006-12-20 Thread Henning Thielemann
On Mon, 18 Dec 2006, Bulat Ziganshin wrote: Monday, December 18, 2006, 4:46:16 PM, Henning Thielemann wrote: Very true. I really like to know some more clean tricks for speedup. use C. seriously :) I followed the thread, hoping for a reference to an existing tutorial or an announcement

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread Henning Thielemann
On Tue, 19 Dec 2006, Imam Tashdid ul Alam wrote: hi guys, I was just wondering if anyone is interested is a quasi-project of rewriting the Prelude (only shrinking it as measured by the total number of names imported, read along...) There is a hybrid Java-Haskell language which also

Re: [Haskell-cafe] Versioning

2006-12-20 Thread Neil Mitchell
Hi Jo, You seem to be describing SYB and not knowing it: http://homepages.cwi.nl/~ralf/syb1/ That basically does exactly what you've requested, in terms of traversing all items when only one matters. That said, serialisation is still a hard problem - think long and hard before picking a data

Re: [Haskell-cafe] Re: Getting my feet wet - small browser game

2006-12-20 Thread Neil Mitchell
Hi Btw, if you're dumping large structures to disk, using Read/Show is a bad idea :) Just as a mention how bad it is, maybe 30 times at Show and 50 times at Read. I used to use this approach, moving away from it and learning how to use Drift was a good idea. Thanks Neil

[Haskell-cafe] RE: New Layout Rule take 2

2006-12-20 Thread Simon Marlow
[EMAIL PROTECTED] wrote: I have made some improvements to the algorithm, and I am happy to say that with some minor tweaks, it correctly lays out the programs in the nofib suite. the algorithm is not much more complicated than the current one in the report, but doesn't have the parse-error

[Haskell-cafe] Re: [Haskell] Haskell Weekly News: December 20, 2006

2006-12-20 Thread Arthur van Leeuwen
On 20-dec-2006, at 2:17, Donald Bruce Stewart wrote: -- - Haskell Weekly News http://sequence.complete.org/hwn/20061220 Issue 54 - December 20, 2006

RE: [Haskell-cafe] Success with Takusen (was: Type problem with simpletakusen code)

2006-12-20 Thread Bayley, Alistair
To build a program, you need to do ghc --make db.hs -o db D:\Oracle\Ora92\bin\oci.dll (put the path to your oci.dll here). This compiles your program, and links it with oci.dll to get the Oracle externals resolved. I've been working with Paul on his linking problems, and there's a

Re: [Haskell-cafe] FD problem in GHC 6.6

2006-12-20 Thread Robert Dockins
On Dec 19, 2006, at 10:11 PM, Dan Weston wrote: instance CommandFunction (Sh st ()) st where ^ I think your first argument (on which the second has a functional dependence) does not determine the second argument, since it makes use of st in the first

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread Brian Hulley
Imam Tashdid ul Alam wrote: hi guys, I was just wondering if anyone is interested is a quasi-project of rewriting the Prelude (only shrinking it as measured by the total number of names imported, read along...) the idea is (just to be substantially different in approach) to develop an alternate

Re: [Haskell-cafe] Success with Takusen (was: Type problem with simpletakusen code)

2006-12-20 Thread Paul Moore
On 12/20/06, Bayley, Alistair [EMAIL PROTECTED] wrote: To build a program, you need to do ghc --make db.hs -o db D:\Oracle\Ora92\bin\oci.dll (put the path to your oci.dll here). This compiles your program, and links it with oci.dll to get the Oracle externals resolved. I've been

[Haskell-cafe] multi parameter type classes for NP problems

2006-12-20 Thread Joshua Ball
Hi all, For my own study, I've been playing around with various NP complete problems. Previuosly I was doing so in Java, but because I want to learn Haskell, I'm trying to port the algorithms. In Java, I had an abstract class called AbstractNPProblem which looked like this: public abstract

Re: [Haskell-cafe] FD problem in GHC 6.6

2006-12-20 Thread Iavor Diatchki
Hi, I don't have a solution for you problem (besides using undecidable instances) but I can explain the coverage condition. On 12/19/06, Robert [EMAIL PROTECTED] wrote: class CommandFunction f st | f - st where parseCommand :: String - f - CommandParser st commandSyntax :: f - [Doc] The

[Haskell-cafe] Re: Versioning

2006-12-20 Thread Joachim Durchholz
Neil Mitchell schrieb: You seem to be describing SYB and not knowing it: http://homepages.cwi.nl/~ralf/syb1/ That basically does exactly what you've requested, in terms of traversing all items when only one matters. Yup, that's exactly what I was looking for. Actually I had seen it a while

Re: [Haskell-cafe] multi parameter type classes for NP problems

2006-12-20 Thread Greg Buchholz
Joshua Ball wrote: Here is how I am trying to solve the problem, using multi-parameter type classes. class NPProblem inst cert where validates :: cert - inst - Bool certificates :: inst - [cert] decide :: inst - Bool decide i = any (\x - x `validates` i) $ certificates i

Re: [Haskell-cafe] Re: Versioning

2006-12-20 Thread Ross Paterson
On Wed, Dec 20, 2006 at 07:30:02PM +0100, Joachim Durchholz wrote: Neil Mitchell schrieb: You seem to be describing SYB and not knowing it: http://homepages.cwi.nl/~ralf/syb1/ That basically does exactly what you've requested, in terms of traversing all items when only one matters. Yup,

Re: [Haskell-cafe] #haskell irc channel reaches 300 users

2006-12-20 Thread Henk-Jan van Tuyl
Nice to know! Can anybody tell me, how many people have subscribed to the Haskell Cafe mailing list? What is the growth? How many people visit haskell.org? On Tue, 19 Dec 2006 03:04:43 +0100, Donald Bruce Stewart [EMAIL PROTECTED] wrote: A small announcement :) 5 years after its

[Haskell-cafe] Re: Versioning

2006-12-20 Thread Joachim Durchholz
Ross Paterson schrieb: It might be not feasible though. The papers mention that you can't serialize (well, actually unserialize) function values with it. For the envisioned update-through-marshalling process, this would prevent me from ever using function values in data that needs to be

Re: [Haskell-cafe] YAHT bug

2006-12-20 Thread Eric Y. Kow
Hi, The page says this was corrected in the wikibook, but it seems not to have been fixed in the darcs repository at haskell.org. Sorry for that. I still haven't worked out a smart way to update the darcs repository from the wikibook. I'm thinking of versioning a copy of the wiki pages with

Re: [Haskell-cafe] Re: Versioning

2006-12-20 Thread Robert Dockins
On Dec 20, 2006, at 2:37 PM, Joachim Durchholz wrote: Ross Paterson schrieb: It might be not feasible though. The papers mention that you can't serialize (well, actually unserialize) function values with it. For the envisioned update-through-marshalling process, this would prevent me

[Haskell-cafe] Re: Versioning

2006-12-20 Thread Joachim Durchholz
Robert Dockins schrieb: Let me just say here that what you are attempting to do sounds very difficult. As I understand, you want to be able to serialize an entire application at some (predetermined / arbitrary?) point, change some of its code and/or data structures, de-serialize and run the

[Haskell-cafe] How to serialize thunks?

2006-12-20 Thread Joachim Durchholz
I have skimmed the serialization libraries on haskell.org (NewBinary, SerTH, AltBinary, HsSyck, GenericSerialize). I'm under the impression that these all force the data that they serialize. Is that correct? If yes: are there workarounds? I'd really like to be able to use infinite data

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread Diego Navarro
take map for example, and fmap, I don't think they should be named different (fmap is ugly, not suggestive, and conceptually the same). mplus could be renamed (++) (they are conceptually the same Wouldn't this raise the same problems monad comprehensions raise? Worse yet, beginners can't start

Re: [Haskell-cafe] Origins of (x:xs)?

2006-12-20 Thread Doug Quale
Paul Hudak [EMAIL PROTECTED] writes: As for x:xs, the xs is meant to be the plural of x, and is pronounced exs (I guess...). Similarly, n:ns is one n followed by many more ens. Make sense? I think this convention is often used in the Prolog community as well, as in X|Xs. -- Doug Quale

Re: [Haskell-cafe] multi parameter type classes for NP problems

2006-12-20 Thread Joshua Ball
That works. Thanks. I didn't realize you could put types in the expression itself. On 12/20/06, Greg Buchholz [EMAIL PROTECTED] wrote: Joshua Ball wrote: Here is how I am trying to solve the problem, using multi-parameter type classes. class NPProblem inst cert where validates :: cert -

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread Greg Fitzgerald
Wouldn't this raise the same problems monad comprehensions raise? The do-notation isn't specific to IO, yet it is the only thing beginners use it for. Do beginners have noticeably more trouble with the do-notation errors than list comprehension errors? As someone who learned Haskell fairly

[Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Ashley Yakeley
Since learning Haskell, I can now count in Spanish! See: one in Spanish, two in Spanish, three in Spanish, four in Spanish.. -- Ashley Yakeley ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Bernie Pope
I thought this email might be interesting for the Spanish speaking part of the Haskell community, so I have written it in Spanish for them: (Since learning Haskell, I can now count in Spanish! See: one in Spanish, two in Spanish, three in Spanish, four in Spanish.. -- Ashley Yakeley)

Re: [Haskell-cafe] Re: Versioning

2006-12-20 Thread Neil Mitchell
Hi With Yhc.Core I used Drift to derve Binary instances, keep a version tag, and if the version tags mismatch refuse to load the data. Links? http://repetae.net/~john/computer/haskell/DrIFT/ http://darcs.haskell.org/yhc/src/libraries/general/Yhc/General/Binary.hs Thats Drift which can

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread jerzy . karczmarczuk
Bernie Pope writes: I thought this email might be interesting for the Spanish speaking part of the Haskell community, so I have written it in Spanish for them: (Since learning Haskell, I can now count in Spanish! See: one in Spanish, two in Spanish, three in Spanish, four in

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Jason Dagit
Am I the only one that doesn't get it? Jason On 12/20/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Bernie Pope writes: I thought this email might be interesting for the Spanish speaking part of the Haskell community, so I have written it in Spanish for them: (Since learning Haskell, I

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Dan Piponi
On 12/20/06, Bernie Pope [EMAIL PROTECTED] wrote: (Since learning Haskell, I can now count in Spanish! See: one in Spanish, ... Ashley Yakeley) in Spanish I notice you're using the assumption that Spanish is a Monad so that Double Spanish can be mapped back into Spanish.

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread J. Garrett Morris
On 12/20/06, Diego Navarro [EMAIL PROTECTED] wrote: take map for example, and fmap, I don't think they should be named different (fmap is ugly, not suggestive, and conceptually the same). mplus could be renamed (++) (they are conceptually the same Wouldn't this raise the same problems

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-20 Thread John Meacham
have it be ( ) 1 with a space between the parens to denote that it is a single tuple rather than a nullary one. John -- John Meacham - ⑆repetae.net⑆john⑈ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Bryan Burgers
On 12/20/06, Jason Dagit [EMAIL PROTECTED] wrote: Am I the only one that doesn't get it? Jason No, you are not the only one that doesn't get it. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Brian Hulley
Ashley Yakeley wrote: Since learning Haskell, I can now count in Spanish! See: one in Spanish, two in Spanish, three in Spanish, four in Spanish.. Is there a solution ie some concept C such that C Haskell C Spanish, somewhere? Thanks, Brian. -- http://www.metamilk.com

[Haskell-cafe] Re: Shrinking the Prelude: The categorical approach

2006-12-20 Thread Imam Tashdid ul Alam
so the main issues are these: Bulat Ziganshin raised: Num is intrinsically bound to the compiler. sad. so let's leave Num out. this basically means we will avoid abstract algebra in general. that is, forget groups, rings, for now, the principle focus will be functor, monad... Henning Thielemann

Re: [Haskell-cafe] Haskell Side Effect

2006-12-20 Thread Murray Gross
On Wed, 20 Dec 2006, Bryan Burgers wrote: On 12/20/06, Jason Dagit [EMAIL PROTECTED] wrote: Am I the only one that doesn't get it? Jason But your question on it clearly implies that you did get it. Murray Gross ___ Haskell-Cafe mailing list