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
/* Example usage of internal api */ | |
#include <aie_arc.h> | |
typedef struct Header { | |
char magic[4]; | |
uint32_t fcount; | |
uint64_t dummy; | |
} Header; |
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
-- Concatenate contents of strings1 with strings2 and the rest. | |
-- Return flat table of all possible concatenations. | |
local function Affixate(strings1, strings2, ...) | |
strings1 = MakeFlatTable(strings1) | |
if not strings2 then | |
return strings1 | |
end | |
strings2 = MakeFlatTable(strings2) | |
local result = {} |
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" | |
import "fmt" | |
import "os" | |
var oz = flag.Bool("oz", false, "if false, write 55h, otherwise write AAh.") | |
var len = flag.Uint("len", 512, "length of the bytes buffer") | |
func 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
set nocompatible | |
set background=dark | |
set rtp+=~/vimfiles/bundle/vundle | |
let path='~/vimfiles/bundle' | |
call vundle#rc(path) | |
Plugin 'gmarik/vundle' | |
Plugin 'altercation/vim-colors-solarized' |
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
func (s *Space) evaluateK(dt float64, k int) { | |
q := NewQuad(BB{vect.V{-1, 1}, vect.V{1, -1}}) | |
q.insertSlice(s.bnParticles[k]) | |
for i := range s.bnParticles[k] { | |
p := &s.bnParticles[k][i] | |
p.position = p.position.Add(s.bnParticles[k-1][i].velocity) | |
p.velocity = p.velocity.Sub(p.treeForce(q).Mul(dt)) | |
p.mass = s.bnParticles[k-1][i].mass | |
} | |
} |
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
--- PASS: TestQuadTreeBuilding (0.00 seconds) | |
bnticles_test.go:55: created particle @{0.10466028797961957 0.44050908804501243}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{0.16456005321849043 -0.062285812813019814}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{-0.07536250292873431 0.18682307286710942}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{-0.4343629807825238 -0.34348074526720873}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{-0.4030304810855154 -0.19908813941471293}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{0.015212628502065395 0.31363996099009683}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{-0.2857361274176251 -0.119342810700314}; ->{0 0}; m: 1 | |
bnticles_test.go:55: created particle @{-0.18194182566967015 -0.031110155097576808}; ->{0 0}; m: 1 | |
bnticles_test.go:57: |
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
const char* vertShader = R"( | |
#version 150 | |
uniform mat4 project; | |
uniform mat4 modelview; | |
in float x; | |
in float y; | |
in float z; | |
void main() { | |
gl_Position = project * modelview * vec4(x, y, z, 1.0); |
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
#define CALL_POINTER(pointer, default_val, ...) ((pointer) != NULL) ? (pointer)(__VA_ARGS_) : (default_val) |
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
(21:04:57) red-eagle: hello fello C'ers | |
(21:05:46) fstd: fello hellow C'er | |
(21:07:44) red-eagle: why is c so much better then c++? | |
(21:11:28) bone: red-eagle: don't forget to ask why C++ is so much better than C in ##c++ | |
(21:11:50) red-eagle: good idea | |
(21:11:53) red-eagle: will do | |
(21:11:54) red-eagle: brb | |
... | |
(21:15:25) red-eagle: I did not receive a positive reaction | |
(21:15:27) red-eagle: red-eagle> why is C so much better then C++ |
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
;streaming horribly unreadable functional language | |
let cap 1000 | |
fun 3-5-multiples $ | |
- + sum-multiples-lt 3 cap | |
sum-multiples-lt 5 cap | |
sum-multiples-lt * 3 5 cap | |
fun sum-multiples-lt [n cap] |
OlderNewer