Python & Haskell

2003-05-30 Thread Sengan . Baring-Gould
Has anybody on the list used Haskell and python together such that the haskell data-types appear to be native Python objects? I'm currently developing a debugger which uses Haskell engines for the algorithmic parts, but I'm finding Python to be a flexible glue language, which my users could more ea

Persistent data

2003-03-03 Thread Sengan . Baring-Gould
Is there some way to reduce the cost of garbage collection over large persistent datastructures without resorting to escaping to C to malloc memory outside the heap? The program I'm working is part database, which cannot discard information. The net result is that I see figures like 82.9% of the t

Balanced ternary tree

2002-09-10 Thread Sengan . Baring-Gould
I was wondering if anyone has implemented a Balanced Ternary Tree module for haskell. According to http://www.ddj.com/documents/s=921/ddj9804a/9804a.htm this would be a better datastructure for symbol tables than the binary tree I am currently using: * Each string is a key, which makes for O(n/2

Re: Lazy IO?

2002-09-03 Thread Sengan . Baring-Gould
On Tue, 3 Sep 2002 20:08:32 +0100 "Duncan Coutts" <[EMAIL PROTECTED]> wrote: > On Tue, 3 Sep 2002 14:49:45 -0400 > [EMAIL PROTECTED] wrote: > > > Is there any way to make the IO Monad lazy? > > > > The simplified version of my problem is that I want to > > generate an infinite structure from an

Lazy IO?

2002-09-03 Thread Sengan . Baring-Gould
Is there any way to make the IO Monad lazy? The simplified version of my problem is that I want to generate an infinite structure from an IOArray and then consume only the relevant part of it. The real version of my problem is that the IOArray is embedded 4 API layers deep and it would be a lot

Re: Haskell slicing tool?

2002-03-19 Thread Sengan . Baring-Gould
On Tue, 19 Mar 2002 09:56:49 + "Colin Runciman" <[EMAIL PROTECTED]> wrote: > > Are there any tools to perform program slicing on Haskell? > > I often find myself wanting to find all "fromJusts" invoked > > from the current function, or all functions that use a > > particular member of my mona

Re: Haskell Programming Environment

2000-10-25 Thread Sengan Baring-Gould
> Hello, > > I'm writing my master thesis. Its subject is 'Haskell Programming > Environment'. It is (or rather will be) an extended text editor working i= > n > graphical (XFree86) environment designed for Haskell programmers. It will= > be > implemented using Fudgets library. > I'm wondering w

Re: mapM/concatMapMy

2000-10-18 Thread Sengan Baring-Gould
Actually I think I figured it out: (>>=) (f c) (\x -> (>>=) (mapM f cs) (\xs -> return (x:xs))) -> (>>=) _(f c)_ (\x -> (>>=) (mapM f cs) (\xs -> return (x:xs))) -> (>>=) (MN c1) (\x -> (>>=) (mapM f cs) (\xs -> return (x:xs))) -> (\(MN c1) \fc2 -> MN $ \s0 -> let (r1,io1,s1) = c1 s0

Re: mapM/concatMapMy

2000-10-18 Thread Sengan Baring-Gould
> > [EMAIL PROTECTED] (Sengan Baring-Gould) wrote: > > > > > mapM seems to be a memory hog (and thus also concatMapM). > > > In the following eg: > > > > > > > main = mapM print ([1..102400] :: [Integer]) > > > > > > mem

Re: mapM/concatMapMy

2000-10-18 Thread Sengan Baring-Gould
> > > [EMAIL PROTECTED] (Sengan Baring-Gould) wrote: > > > mapM seems to be a memory hog (and thus also concatMapM). > > In the following eg: > > > > > main = mapM print ([1..102400] :: [Integer]) > > > > memory usage climbs to 1.6M with ghc

mapM/concatMapM

2000-10-18 Thread Sengan Baring-Gould
mapM seems to be a memory hog (and thus also concatMapM). In the following eg: > main = mapM print ([1..102400] :: [Integer]) memory usage climbs to 1.6M with ghc and needs -K20M, whereas with > main = print ([1..102400] :: [Integer]) memory usage is only 1300 bytes. I instrumented mapM: >