Re: [Haskell-cafe] pure Haskell database

2008-10-03 Thread Sterling Clover
So the issue is one writer, many readers across processes? Creating an actual mini-db-server might be the proper way to do this. Expose a simple socket by which other processes can query the DB state. If you need persistence between runs of your main server you can always snapshot on

Re: [Haskell-cafe] pure Haskell database

2008-10-01 Thread Manlio Perillo
Graham Fawcett ha scritto: [...] Never though about sparse array, what is the advantage? For the complexity, the same of a good hash map. Almost certainly worse complexity than a hash map; but the overhead could be much smaller. If (for example) you only needed a small number of key/value

Re: [Haskell-cafe] pure Haskell database

2008-09-30 Thread Manlio Perillo
Marc Weber ha scritto: On Wed, Sep 24, 2008 at 11:17:01PM +0200, Manlio Perillo wrote: Hi. I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically increment some integer values, and I

Re: [Haskell-cafe] pure Haskell database

2008-09-30 Thread Manlio Perillo
Graham Fawcett ha scritto: On Thu, Sep 25, 2008 at 5:09 PM, Manlio Perillo [EMAIL PROTECTED] wrote: Graham Fawcett ha scritto: If you're on Intel/Itanium, I believe there's a CMPXCHG instruction that will do atomic compare-and-set on a memory address, and I'm not sure you could get much faster

Re: [Haskell-cafe] pure Haskell database

2008-09-30 Thread Manlio Perillo
Rich Neswold ha scritto: [...] On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I need a simple, concurrent safe, database, written in Haskell.

Re: [Haskell-cafe] pure Haskell database

2008-09-30 Thread Graham Fawcett
On Tue, Sep 30, 2008 at 9:18 AM, Manlio Perillo [EMAIL PROTECTED] wrote: Graham Fawcett ha scritto: On Thu, Sep 25, 2008 at 5:09 PM, Manlio Perillo [EMAIL PROTECTED] wrote: Graham Fawcett ha scritto: If you're on Intel/Itanium, I believe there's a CMPXCHG instruction that will do atomic

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread jean-christophe mincke
Marc What is this strange syntax columns = [ (trackId, conT *''Int* ) It looks like a not ended string literal unless I still have sth to learn about Haskell. Thank you J-C On Thu, Sep 25, 2008 at 12:03 AM, Marc Weber [EMAIL PROTECTED] wrote: On Wed, Sep 24, 2008 at 11:17:01PM +0200,

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Marc Weber
On Thu, Sep 25, 2008 at 11:52:26AM +0200, jean-christophe mincke wrote: Marc What is this strange syntax columns = [ (trackId, conT ''Int ) Hi J-C, I'ts part of template haskell and tells ghc to use the type referenced by Int. There are some getting started guides on haskell.org

Re[2]: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Bulat Ziganshin
Hello jean-christophe, Thursday, September 25, 2008, 1:52:26 PM, you wrote: columns = [ (trackId, conT ''Int ) It looks like a not ended string literal unless I still have sth to learn about Haskell. it's TemplateHaskell, look for Reification in http://www.haskell.org/bz/thdoc.htm --

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Manlio Perillo
Rich Neswold ha scritto: On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Rich Neswold
On Thu, Sep 25, 2008 at 11:09 AM, Manlio Perillo [EMAIL PROTECTED]wrote: Rich Neswold ha scritto: On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: I need a simple, concurrent safe, database, written in Haskell. A database with the

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Graham Fawcett
On Wed, Sep 24, 2008 at 5:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: Hi. I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically increment some integer values, and I would like to avoid

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Manlio Perillo
Graham Fawcett ha scritto: On Wed, Sep 24, 2008 at 5:17 PM, Manlio Perillo [EMAIL PROTECTED] wrote: Hi. I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically increment some integer values,

Re: [Haskell-cafe] pure Haskell database

2008-09-25 Thread Graham Fawcett
On Thu, Sep 25, 2008 at 5:09 PM, Manlio Perillo [EMAIL PROTECTED] wrote: Graham Fawcett ha scritto: If you're on Intel/Itanium, I believe there's a CMPXCHG instruction that will do atomic compare-and-set on a memory address, and I'm not sure you could get much faster than that. :-) I have an

[Haskell-cafe] pure Haskell database

2008-09-24 Thread Manlio Perillo
Hi. I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically increment some integer values, and I would like to avoid to use SQLite. Thanks Manlio Perillo

Re: [Haskell-cafe] pure Haskell database

2008-09-24 Thread Rich Neswold
On Wed, Sep 24, 2008 at 4:17 PM, Manlio Perillo [EMAIL PROTECTED]wrote: I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically increment some integer values, and I would like to avoid to

Re: [Haskell-cafe] pure Haskell database

2008-09-24 Thread Marc Weber
On Wed, Sep 24, 2008 at 11:17:01PM +0200, Manlio Perillo wrote: Hi. I need a simple, concurrent safe, database, written in Haskell. A database with the interface of Data.Map would be great, since what I need to to is atomically increment some integer values, and I would like to avoid