1. 08 Dec, 2012 1 commit
  2. 07 Dec, 2012 2 commits
    • Russ Cox's avatar
      math/rand: add example / regression test · b99161e4
      Russ Cox authored
      This makes sure the outputs do not change for a fixed seed.
      See also https://golang.org/cl/6905049.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6907048
      b99161e4
    • Russ Cox's avatar
      undo CL 6845121 / 79603a5e4cda · ff2534e0
      Russ Cox authored
      This changes the output of
      
      rand.Seed(0)
      perm := rand.Perm(100)
      
      When giving the same seeds to Go 1.0 and Go 1.1 programs
      I would like them to generate the same random numbers.
      
      ««« original CL description
      math/rand: remove noop iteration in Perm
      
      The first iteration always do `m[0], m[0] = m[0], m[0]`, because
      `rand.Intn(1)` is 0.
      
      fun note: IIRC in TAOCP version of this algorithm, `i` goes
      backward (n-1->1), meaning that the "already" shuffled part of the
      array is never altered betweens iterations, while in the current
      implementation the "not-yet" shuffled part of the array is
      conserved between iterations.
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/6845121
      
      »»»
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/6905049
      ff2534e0
  3. 06 Dec, 2012 17 commits
  4. 05 Dec, 2012 7 commits
  5. 04 Dec, 2012 10 commits
  6. 03 Dec, 2012 3 commits
    • Andrew Gerrand's avatar
      A+C: Egon Elbre (individual CLA) · 936a6d26
      Andrew Gerrand authored
      R=golang-dev, remyoudompheng, iant
      CC=golang-dev
      https://golang.org/cl/6863055
      936a6d26
    • Robert Griesemer's avatar
      spec: channel operations are restricted by the channel direction · cc3f21ce
      Robert Griesemer authored
      Also:
      - 'for' statements with a range clause do not accept send-only
         channels
      - '_, _ = range ch' is not equivalent to "_ = range ch" if ch
         is a channel (rewriting the latter to the former leads to
         an invalid range clause).
      
      These clarifications document the status quo.
      
      R=rsc, r, iant, ken
      CC=golang-dev
      https://golang.org/cl/6874053
      cc3f21ce
    • Dave Cheney's avatar
      cmd/dist: support building on debian/kFreeBSD · 3167c12e
      Dave Cheney authored
      The debian/kFreeBSD project uses the FreeBSD kernel and the debian userspace. From our point of view, this is freebsd not linux as GOOS talks about the kernel syscall interface, not the userspace (although cgo alters that). As debian/kFreeBSD is experimental at this time, I do not think it is worth the effort of duplicating all the freebsd specific code so this is proposal represents a reasonable workaround.
      
      Currently cgo is not supported, make.bash will detect this and disable cgo automatically during the build.
      
      dfc@debian:~/go/src$ uname -a
      GNU/kFreeBSD debian 8.1-1-686 #0 Sat Jul 21 17:02:04 UTC 2012 i686 i386 Intel(R) Core(TM) i5-2415M CPU @ 2.30GHz GNU/kFreeBSD
      dfc@debian:~/go/src$ ../bin/go version
      go version devel +d05272f402ec Sat Dec 01 15:15:14 2012 -0800
      
      Tested with GOOS=freebsd GOARCH=386
      
      R=golang-dev
      CC=golang-dev
      https://golang.org/cl/6868046
      3167c12e