This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------- | |
# general layout of the land | |
# ---------------------------------- | |
$GOPATH/src/.go | |
$GOPATH/src/.go/config | |
$GOPATH/src/.go/vendors # for all projects | |
# ---------------------------------- | |
# $GOPATH/.go/vendors sketch | |
# ---------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
) | |
var option = struct { | |
knob uint | |
}{ | |
knob: 4096, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x---1000 0x---2000 # v.mem address space and v.mem page alignments | |
| 0x---1080 | 0x--------2080 # ~ and allocated [512]uint64 page bucket array | |
| | r1 r2 | r3| | |
----|-------------*-- /.../ -*----|-*------ | |
| | | |
bucket[n] bucket[n+1] # Go d.s. as allocated - word aligned | |
- swap bucket[n][r1] with bucket[n][r3] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[19]--bkts: 524288 108869352 0.814 | prob% (99.9985 0.0015 0.0000 0.0000) max (21 0 0) o/f (n 1644 pgs 6) PIT-pages:256 | |
so 99.9985 primary page, 0.0015% 2nd, etc. | |
1644 is the total number of keys that missed their primary (out of 524288 * 255). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
± ./wot master | |
panic: n:1152066 now:1407851832361738000 t0:1407851832361738425 dt:-425 | |
goroutine 23 [running]: | |
runtime.panic(0x97380, 0x2081ec020) | |
/usr/local/go/src/pkg/runtime/panic.c:279 +0xf5 | |
main.func·004() | |
/Users/alphazero/go/src/lsf/exp/wot.go:38 +0x1fa | |
created by main.main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- initial state of ContactInfo -- | |
actor: root - Joubin - address: 321 Infinity Unloop - email: [email protected] | |
-- run the parallel tasks -- | |
-- merge beings -- | |
actor: actor-1 - Joubin - address: 321 Infinity Unloop - email: [email protected] | |
actor: actor-2 - Joubin - address: 123 Main Street - email: [email protected] | |
-- merge end -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
const clen = 3 // knob - needs to match parr below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a very thin convenience wrapper over go's log package | |
// that also alters the semantics of go log's Error and Fatal: | |
// none of the functions of this package will ever panic() or | |
// call os.Exit(). | |
// | |
// Log levels are prefixed to the user log data for each | |
// eponymous function i.e. logger.Error(..) will emit a log | |
// message that begins (after prefix) with ERROR - .. | |
// | |
// Package also opts for logger.Lmicroseconds prefix in addition |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oss.alphazero.temp; | |
import java.util.Map; | |
public class GenericFoo<K, V, T extends Map<K, V>> { | |
} | |
-- javap -- | |
Compiled from "GenericFoo.java" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Main concern for me is lack of generic functions | |
* it really isn't that bad. 2 (un-necessary given the information at hand) casts occur. | |
* - One category e.g. C#Add(..) entails casts by the provider, | |
* so that is not a huge concern. Note that the body of text typed remains effectively the same with or without generics. | |
* | |
* - other category e.g. call site casts remains. That is a concern that can't be addressed by the provider of the library, | |
* but I suppose it is ultimately partially the responsibility of the | |
package main | |
import "fmt" |