Re[2]: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
Hello Peter, Saturday, September 22, 2007, 1:41:44 AM, you wrote: Is this still up-to-date with the way GHC/GHCi work internally? Then I'll certainly check it out. you should look at SPJ papers' page. it contains section with ghc-implementation details. just a few papers from there, sorted by publication time: Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine. [http://research.microsoft.com/copyright/accept.asp?path=/users/simonpj/papers/spineless-tagless-gmachine.ps.gz] [http://www.haskell.org/ghc/docs/papers/run-time-system.ps.gz] Making a fast curry: push/enter vs. eval/apply for higher-order languages [http://www.haskell.org/~simonmar/papers/eval-apply.pdf] -- Best regards, Bulatmailto:[EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
Thanks for the info, very interesting. Yes, I'm using GHCi, and I'm using forkOS, and I'm using OpenGL... Since I'm used to write heavily multi-threaded/multi-core code in imperative languages, I would like to understand more about the existing execution models, and those black holes... Understanding the low-level details helps a lot for me. Actually the problem was caused by (yet another) strict pattern match in my code, which should have been lazy. I find it strange that this would cause 0% CPU time... But then again I don't understand the details of how GHCi/GHC works. I did read the book Modern Compiler Design (http://www.cs.vu.nl/~dick/MCD.html) which implements a basic Haskell interpreter compiler, so I got an introduction. Anyway, it's a very good learning experience for me to redo FRP from scratch, as I encounter all pitfalls (such as the need for memoization when using recursive streams, the need for lazy pattern matching, the space leaks sneaking up on you, etc). Once I get to understand these in detail, I'll try to re-read the existing papers on FRP, which I hardly understood initially :-) Thanks, Peter Stefan O'Rear wrote: On Wed, Sep 19, 2007 at 10:24:24PM +0100, Neil Mitchell wrote: Hi Peter, So I grabbed ghc-6.7.20070824 (=the latest one for Windows I could find) and the extra-libs, compiled and installed the GLUT package (which I needed), but when I compile my library, I get Could not find module `Data.Map': it is a member of package containers-0.1, which is hidden All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. I also don't think that the debugger will help you track down infinite loop style errors. You might be better off posting the code and asking for help. You said 0% CPU. That's *very* important. It means that you are using the threaded runtime (GHCi?), and that you triggered a blackhole. You should be able to handle this by compiling your program with -prof (do *not* use -threaded!), and running with +RTS -xc. With luck, that will give you a backtrace to the infinite loop. PS. blackholes are a serious dark corner of GHC's execution model, chances are better than even that if you try to use the debugger for this you will discover a new and (for you) crippling bug. I wouldn't recommend it. Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. That's a petty. I really would like to experiment with the debugger :-) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
On 9/21/07, Peter Verswyvelen [EMAIL PROTECTED] wrote: Since I'm used to write heavily multi-threaded/multi-core code in imperative languages, I would like to understand more about the existing execution models, and those black holes... Understanding the low-level details helps a lot for me. I think you want to know about the STG, the Spineless Tagless G-Machine. If I'm correct, that's how GHC works behind the scenes. -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. That's a petty. I really would like to experiment with the debugger :-) Me too! A proper release of GHC 6.8 is very nearby, so you should get your wish then. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
On Fri, Sep 21, 2007 at 05:40:59PM -0300, Felipe Almeida Lessa wrote: On 9/21/07, Peter Verswyvelen [EMAIL PROTECTED] wrote: Since I'm used to write heavily multi-threaded/multi-core code in imperative languages, I would like to understand more about the existing execution models, and those black holes... Understanding the low-level details helps a lot for me. I think you want to know about the STG, the Spineless Tagless G-Machine. If I'm correct, that's how GHC works behind the scenes. STG is a very pretty island, but it's just that - an island. If you want to see the Big Picture, I can only recommend SPJ's 1987 (except for the optimization section, almost everything is still true) book: http://research.microsoft.com/~simonpj/papers/slpj-book-1987/slpj-book-1987.djvu Stefan signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
STG is a very pretty island, but it's just that - an island. If you want to see the Big Picture, I can only recommend SPJ's 1987 (except for the optimization section, almost everything is still true) book: http://research.microsoft.com/~simonpj/papers/slpj-book-1987/slpj-book-1987.djvu Stefan Well, if the sun shines on that island, I wouldn't mind spending a holiday over there ;-) 1987??? Gee, I was still programming in 6502 68000 assembler then :-) Of course, I guess one could not use Haskell back then to make a videogame on home computers with 64KB of RAM ;-) Is this still up-to-date with the way GHC/GHCi work internally? Then I'll certainly check it out. Thanks, Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
Since I'm hopelessly stuck with an weird infinite loop (that consumes 0% CPU time!), and since I can't find the problem using trace, I wanted to try GHC 6.7, which seems to container a debugger (woohoo!!!). Currently I'm using GHC-6.6.1 on Windows. So I grabbed ghc-6.7.20070824 (=the latest one for Windows I could find) and the extra-libs, compiled and installed the GLUT package (which I needed), but when I compile my library, I get Could not find module `Data.Map': it is a member of package containers-0.1, which is hidden So I tried to expose it using GHC-PKG expose containers-0.1 which worked find, because GHC-PKG list prints d:/app/ghc/ghc-6.7.20070824\package.conf: Cabal-1.1.7, GLUT-2.1.1, HUnit-1.1.1, OpenGL-2.2.1, QuickCheck-1.0.1, Win32-2.1, array-0.1, arrows-0.2.1, base-2.1, bytestring-0.1, cgi-3001.1.5, containers-0.1, directory-1.0, fgl-5.4.1, filepath-1.0, (ghc-6.7.20070824), haskell-src-1.0.1, haskell98-1.0, hpc-0.5, html-1.0.1, mtl-1.0.1, network-2.0.1, old-locale-1.0, old-time-1.0, packedstring-0.1, parallel-1.0, parsec-2.0, pretty-1.0, process-1.0, random-1.0, regex-base-0.72, rts-1.0, stm-2.1, template-haskell-0.1, xhtml-3000.0.2 Anybody has an idea how I can continue? Thanks (again!), Peter ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
Hi Peter, So I grabbed ghc-6.7.20070824 (=the latest one for Windows I could find) and the extra-libs, compiled and installed the GLUT package (which I needed), but when I compile my library, I get Could not find module `Data.Map': it is a member of package containers-0.1, which is hidden All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. I also don't think that the debugger will help you track down infinite loop style errors. You might be better off posting the code and asking for help. Thanks Neil ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] GHC 6.7 on Windows / containers-0.1 package?
On Wed, Sep 19, 2007 at 10:24:24PM +0100, Neil Mitchell wrote: Hi Peter, So I grabbed ghc-6.7.20070824 (=the latest one for Windows I could find) and the extra-libs, compiled and installed the GLUT package (which I needed), but when I compile my library, I get Could not find module `Data.Map': it is a member of package containers-0.1, which is hidden All dependencies etc. have changed when going to 6.7/6.8 - you are probably better off using 6.6.1 for now. I also don't think that the debugger will help you track down infinite loop style errors. You might be better off posting the code and asking for help. You said 0% CPU. That's *very* important. It means that you are using the threaded runtime (GHCi?), and that you triggered a blackhole. You should be able to handle this by compiling your program with -prof (do *not* use -threaded!), and running with +RTS -xc. With luck, that will give you a backtrace to the infinite loop. PS. blackholes are a serious dark corner of GHC's execution model, chances are better than even that if you try to use the debugger for this you will discover a new and (for you) crippling bug. I wouldn't recommend it. Stefan signature.asc Description: Digital signature ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe