Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Bill Wood
On Mon, 2007-09-03 at 07:46 +0100, Andrew Cheadle wrote: . . . > Incidentally, we've often seen a lot of traffic on here about Sudoku > solvers and I've always wanted to post the ECLiPSe solution > (neat when you consider the length of the sudoku/2 predicate ;-) : Reasonably quick, too -- 50 s

Re: [Haskell-cafe] Haskell as an extension language

2007-09-02 Thread ajb
G'day all. Quoting Hugh Perkins <[EMAIL PROTECTED]>: However, using Swig etc to join Python to C++ takes a significant amount of time, [...] Supposedly, Boost.Python is pretty good. Then I discovered a different language (not Haskell) that combined the ease of Python with the speed of C++.

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread ajb
G'day all. Quoting Bill Wood <[EMAIL PROTECTED]>: As to whether Prolog is "dead" or not, it depends on your definition of "dead". Three years ago (not ten!) I made my living maintaining and developing a large application written in Prolog. Back when I was doing logic programming, 10 or so ye

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Andrew Cheadle
It's fairly correct and up-to-date although I note that the constraint example 'send more money' given is stated as 'Prolog' when it really uses ECLiPSe Prolog constraint syntax (alldifferent/1, labelling/1 and '#' integer constraints): If you're really interested in constraint based languages

[Haskell-cafe] Re: Haskell as an extension language

2007-09-02 Thread Yuri D'Elia
In article <[EMAIL PROTECTED]>, "Hugh Perkins" <[EMAIL PROTECTED]> wrote: > However, using Swig etc to join Python to C++ takes a significant > amount of time, and one needs project members now to learn two > languages. That's a non-issue in my context. The first real problem is wasting time ge

[Haskell-cafe] APLAS07 - Call for Participation

2007-09-02 Thread Shin-Cheng Mu
Call for Participation The Fifth Asian Symposium on Programming Languages and Systems November 29 - December 1, 2007 Singapore http://www.comp.nus.edu.sg/~aplas07/ http://flint

Re: [Haskell-cafe] Re: Bi-directional Maps

2007-09-02 Thread Hugh Perkins
Just noticed, erlang has the second kind of bimap (a "bijection"?) built into each process: >From http://www.erlang.org/doc/reference_manual/processes.html : "10.9 Process Dictionary Each process has its own process dictionary, accessed by calling the following BIFs: put(Key, Value) get(Key) ge

Re: [Haskell-cafe] GHC 6.6.1 and SELinux issues

2007-09-02 Thread Bertram Felgenhauer
Alexander Vodomerov wrote: > On Wed, Aug 29, 2007 at 01:03:56PM -0700, Stefan O'Rear wrote: [snip] > What is so special about wrapper and dynamic functions? > > Can you please give some ideas how self-modifying code can be used in > FFI implementation? It's not self-modifying code really, it's dy

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Hugh Perkins
> (BTW I thought the FFI for Forth was the Forth assembler; have things > changed since FIG/F83?) I didnt have a real PC, just a ZX Spectrum. It wasnt real Forth, just Spectrum Forth. It was kindof fun, but a little disappointing not to be able to do anything useful with it. Well, I wanted to w

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Bill Wood
On Mon, 2007-09-03 at 07:43 +0800, Hugh Perkins wrote: > On 9/3/07, Derek Elkins <[EMAIL PROTECTED]> wrote: > > Because no one has said it quite this way: > > The modern equivalent of Prolog is Prolog. I was just about to say the same thing :-); thanks, Derek. . . . > (btw, just thought, when

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Hugh Perkins
On 9/3/07, Derek Elkins <[EMAIL PROTECTED]> wrote: > Because no one has said it quite this way: > The modern equivalent of Prolog is Prolog. Ok, thanks. Just wanted to check that. (btw, just thought, when I was talking about FFI, probably meant Forth, not Prolog. FFI for Prolog probably isnt th

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Hugh Perkins
On 9/3/07, Adrian Hey <[EMAIL PROTECTED]> wrote: > The popularity of MS > Winders or Office Suite are the obvious examples. We all know why these > are used on 95% or whatever of the worlds PCs, and it has nothing > whatever to do with quality. Oh come on. You've been reading waaayyy too much Sla

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Derek Elkins
On Sun, 2007-09-02 at 22:52 +0800, Hugh Perkins wrote: > Sooo.. what is the modern equivalent of Prolog? Because no one has said it quite this way: The modern equivalent of Prolog is Prolog. Most of the advancement in logic programming has either been folded back into Prolog or has been advanced

Re: [Haskell-cafe] Haskell as an extension language

2007-09-02 Thread Hugh Perkins
Off-topic, so stop reading now if you want ;-) , but reminds me of my experience using Python and C++. Python and C++ are both great languages, with their own strengths, and one might think that combining thing gets the best of both. However, using Swig etc to join Python to C++ takes a significa

[Haskell-cafe] Re: Learn Prolog...

2007-09-02 Thread Benjamin Franksen
Hugh Perkins wrote: > Sooo.. what is the modern equivalent of Prolog? I once learned about LIFE (Logic, Inheritance, Functions, and Equations) and was deeply fascinated. However, it died the quick death of most research languages. Cheers Ben ___ Haske

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Chaddaï Fouché
2007/9/2, Adrian Hey <[EMAIL PROTECTED]>: > Other meaningless measures that have been suggested are the rate of > patch submissions of the number of developers involved. I seem to > remember someone recently suggesting that libraries that score highly > in on this regard should be elevated to "bles

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Peter Verswyvelen
Jerzy Karczmarczuk wrote > Perhaps somebody can say more about constraint languages which replaced Yes please! Of example, how correct is http://en.wikipedia.org/wiki/Constraint_programming? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org h

Re: [Haskell-cafe] Extending the idea of a general Num to other types?

2007-09-02 Thread Peter Verswyvelen
Snif, this is sad... :-( Oh well, maybe this gets improved in Haskell Prime ;-) Lennart Augustsson wrote: You're right. The list syntax is only for lists in Haskell. It would be nice if the list syntax was overloaded too. You can overload numeric literals (by defining fromInteger) and str

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Adrian Hey
Hugh Perkins wrote: A really simple way to track the "quality" of a package is to display the number of downloads. A posteriorae, this works great in other download sites. We can easily hypothesize about why a download count gives a decent indication of some measure of quality: - more people do

Re: [Haskell-cafe] GHC 6.6.1 and SELinux issues

2007-09-02 Thread Alexander Vodomerov
On Wed, Aug 29, 2007 at 01:03:56PM -0700, Stefan O'Rear wrote: > > So it is not clear if GHC does really need this PROT_EXEC. Can someone > > familiar with GHC internals answer why PROT_EXEC is used in getMBlocks? > > It's not possible to correctly implement 'foreign import ccall > "wrapper"' wit

Re: [Haskell-cafe] interaction between OS processes

2007-09-02 Thread Albert Y. C. Lai
Albert Y. C. Lai wrote: It is similar to saying, if you use Haskell, you don't have to learn dependent typing. Ah, but knowing dependent typing informs you of certain typing issues and how to use the Haskell type system more successfully. This is despite tutorials on dependent typing talk about

Re: [Haskell-cafe] interaction between OS processes

2007-09-02 Thread Albert Y. C. Lai
Bryan O'Sullivan wrote: Your problem may be buffering-related (I haven't read your code to check), but if so, there's a fair likelihood that it has nothing to do with the OS. GHC's runtime does its own buffer management on Handles. It's quite possible that your deadlock lies at that level, rat

[Haskell-cafe] Haskell as an extension language

2007-09-02 Thread Yuri D'Elia
Hello everyone; I've been using haskell for quite some time now, but, as usual, I still find myself resorting to c code too much often due to the performance penalty introduced. FFI is all nice and dandy, yet, the need to compile the code and separate the implementation in two is a mayor develo

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Hans van Thiel
On Sun, 2007-09-02 at 08:24 -0500, Bill Wood wrote: > As to whether Prolog is "dead" or not, it depends on your definition of > "dead". Three years ago (not ten!) I made my living maintaining and > developing a large application written in Prolog. That was actually an > interesting experience, si

Re: [Haskell-cafe] GHC-API: a few questions

2007-09-02 Thread Andrea Rossato
On Sun, Sep 02, 2007 at 04:09:11PM +0200, Andrea Rossato wrote: > Hi, > > I'm trying to acquire some confidence with the GHC-API and I'm having > some problems, related to error handling, I seem not be able to solve. It's always like this: you finally give up, ask for help in the haskell-cafe, go

Re: [Haskell-cafe] Ideas

2007-09-02 Thread Sven Panne
On Saturday 25 August 2007 20:49, Andrew Coppin wrote: > [...] Would be nice if I could build something in Haskell that overcomes > these. OTOH, does Haskell have any way to talk to the audio hardware? Depending on what you are exactly trying to do, the OpenAL/ALUT packages might be of interest.

Re: [Haskell-cafe] Extending the idea of a general Num to other types?

2007-09-02 Thread Lennart Augustsson
You're right. The list syntax is only for lists in Haskell. It would be nice if the list syntax was overloaded too. You can overload numeric literals (by defining fromInteger) and string literals (by defining fromString, in 6.7). BTW, the [1..10] syntax is overloaded, you need an Enum instance.

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread jerzy . karczmarczuk
Hugh Perkins writes: Sooo.. what is the modern equivalent of Prolog? Well, first, I wouldn't agree entirely that Prolog is "not modern". Anyway... If you want something wih more bells and whistles, modularity, coroutining, more security (less power, e.g. no program auto-modification), etc.,

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Hugh Perkins
Sooo.. what is the modern equivalent of Prolog? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] GHC-API: a few questions

2007-09-02 Thread Andrea Rossato
Hi, I'm trying to acquire some confidence with the GHC-API and I'm having some problems, related to error handling, I seem not be able to solve. Basically there are 3 functions to (interactively) compile/run Haskell expressions: compileExpr, dyCompileExpr and runStmt. The first 2 will return the

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Andrew Coppin
[EMAIL PROTECTED] wrote: Andrew Coppin writes: Ever tried implementing Haskell in Haskell? ;-) Seriously: Haskell is a *complicated* language, needing a parser, which by itself is a non-trivial exercice. It looks so simple on the surface... [Actually, so does cold fusion.] Read my whole me

Re: [Haskell-cafe] interaction between OS processes

2007-09-02 Thread Bryan O'Sullivan
Andrea Rossato wrote: Most likely, the content of s sits in a local buffer and never leaves this process, following most OS conventions and as others point out. Another process waiting for it will deadlock. Yes, I knew it was something related to the underneath OS. I'll have to study Unix

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Bill Wood
As to whether Prolog is "dead" or not, it depends on your definition of "dead". Three years ago (not ten!) I made my living maintaining and developing a large application written in Prolog. That was actually an interesting experience, since one of the performance drivers was speed. As a result co

[Haskell-cafe] Array.Diff, strange oversight or myopia ?

2007-09-02 Thread Chaddaï Fouché
Data.Array.Diff don't have an instance for DiffUArray Bool, which is strange by itself since IOUArray Bool exists and it's the only IOUArray that is not mirrored in Diff. But ok, why not, I guess it might be a small oversight, so I go on to create the missing instance IArray (IOToDiffArray IOUArray

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread jerzy . karczmarczuk
Andrew Coppin writes: Ever tried implementing Haskell in Haskell? ;-) Seriously: Haskell is a *complicated* language, needing a parser, which by itself is a non-trivial exercice. Moreover, it has a type-inference engine, which may be simulated, sure, but Haskell in Haskell is a tough job. Howe

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Neil Davies
Cut is a means of preventing backtracking beyond that point - it prunes the potential search space saying the answer must be built on the current set of bindings. (Lots of work went into how automatically get "cut's" into programs to make them efficient but without the programmer having to worry ab

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Peter Verswyvelen
Sven Panne wrote: > ... and even more easily hypothesize why this is not always a good indication: > High-qualitiy standard libraries which are packaged with GHC/Hugs/... will probably almost never be downloaded separately. Solution: change GHC/Hugs so it submits (via a webservice, stored in a

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Andrew Coppin
One of standard exercices in Prolog is the construction of the meta-interpreter of Prolog in Prolog. While this is cheating, I recommend it to you. It opens eyes. Ever tried implementing Haskell in Haskell? ;-) Prolog strategies are straightforward, and I simply cannot understand the comment

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Peter Verswyvelen
Sven Panne wrote: ... and even more easily hypothesize why this is not always a good indication: High-qualitiy standard libraries which are packaged with GHC/Hugs/... will probably almost never be downloaded separately. Solution: change GHC/Hugs so it submits usage counters of which librarie

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Hugh Perkins
On 9/2/07, Brandon S. Allbery KF8NH <[EMAIL PROTECTED]> wrote: > in the early 90s I think I found the flaw in your argument ;-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Learn Prolog...

2007-09-02 Thread Brandon S. Allbery KF8NH
On Sep 2, 2007, at 2:08 , Peter Verswyvelen wrote: But after reading http://en.wikipedia.org/wiki/ Fifth_generation_computer, it seemed to me that Prolog was a dead language, having only pure theoretical purposes. Is this true? Tell that to the order pricing system I wrote in Prolog for a

Re: [Haskell-cafe] Re: HApps API Documentation?

2007-09-02 Thread Martin Lütke
> Just compile your one version from the HAppS source. Use runghc Setup.hs > haddock. OK, I can give that a shot. I'm still curious about my original question, though. Are there alternative online API docs for Happs? I am sorry I dont answer your question directly, but the last online api

Re: [Haskell-cafe] Extending the idea of a general Num to other types?

2007-09-02 Thread Peter Verswyvelen
Chaddaï Fouché wrote: You can indeed already do that, except it won't be a single instance since list have a bucketful of interesting properties. A good starting is looking at what list is an instance of and trying to identify the set of instance which interest us in this case, Foldable and Funct

Re: [Haskell-cafe] Looking for suggestions to improve my algorithm

2007-09-02 Thread Chaddaï Fouché
Right, your program is 2 times faster than mine on my machine... I wonder if there is a better structure to do this bookkeeping than IntSet (maybe Sequence slightly remanied ?), anyway it goes to show how sometimes the bookkeeping can be more expensive than the operations it's meant to prevent ! A

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Hugh Perkins
On 9/2/07, Sven Panne <[EMAIL PROTECTED]> wrote: > High-qualitiy standard libraries which are packaged with GHC/Hugs/... will > probably almost never be downloaded separately. Good point. Note however that if someone is hunting for a library, it's generally because it's not already bundled with t

Re: [Haskell-cafe] Extending the idea of a general Num to other types?

2007-09-02 Thread Chaddaï Fouché
2007/9/2, Peter Verswyvelen <[EMAIL PROTECTED]>: > Can the same be done on other builtin constructs? For example, if I have > [a], can this list be lifted to other types? I guess not, because no > type class exists for the list type? > You can indeed already do that, except it won't be a single in

Re: [Haskell-cafe] RE: Definition of the Haskell standard library

2007-09-02 Thread Sven Panne
On Sunday 02 September 2007 03:29, Hugh Perkins wrote: > A really simple way to track the "quality" of a package is to display > the number of downloads. > > A posteriorae, this works great in other download sites. > > We can easily hypothesize about why a download count gives a decent > indication