Re: [Haskell-cafe] Mac OS X dylib woes

2008-09-17 Thread Austin Seipp
I'm not getting this issue, but to fix it, given whatever you shell you use with your terminal (Terminal.app, iTerm, etc) program, just stick this into the rc file for it: export DYLD_LIBRARY_PATH=/opt/local/lib:$DYLD_LIBRARY_PATH For example, in this case it would exist in my ~/.zshrc - it

Re: [Haskell-cafe] Predicativity?

2008-09-17 Thread Ryan Ingram
Maybe this example is more enlightening? -- doesn't compile -- f x = x x -- does compile under GHC at least g :: (forall a. a - a) - (forall a. a - a) g x = x x h = g id (although I don't know if it really answers your question) One big motivation for impredicativity, as I understand

Re: [Haskell-cafe] Predicativity?

2008-09-17 Thread Ryan Ingram
Here is another example that doesn't compile under current GHC directly: f = (runST .) ghci reports the type of f as (a1 - forall s. ST s a) - a1 - a But (f return) doesn't typecheck, even though the type of return is return :: forall a s. a - ST s a Oddly, this does typecheck if we

Re: [Haskell-cafe] Mac OS X dylib woes

2008-09-17 Thread Judah Jacobson
On Tue, Sep 16, 2008 at 4:49 PM, John MacFarlane [EMAIL PROTECTED] wrote: I'm hoping some Haskell developers who use Macs can help me with this one. I can install pcre-light just fine using cabal install. But when I try to use it, I get this error: [snip] OK, so it can't find the pcre library

Re: [Haskell-cafe] Predicativity?

2008-09-17 Thread Thomas Davie
On 17 Sep 2008, at 07:05, Wei Hu wrote: Hello, I only have a vague understanding of predicativity/impredicativity, but cannot map this concept to practice. We know the type of id is forall a. a - a. I thought id could not be applied to itself under predicative polymorphism. But Haksell

[Haskell-cafe] hircules resurrected (partially ;-)

2008-09-17 Thread wman
I stumbled upon hircules-0.3 IRC client and decided to take it for a test drive. I managed to get it to compile under ghc-6.8.3/win32, converted it to use Text.Codec.Iconv (the old version of included Iconv.hs should also work), but it seems it doesn't work. It only gives an empty form and

[Haskell-cafe] Re: Problem with hscurses

2008-09-17 Thread david48
On Tue, Sep 16, 2008 at 5:31 PM, david48 [EMAIL PROTECTED] wrote: the getCh funtion is supposed to return an interpreted Key with values like KeyChar c, KeyReturn, KeyBackspace, etc. but in fact, it only ever returns KeyChar c values ! Nevermind, issue solved.

[Haskell-cafe] readFile and closing a file

2008-09-17 Thread Henning Thielemann
Say I acquire a text by readFile, feed it to a lazy parser and the parser stops reading because of a parse error. After the parser error I won't fetch more characters from the text file, but readFile does not get to know that and cannot close the file. Actually, when encountering a parser

Re: [Haskell-cafe] Float instance of 'read'

2008-09-17 Thread Henning Thielemann
On Tue, 16 Sep 2008, Mauricio wrote: Hi, A small annoyance some users outside english speaking countries usually experiment when learning programming languages is that real numbers use a '.' instead of ','. Of course, that is not such a problem except for the inconsistence between computer

Re: [Haskell-cafe] Real World HAppS: Cabalized, Self-Demoing HAppS Tutorial (Version 3)

2008-09-17 Thread Marc Weber
On Tue, Sep 16, 2008 at 11:32:04PM +0200, Martin Huschenbett wrote: Hi all, taking a look at this tutorial under Windows Vista I ran into a problem: You should get the latest darcs version which contains the conditional cabal flag: if !os(windows) Build-Depends:unix

RE: [Haskell-cafe] readFile and closing a file

2008-09-17 Thread Mitchell, Neil
Hi Henning, I tend to use openFile, hGetContents, hClose - your initial readFile like call should be openFile/hGetContents, which gives you a lazy stream, and on a parse error call hClose. Thanks Neil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of

Re: Hyena Status? Re: [Haskell-cafe] Starting Haskell with a web application

2008-09-17 Thread Donnie Jones
Hello Johan, On Wed, Sep 17, 2008 at 1:12 AM, Johan Tibell [EMAIL PROTECTED]wrote: On Tue, Sep 16, 2008 at 11:15 AM, Donnie Jones [EMAIL PROTECTED] wrote: Hello Johan Tibell, Hyena looks very interesting. From the github tracking, you've been working... Maybe a release soon? I'm

[Haskell-cafe] about openTempFile

2008-09-17 Thread Manlio Perillo
Hi. After reading the chapter about IO in the Real Word Haskell book, I have noted that there is no support for opening a temporary file that will be automatically removed at program termination. The Python tempfile module, as an example, implements a wrapper around mkstemp function that

[Haskell-cafe] Re: GHC trouble on Leopard

2008-09-17 Thread Miguel Vilaca
Hi Manuel, After your tip, I check the file, it permissions and it content, and find that this specific file looks for perl in an existing place; this is a fresh Leopard and I just installed a few things using binaries. It seems GHC expects perl to be installed through macPorts or Fink and

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Lionel Barret De Nazaris
Amen, Those are the hard question that the python community needs to answer (I am not sure they want to answer, tho). They are also part of the reasons we are switching to Haskell. L. Don Stewart wrote:

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Manlio Perillo
Don Stewart ha scritto: http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-on-future--/news/111534 cloud computing, transactional memory and future multicore processors Multicore support is already supported in Python, if you use multiprocessing, instead of

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Bruce Eckel
Multicore support is already supported in Python, if you use multiprocessing, instead of multithreading. This is one of the reasons for my other question on this list, about whether you can solve all problems using multiple isolated processes with message passing. -- Bruce Eckel

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Arnar Birgisson
Hi Manlio and others, On Wed, Sep 17, 2008 at 14:58, Manlio Perillo [EMAIL PROTECTED] wrote: http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-on-future--/news/111534 cloud computing, transactional memory and future multicore processors Multicore support is already

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread Dougal Stanton
On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it uses O_TEMPORARY_FILE flag, on POSIX systems the file is unlink-ed as

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jefferson Heard
Multiprocessing is hardly a solution... I realize the Python interpreter's fairly lightweight on its own, but the weight of a full unix process plus the weight of the python interpreter in terms of memory, context switching times, and finally the clunkiness of the fork() model (which is HOW many

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Arnar Birgisson
Hi Bruce, On Wed, Sep 17, 2008 at 15:03, Bruce Eckel [EMAIL PROTECTED] wrote: Multicore support is already supported in Python, if you use multiprocessing, instead of multithreading. This is one of the reasons for my other question on this list, about whether you can solve all problems using

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Bruce Eckel
Well, I'm a huge Python fan myself, but multiprocessing is not really a solution as much as it is a workaround. Python as a language has no problem with multithreading and multicore support and has all primitives to do conventional shared-state parallelism. However, the most popular

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Arnar Birgisson
Hi again, On Wed, Sep 17, 2008 at 15:13, Bruce Eckel [EMAIL PROTECTED] wrote: Well, I'm a huge Python fan myself, but multiprocessing is not really a solution as much as it is a workaround. Python as a language has no problem with multithreading and multicore support and has all primitives to

Re: [Haskell-cafe] readFile and closing a file

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 01:31:26PM +0200, Henning Thielemann wrote: Say I acquire a text by readFile, feed it to a lazy parser and the parser stops reading because of a parse error. After the parser error I won't fetch more characters from the text file, but readFile does not get to know

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Manlio Perillo
Arnar Birgisson ha scritto: Hi Manlio and others, On Wed, Sep 17, 2008 at 14:58, Manlio Perillo [EMAIL PROTECTED] wrote: http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-on-future--/news/111534 cloud computing, transactional memory and future multicore processors

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jefferson Heard
Both Jython and JRuby can use multicore parallelism. Which, of course, you need desperately when running in Jython and JRuby, because they're slow as christmas for most tasks. In addition, Jython is not a predictably complete version of Python and its internals are not well documented in the

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 02:10:56PM +0100, Dougal Stanton wrote: On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Manlio Perillo
Jefferson Heard ha scritto: Multiprocessing is hardly a solution... I realize the Python interpreter's fairly lightweight on its own, but the weight of a full unix process plus the weight of the python interpreter in terms of memory, With copy on write some memory can be saved (if you

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread Manlio Perillo
Dougal Stanton ha scritto: On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it uses O_TEMPORARY_FILE flag, on POSIX

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
No, it is not. Strings created by show are always supposed to be readable by read, no matter which system used 'show' and which system is using 'read'. Maurício Rafael C. de Almeida a écrit : Mauricio wrote: Hi, A small annoyance some users outside english speaking countries usually

[Haskell-cafe] FRP (was: Semantic Domain, Function, and denotational model)

2008-09-17 Thread John Lato
I just noticed that the Simply Efficient Functional Reactivity paper has been updated since I last looked; I'll have to read it again now. Is the library/code mentioned in the paper released or available anywhere at this time? Conal has left tantalizing hints scattered in various places...

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Bruce Eckel
Jython 2.5 is very close to release and its goal is to be a very complete implementation, including such improbable things as ctypes. You can indeed use the underlying threads of the JVM with Jython and JRuby, but the native Python threads are prevented from running on more than one processor by

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Maybe. Doubles 'show' function always print something after the decimal separator, so 'show [doubles]' is easy to parse but difficult for human reading. It would be nice to have a space between elements of a shown list, though. It's an annoyance, but internationalization is really great, I think

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
I'm happy to finaly use a language where I can use words of my language to name variables, so I wonder if we could also make that step. Really? There is a bunch of languages (like Glagol) that use words of Russian language as keywords; AFAIK there aren't any Russian programmer who uses them.

Re: [Haskell-cafe] FRP (was: Semantic Domain, Function, and denotational model)

2008-09-17 Thread Robin Green
On Wed, 17 Sep 2008 15:28:35 +0100 John Lato [EMAIL PROTECTED] wrote: I just noticed that the Simply Efficient Functional Reactivity paper has been updated since I last looked; I'll have to read it again now. Is the library/code mentioned in the paper released or available anywhere at this

[Haskell-cafe] Re: haskell blas bindings: does iomatrix gemv transposing of matrix a?

2008-09-17 Thread Patrick O'Regan Perry
Hi Anatoly, I made the decision to make herm an O(1) operation. This means you don't have to pass transpose arguments to the multiplication routines. When you do, for example: let a = listMatrix (2,3) [1..6] x = listVector 2 [1, -1] in herm a * x this gets implemented as a call to

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read 1,5 would also work besides read 1.5)? I'm happy to finaly use a language where I can use words of my language to name variables, so I wonder if we could also make that step. That

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
As of today, show ((1,2)::(Float,Float)) would not produce that kind of output. Dan Piponi a écrit : Mauricio asked: Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read 1,5 would also work besides read 1.5)? What would you hope the

Re: [Haskell-cafe] FRP (was: Semantic Domain, Function, and denotational model)

2008-09-17 Thread Conal Elliott
Hi John, We're working toward a library release. This summer has been more chaotic for me than I expected. Meanwhile the current is as Robin mentioned below. Not in a terribly usable form. You'll need ghc-6.9 for the vector-space dependency (vector spaces, linear maps, and derivatives), since

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read 1,5 would also work besides read 1.5)? I'm happy to finaly use a language where I can use words of my language to name variables, so I wonder if we could also make that step. The

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread Don Stewart
manlio_perillo: Hi. After reading the chapter about IO in the Real Word Haskell book, I have noted that there is no support for opening a temporary file that will be automatically removed at program termination. The Python tempfile module, as an example, implements a wrapper around

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread Don Stewart
manlio_perillo: Dougal Stanton ha scritto: On Wed, Sep 17, 2008 at 1:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it uses O_TEMPORARY_FILE

Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Lennart Augustsson
Given examples like (1,2,3) I don't see how comma could ever be used instead of dot, unless you insist on whitespace around all commas. And that doesn't look like the right way forward. -- Lennart On Wed, Sep 17, 2008 at 4:20 PM, Mauricio [EMAIL PROTECTED] wrote: Do you think 'read'

[Haskell-cafe] Re: Mac OS X dylib woes

2008-09-17 Thread John MacFarlane
If you type ghc-pkg describe pcre-light, does it list /opt/local/lib under the library-dirs: field? If not, that's most likely your problem. Try unregistering the library and reinstalling with: cabal install pcre-light --extra-include-dirs=/opt/local/include

RE: [Haskell-cafe] about openTempFile

2008-09-17 Thread Mitchell, Neil
But since GHC does not implement such a function, I was curious to know why it don't even implement a function that make sure the temporary file is removed. Because it is two lines to write, so no one has yet proposed it for the base library. Map is 2 lines, but we have that as a

[Haskell-cafe] a question about Database.HDBC.ODBC

2008-09-17 Thread Changying Li
I want to use hdbc to connect my mysql test db. so I set up my /etc/odbcinst.ini : [MySQL] Description = ODBC Driver for MySQL Driver = /usr/lib/libmyodbc.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1 and /etc/odbc.ini: [test] Description = MySQL database test

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read 1,5 would also work besides read 1.5)? No, as read is really intended to be a language-level tool, not something that you should expose to end users. For

[Haskell-cafe] Re: How to check if two Haskell files are the same?

2008-09-17 Thread Mauricio
I would like to write a Haskell pretty-printer, using standard libraries for that. How can I check if the original and the pretty-printed versions are the same? For instance, is there a file generated by GHC at the compilation pipe that is always guaranteed to have the same MD5 hash when it comes

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 04:51:07PM +0100, Mitchell, Neil wrote: But since GHC does not implement such a function, I was curious to know why it don't even implement a function that make sure the temporary file is removed. Because it is two lines to write, so no one has yet

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Tony Finch
On Wed, 17 Sep 2008, Manlio Perillo wrote: Jefferson Heard ha scritto: the weight of a full unix process plus the weight of the python interpreter in terms of memory, With copy on write some memory can be saved (if you preload all the required modules in the master process). The kernel

Re: [Haskell-cafe] Semantic Domain, Function, and denotational model.....

2008-09-17 Thread Daryoush Mehrtash
I noticed that Wikipedia has listed a few text books on the topic: http://en.wikipedia.org/wiki/Denotational_semantics#Textbooks Any recommendations on which one might be a better read? Thanks, Daryoush 2008/9/16 Greg Meredith [EMAIL PROTECTED]: Daryoush, Hopefully, the other replies about

[Haskell-cafe] Re: haskell blas bindings: does iomatrix gemv transposing of matrix a?

2008-09-17 Thread Anatoly Yakovenko
I made the decision to make herm an O(1) operation. This means you don't have to pass transpose arguments to the multiplication routines. When you do, for example: let a = listMatrix (2,3) [1..6] x = listVector 2 [1, -1] in herm a * x this gets implemented as a call to gemv with

Re: [Haskell-cafe] Re: How to check if two Haskell files are the same?

2008-09-17 Thread Svein Ove Aas
On Wed, Sep 17, 2008 at 7:04 PM, Mauricio [EMAIL PROTECTED] wrote: I would like to write a Haskell pretty-printer, using standard libraries for that. How can I check if the original and the pretty-printed versions are the same? For instance, is there a file generated by GHC at the compilation

Re: [Haskell-cafe] How to check if two Haskell files are the same?

2008-09-17 Thread Alfonso Acosta
On Wed, Sep 17, 2008 at 1:03 AM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Sep 16, at 10:30, Mauricio wrote: I would like to write a Haskell pretty-printer, using standard libraries for that. How can I check if the original and the pretty-printed versions are the same? For

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Aaron Denney
On 2008-09-17, Mauricio [EMAIL PROTECTED] wrote: Localized reading should be somewhere else, perhaps related to Locales. No! If we had that, string from a program would not be readable by some program running in other machine, or other locale. As, actually, you describe below. Show and

[Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Aaron Denney
On 2008-09-17, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi Manlio and others, On Wed, Sep 17, 2008 at 14:58, Manlio Perillo [EMAIL PROTECTED] wrote: http://www.heise-online.co.uk/open/Shuttleworth-Python-needs-to-focus-on-future--/news/111534 cloud computing, transactional memory and future

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread Brandon S. Allbery KF8NH
On 2008 Sep 17, at 8:17, Manlio Perillo wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it uses O_TEMPORARY_FILE flag, on POSIX systems the file is unlink-ed as soon as it is created

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jonathan Cast
On Wed, 2008-09-17 at 18:40 +, Aaron Denney wrote: On 2008-09-17, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi Manlio and others, On Wed, Sep 17, 2008 at 14:58, Manlio Perillo [EMAIL PROTECTED] wrote:

Re: [Haskell-cafe] Semantic Domain, Function, and denotational model.....

2008-09-17 Thread Greg Meredith
Daryoush, The two chapters in the Handbook of Logic in Computer Science -- especially the one http://www.cs.bham.ac.uk/%7Eaxj/pub/papers/handy1.pdf by Abramsky and Jung -- are good. i noticed that Lloyd Allison wrote a book on practical denotational semantics. i've never read it, but i was

Re: [Haskell-cafe] a question about Database.HDBC.ODBC

2008-09-17 Thread Mads Lindstrøm
Hi, Changying Li wrote: I want to use hdbc to connect my mysql test db. so I set up my /etc/odbcinst.ini : [MySQL] Description = ODBC Driver for MySQL Driver = /usr/lib/libmyodbc.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1 and /etc/odbc.ini: [test]

Re: [Haskell-cafe] How to check if two Haskell files are the same?

2008-09-17 Thread Brandon S. Allbery KF8NH
On 2008 Sep 17, at 14:17, Alfonso Acosta wrote: On Wed, Sep 17, 2008 at 1:03 AM, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Sep 16, at 10:30, Mauricio wrote: I would like to write a Haskell pretty-printer, using standard libraries for that. How can I check if the original and

Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Brandon S. Allbery KF8NH
On 2008 Sep 17, at 14:38, Aaron Denney wrote: On 2008-09-17, Mauricio [EMAIL PROTECTED] wrote: Localized reading should be somewhere else, perhaps related to Locales. No! If we had that, string from a program would not be readable by some program running in other machine, or other locale.

Re: [Haskell-cafe] Real World HAppS: Cabalized, Self-Demoing HAppS Tutorial (Version 3)

2008-09-17 Thread Martin Huschenbett
Hi, I got your tutorial working. But when running it from ghci an exception raises: *** Exception: _local/interactive_state\current-00: openBinaryFile: invalid argument (Invalid argument) But I found a way to fix this: replace runserver 5001 by withProgName happs-tutorial $

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread Manlio Perillo
David Roundy ha scritto: [...] In particular, the code Don quoted is incorrect depending on which import statements are used. If we assume that the default is the bracket available in Haskell 98, then it is definitely incorrect. It also doesn't behave properly in the presence of signals or

[Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Aaron Denney
On 2008-09-17, Jonathan Cast [EMAIL PROTECTED] wrote: On Wed, 2008-09-17 at 18:40 +, Aaron Denney wrote: On 2008-09-17, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi Manlio and others, On Wed, Sep 17, 2008 at 14:58, Manlio Perillo [EMAIL PROTECTED] wrote:

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Evan Laforge
systems that don't use an existing user-space thread library (such as Concurrent Haskell or libthread [1]) emulate user-space threads by keeping a pool of processors and re-using them (e.g., IIUC Apache does this). Your response seems to be yet another argument that processes are too

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jonathan Cast
On Wed, 2008-09-17 at 20:29 +, Aaron Denney wrote: On 2008-09-17, Jonathan Cast [EMAIL PROTECTED] wrote: On Wed, 2008-09-17 at 18:40 +, Aaron Denney wrote: On 2008-09-17, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi Manlio and others, On Wed, Sep 17, 2008 at 14:58, Manlio

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Brandon S. Allbery KF8NH
On 2008 Sep 17, at 16:44, Evan Laforge wrote: The fast context switching part seems orthogonal to me. Why is it that getting the OS involved for context switches kills the performance? Is it that the ghc RTS can switch faster because it knows more about the code it's running (i.e. the OS

Re: [Haskell-cafe] about openTempFile

2008-09-17 Thread David Roundy
On Wed, Sep 17, 2008 at 10:11:28PM +0200, Manlio Perillo wrote: David Roundy ha scritto: [...] In particular, the code Don quoted is incorrect depending on which import statements are used. If we assume that the default is the bracket available in Haskell 98, then it is definitely incorrect.

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jonathan Cast
On Wed, 2008-09-17 at 13:44 -0700, Evan Laforge wrote: systems that don't use an existing user-space thread library (such as Concurrent Haskell or libthread [1]) emulate user-space threads by keeping a pool of processors and re-using them (e.g., IIUC Apache does this). Your response

[Haskell-cafe] Re: Predicativity?

2008-09-17 Thread Wei Hu
Thomas Davie tom.davie at gmail.com writes: In your application (id id) you create two instances of id, each of which has type forall a. a - a, and each of which can be applied to a different type. In this case, the left one gets applied to the type (a - a) and the right one a, giving

[Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Mauricio
Do you think 'read' (actually, 'readsPrec'?) could be made to also read the international convention (ie., read 1,5 would also work besides read 1.5)? (...) IMAO, it's bloody well stupid to use commas for either the decimal separator or the thousands separator, as it has a well

[Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Aaron Denney
On 2008-09-17, Jonathan Cast [EMAIL PROTECTED] wrote: In my mind pooling vs new-creation is only relevant to process vs thread in the performance aspects. Say what? This discussion is entirely about performance --- does CPython actually have the ability to scale concurrent programs to

Re: [Haskell-cafe] How to check if two Haskell files are the same?

2008-09-17 Thread Chaddaï Fouché
2008/9/16 Mauricio [EMAIL PROTECTED]: Hi, I would like to write a Haskell pretty-printer, using standard libraries for that. How can I check if the original and the pretty-printed versions are the same? For instance, is there a file generated by GHC at the compilation pipe that is always

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Arnar Birgisson
Hi Aaron, On Wed, Sep 17, 2008 at 23:20, Aaron Denney [EMAIL PROTECTED] wrote: I entered the discussion as which model is a workaround for the other -- someone said processes were a workaround for the lack of good threading in e.g. standard CPython. I replied that most languages thread

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Don Stewart
jonathanccast: The fact that people use thread-pools I don't think people use thread-pools with Concurrent Haskell, or with libthread. Sure. A Chan with N worker forkIO threads taking jobs from a queue is a useful idiom I've employed on occasion. -- Don

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jonathan Cast
On Wed, 2008-09-17 at 23:42 +0200, Arnar Birgisson wrote: On Wed, Sep 17, 2008 at 23:20, Aaron Denney [EMAIL PROTECTED] wrote: The central aspect in my mind is a default share-everything, or default share-nothing. [..snip...] These are, in fact, process models. They are implemented on

[Haskell-cafe] Ajax-Haskell framework?

2008-09-17 Thread Greg Meredith
Haskellians, Is there an Ajax-Haskell framework? In case there are many, is there a preferred one? Experiences people would like to share? Best wishes, --greg -- L.G. Meredith Managing Partner Biosimilarity LLC 806 55th St NE Seattle, WA 98105 +1 206.650.3740

Threads vs. processes [Was: Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?]

2008-09-17 Thread Jonathan Cast
On Wed, 2008-09-17 at 21:20 +, Aaron Denney wrote: On 2008-09-17, Jonathan Cast [EMAIL PROTECTED] wrote: In my mind pooling vs new-creation is only relevant to process vs thread in the performance aspects. Say what? This discussion is entirely about performance --- does CPython

[Haskell-cafe] Re: How to check if two Haskell files are the same?

2008-09-17 Thread Mauricio
Chaddaï Fouché a écrit : 2008/9/16 Mauricio [EMAIL PROTECTED]: Hi, I would like to write a Haskell pretty-printer, using standard libraries for that. How can I check if the original and the pretty-printed versions are the same? For instance, is there a file generated by GHC at the

[Haskell-cafe] Re: about openTempFile

2008-09-17 Thread Aaron Denney
On 2008-09-17, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Sep 17, at 8:17, Manlio Perillo wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is portable; on Windows it uses O_TEMPORARY_FILE

[Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Aaron Denney
On 2008-09-17, Arnar Birgisson [EMAIL PROTECTED] wrote: Hi Aaron, On Wed, Sep 17, 2008 at 23:20, Aaron Denney [EMAIL PROTECTED] wrote: I entered the discussion as which model is a workaround for the other -- someone said processes were a workaround for the lack of good threading in e.g.

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Manlio Perillo
Jonathan Cast ha scritto: [...] Huh. I see multi-threading as a workaround for expensive processes, which can explicitly use shared memory when that makes sense. That breaks down when you want 1000s of threads. I'm not aware of any program, on any system, that spawns a new process on each

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Donn Cave
Quoth Jonathan Cast [EMAIL PROTECTED]: ... | Say what? This discussion is entirely about performance --- does | CPython actually have the ability to scale concurrent programs to | multiple processors? Well, ostensibly the discussion also has something to do with Haskell. On that premise, may I

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Manlio Perillo
Tony Finch ha scritto: [...] context switching times, That's probabily the same as thread switching time. Competent language-level concurrency support (as in Haskell and Erlang) makes a context switch about as expensive as a function call, thousands of times faster than an OS-level process

Re: [Haskell-cafe] Re: Float instance of 'read'

2008-09-17 Thread Richard A. O'Keefe
On 18 Sep 2008, at 3:20 am, Mauricio wrote: Agree about the answer, not about the question. The correct one would be is it possible to change haskell syntax to support the international notation (not any locally sensitive one) for decimal real numbers? Would a change in 'read' be a good first

Re: [Haskell-cafe] Re: about openTempFile

2008-09-17 Thread Brandon S. Allbery KF8NH
On 2008 Sep 17, at 18:20, Aaron Denney wrote: On 2008-09-17, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On 2008 Sep 17, at 8:17, Manlio Perillo wrote: The Python tempfile module, as an example, implements a wrapper around mkstemp function that does exactly this, and the code is

[Haskell-cafe] Re: Threads vs. processes [Was: Re: Re: Python's big challenges, Haskell's big advantages?]

2008-09-17 Thread Aaron Denney
On 2008-09-17, Jonathan Cast [EMAIL PROTECTED] wrote: On Wed, 2008-09-17 at 21:20 +, Aaron Denney wrote: On 2008-09-17, Jonathan Cast [EMAIL PROTECTED] wrote: In my mind pooling vs new-creation is only relevant to process vs thread in the performance aspects. Say what? This

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jason Dusek
What does Haskell have to say about cloud computing? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jason Dusek
Bruce Eckel [EMAIL PROTECTED] wrote: Manlio Perillo [EMAIL PROTECTED] wrote: Multicore support is already supported in Python, if you use multiprocessing, instead of multithreading. This is one of the reasons for my other question on this list, about whether you can solve all problems

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Don Stewart
jason.dusek: What does Haskell have to say about cloud computing? I'm not sure cloud computing is well-enough defined to say anything yet. paradigm in which information is permanently stored in servers on the Internet and cached temporarily on clients that include desktops,

Re: [Haskell-cafe] Exceptions

2008-09-17 Thread Marc Weber
On Sun, Jul 27, 2008 at 07:23:14PM +0200, Adrian Neumann wrote: Hello, I think it'd be nice if the compiler could warn me if there are any exceptions which I'm not catching, similar to checked exceptions in Java. Does anyone know of a possibility to do that in Haskell? He, I have

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Thomas M. DuBuisson
jason.dusek: What does Haskell have to say about cloud computing? If by 'cloud computing' you wish to discuss mapReduce then: http://www.cs.vu.nl/~ralf/MapReduce/paper.pdf Map reduce in Haskell, enjoy! Tom ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Richard A. O'Keefe
It may be of interest that although Erlang has been doing lightweight concurrency for 20 years, - you can choose whether you want to use an SMP version that has as many schedulers as there are cores (plus internal locking as needed) or a non-SMP version with one scheduler (and no

[Haskell-cafe] Re: a question about Database.HDBC.ODBC

2008-09-17 Thread Changying Li
thanks for your reply. I'm sure isql is ok for me: [EMAIL PROTECTED] tapl-haskell] isql test +---+ | Connected!| | | | sql-statement | | help [tablename]

Re: [Haskell-cafe] Python's big challenges, Haskell's big advantages?

2008-09-17 Thread Jason Dusek
Don Stewart [EMAIL PROTECTED] wrote: jason.dusek: What does Haskell have to say about cloud computing? I'm not sure cloud computing is well-enough defined to say anything yet. That is fair -- having something to say about cloud computing is essentially having a grand vision. I only ask

Re: [Haskell-cafe] ANN: pandoc 1.0.0.1

2008-09-17 Thread Alfonso Acosta
On Sun, Sep 14, 2008 at 3:29 AM, John MacFarlane [EMAIL PROTECTED] wrote: Some highlights of this release: + New GNU Texinfo writer (contributed by Peter Wang) + New OpenDocument XML writer (contributed by Andrea Rossato) + New ODT (OpenOffice document) writer + New MediaWiki markup writer

[Haskell-cafe] Re: Haskell Weekly News: Issue 85 - September 13, 2008

2008-09-17 Thread Benjamin L . Russell
On Sat, 13 Sep 2008 21:06:21 -0700, Daryoush Mehrtash [EMAIL PROTECTED] wrote: I have a newbie question Does theorem proofs have a use for an application? Take for example the IRC bot example ( http://www.haskell.org/haskellwiki/Roll_your_own_IRC_bot) listed below. Is there any insight to

Re: [Haskell-cafe] Exceptions

2008-09-17 Thread Ryan Ingram
Better is this: data MalformedAddressException = MalformedAddressException String deriving (Show, Typeable) throwDynIO x = throwIO (DynException $ toDyn x) -- in inet_error ... throwDynIO (MalformedAddressException blah blah) ... -- in HAppS-Server ... Exception.catchDyn (inet_addr uri)