View mandelbrot.go
package main
import (
"fmt"
"github.com/shiena/ansicolor"
"os"
"sync"
)
const (
View xkcd.go
package main
import (
"fmt"
"net/http"
"encoding/json"
"strconv"
"os"
"log"
"io"
)
View resource_poller.go
package main
import (
"fmt"
"log"
"net/http"
"time"
)
const (
View goroutine_primes.go
package main
import (
"fmt"
)
func main() {
prime := primes()
for {
View goroutine_ping_pong.go
package main
import (
"time"
"fmt"
)
func main() {
var ball int
ch := make(chan int)
View goroutine_timer.go
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i < 10; i++ {
ch := timer(1 * time.Second)
View goroutine_iterator.go
package main
import (
"fmt"
"sync"
"time"
)
func main() {
var ch chan int
View simplexnoise.js
var NOISE = NOISE || { };
NOISE.Simplex = (function() {
var iOctaves = 1,
fPersistence = 0.5,
fResult, fFreq, fPers,
aOctFreq, // frequency per octave
aOctPers, // persistance per octave
fPersMax; // 1 / max persistence
View perlin.js
var NOISE = NOISE || { };
NOISE.Perlin = (function() {
var iOctaves = 1,
fPersistence = 0.2,
fResult, fFreq, fPers,
aOctFreq, // frequency per octave
aOctPers, // persistance per octave
fPersMax; // 1 / max persistence
View prime_goroutine.go
package main
import "fmt"
// Generate the input values passing through the go channel pipe
func generate(ch chan int) {
go func() {
for i := 2; ; i++ {
ch <- i
}