Re: [Haskell-cafe] Lazy language on JVM/CLR

2010-02-08 Thread Marcin Kosiba
On Mon, Feb 8, 2010 at 5:16 PM, John Meacham j...@repetae.net wrote: On Tue, Feb 09, 2010 at 10:42:26AM +1000, Tony Morris wrote: I expect others have forethought and perhaps even experimented with such a language. Are there any dangers to be wary of that undo the entire endeavour? There

Re: [Haskell-cafe] WHNF versus HNF (was: Optimizing unamb by determining the state of a thunk?)

2009-04-22 Thread Marcin Kosiba
inside the body of the first lambda, so according to the article, seq reduces to weak head normal form, not hnf... Hi, Try: Prelude Debug.Trace (f 0) `seq` () \x \y y 2 x () -- Thanks! Marcin Kosiba signature.asc Description: This is a digitally signed message part

Re: [Haskell-cafe] Software Transactional Memory and LWN

2009-06-12 Thread Marcin Kosiba
released an experimental STM-supporing C++ compiler[4]). It is also true, that as the number of cores in cpus grows, STM will become more attractive. Thanks! Marcin Kosiba [1]http://en.wikipedia.org/wiki/Software_transactional_memory#Implementation_issues [2]when a long-lived transaction

Re: [Haskell-cafe] Obscure weirdness

2009-06-20 Thread Marcin Kosiba
. The last thing I'd do is blame it on ghc/ghci, but as always -- such a possibility exists. Thanks! Marcin Kosiba [1] http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-debugger.html ___ Haskell-Cafe mailing list Haskell-Cafe

[Haskell-cafe] FFI and heap memory usage limit

2009-06-22 Thread Marcin Kosiba
/fixed issue. I'm using ghc 6.10.3, bzlib 0.5.0.0. If this is something new then I'll try to come up with a small program which demonstrates the problem. -- Marcin Kosiba ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

[Haskell-cafe] Re: FFI and heap memory usage limit

2009-06-28 Thread Marcin Kosiba
System.Mem.performGC just before allocating the memory. I've already worked around the problem. -- Marcin Kosiba signature.asc Description: This is a digitally signed message part. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] following up on space leak

2009-07-04 Thread Marcin Kosiba
= execStateT mapMLAs (List []) where mapMLAs = sequence_ $ map mapMLA lst mapMLA x = (lift $ fn x) = put -- Marcin Kosiba signature.asc Description: This is a digitally signed message part. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Marcin Kosiba
this worked to a certain extent, composability was a problem, because any sub-procedure which used yield (and thus was an iterator) required being called in a rather inelegant way. Thanks! Marcin Kosiba signature.asc Description: This is a digitally signed message part

Re: [Haskell-cafe] Laziness enhances composability: an example

2009-07-09 Thread Marcin Kosiba
On Thursday 09 July 2009, you wrote: 2009/7/9 Marcin Kosiba marcin.kos...@gmail.com: I thought I'll go the smart way and rely on the Python yield construct to do a CPS transformation of my code.        While this worked to a certain extent, composability was a problem, because any sub

Re: [Haskell-cafe] Re: Laziness enhances composability: an example

2009-07-10 Thread Marcin Kosiba
On Friday 10 July 2009, Gleb Alexeyev wrote: Marcin Kosiba wrote: Hi, To illustrate what I meant I'm attaching two examples. In example_1.py I've written code the way I think would be elegant (but it doesn't work). In example_2.py I've written code so that it works, but it isn't

Re: [Haskell-cafe] Static linking

2009-07-24 Thread Marcin Kosiba
how to correctly specify the pthread library for this? Hi, Try: ghc --make Installer.hs -static -optl-static -optl-pthread If that doesn't work, you can always do a ghc -v, find the command it uses for linking, modify it and run it manually. Thanks! Marcin Kosiba

Re: [Haskell-cafe] Re: DDC compiler and effects; better than Haskell?

2009-08-16 Thread Marcin Kosiba
. -- Thanks! Marcin Kosiba signature.asc Description: This is a digitally signed message part. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: simulation in the haskell way

2009-08-18 Thread Marcin Kosiba
of simulation you'd like to write. -- Thanks! Marcin Kosiba signature.asc Description: This is a digitally signed message part. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Using a monad to decompose a function into functions

2009-03-12 Thread Marcin Kosiba
://monadicheadaches.blogspot.com/2008/01/python-25s-iterators-in-haskell-sort-of.html, the unified concurrency model and Control.Coroutine, but couldn't get the behavior I was going for. Thanks! Marcin Kosiba signature.asc Description: This is a digitally signed message part

Re: [Haskell-cafe] Using a monad to decompose a function into functions

2009-03-12 Thread Marcin Kosiba
On Thursday 12 March 2009, you wrote: 2009/3/12 Marcin Kosiba marcin.kos...@gmail.com: Hi,        I'm doing a bit of research into mobility models and I'm currently exploring implementation language choices for the simulator (*snip*) The simulation algorithm requires expressing

Re: [Haskell-cafe] Using a monad to decompose a function into functions

2009-03-13 Thread Marcin Kosiba
On Friday 13 March 2009, you wrote: 2009/3/13 Marcin Kosiba marcin.kos...@gmail.com: On Thursday 12 March 2009, you wrote: 2009/3/12 Marcin Kosiba marcin.kos...@gmail.com: Hi,        I'm doing a bit of research into mobility models and I'm currently exploring implementation language

Re: [Haskell-cafe] Using a monad to decompose a function into functions

2009-03-13 Thread Marcin Kosiba
On Friday 13 March 2009, Cristiano Paris wrote: 2009/3/13 Marcin Kosiba marcin.kos...@gmail.com: ... Threading the state is not the problem. Maybe this will help: what I have now: fsm world state = case state of  first -    do_stuff_one    (move_up, succ state)  second

Re: [Haskell-cafe] Using a monad to decompose a function into functions

2009-03-14 Thread Marcin Kosiba
On Friday 13 March 2009, Cristiano Paris wrote: 2009/3/13 Marcin Kosiba marcin.kos...@gmail.com: Hi,        I've already checked those out. I tried using your yield implementation and while it works, I couldn't get it to work with the state monad.        So while: data RecPair a b

Re: [Haskell-cafe] Proof of induction case of simple foldl identity.

2009-03-14 Thread Marcin Kosiba
(-) (x-z) zs) - y (IH, a = x, b = z) = (foldl (-) x (z:zs)) - y (R) The trick is to formulate the inductive hypothesis with enough generality, so you have strong foundations to build on. -- Pozdrawiam, Marcin Kosiba signature.asc Description: This is a digitally

Re: [Haskell-cafe] ANN: cmonad 0.1.1

2009-03-29 Thread Marcin Kosiba
;) Unfortunately, GHC lacks certain optimizations to make efficient code when using CMonad, so instead of C speed you get low speed. I mean as a proof-of-concept this is cool, but if your primary concern is performance then I think you're barking up the wrong tree with this. Cheers! Marcin Kosiba

Re: [Haskell-cafe] about import alias

2009-04-04 Thread Marcin Kosiba
, longfunctionnameswhichareapaintoreadandespeciallywrite are a bug and should be treated and fixed by the owner of that code, not by the user. If very function names are that much of a problem to you consider a wrapper library. -- Cheers! Marcin Kosiba signature.asc Description: This is a digitally signed