- Introduction
- I love dynamic languages
- You will hate the compiler (at first)
- Goals for the series
- C vs Go vs Python/Ruby/JavaScript
- Compilation Speed
- Runtime Speed
- Startup Time
This file contains hidden or 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" | |
func main() { | |
func() { | |
goto HELL | |
}() | |
return |
This file contains hidden or 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
resource "remote_data" current_datetime { | |
count = "${var.size}" | |
taint = "is_end_of_the_world" | |
create = "date +%y%m%d%H%M" | |
shell = true | |
} | |
resource "openstack_compute_instance_v2" myinstance { | |
count = "${var.size}" |
Get an invite to the gopher's slack. It is a great resource for just asking questions or discussing various topics you might be interested in.
For Pivots there is also #gophers and #gopher-den-community slack channels.
This file contains hidden or 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
type lock struct { | |
l uint32 | |
} | |
func (l *lock) Lock() { | |
for { | |
if atomic.CompareAndSwapUint32(&l.l, 0, 1) { | |
return | |
} | |
} |
This file contains hidden or 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 ( | |
"net" | |
"os" | |
) | |
const sock = "/tmp/test.sock" | |
func main() { |
This file contains hidden or 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
// This program atomically increments two unit64 values and prints them out | |
// periodically. | |
// | |
// The objective is to capture the same data `stat()` is providing by | |
// instrumenting calls to `read()` and `write()`. | |
package main | |
import ( | |
"log" | |
"sync/atomic" |
This file contains hidden or 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
b github.com/cloudfoundry/diodes.(*OneToOne).TryNext | |
c | |
p d.readIndex | |
p d.writeIndex | |
q | |
n |