Re: H98 Text IO

2008-02-27 Thread Johan Tibell
On Wed, Feb 27, 2008 at 1:06 AM, Duncan Coutts [EMAIL PROTECTED] wrote: As a data point, Java and python use always locale as default if you don't specify an encoding when opening a text stream. I think personally I'm coming round to the always locale point of view. We already have no

Making rule application less fragile

2008-03-13 Thread Johan Tibell
Hi, I'm trying (for the first time ever) to use RULES pragmas to achieve some nice speedups in my bytestring parsing library. The relevant code in my library's module is: -- The module imports Control.Applicative which containes 'many' and 'some'. -- | The parser @satisfy p@ succeeds for any

Re: Making rule application less fragile

2008-03-13 Thread Johan Tibell
On Thu, Mar 13, 2008 at 11:24 PM, Don Stewart [EMAIL PROTECTED] wrote: Hey Johan, The main thing to remember is that anything you wish to match on in a rule needs to not be inlined in the first pass. So to match many or satisfy robustly, you'll need: {-# NOINLINE [1] many #-} For

Re: Making rule application less fragile

2008-03-14 Thread Johan Tibell
On Fri, Mar 14, 2008 at 6:28 PM, John Meacham [EMAIL PROTECTED] wrote: Note also that you are attaching your rule to 'fmap', however, since your rule only applies to the 'Parser' monad (if I am reading it properly) then 'fmap' will have been replaced by the 'fmap' in the Functor Parser

Re: Optimisation of unpackCString#

2008-04-29 Thread Johan Tibell
On Tue, Apr 29, 2008 at 8:44 PM, Don Stewart [EMAIL PROTECTED] wrote: ndmitchell: That requires Proposal 2, so needs to have an API defined -- including length# and some others. Out of curiosity, how much performance boost would this give in ByteString? It matters for programs with

Re: desperately seeking RULES help

2008-06-07 Thread Johan Tibell
2008/6/7 Conal Elliott [EMAIL PROTECTED]: I'm trying to do some fusion in ghc, and I'd greatly appreciate help with the code below (which is simplified from fusion on linear maps). I've tried every variation I can think of, and always something prevents the fusion. [snip] {-# INLINE onInt

Re: cvs.haskell.org

2008-07-11 Thread Johan Tibell
I've been trying to get the latest haskell-mode the last few weeks without success. On Fri, Jul 11, 2008 at 12:53 PM, Christian Maeder [EMAIL PROTECTED] wrote: Hi, What happened to the haskell cvs server? I used to get the programatica sources from there. But cvs -d :pserver:[EMAIL

Re: Weekly IRC meeting?

2008-07-11 Thread Johan Tibell
On Fri, Jul 11, 2008 at 11:08 AM, Simon Marlow [EMAIL PROTECTED] wrote: Hi folks, I've been wondering whether it would be useful to have a weekly IRC meeting to discuss GHC. The idea would be that this is a scheduled time when the developers turn up on #ghc, we'll discuss current topics

Re: Weekly IRC meeting?

2008-07-17 Thread Johan Tibell
On Thu, Jul 17, 2008 at 1:33 PM, Simon Marlow [EMAIL PROTECTED] wrote: Thanks to everyone who turned up and joined in, we had an interesting discussion about the HLP. On this basis I think we should try making it a weekly event. Thanks for arranging the meeting. I couldn't attend this time

Re: Weekly IRC meeting?

2008-07-21 Thread Johan Tibell
On Mon, Jul 21, 2008 at 12:41 PM, Simon Marlow [EMAIL PROTECTED] wrote: Ian and I talked about possibly trying a different time - 9pm UK time, which would be slightly less friendly to us in the UK (I have my work/life balance to think about you know :-) but more friendly to people in the US. I

Re: Version control systems

2008-08-13 Thread Johan Tibell
On Wed, Aug 13, 2008 at 2:49 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Ian, I completely agree with you. I love the darcs vcs model, too. However, we have three discussions here: (1) Do we want darcs vcs model? Except Thomas Schilling, who seems to be dead set to get rid of

Re: Version control systems

2008-08-13 Thread Johan Tibell
As someone who is not contributing to the core libraries I find a few things in this discussions a bit puzzlng. - Why does NHC98 break so often? Is it because people are checking in code that is not Haskell 98 compatible? - It seems to me that implementations share libraries using CPP. At least

Re: Version control systems

2008-08-13 Thread Johan Tibell
On Wed, Aug 13, 2008 at 12:21 PM, Malcolm Wallace [EMAIL PROTECTED] wrote: - Why does NHC98 break so often? Is it because people are checking in code that is not Haskell 98 compatible? Yes, there is a bit of that. Also, as you point out, there is quite a lot of CPP conditionally compiled

Re: Version control systems

2008-08-13 Thread Johan Tibell
On Wed, Aug 13, 2008 at 1:52 PM, Malcolm Wallace [EMAIL PROTECTED] wrote: I don't think that is the right policy. Everybody (including Malcolm) should validate. If you contribute code to the linux kernel, comprehensive testing of the code is a requirement, too. The analogy is flawed. It

Re: Version control systems

2008-08-15 Thread Johan Tibell
On Fri, Aug 15, 2008 at 4:38 PM, Ian Lynagh [EMAIL PROTECTED] wrote: One way that it is worse is that you will get a lot more automatic merge commits when you pull changes from the central repo into a repo in which you have local commits. I don't think that there is anything bad about these,

Re: Version control systems

2008-08-16 Thread Johan Tibell
On Sat, Aug 16, 2008 at 12:21 AM, Thomas Schilling [EMAIL PROTECTED] wrote: you don't use local branches? I do. I like to keep a clean linear history on top of the upstream repo. So I might do work in a topic branch, rebase it on my master branch which is synced with upstream and then push. --

Re: Version control systems

2008-08-19 Thread Johan Tibell
Git 1.6.0 was just released [1]. Might be of interest given the current discussion. I cherry picked some highlights that might matter to us: * Source changes needed for porting to MinGW environment are now all in the main git.git codebase. * even more documentation pages are now accessible via

Re: [Haskell-cafe] HEADS UP: finalizer changes coming in GHC 6.10.2

2009-01-14 Thread Johan Tibell
On Wed, Jan 14, 2009 at 1:14 PM, Simon Marlow marlo...@gmail.com wrote: By popular demand, GHC 6.10.2 will support finalizers that are actually guaranteed to run, and run promptly. There aren't any API changes: this happens for finalizers created using newForeignPtr as normal. Does this

Re: permissions api in directory package is useless (and possibly harmful)

2009-01-28 Thread Johan Tibell
On Wed, Jan 28, 2009 at 2:13 PM, Duncan Coutts duncan.cou...@worc.ox.ac.uk wrote: We need to think about a new better permissions api for the System.Directory module. The current api and also the implementation are at best useless and possibly harmful. Perhaps there's something we can learn

Re: Problems with Network.Socket.getAddrInfo under MacOS 10.5, GHC 6.10.2?

2009-05-04 Thread Johan Tibell
On Mon, May 4, 2009 at 8:20 PM, Bryan O'Sullivan b...@serpentine.com wrote: On Mon, May 4, 2009 at 8:35 AM, Neil Davies semanticphilosop...@googlemail.com wrote: It does not appear that you can access the 'addrFlags' returned by getAddrInfo, you get the exception: *** Exception: unpackBits:

Re: mtl and network packages in GHC 6.10.3.*

2009-05-27 Thread Johan Tibell
I'll look into it later today when I have access to a Windows install. On May 27, 2009 3:33 AM, Neil Mitchell ndmitch...@gmail.com wrote: Hi, I just downloaded the Windows snapshot of 6.10.3.20090526, and found that mtl and network don't seem to be included. $ ghc-pkg list

Re: mtl and network packages in GHC 6.10.3.*

2009-05-27 Thread Johan Tibell
On Wed, May 27, 2009 at 3:33 AM, Neil Mitchell ndmitch...@gmail.com wrote: In addition, I can't install network under Cygwin, Mingw, or the Windows command line. Here are the errors from Cygwin: I've filed a bug: http://trac.haskell.org/network/ticket/14 In the meantime try 2.2.1.1 Cheers,

Re: mtl and network packages in GHC 6.10.3.*

2009-05-27 Thread Johan Tibell
On Wed, May 27, 2009 at 9:53 PM, Johan Tibell johan.tib...@gmail.comwrote: On Wed, May 27, 2009 at 3:33 AM, Neil Mitchell ndmitch...@gmail.comwrote: In addition, I can't install network under Cygwin, Mingw, or the Windows command line. Here are the errors from Cygwin: I've filed a bug

Re: buildFdSets: file descriptor out of range

2009-07-15 Thread Johan Tibell
2009/7/15 Simon Marlow marlo...@gmail.com On 15/07/2009 05:16, Brandon S. Allbery KF8NH wrote: Reduce this to 1024, otherwise the runtime will eventually find itself dealing with file descriptors beyond the select() limit mentioned above. Someone with more knowledge of the Haskell runtime

Re: buildFdSets: file descriptor out of range

2009-07-16 Thread Johan Tibell
2009/7/16 Kazu Yamamoto k...@iij.ad.jp Hello, I have a standalone (i.e. not integrated into the RTS yet) proof of concept working using kqueue. However, to be portable we still need to fall back to select on systems that don't support anything better. This implies that if you want to

Re: Working with GHC HEAD

2009-08-04 Thread Johan Tibell
On Sun, Aug 2, 2009 at 8:32 PM, Bertram Felgenhauer bertram.felgenha...@googlemail.com wrote: Antoine Latter wrote: - Does anyone have a version of 'network' which builds against GHC head? I could bludgeon in the new GHC.IO.FD.FD type myself, but I'd thought I'd ask around first.

Re: ANNOUNCE: GHC 6.12.1 Release Candidate 1

2009-10-13 Thread Johan Tibell
On Mon, Oct 12, 2009 at 9:17 AM, Philip Weaver philip.wea...@gmail.com wrote: Then, when I tried to build the network package manually, I got this: Building network-2.2.1.4... [1 of 5] Compiling Network.URI  ( Network/URI.hs, dist/build/Network/URI.o ) [2 of 5] Compiling

Re: ANNOUNCE: GHC 6.12.1 Release Candidate 1

2009-10-15 Thread Johan Tibell
On Tue, Oct 13, 2009 at 10:35 PM, Johan Tibell johan.tib...@gmail.com wrote: On Mon, Oct 12, 2009 at 9:17 AM, Philip Weaver philip.wea...@gmail.com wrote: Then, when I tried to build the network package manually, I got this: Building network-2.2.1.4... [1 of 5] Compiling Network.URI

Re: Default value for numCapabilities?

2010-04-28 Thread Johan Tibell
On Wed, Apr 28, 2010 at 8:02 AM, Bryan O'Sullivan b...@serpentine.com wrote: On Tue, Apr 27, 2010 at 7:02 PM, Dimitry Golubovsky golubov...@gmail.com wrote: This is probably about forkProcess rather than forkIO/forkOS, but why this limitation? That's a standard Unix limitation. A child

Re: Parallel Haskell: 2-year project to push real world use

2010-05-03 Thread Johan Tibell
On Mon, May 3, 2010 at 11:12 AM, Simon Peyton-Jones simo...@microsoft.comwrote: | Does this mean DPH is ready for abuse? | | The wiki page sounds pretty tentative, but it looks like it's been awhile | since it's been updated. | | http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell

Avoiding O(n^2) instances when using associated data types to unpack values into constructors

2010-07-06 Thread Johan Tibell
Hi, I'm trying to create a data type for maps where both keys and values are unpacked into the data type constructors (see code at the end of this email). I achieve this using an associated data type of two arguments (`Map` in the code below). The problem I have is that this definition requires

Error building head on OS X

2010-07-20 Thread Johan Tibell
Building from a clean checkout of HEAD (from today) I get: inplace/bin/ghc-stage2 -H32m -O-package-name dph-seq-0.4.0 -hide-all-packages -i -ilibraries/dph/dph-seq/../dph-common -ilibraries/dph/dph-seq/dist-install/build -ilibraries/dph/dph-seq/dist-install/build/autogen

Using associated data types to create unpacked data structures

2010-08-11 Thread Johan Tibell
Hi all, Inspired by the generic maps example at http://www.haskell.org/haskellwiki/GHC/Indexed_types I tried to use associated data types to create a generic finite map that unpacks both the key and value into the leaf data constructor. This makes functions such as lookup faster as the key

Re: Using associated data types to create unpacked data structures

2010-08-12 Thread Johan Tibell
On Thu, Aug 12, 2010 at 11:28 AM, Simon Marlow marlo...@gmail.com wrote: On 11/08/2010 17:03, Johan Tibell wrote: Inspired by the generic maps example at http://www.haskell.org/haskellwiki/GHC/Indexed_types I tried to use associated data types to create a generic finite map that unpacks

Re: Using associated data types to create unpacked data structures

2010-08-12 Thread Johan Tibell
On Thu, Aug 12, 2010 at 12:25 PM, Simon Marlow marlo...@gmail.com wrote: I'm not sure I want lookup (and other operations) to be inlined at every call site though. That's a good point. If inlining isn't a the right option in every case we would have to duplicate the implementation. I had a

Re: Using associated data types to create unpacked data structures

2010-08-12 Thread Johan Tibell
On Thu, Aug 12, 2010 at 1:47 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: None of the mechanism for making this stuff happen is available at the moment. It's an engineering problem that just needs time to be thrown at it. If we could figure out which mechanisms are needed we would

Re: Using associated data types to create unpacked data structures

2010-08-12 Thread Johan Tibell
On Thu, Aug 12, 2010 at 11:28 AM, Simon Marlow marlo...@gmail.com wrote: Rather than try to solve this problem in one go, I would go for a low-tech approach for now: write a TH library to generate the code, and ask the user to declare the versions they need. To make a particular version, the

Re: Using associated data types to create unpacked data structures

2010-08-12 Thread Johan Tibell
On Thu, Aug 12, 2010 at 6:07 PM, Simon Peyton-Jones simo...@microsoft.comwrote: 1. You **want** a distinct blob of lookup code for each different key type, because you really do want a different lookup structure for each There are two reasons to want different blobs of code for the

Re: Using associated data types to create unpacked data structures

2010-08-12 Thread Johan Tibell
On Thu, Aug 12, 2010 at 9:27 PM, scooter@gmail.com wrote: C++ template instantiations are exported as weak linker symbols. It's just that the linker elides all of the implementations. Yes and dead code elimination should also be able to get rid of much of the code duplication even before

Re: Using associated data types to create unpacked data structures

2010-08-13 Thread Johan Tibell
On Fri, Aug 13, 2010 at 1:14 AM, Max Bolingbroke batterseapo...@hotmail.com wrote: On 12 August 2010 20:31, Johan Tibell johan.tib...@gmail.com wrote: Yes and dead code elimination should also be able to get rid of much of the code duplication even before it reaches the linker. I don't

Surprising strictness properties of pre-order fold over a Data.Map

2010-08-18 Thread Johan Tibell
Hi, I was adding a strict pre-order fold to the Data.Map module and I ran into this slightly surprising behavior. Modeled on foldl' for lists I defined foldlWithKey' :: (b - k - a - b) - b - Map k a - b foldlWithKey' f z0 m = go z0 m where go z Tip = z

Re: Surprising strictness properties of pre-order fold over a Data.Map

2010-08-18 Thread Johan Tibell
On Wed, Aug 18, 2010 at 2:47 PM, Ian Lynagh ig...@earth.li wrote: On Wed, Aug 18, 2010 at 12:01:54PM +0200, Johan Tibell wrote: foldlWithKey' :: (b - k - a - b) - b - Map k a - b foldlWithKey' f z0 m = go z0 m where go z Tip = z go z (Bin

Re: Surprising strictness properties of pre-order fold over a Data.Map

2010-08-18 Thread Johan Tibell
On Wed, Aug 18, 2010 at 4:38 PM, Lennart Augustsson lennart.augusts...@gmail.com wrote: You don't know that f is strict in its first argument so you cannot deduce that go is strict in z in the first case. I'm not sure I understand. f :: Int - Int - Int - Int f = \x y z - x + y + z in this

HEAD unbuildable

2010-08-26 Thread Johan Tibell
I'm having trouble building HEAD, to the point where even running make clean fails. $ make clean make maintainer-clean make -r --no-print-directory -f ghc.mk clean CLEANING=YES rm -rf inplace rm -rf rm -rf docs/users_guide/users_guide docs/users_guide/users_guide.pdf

Re: Confusing warnings from GHC HEAD

2010-08-31 Thread Johan Tibell
On Tue, Aug 31, 2010 at 11:06 AM, Simon Peyton-Jones simo...@microsoft.comwrote: I can’t reproduce this. With the enclosed module and HEAD, I get the warning; but when I add –fspec-constr-count=5, the warning goes away and I get the specialised rules. Is this the right fix in general? I

Collecting all external names in a module

2010-09-10 Thread Johan Tibell
Hi, I have a question regarding the GHC API. Given a module, I'm trying to collect * the Name and SrcSpan of all top-level definitions, * the Name and SrcSpan of all (local) uses of these top-level definition * the Name and SrcSpan of all uses of imported definitions. For example, given the

Re: Collecting all external names in a module

2010-09-18 Thread Johan Tibell
Hi Simon, Thanks for the pointers! On Fri, Sep 17, 2010 at 6:29 PM, Simon Peyton-Jones simo...@microsoft.comwrote: GHC already collects all RdrNames for imported things, for use when reporting unused imports. But it doesn’t collect the SrcSpan of the occurrences, nor does it collect

Re: Collecting all external names in a module

2010-09-20 Thread Johan Tibell
On Mon, Sep 20, 2010 at 12:47 PM, Simon Peyton-Jones simo...@microsoft.comwrote: Thomas had it right; it’s just a particular kind of fold. The key parts of the traversal would be: ·Occurrences.getExpr g (HsVar v) = g_occ g v Don't I need to work on LHsExpr rather than

Re: Collecting all external names in a module

2010-09-20 Thread Johan Tibell
More hacking leads to more questions! IDs occur in many places in the AST and I'm not sure which ones I should record (by calling g_occ) during my traversal. Should I only gather the ones in HsVar or are there other IDs of interest? As I explained in my first email, I'm looking for occurrences of

Unaligned word-sized reads on ByteArray#

2010-10-24 Thread Johan Tibell
Hi, I noticed that indexWordArray# only allows for aligned reads (by forcing the offset to be in words, rather than in bytes.) Is it possible to perform unaligned reads on a ByteArray# e.g. going via Addr#? There's the byteArrayContent# primitive but I don't know how to force the ByteArray# to

Re: Parallel, Incremental Linking

2010-12-07 Thread Johan Tibell
On Tue, Dec 7, 2010 at 12:00 PM, Bulat Ziganshin bulat.zigans...@gmail.com wrote: Hello John, Tuesday, December 7, 2010, 11:54:22 AM, you wrote: The bottleneck for building on my multi-core machine is ld, which afaik, there was some alternative linker, at least for linux systems gold,

Re: [darcs-users] How to develop on a (GHC) branch with darcs

2010-12-08 Thread Johan Tibell
On Wed, Dec 8, 2010 at 12:31 PM, Edward Z. Yang ezy...@mit.edu wrote: I like Git for Computer Scientists [1] and Git in pictures [2].  It also sounds like a Git for Darcs users might be in order. Once you got the general ideas down I'd recommend

HEAD doesn't build on OS X

2010-12-14 Thread Johan Tibell
Starting with a clean tree I get: /usr/bin/ghc -H32m -O -Wall -Werror -H64m -O0 -package-conf libraries/bootstrapping.conf -package-name ghc-7.1 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn

Re: RFC: migrating to git

2011-01-10 Thread Johan Tibell
On Mon, Jan 10, 2011 at 12:19 PM, Simon Marlow marlo...@gmail.com wrote: We're intrested in opinions from both active and potential GHC developers/contributors.  Let us know what you think - would this make life harder or easier for you?  Would it make you less likely or more likely to

Re: RFC: migrating to git

2011-01-10 Thread Johan Tibell
On Mon, Jan 10, 2011 at 2:02 PM, Max Bolingbroke batterseapo...@hotmail.com wrote: Naturally other workflows are possible and I'm sure other list members will chime in with their own favourites :-) Here's the flow I use: http://nvie.com/posts/a-successful-git-branching-model/ with the

Re: Mercurial? Re: RFC: migrating to git

2011-01-10 Thread Johan Tibell
On Mon, Jan 10, 2011 at 2:34 PM, Pavel Perikov peri...@gmail.com wrote: Please please consider Mercurial if migration from darcs is inevitable :) While Mercurial is a fine choice, I think there are more Haskellers that use Git than Mercurial. Probably because GitHub is such an awesome service.

Re: Mercurial? Re: RFC: migrating to git

2011-01-10 Thread Johan Tibell
On Mon, Jan 10, 2011 at 2:43 PM, Pavel Perikov peri...@gmail.com wrote: On 10.01.2011, at 16:40, Johan Tibell wrote: While Mercurial is a fine choice, I think there are more Haskellers that use Git than Mercurial. Probably because GitHub is such an awesome service. Interesting

Re: RFC: migrating to git

2011-01-10 Thread Johan Tibell
On Mon, Jan 10, 2011 at 5:25 PM, Nils Anders Danielsson n...@cs.nott.ac.uk wrote: Even if GitHub is used you should probably arrange some other kind of backup solution, because GitHub reserves the right to delete your repository for any reason at any time (http://help.github.com/terms/). If

Re: git repos for testing (was: Re: RFC: migrating to git)

2011-01-13 Thread Johan Tibell
On Thu, Jan 13, 2011 at 4:03 PM, Simon Marlow marlo...@gmail.com wrote: I've made git mirrors of the current GHC HEAD repos (all of them), so people can try out their workflows with git. Poking around in the different repos works for me and is fast. For example: Find new files in base: $ cd

Can't make sense of newArray# docs

2011-01-18 Thread Johan Tibell
Hi, The docs for newArray# states: Create a new mutable array of specified size (in bytes), in the specified state thread, with each element containing the specified initial value. Why is the size in bytes? Is Array# meant to be used both for boxed and unboxed values? For arrays of boxed values

Kernel panic when building HEAD on OS X 10.6.4

2011-01-28 Thread Johan Tibell
Hi, My computer dies a horrible death (i.e. kernel panic) whenever I build GHC from HEAD (currently using the quickest build configuration). Anyone had the same problem in the past? Any workarounds? Johan ___ Glasgow-haskell-users mailing list

Re: Kernel panic when building HEAD on OS X 10.6.4

2011-01-28 Thread Johan Tibell
On Fri, Jan 28, 2011 at 2:44 PM, Johan Tibell johan.tib...@gmail.com wrote: My computer dies a horrible death (i.e. kernel panic) whenever I build GHC from HEAD (currently using the quickest build configuration). Anyone had the same problem in the past? Any workarounds? Here are some details

Re: Kernel panic when building HEAD on OS X 10.6.4

2011-01-31 Thread Johan Tibell
On Mon, Jan 31, 2011 at 4:33 AM, Manuel M T Chakravarty mchakrava...@mac.com wrote: Are you building inside a Parallels VM?  If so, it is probably a Parallels bug (which also explain why compiling GHC can lead to a kernel panic). If the GHC build is not in a Parallels VM, I would suggest to

Re: Kernel panic when building HEAD on OS X 10.6.4

2011-01-31 Thread Johan Tibell
On Mon, Jan 31, 2011 at 10:15 AM, John Meacham j...@repetae.net wrote: Any chance a cooling fan inside died and you are overheating it? Can you reproduce the failure with other heavy load programs, can you run a widget that monitors the internal temperatures and other sensors during the

Re: Kernel panic when building HEAD on OS X 10.6.4

2011-02-02 Thread Johan Tibell
The issue seems to be related to PGP encryption of the disk. Creating a new disk image, mounting it, and building GHC on it works. Johan ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: Adventures with threadDelay Mac OS X

2011-02-13 Thread Johan Tibell
On Sun, Feb 13, 2011 at 11:27 AM, Pavel Perikov peri...@gmail.com wrote: hi list. I tried to build myself 64-bit compiler under mac os x. I started with the distribution of 7.0.1 provided by Gregory Wright. It installed and worked fine but 7.0.1 has some known bugs so I moved on to later

Re: cabal install network was: Re: ANNOUNCE: GHC 7.0.2 Release Candidate 2

2011-02-21 Thread Johan Tibell
Just to double check. Is there a problem with the network library that I need to fix or is this just GHC/Cabal related? Johan ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: ANNOUNCE: GHC 7.0.2 Release Candidate 1

2011-02-23 Thread Johan Tibell
On Tue, Feb 22, 2011 at 8:22 AM, paolino paolo.verone...@gmail.com wrote: Hi, I've a problem compiling last network package 2.3.0.2 [ 4 of 10] Compiling Network.Socket   ( dist/build/Network/Socket.hs, dist/build/Network/Socket.o ) Network/Socket.hsc:1701:11:    Ambiguous occurrence

Re: Faster Array#/MutableArray# copies

2011-02-28 Thread Johan Tibell
On Mon, Feb 28, 2011 at 9:01 AM, Simon Marlow marlo...@gmail.com wrote: On 18/02/2011 19:42, Nathan Howell wrote: On Fri, Feb 18, 2011 at 12:54 AM, Roman Leshchinskiy r...@cse.unsw.edu.au mailto:r...@cse.unsw.edu.au wrote:    Max Bolingbroke wrote:     On 18 February 2011 01:18, Johan

Re: memory slop (was: Using the GHC heap profiler)

2011-03-22 Thread Johan Tibell
On Wed, Mar 23, 2011 at 9:32 AM, Tim Docker t...@dockerz.net wrote:  Productivity  78.2% of total user, 76.5% of total elapsed As a rule of thumb GC time should be less than 10%. This seems strange. The maximum residency of 12MB sounds about correct for my data. But what's with the 59MB of

Some tips for using git rebase and keeping your history clean

2011-04-06 Thread Johan Tibell
Hi all, Since we've now switched to git I though I share Linus' notes on rebasing for those of you who haven't seen them: http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html The mail talks about when to use rebase and when not to. Johan

C-- source highlighting using source-highlight

2011-04-14 Thread Johan Tibell
Hi, I've thrown together a small source-highlight language file for C--. You can use it to e.g. highlight C-- code when piped through less. ### Installion ### # This works on Debian/Ubuntu $ sudo apt-get install source-highlight # Put this file anywhere $ cat $HOME/cmm.lang comment start // #

Head does not build on OS X

2011-04-22 Thread Johan Tibell
Here's the error. I've run make clean, but it didn't help: /usr/bin/ghc -H64m -O -fasm -package-conf libraries/bootstrapping.conf -package-name Cabal-1.11.0 -hide-all-packages -i -ilibraries/Cabal/. -ilibraries/Cabal/dist-boot/build -ilibraries/Cabal/dist-boot/build/autogen

Re: Head does not build on OS X

2011-04-22 Thread Johan Tibell
On Fri, Apr 22, 2011 at 6:20 PM, Ian Lynagh ig...@earth.li wrote: On Fri, Apr 22, 2011 at 08:53:44AM +0200, Johan Tibell wrote: Here's the error. I've run make clean, but it didn't help: It sounds like you need to run perl boot. Already ran a make clean

Incrementally consuming the eventlog

2011-04-28 Thread Johan Tibell
Hi, We were discussing how to consume the eventlog incrementally on #ghc today. Would it be feasible to offer an API (e.g. GHC.EventLog) that allows programs to register for events that occur in the program? Programs would register listeners like so: registerEventListener (\ event -

Re: Incrementally consuming the eventlog

2011-05-01 Thread Johan Tibell
On Thu, Apr 28, 2011 at 11:53 PM, Donnie Jones don...@darthik.com wrote: Anyway, from your description, I don't understand how a listener would consume the eventlog incrementally? I simply meant that I want to be able to register listeners for events instead of having to parse the eventlog file

Re: Incrementally consuming the eventlog

2011-05-01 Thread Johan Tibell
On Fri, Apr 29, 2011 at 12:00 AM, Don Stewart don...@gmail.com wrote: I'm very interested in what the best way to get incremental event data from a running GHC process would be. Looking at the code, we flush the event buffer fairly regularly, but the event parser is currently strict. So

Compiling 32-bit GHC on a 64-bit Mac

2011-06-05 Thread Johan Tibell
Hi, I need to reproduce a bug that only appears on 32-bit machines. I don't own such a machine but I was hoping I could compile a 32-bit GHC on my Mac and debug using that. What changes do I need to make (e.g. to build/mk) to build a 32-bit GHC? Cheers, Johan

Re: Compiling 32-bit GHC on a 64-bit Mac

2011-06-06 Thread Johan Tibell
On Sun, Jun 5, 2011 at 2:38 PM, Ian Lynagh ig...@earth.li wrote: On Sun, Jun 05, 2011 at 02:10:39PM +0200, Johan Tibell wrote: I need to reproduce a bug that only appears on 32-bit machines. I don't own such a machine but I was hoping I could compile a 32-bit GHC on my Mac and debug using

Wiki page about new memcpy/memmove/memset primops need a home

2011-06-08 Thread Johan Tibell
Hi, I intend to write a short wiki page explaining the design and use of the new memcpy/memmove/memset primops we added recently. Where would be a good place to put such a page? Cheers, Johan ___ Glasgow-haskell-users mailing list

Re: The role of INLINE and INLINABLE on recursive functions

2011-06-09 Thread Johan Tibell
On Thu, Jun 9, 2011 at 1:43 PM, Simon Peyton-Jones simo...@microsoft.com wrote: Does that help? Definitely. Thanks! Johan ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Using CPP in Cmm

2011-06-09 Thread Johan Tibell
Hi, I'm trying to write a test case to make sure memset gets unrolled correctly by the backend. Unrolling only happens when the alignment and size is statically known so writing a simple Cmm loop that calls memset won't work as the sizes won't be statically known. I want to test memset with a

Re: Wiki page about new memcpy/memmove/memset primops need a home

2011-06-14 Thread Johan Tibell
On Wed, Jun 8, 2011 at 11:26 PM, David Terei davidte...@gmail.com wrote: I would suggest it be put under the Commentary/Compiler. Here's a first draft: http://hackage.haskell.org/trac/ghc/wiki/MemcpyOptimizations Feel free to point out things that need clarification. Cheers, Johan

Reducing the cost of garbage collecting small arrays

2011-06-22 Thread Johan Tibell
Hi, Now when we can efficiently copy small arrays I've gone back to benchmarking/optimizing my hash array mapped trie data structure. The data structure's performance depends on how efficiently we can allocate/collect/copy Array#s and MutableArrays#s of size =32. Speeding up copying helped quite

Re: Reducing the cost of garbage collecting small arrays

2011-06-23 Thread Johan Tibell
On Thu, Jun 23, 2011 at 12:31 AM, Jan-Willem Maessen jmaes...@alum.mit.edu wrote: On Wed, Jun 22, 2011 at 12:33 PM, Johan Tibell johan.tib...@gmail.com wrote: Hi, Now when we can efficiently copy small arrays I've gone back to benchmarking/optimizing my hash array mapped trie data structure

Re: Reducing the cost of garbage collecting small arrays

2011-06-23 Thread Johan Tibell
On Thu, Jun 23, 2011 at 8:27 AM, Johan Tibell johan.tib...@gmail.com wrote: Is 5 the optimal number of bits to slice off at a time (ie the best fanout)?  It sounds like node copy cost on insert argues for a slightly narrower fanout.  You'll be evacuating / scanning more words total, but new

Re: Reducing the cost of garbage collecting small arrays

2011-06-23 Thread Johan Tibell
On Thu, Jun 23, 2011 at 3:27 PM, Jan-Willem Maessen jmaes...@alum.mit.edu wrote: Yes, I'd still expect that; internal node churn with fat nodes exhausts heap more quickly than usual.  If large nodes become the norm, cranking up GC nursery size might be in order. It's great to see that fat

Statically linking a small piece of C into every GHC generated binary

2011-07-19 Thread Johan Tibell
Hi, I'm trying to add support for the POPCNT instruction, which exists on some modern CPUs (e.g. Nehalem). The idea is to add a popCnt# primop which would generate a POPCNT instruction when compiling with -msse4.2. If the user didn't specified -msse4.2, the primop should fall back to some other

Re: Statically linking a small piece of C into every GHC generated binary

2011-07-19 Thread Johan Tibell
On Tue, Jul 19, 2011 at 6:02 PM, Johan Tibell johan.tib...@gmail.com wrote: I've implemented the primop but run into some difficulty: to use the above fallback I need the code to be statically linked into every binary. I'm not quite sure how to achieve that. If dynamic linking doesn't hurt

HEAD doesn't not build on OS X

2011-07-19 Thread Johan Tibell
While trying to build head (from a maintainer-clean tree) I get the following error: echo compiler_stage1_depfile_haskell_EXISTS = YES compiler/stage1/build/.depend-v.haskell.tmp for dir in compiler/stage1/build/./ compiler/stage1/build/Llvm/ compiler/stage1/build/LlvmCodeGen/

Re: HEAD doesn't not build on OS X

2011-07-19 Thread Johan Tibell
I just unpulled all the new GHC event patches, starting with d77df1caad3a5f833aac9275938a0675e1ee6aac, and the build is chugging along. On Tue, Jul 19, 2011 at 8:38 PM, Johan Tibell johan.tib...@gmail.com wrote: While trying to build head (from a maintainer-clean tree) I get the following error

Re: HEAD doesn't not build on OS X

2011-07-19 Thread Johan Tibell
Duncan, could you please take a look. On Tue, Jul 19, 2011 at 9:51 PM, Johan Tibell johan.tib...@gmail.com wrote: I just unpulled all the new GHC event patches, starting with d77df1caad3a5f833aac9275938a0675e1ee6aac, and the build is chugging along. On Tue, Jul 19, 2011 at 8:38 PM, Johan

Re: HEAD doesn't not build on OS X

2011-07-20 Thread Johan Tibell
extern declaration of ‘sparkPoolSize’ rts/Trace.h:516:0: error: ‘Capability’ has no member named ‘sparks’ make[1]: *** [rts/dist/build/Capability.o] Error 1 make[1]: *** Waiting for unfinished jobs make: *** [all] Error 2 On Tue, Jul 19, 2011 at 9:55 PM, Johan Tibell johan.tib...@gmail.com

HEAD does not build on OS X using 7.2.1 as bootstrap compiler

2011-08-11 Thread Johan Tibell
Here's the error I get: compiler/nativeGen/PprBase.hs:26:8: Could not find module `Data.Array.Unsafe' Perhaps you meant Data.Array.Base (from array-0.3.0.3) Data.Array.Unboxed (from array-0.3.0.3) Use -v to see a list of the files searched for. This is from a clean tree.

Can't find interface-file declaration for type constructor or class integer-gmp:GHC.Integer.Type.Integer

2011-08-18 Thread Johan Tibell
I'm trying to refactor the integer-gmp package to fix the breakage explained in #5384. During the refactoring I * moved GHC.Integer.Type to GHC.Integer.GMP.Type, and * added a new GHC.Integer.Type module that re-exports parts of the interface now exposed by GHC.Integer.GMP.Type The content of

Re: Can't find interface-file declaration for type constructor or class integer-gmp:GHC.Integer.Type.Integer

2011-08-18 Thread Johan Tibell
moved! S | -Original Message- | From: glasgow-haskell-users-boun...@haskell.org [mailto:glasgow-haskell-users- | boun...@haskell.org] On Behalf Of Johan Tibell | Sent: 18 August 2011 15:45 | To: glasgow-haskell-users | Subject: Can't find interface-file declaration for type

Re: Can't find interface-file declaration for type constructor or class integer-gmp:GHC.Integer.Type.Integer

2011-08-18 Thread Johan Tibell
On Thu, Aug 18, 2011 at 7:07 PM, Simon Peyton-Jones simo...@microsoft.com wrote: | I shouldn't have to modify PrelNames since I kept GHC.Integer.Type, | no? Or does PrelNames have to contain the name of the module that | originally defined the type? Yes, exactly! This causes some trouble

Re: Can't find interface-file declaration for type constructor or class integer-gmp:GHC.Integer.Type.Integer

2011-08-18 Thread Johan Tibell
On Thu, Aug 18, 2011 at 7:32 PM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: On Thursday 18 August 2011, 19:13:45, Johan Tibell wrote: On Thu, Aug 18, 2011 at 7:07 PM, Simon Peyton-Jones simo...@microsoft.com wrote: | I shouldn't have to modify PrelNames since I kept

Re: Can't find interface-file declaration for type constructor or class integer-gmp:GHC.Integer.Type.Integer

2011-08-19 Thread Johan Tibell
be good to figure out a good design before going much further into implementation. Simon |  -Original Message- |  From: Johan Tibell [mailto:johan.tib...@gmail.com] |  Sent: 18 August 2011 18:14 |  To: Simon Peyton-Jones |  Cc: glasgow-haskell-users |  Subject: Re: Can't find

Re: Can't find interface-file declaration for type constructor or class integer-gmp:GHC.Integer.Type.Integer

2011-08-19 Thread Johan Tibell
the original names of types, which means that moving basic types around totally wrecks backwards compatibility for those of us who use the type name for serialization etc.   -- Lennart (iPhone) On Aug 19, 2011, at 11:00, Johan Tibell johan.tib...@gmail.com wrote: These two parallel

  1   2   3   >