Re: [Haskell-cafe] How to give unique name/id to nodes outside any monad ?

2009-01-09 Thread minh thu
2009/1/9 Timothy Goddard t...@goddard.net.nz: On Thu, 08 Jan 2009 21:28:27 minh thu wrote: Hi, I'd like to process some kind of graph data structure, say something like data DS = A [DS] | B DS DS | C. Graphs in funtional languages aren't usually represented in this sort of manner. Trees

[Haskell-cafe] Re: Low-level networking [Haskell not ready for Foo]

2009-01-09 Thread Dominic Steinitz
John Goerzen jgoerzen at complete.org writes: Any idea how I get Haskell to send ICMP ECHO packets? (And, obviously, receive the replies.) SocketType claims to support Raw, which I think is the conventional means for doing this. Whether all the infrastructure for that is there, I don't

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.8

2009-01-09 Thread Miguel Mitrofanov
On 9 Jan 2009, at 03:51, Niklas Broberg wrote: - Support for Unicode symbols for e.g. -. Fixing that would require me to have a Unicode-compliant editor, which it appears I don't. And I couldn't have someone else submit a patch either, since then I couldn't open the file anymore in my editor.

[Haskell-cafe] Re: GHC libraries documentation and links to source files

2009-01-09 Thread Simon Marlow
Manlio Perillo wrote: Hi. I have noted that recent versions of the GHC libraries documentation, no longer have links to the source code. What is the reason? I find it very useful. This was an oversight in the GHC 6.10.1 release, we'll make sure it gets remedied for 6.10.2. Cheers,

[Haskell-cafe] Re: databases in Haskell type-safety

2009-01-09 Thread Gour
John == John Goerzen jgoer...@complete.org writes: Hello John, John I would say that database interactions are typically limited to a John small part of code. In small programs, I generally have a DB John module that does the queries, and marshals everything to/from the John rich Haskell types

[Haskell-cafe] Re: concurrent haskell: thread priorities

2009-01-09 Thread Simon Marlow
Bulat Ziganshin wrote: Monday, December 22, 2008, 11:07:32 PM, you wrote: The threaded RT creates an OS thread for each CPU/core on the system and uses them to multiplex userland threads. These are context switched whenever they block/yield/gc and no priorities can be assigned. not

[Haskell-cafe] Re: concurrent haskell: thread priorities

2009-01-09 Thread Simon Marlow
Neal Alexander wrote: Bulat Ziganshin wrote: Hello Neal, Monday, December 22, 2008, 11:07:32 PM, you wrote: The threaded RT creates an OS thread for each CPU/core on the system and uses them to multiplex userland threads. These are context switched whenever they block/yield/gc and no

[Haskell-cafe] Re: concurrent haskell: thread priorities

2009-01-09 Thread Simon Marlow
Neal Alexander wrote: Thomas DuBuisson wrote: It seems like we could get some priority based scheduling (and still be slackers) if we allow marked green threads to be strictly associated with a specific OS thread (forkChildIO?). I think you want the GHC-only GHC.Conc.forkOnIO

[Haskell-cafe] Marshalling recursive data structures with the FFI

2009-01-09 Thread Ron de Bruijn
Hi, A few days ago we published an article (http://gamr7.com/blog/?p=66) on using the FFI to marshal recursive data structures between Haskell and C (or Python if you use ctypes). Best regards, Ron de Bruijn ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.8

2009-01-09 Thread Nils Anders Danielsson
On 2009-01-09 00:51, Niklas Broberg wrote: - Support for Unicode symbols for e.g. -. Fixing that would require me to have a Unicode-compliant editor Can't you just use character literals like '\x2192'? -- /NAD This message has been checked for viruses but the contents of an attachment may

Re: [Haskell-cafe] Re: Hypothetical Haskell job in New York

2009-01-09 Thread Manlio Perillo
John Goerzen ha scritto: On Thu, Jan 08, 2009 at 09:46:36PM +0100, Manlio Perillo wrote: I'm speaking about servers, not clients. How much of pure Haskell internet servers are used in a production environment, in the open internet (and not in restricted LANs)? Does that really matter? I

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread Manlio Perillo
Bryan O'Sullivan ha scritto: On Thu, Jan 8, 2009 at 1:07 PM, Manlio Perillo manlio_peri...@libero.it mailto:manlio_peri...@libero.it wrote: Another example is the multipart parser: -- | Read a multi-part message from a 'Handle'. -- Fails on parse errors. hGetMultipartBody

[Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Mauricio
benchpress also uses System.CPUTime -- is that what you are looking for? I'm writing a program that will read medical signs from many patients. It's important to have a precise measure of the time interval between some signs, and that can't depend on adjustments of time. (Supose my software is

Re: [Haskell-cafe] Staged evaluation, names?

2009-01-09 Thread wren ng thornton
Andrea Vezzosi wrote: On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton w...@freegeek.org wrote: The question for y'all is what should I call it? I've been calling the template-function qaf (for Compiled Applicative Form ;) and the type class with that function would be the only thing in the

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Bulat Ziganshin
Hello Mauricio, Friday, January 9, 2009, 4:01:18 PM, you wrote: computer has been turned on would do all I need. Or, maybe, how much has elapsed since the program started. i think you should look into system counters (if you on windows). for example, task managet in vista shows time since

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Cetin Sert
Don't know if it might help but: http://en.wikipedia.org/wiki/RDTSC cabal install rdtsc http://hackage.haskell.org/packages/archive/rdtsc/1.1.1/doc/html/System-CPUTime-Rdtsc.html Regards, CS 2009/1/9 Bulat Ziganshin bulat.zigans...@gmail.com Hello Mauricio, Friday, January 9, 2009, 4:01:18

Re[2]: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Bulat Ziganshin
Hello Cetin, Friday, January 9, 2009, 4:29:04 PM, you wrote: yes, i mean this lib but forget its name :) thank you Don't know if it might help but: http://en.wikipedia.org/wiki/RDTSC cabal install rdtsc

Re: [Haskell-cafe] Re: Hypothetical Haskell job in New York

2009-01-09 Thread John Goerzen
On Fri, Jan 09, 2009 at 01:06:44PM +0100, Manlio Perillo wrote: John Goerzen ha scritto: On Thu, Jan 08, 2009 at 09:46:36PM +0100, Manlio Perillo wrote: I'm speaking about servers, not clients. How much of pure Haskell internet servers are used in a production environment, in the open

Re: [Haskell-cafe] Staged evaluation, names?

2009-01-09 Thread wren ng thornton
Henning Thielemann wrote: wren ng thornton schrieb: Every now and then I find myself in the position where I'd like to define some hairy value as a CAF instead of a literal, but I'd like for it to be fully evaluated at compile-time rather than postponed until runtime. It'd be possible to

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Manlio Perillo
Mauricio ha scritto: benchpress also uses System.CPUTime -- is that what you are looking for? I'm writing a program that will read medical signs from many patients. It's important to have a precise measure of the time interval between some signs, and that can't depend on adjustments of time.

Re: [Haskell-cafe] Staged evaluation, names?

2009-01-09 Thread wren ng thornton
wren ng thornton wrote: Andrea Vezzosi wrote: On Thu, Jan 8, 2009 at 5:25 AM, wren ng thornton w...@freegeek.org wrote: The question for y'all is what should I call it? I've been calling the template-function qaf (for Compiled Applicative Form ;) and the type class with that function would be

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Manlio Perillo
Cetin Sert ha scritto: Don't know if it might help but: http://en.wikipedia.org/wiki/RDTSC cabal install rdtsc http://hackage.haskell.org/packages/archive/rdtsc/1.1.1/doc/html/System-CPUTime-Rdtsc.html Note that the use of RDTSC register has some issues on multicore CPU. More info at:

[Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Mauricio
Both wikipedia and hackage rdtsc packages have lot of warnings regarding things I'm not able to control. It seems it doesn't work with many platforms, be it older or multi-core, hibernating computers. yes, i mean this lib but forget its name :) thank you Don't know if it might help but:

[Haskell-cafe] issues with posix-realtime package

2009-01-09 Thread Manlio Perillo
Hi. I'm testing the posix-realtime package, but I have found a problem. Configuration, build and install works well, but if I execute some code from ghci I get: GHCi runtime linker: fatal error: I found a duplicate definition for symbol __hsunix_wifexited whilst processing object file

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread John A. De Goes
On Thu, Jan 08, 2009 at 10:36:32AM -0700, John A. De Goes wrote: The number of applications requiring the implementation of a custom web server is an insignificant fraction of the number of applications requiring a messaging system. I don't think anyone would dispute Haskell's ability to do

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread John A. De Goes
You must be referring to erlang-0.1, an alpha release of a package that impersonates an Erlang node. Which is surely useful to someone, somewhere, but is not useful to write a messaging application. Regards, John On Jan 8, 2009, at 4:17 PM, Bryan O'Sullivan wrote: On Thu, Jan 8, 2009

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread John A. De Goes
My statements refer not to the FFI, but as I said, to FFI code. FFI- based libraries seldom compile without excessive amounts of work, they're often poorly documented, and in general they seem to be maintained much less than pure Haskell libraries. The FFI is necessary, of course, but in

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread John A. De Goes
On Jan 8, 2009, at 4:34 PM, Bryan O'Sullivan wrote: I actually think that we're very close to being in fantastic shape here. I think that's Haskell zeal speaking. :-) Not that I don't appreciate your zeal (I do), and I'm definitely excited about the stuff you're working on, but we're a

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Steve Schafer
On Fri, 09 Jan 2009 11:01:18 -0200, you wrote: I'm writing a program that will read medical signs from many patients. It's important to have a precise measure of the time interval between some signs, and that can't depend on adjustments of time. (Supose my software is running midnight at the end

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread John Goerzen
John A. De Goes wrote: My statements refer not to the FFI, but as I said, to FFI code. FFI-based libraries seldom compile without excessive amounts of work, they're often poorly documented, and in general they seem to be Examples? I maintain a couple of FFI libraries, and strive to have

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread John Goerzen
Steve Schafer wrote: On Fri, 09 Jan 2009 11:01:18 -0200, you wrote: I'm writing a program that will read medical signs from many patients. It's important to have a precise measure of the time interval between some signs, and that can't depend on adjustments of time. (Supose my software is

Re: [Haskell-cafe] Re: databases in Haskell type-safety

2009-01-09 Thread John Goerzen
Gour wrote: John HDBC is a low-level abstraction, which can be used on its own or, John of course, as a layer underlying HaskellDB or some such. I do not John dispute the use of tools such as HaskellDB or others that try to John automate the business of representing a database's schema -- and

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread Thomas DuBuisson
John A. De Goes said: If you're looking for a project to take on, I would suggest starting with [AMQP] See: http://www.reddit.com/r/haskell_proposals/comments/7ihpt/amqp_client/ This isn't a new proposal, not to imply you thought so. If you have a need for such a library please start working

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Manlio Perillo
John Goerzen ha scritto: Steve Schafer wrote: On Fri, 09 Jan 2009 11:01:18 -0200, you wrote: I'm writing a program that will read medical signs from many patients. It's important to have a precise measure of the time interval between some signs, and that can't depend on adjustments of time.

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Cetin Sert
Here's a basic draft project for clock_gettime(CLOCK_MONOTONIC, ...) http://sert.homedns.org/hs/mnsec/ http://sert.homedns.org/hs/mnsec/dist/mnsec-1.0.0.tar.gz It could be extended to cover other clock types than just monotonic. Regards, CS 2009/1/9 John Goerzen jgoer...@complete.org Steve

Re: [Haskell-cafe] advanced class constraints in Haskell 98?

2009-01-09 Thread Joachim Breitner
Hi, Am Donnerstag, den 08.01.2009, 22:22 +0100 schrieb Henning Thielemann: On 8 Jan 2009, at 23:59, Henning Thielemann wrote: From Report: A nice. I jumped into 4.3 and found § § R 32 © ¦ 6 © ¦ 32 ¢ R

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread Creighton Hogg
2009/1/9 John A. De Goes j...@n-brain.net: If you're looking for a project to take on, I would suggest starting with the following: A high-level, type-safe AMQP client written in 100% Haskell, which provides a clean way of handling hundreds of unique message types. Then it would be

[Haskell-cafe] ANNOUNCE: Data.TCache 0.5.5

2009-01-09 Thread Alberto G. Corona
The main addition of this versión is the capablity to safely handle transact, and serialize to permanent storage many datatypes simultaneously in the same piece of code and incrementally. Just register each new datatype (with registerType :: Type). So it is not necessary to glue all types in

[Haskell-cafe] ANNOUNCE: X Haskell Bindings

2009-01-09 Thread Antoine Latter
Folks, I'd like to announce a preview-release of the X Haskell Bindings. The goal of the library is to provide low-level access to the X11 protocol, in the spirit of the X C Bindings This is a preview because I expect that the interface will still need to change - but I do plan on bump the

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.8

2009-01-09 Thread Niklas Broberg
Thanks all for the suggestions! VIM and I have never gone together well, probably mostly my fault I know. Maybe some day... Emacs isn't my favorite either. I do have Notepad++, but it only seems to support a small portion of the unicode I need. Normally I use TextPad, but it wouldn't show me any

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.8

2009-01-09 Thread Jonathan Cast
On Fri, 2009-01-09 at 18:38 +0100, Niklas Broberg wrote: Thanks all for the suggestions! VIM and I have never gone together well, probably mostly my fault I know. Maybe some day... Emacs isn't my favorite either. I do have Notepad++, but it only seems to support a small portion of the

Re: [Haskell-cafe] Low-level networking [Haskell not ready for Foo]

2009-01-09 Thread Andrew Coppin
Thomas DuBuisson wrote: Not all the data structures you need are there last I looked. This was my conclusion as well. As with most network libraries I've seen, TCP works just great, and anything else... tough? (I couldn't even see UDP last time. Have I missed something?) As you could

Re: [Haskell-cafe] Re: Low-level networking [Haskell not ready for Foo]

2009-01-09 Thread Andrew Coppin
Dominic Steinitz wrote: John Goerzen jgoerzen at complete.org writes: Any idea how I get Haskell to send ICMP ECHO packets? (And, obviously, receive the replies.) SocketType claims to support Raw, which I think is the conventional means for doing this. Whether all the infrastructure

Re: [Haskell-cafe] Low-level networking [Haskell not ready for Foo]

2009-01-09 Thread John Van Enk
I've managed to get UDP NAT traversal working in my personal project. I haven't really had issues with the Networking libraries at all (except that htons and htonl aren't where i expected them to be... and yes, i did actually need them...) /jve On Fri, Jan 9, 2009 at 1:18 PM, Andrew Coppin

Re: [Haskell-cafe] Re: concurrent haskell: thread priorities

2009-01-09 Thread Don Stewart
marlowsd: Neal Alexander wrote: Thomas DuBuisson wrote: It seems like we could get some priority based scheduling (and still be slackers) if we allow marked green threads to be strictly associated with a specific OS thread (forkChildIO?). I think you want the GHC-only

[Haskell-cafe] Re: databases in Haskell type-safety

2009-01-09 Thread Mauricio
However options in d) do not offer, afaik, type-safety which is emblem of Haskell language, so I wonder how much this could be the problem for real-world usage? I've been doing a lot of low level sqlite3 lately (it's going to be on a hackage package as soon as I finish my current work). As long

[Haskell-cafe] Possible GC bug

2009-01-09 Thread Anish Muttreja
Hi, I have a program that seems to run into occasional garbage collection-related core dumps. The problem typically only occurs after the program has been running for a while and is consuming a large amount of memory (5 - 16GB). The large memory consumption is expected because the program

[Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Mauricio
Linux has High-Resolution Timers (HRTs) that may be appropriate. See the manpage for clock_gettime(), which defines these HRTs: [...] CLOCK_MONOTONIC, in particular, looks suitable. Using it could be a matter of just a few quick likes in FFI. I don't know if Windows has similar features.

Re: [Haskell-cafe] Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread John Goerzen
John A. De Goes wrote: Hi Austin, How do you know it's not your experience with FFI code that isn't biased? As far as I know, there has been no systematic attempt to document whether pure Haskell or FFI-based libraries are better designed and better maintained. Which means your statements

[Haskell-cafe] Re: concurrent haskell: thread priorities

2009-01-09 Thread Neal Alexander
Simon Marlow wrote: Neal Alexander wrote: Thomas DuBuisson wrote: It seems like we could get some priority based scheduling (and still be slackers) if we allow marked green threads to be strictly associated with a specific OS thread (forkChildIO?). I think you want the GHC-only

[Haskell-cafe] Re: databases in Haskell type-safety

2009-01-09 Thread Johannes Waldmann
[on hsql] Still, it would be nice to present some info 'cause web site still shows 1.7 from Dec '05 as the latest release see http://article.gmane.org/gmane.comp.lang.haskell.libraries/10490 J.W. ___ Haskell-Cafe mailing list

[Haskell-cafe] Re: Issues with posix-realtime package

2009-01-09 Thread Galchin, Vasili
Hi Manlio, I am the author of this package. Let me think about what you have said. Regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Possible GC bug

2009-01-09 Thread Don Stewart
Report it as a GHC bug to the GHC team, here: http://hackage.haskell.org/trac/ghc/newticket?type=bug if you believe it is a bug. Cheers, Don anishmuttreja: Hi, I have a program that seems to run into occasional garbage collection-related core dumps. The problem typically

Re: [Haskell-cafe] Possible GC bug

2009-01-09 Thread Anish Muttreja
Thanks, I have reported a bug.I hope the stack trace is useful. Cheers, Anish On Fri, Jan 09, 2009 at 02:21:58PM -0800, Don Stewart wrote: Report it as a GHC bug to the GHC team, here: http://hackage.haskell.org/trac/ghc/newticket?type=bug if you believe it is a bug. Cheers, Don

[Haskell-cafe] Re: Issues with posix-realtime package

2009-01-09 Thread Manlio Perillo
Galchin, Vasili ha scritto: Hi Manlio, I am the author of this package. Let me think about what you have said. Regards, Vasili Thanks. Note that there are no problems if I compile my program, instead of running it using ghci. Manlio Perillo

Re: [Haskell-cafe] Re: Low-level networking [Haskell not ready for Foo]

2009-01-09 Thread Jeff Zaroyko
On Sat, Jan 10, 2009 at 5:20 AM, Andrew Coppin andrewcop...@btinternet.com wrote: Dominic Steinitz wrote: John Goerzen jgoerzen at complete.org writes: Any idea how I get Haskell to send ICMP ECHO packets? (And, obviously, receive the replies.) SocketType claims to support Raw, which I

RE: [Haskell-cafe] HookedBuildInfo and Cabal

2009-01-09 Thread Duncan Coutts
On Sat, 2009-01-10 at 01:40 +0100, Brian B wrote: Hi Duncan, This works for me too, many thanks. Great. The only change I needed was that the real pg_config outputs a newline where your fake one didn't: Ah yes, good point. Duncan ___

Re: [Haskell-cafe] Re: Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread Tim Newsham
Don't get me wrong -- the socket support is pretty decent, but there are also some weird idiosyncrasies, for example requiring that the PortNum is specified in network byte order and lacking a function to convert host-network byte order (hton). PortNum is indeed strange, but it does allow yo

[Haskell-cafe] Shared library creating on Mac OS X

2009-01-09 Thread Phil
Hi, I¹m hitting a problem trying create shared haskell libs to be linked into a C program on Mac OS X. I¹m using the latest download for Leopard from the GHC page: http://www.haskell.org/ghc/dist/6.10.1/witten/ghc-6.10.1-powerpc-apple-darwi n.tar.bz2 I can get basic executables working fine

[Haskell-cafe] Re: Issues with posix-realtime package

2009-01-09 Thread Galchin, Vasili
hmm Vasili On Fri, Jan 9, 2009 at 5:30 PM, Manlio Perillo manlio_peri...@libero.itwrote: Galchin, Vasili ha scritto: Hi Manlio, I am the author of this package. Let me think about what you have said. Regards, Vasili Thanks. Note that there are no problems if I compile

Re: [Haskell-cafe] Re: Computer time, independent of date

2009-01-09 Thread Steve Schafer
On Fri, 09 Jan 2009 09:28:49 -0600, you wrote: I'm not sure that the original question implied *that* level of need. I can't imagine being worried about leap seconds yet at the same time being willing to accept the potential vagaries of any of the built-in clocks. Steve Schafer Fenestra

Re: [Haskell-cafe] Re: Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-09 Thread Brandon S. Allbery KF8NH
On 2009 Jan 9, at 20:51, Tim Newsham wrote: I'm suprised htonl comes up so often. You can unmarshall data directly from a byte stream to an Int type without caring about the underlying representation of your Int. Why do people want the htonl function? IP address math. (see @ipcalc in

[Haskell-cafe] Re: Issues with posix-realtime package

2009-01-09 Thread Galchin, Vasili
Manlio, so compiling to native machine code works ok but if using ghci byte-code interpreter doesn't . can you supply your program please? Vasili On Fri, Jan 9, 2009 at 5:30 PM, Manlio Perillo manlio_peri...@libero.itwrote: Galchin, Vasili ha scritto: Hi Manlio, I am the author