Re: submodule repos on GitHub

2018-07-17 Thread Richard Eisenberg
How clever of someone to note that. I stand down. Thanks!

> On Jul 17, 2018, at 5:08 PM, Matthew Pickering  
> wrote:
> 
> It was changed when a large number of people were cloning the
> git.haskell.org repo after being posted on reddit and it was causing
> load issues.
> 
> There is a comment to this effect in the newcomers page source.
> 
> {{{#!comment
> -- Note: when this page got mentioned on reddit, git.haskell.org
> couldn't handle the load, so we now tell newcomers to clone from
> github, even though it requires one more initial step.
> git clone --recursive git://git.haskell.org/ghc.git
> }}}
> 
> 
> Matt
> 
> On Tue, Jul 17, 2018 at 10:04 PM, Artem Pelenitsyn
>  wrote:
>> I personally consider this to be most reasonable. But maybe I oversee
>> something…
>> 
>> --
>> Best, Artem
>> вт, 17 июля 2018 г. в 22:59, Richard Eisenberg :
>>> 
>>> Aha. I had just jumped to the chase.
>>> 
>>> But is there a reason we don't just point everyone (including newcomers)
>>> to git://git.haskell.org/ghc.git ? That's what I always use myself, and it
>>> seems simpler to do so.
>>> 
>>> Richard
>>> 
>>> 
>>> On Jul 17, 2018, at 3:14 PM, Matthew Pickering
>>>  wrote:
>>> 
>>> Did you do the line above as well?
>>> 
>>> ```
>>> git config --global url."git://github.com/ghc/packages-".insteadOf
>>> git://github.com/ghc/packages/
>>> ```
>>> 
>>> On Tue, Jul 17, 2018 at 8:09 PM, Richard Eisenberg 
>>> wrote:
>>> 
>>> Hi devs,
>>> 
>>> The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers)
>>> recommends cloning GHC with
>>> 
>>> git clone --recursive git://github.com/ghc/ghc
>>> 
>>> 
>>> I believe my students did this with success several weeks ago. But trying
>>> it again today leads to trouble with some submodules, e.g.:
>>> 
>>> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
>>> fatal: remote error:
>>> ghc/packages/Cabal is not a valid repository name
>>> Email supp...@github.com for help
>>> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into submodule
>>> path '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
>>> 
>>> 
>>> Is there something wrong in the internets? Or should we update the
>>> Newcomers page?
>>> 
>>> Thanks,
>>> Richard
>>> ___
>>> ghc-devs mailing list
>>> ghc-devs@haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>> 
>>> 
>>> ___
>>> ghc-devs mailing list
>>> ghc-devs@haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: submodule repos on GitHub

2018-07-17 Thread Matthew Pickering
It was changed when a large number of people were cloning the
git.haskell.org repo after being posted on reddit and it was causing
load issues.

There is a comment to this effect in the newcomers page source.

{{{#!comment
-- Note: when this page got mentioned on reddit, git.haskell.org
couldn't handle the load, so we now tell newcomers to clone from
github, even though it requires one more initial step.
git clone --recursive git://git.haskell.org/ghc.git
}}}


Matt

On Tue, Jul 17, 2018 at 10:04 PM, Artem Pelenitsyn
 wrote:
> I personally consider this to be most reasonable. But maybe I oversee
> something…
>
> --
> Best, Artem
> вт, 17 июля 2018 г. в 22:59, Richard Eisenberg :
>>
>> Aha. I had just jumped to the chase.
>>
>> But is there a reason we don't just point everyone (including newcomers)
>> to git://git.haskell.org/ghc.git ? That's what I always use myself, and it
>> seems simpler to do so.
>>
>> Richard
>>
>>
>> On Jul 17, 2018, at 3:14 PM, Matthew Pickering
>>  wrote:
>>
>> Did you do the line above as well?
>>
>> ```
>> git config --global url."git://github.com/ghc/packages-".insteadOf
>> git://github.com/ghc/packages/
>> ```
>>
>> On Tue, Jul 17, 2018 at 8:09 PM, Richard Eisenberg 
>> wrote:
>>
>> Hi devs,
>>
>> The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers)
>> recommends cloning GHC with
>>
>> git clone --recursive git://github.com/ghc/ghc
>>
>>
>> I believe my students did this with success several weeks ago. But trying
>> it again today leads to trouble with some submodules, e.g.:
>>
>> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
>> fatal: remote error:
>>  ghc/packages/Cabal is not a valid repository name
>>  Email supp...@github.com for help
>> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into submodule
>> path '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
>>
>>
>> Is there something wrong in the internets? Or should we update the
>> Newcomers page?
>>
>> Thanks,
>> Richard
>> ___
>> ghc-devs mailing list
>> ghc-devs@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>
>>
>> ___
>> ghc-devs mailing list
>> ghc-devs@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: submodule repos on GitHub

2018-07-17 Thread Artem Pelenitsyn
I personally consider this to be most reasonable. But maybe I oversee
something…

--
Best, Artem
вт, 17 июля 2018 г. в 22:59, Richard Eisenberg :

> Aha. I had just jumped to the chase.
>
> But is there a reason we don't just point everyone (including newcomers)
> to git://git.haskell.org/ghc.git ? That's what I always use myself, and
> it seems simpler to do so.
>
> Richard
>
>
> On Jul 17, 2018, at 3:14 PM, Matthew Pickering <
> matthewtpicker...@gmail.com> wrote:
>
> Did you do the line above as well?
>
> ```
> git config --global url."git://github.com/ghc/packages-".insteadOf
> git://github.com/ghc/packages/
> ```
>
> On Tue, Jul 17, 2018 at 8:09 PM, Richard Eisenberg 
> wrote:
>
> Hi devs,
>
> The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers)
> recommends cloning GHC with
>
> git clone --recursive git://github.com/ghc/ghc
>
>
> I believe my students did this with success several weeks ago. But trying
> it again today leads to trouble with some submodules, e.g.:
>
> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
> fatal: remote error:
>  ghc/packages/Cabal is not a valid repository name
>  Email supp...@github.com for help
> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into submodule
> path '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
>
>
> Is there something wrong in the internets? Or should we update the
> Newcomers page?
>
> Thanks,
> Richard
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: submodule repos on GitHub

2018-07-17 Thread Richard Eisenberg
Aha. I had just jumped to the chase.

But is there a reason we don't just point everyone (including newcomers) to 
git://git.haskell.org/ghc.git  ? That's what I 
always use myself, and it seems simpler to do so.

Richard

> On Jul 17, 2018, at 3:14 PM, Matthew Pickering  
> wrote:
> 
> Did you do the line above as well?
> 
> ```
> git config --global url."git://github.com/ghc/packages-".insteadOf
> git://github.com/ghc/packages/
> ```
> 
> On Tue, Jul 17, 2018 at 8:09 PM, Richard Eisenberg  
> wrote:
>> Hi devs,
>> 
>> The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers) 
>> recommends cloning GHC with
>> 
>>> git clone --recursive git://github.com/ghc/ghc
>> 
>> I believe my students did this with success several weeks ago. But trying it 
>> again today leads to trouble with some submodules, e.g.:
>> 
>>> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
>>> fatal: remote error:
>>>  ghc/packages/Cabal is not a valid repository name
>>>  Email supp...@github.com for help
>>> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into submodule 
>>> path '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
>>> 
>> 
>> Is there something wrong in the internets? Or should we update the Newcomers 
>> page?
>> 
>> Thanks,
>> Richard
>> ___
>> ghc-devs mailing list
>> ghc-devs@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Write barrier for stack updates?

2018-07-17 Thread Ömer Sinan Ağacan
Hi Simon,

I'm a bit confused about stack updates in generated code and write barriers.
Because stacks are mutable (we push new stuff or maybe even update existing
frames?) it seems to me that we need one these two, similar to other mutable
objects:

- Always keep all stacks in mut_lists
- Add write barriers before updates

However looking at some of the primops like catch# and the code generator that
generates code that pushes update frames I can't see any write barriers and the
GC doesn't always add stacks to mut_lists (unlike e.g. MUT_ARR_PTRS). I also
thought maybe we add a stack to a mut_list when we switch to the TSO that owns
it or we park the TSO, but I don't see anything relevant in Schedule.c or
ThreadPaused.c. So I'm lost. Could you say a few words about how we deal with
mutated stacks in the GC, so that if an old stack points to a young object we
don't collect the young object in a minor GC?

Thanks,

Ömer
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Cmm learning tools

2018-07-17 Thread Daniel Cartwright
Thank you, that was very illuminating.

On Tue, Jul 17, 2018, 3:37 PM Simon Peyton Jones 
wrote:

> Here’s a little bit of background.
>
>
>
>- C—started when Norman Ramsey and I decided to have a stab at
>designing a “portable assembly language”.
>- Our primary motivation was GHC: I wanted to clearly separate the
>business of turning lambda calculus into an imperative language, from that
>of turning the imperative language into machine instructions for a
>particular CPU architecture.  But our intention was that many compilers,
>not just GHC, could generate C--.
>- We published a series of papers describing why this goal is less
>easy than it looks (tail calls, garbage collection, exception handling,
>lightweight threading).
>- But then along came LLVM.   It’s goal was the same (some differences
>in emphasis).   And LLVM “won” – it gained mindshare, a corporate sponsor,
>an ecosystem.   I’m quite happy about this – hundreds of person-years
>invested by someone else .
>- As a result C—is really a GHC-only language (though nothing stops
>other compilers from using it)
>   - Cmm is the GHC data type (defined in compiler/cmm) that
>   represents C—syntax trees internally in GHC.
>   - We do parse foo.cmm for a few runtime system support files; e.g.
>   rts/Apply.cmm
>   - But most Cmm is generated from STG by compiler/codeGen
>   - We do CPS conversion on Cmm
>   - …and then either emit LLVM, or generate assembly code directly
>   (compiler/nativeGen)
>
>
>
> I hope that helps a bit.
>
>
>
> Simon
>
>
>
> *From:* ghc-devs  *On Behalf Of *Gabor Greif
> *Sent:* 17 July 2018 07:17
> *To:* Daniel Cartwright 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cmm learning tools
>
>
>
> No worries! I searched for C--, which was its name back in the day. There
> are a bunch of other conference papers in the "GHC commentary" too.
>
>
>
> Cheers,
>
>
>
>  Gabor
>
>
>
>
>
> Em ter, 17 de jul de 2018 às 08:00, Daniel Cartwright <
> chessai1...@gmail.com> escreveu:
>
> Thanks, I'll check it out.
>
>
>
> P.S.: Apologies if my request seemed low-effort w.r.t. searching, I did
> spend a good 15 minutes doing so before asking, and was unable to find the
> document you just produced.
>
>
>
> On Tue, Jul 17, 2018, 1:49 AM Gabor Greif  wrote:
>
> Hello Daniel,
>
>
>
> a quick web search brought up this manual:
>
>
>
>
> https://www.microsoft.com/en-us/research/wp-content/uploads/1998/01/pal-manual.pdf
> 
>
>
>
> Please note that Cmm is slightly different, but it should get you started.
>
>
>
> Cheers,
>
>
>
>  Gabor
>
>
>
> Em ter, 17 de jul de 2018 às 05:20, Daniel Cartwright <
> chessai1...@gmail.com> escreveu:
>
> Hello all, I've recently become interested in learning Cmm, but cannot
> seem to find any concrete learning resources or extensive papers. It
> doesn't help that the web seems to contain a lot of useless information for
> a newcomer to Cmm. If anyone could provide some reading material about Cmm,
> I would be most grateful.
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> 
>
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Cmm learning tools

2018-07-17 Thread Simon Peyton Jones via ghc-devs
Here’s a little bit of background.


  *   C—started when Norman Ramsey and I decided to have a stab at designing a 
“portable assembly language”.
  *   Our primary motivation was GHC: I wanted to clearly separate the business 
of turning lambda calculus into an imperative language, from that of turning 
the imperative language into machine instructions for a particular CPU 
architecture.  But our intention was that many compilers, not just GHC, could 
generate C--.
  *   We published a series of papers describing why this goal is less easy 
than it looks (tail calls, garbage collection, exception handling, lightweight 
threading).
  *   But then along came LLVM.   It’s goal was the same (some differences in 
emphasis).   And LLVM “won” – it gained mindshare, a corporate sponsor, an 
ecosystem.   I’m quite happy about this – hundreds of person-years invested by 
someone else .
  *   As a result C—is really a GHC-only language (though nothing stops other 
compilers from using it)
 *   Cmm is the GHC data type (defined in compiler/cmm) that represents 
C—syntax trees internally in GHC.
 *   We do parse foo.cmm for a few runtime system support files; e.g. 
rts/Apply.cmm
 *   But most Cmm is generated from STG by compiler/codeGen
 *   We do CPS conversion on Cmm
 *   …and then either emit LLVM, or generate assembly code directly 
(compiler/nativeGen)

I hope that helps a bit.

Simon

From: ghc-devs  On Behalf Of Gabor Greif
Sent: 17 July 2018 07:17
To: Daniel Cartwright 
Cc: ghc-devs@haskell.org
Subject: Re: Cmm learning tools

No worries! I searched for C--, which was its name back in the day. There are a 
bunch of other conference papers in the "GHC commentary" too.

Cheers,

 Gabor


Em ter, 17 de jul de 2018 às 08:00, Daniel Cartwright 
mailto:chessai1...@gmail.com>> escreveu:
Thanks, I'll check it out.

P.S.: Apologies if my request seemed low-effort w.r.t. searching, I did spend a 
good 15 minutes doing so before asking, and was unable to find the document you 
just produced.

On Tue, Jul 17, 2018, 1:49 AM Gabor Greif 
mailto:ggr...@gmail.com>> wrote:
Hello Daniel,

a quick web search brought up this manual:

https://www.microsoft.com/en-us/research/wp-content/uploads/1998/01/pal-manual.pdf

Please note that Cmm is slightly different, but it should get you started.

Cheers,

 Gabor

Em ter, 17 de jul de 2018 às 05:20, Daniel Cartwright 
mailto:chessai1...@gmail.com>> escreveu:
Hello all, I've recently become interested in learning Cmm, but cannot seem to 
find any concrete learning resources or extensive papers. It doesn't help that 
the web seems to contain a lot of useless information for a newcomer to Cmm. If 
anyone could provide some reading material about Cmm, I would be most grateful.
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: submodule repos on GitHub

2018-07-17 Thread Artem Pelenitsyn
The other page

https://ghc.haskell.org/trac/ghc/wiki/Building/GettingTheSources

suggests:

git clone --recursive git://git.haskell.org/ghc.git

This always works to me.

--
Best wishes,
Artem

вт, 17 июля 2018 г. в 21:14, Matthew Pickering :

> Did you do the line above as well?
>
> ```
> git config --global url."git://github.com/ghc/packages-".insteadOf
> git://github.com/ghc/packages/
> ```
>
> On Tue, Jul 17, 2018 at 8:09 PM, Richard Eisenberg 
> wrote:
> > Hi devs,
> >
> > The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers)
> recommends cloning GHC with
> >
> >> git clone --recursive git://github.com/ghc/ghc
> >
> > I believe my students did this with success several weeks ago. But
> trying it again today leads to trouble with some submodules, e.g.:
> >
> >> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
> >> fatal: remote error:
> >>   ghc/packages/Cabal is not a valid repository name
> >>   Email supp...@github.com for help
> >> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into
> submodule path '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
> >>
> >
> > Is there something wrong in the internets? Or should we update the
> Newcomers page?
> >
> > Thanks,
> > Richard
> > ___
> > ghc-devs mailing list
> > ghc-devs@haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: submodule repos on GitHub

2018-07-17 Thread Matthew Pickering
Did you do the line above as well?

```
git config --global url."git://github.com/ghc/packages-".insteadOf
git://github.com/ghc/packages/
```

On Tue, Jul 17, 2018 at 8:09 PM, Richard Eisenberg  wrote:
> Hi devs,
>
> The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers) 
> recommends cloning GHC with
>
>> git clone --recursive git://github.com/ghc/ghc
>
> I believe my students did this with success several weeks ago. But trying it 
> again today leads to trouble with some submodules, e.g.:
>
>> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
>> fatal: remote error:
>>   ghc/packages/Cabal is not a valid repository name
>>   Email supp...@github.com for help
>> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into submodule 
>> path '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
>>
>
> Is there something wrong in the internets? Or should we update the Newcomers 
> page?
>
> Thanks,
> Richard
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


submodule repos on GitHub

2018-07-17 Thread Richard Eisenberg
Hi devs,

The Newcomers page (https://ghc.haskell.org/trac/ghc/wiki/Newcomers) recommends 
cloning GHC with

> git clone --recursive git://github.com/ghc/ghc

I believe my students did this with success several weeks ago. But trying it 
again today leads to trouble with some submodules, e.g.:

> Cloning into '/Users/rae/ltemp/ghc-test/libraries/Cabal'...
> fatal: remote error: 
>   ghc/packages/Cabal is not a valid repository name
>   Email supp...@github.com for help
> fatal: clone of 'git://github.com/ghc/packages/Cabal.git' into submodule path 
> '/Users/rae/ltemp/ghc-test/libraries/Cabal' failed
> 

Is there something wrong in the internets? Or should we update the Newcomers 
page?

Thanks,
Richard
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Cmm learning tools

2018-07-17 Thread Gabor Greif
No worries! I searched for C--, which was its name back in the day. There
are a bunch of other conference papers in the "GHC commentary" too.

Cheers,

 Gabor


Em ter, 17 de jul de 2018 às 08:00, Daniel Cartwright 
escreveu:

> Thanks, I'll check it out.
>
> P.S.: Apologies if my request seemed low-effort w.r.t. searching, I did
> spend a good 15 minutes doing so before asking, and was unable to find the
> document you just produced.
>
> On Tue, Jul 17, 2018, 1:49 AM Gabor Greif  wrote:
>
>> Hello Daniel,
>>
>> a quick web search brought up this manual:
>>
>>
>> https://www.microsoft.com/en-us/research/wp-content/uploads/1998/01/pal-manual.pdf
>>
>> Please note that Cmm is slightly different, but it should get you started.
>>
>> Cheers,
>>
>>  Gabor
>>
>> Em ter, 17 de jul de 2018 às 05:20, Daniel Cartwright <
>> chessai1...@gmail.com> escreveu:
>>
>>> Hello all, I've recently become interested in learning Cmm, but cannot
>>> seem to find any concrete learning resources or extensive papers. It
>>> doesn't help that the web seems to contain a lot of useless information for
>>> a newcomer to Cmm. If anyone could provide some reading material about Cmm,
>>> I would be most grateful.
>>> ___
>>> ghc-devs mailing list
>>> ghc-devs@haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>>>
>>
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs