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
| seven@broodmother :: ~/Workspaces/pegex-cdent ‹master*› % make test 2 ↵ | |
| mkdir -p lib/Pegex | |
| mkdir -p lib/Pegex/Parser | |
| mkdir -p lib/Pegex/Pegex | |
| mkdir -p lib/Pegex/Grammar | |
| coffee --compile -p src/Pegex/Parser/Indent.coffee > lib/Pegex/Parser/Indent.js | |
| coffee --compile -p src/Pegex/Parser.coffee > lib/Pegex/Parser.js | |
| coffee --compile -p src/Pegex/Pegex/AST.coffee > lib/Pegex/Pegex/AST.js | |
| coffee --compile -p src/Pegex/Pegex/Grammar.coffee > lib/Pegex/Pegex/Grammar.js | |
| coffee --compile -p src/Pegex/Compiler.coffee > lib/Pegex/Compiler.js |
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"; "time" ) | |
| // type Board | |
| // The game board | |
| type Board struct { | |
| tiles [][]int | |
| } |
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 doomed | |
| import ("math/rand"; "fmt") | |
| // UGH WHY AM I DOING IT LIKE THIS | |
| const ( | |
| Unused = -1 | |
| NotGenerated = 0 | |
| Mountain = 1 |
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 doomed | |
| import("testing"; "fmt") | |
| func TestNewBoard(t *testing.T) { | |
| b := NewBoard(17, 17) | |
| if len(b.grid) != 17 { t.Errorf("Board size is wrong!") } | |
| } | |
| func TestGenerator(t *testing.T) { |
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 mapgen | |
| type PerlinNoisePRNG struct { | |
| seed, octaves int | |
| persistence, frequency, amplitude float64 | |
| } | |
| func (prng *PerlinNoisePRNG) NoiseAt(x, y float64) float64 { | |
| n := int(y) * 47 + int(x) + prng.seed | |
| n = (n << 13) ^ n |
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 mapgen | |
| import "testing" | |
| func TestNoiseGenerator(t *testing.T) { | |
| prng := new(PerlinNoisePRNG) | |
| prng.seed = 1 | |
| var e float64 | |
| for i := 0.0; i < 64; i++ { | |
| for j := 0.0; j < 64; j++ { |
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 Card; | |
| sub new { | |
| my $type = shift; | |
| my $obj = []; | |
| my $args = [@_]; | |
| if( ref(\$args->[0]) eq 'SCALAR' ) { | |
| if( $args->[0] eq 'key' ) { | |
| $obj = [$args->[1], $args->[3]]; |
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
| sevvie@Prudence - ~/Downloads % ping guildwars2.com [0] | |
| PING guildwars2.com (64.25.40.16): 56 data bytes | |
| 64 bytes from 64.25.40.16: icmp_seq=0 ttl=112 time=136.137 ms | |
| 64 bytes from 64.25.40.16: icmp_seq=0 ttl=112 time=136.543 ms (DUP!) | |
| 64 bytes from 64.25.40.16: icmp_seq=0 ttl=112 time=136.551 ms (DUP!) | |
| 64 bytes from 64.25.40.16: icmp_seq=0 ttl=112 time=136.575 ms (DUP!) | |
| 64 bytes from 64.25.40.16: icmp_seq=1 ttl=112 time=95.445 ms | |
| 64 bytes from 64.25.40.16: icmp_seq=1 ttl=112 time=95.829 ms (DUP!) | |
| 64 bytes from 64.25.40.16: icmp_seq=1 ttl=112 time=95.849 ms (DUP!) | |
| 64 bytes from 64.25.40.16: icmp_seq=1 ttl=112 time=96.232 ms (DUP!) |
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
| # Conway's Game of Life, in LiveScript | |
| # ==================================== | |
| # | |
| # Conway's Game of Life is a cellular automaton, published by John H Conway | |
| # in 1970, fulfilling the design principles but greatly simplifying the | |
| # research of von Neumann, into a hypothetical machine that could build | |
| # copies of itself. It is a zero-player game, meaning there is no input, and | |
| # the game will progress on its own with a 'seed', or configuration, to | |
| # begin with. | |
| # |
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
| #!env lsc | |
| global <<< require \prelude-ls | |
| cmd-line-args = drop 2, process.argv | |
| console.log cmd-line-args |
OlderNewer