Skip to content

Instantly share code, notes, and snippets.

@gomson
gomson / broken_shader.fs
Created February 20, 2017 16:46 — forked from Erkaman/broken_shader.fs
broken_shader.vs is the broken shader.
// empty fragment shader.
void main()
{
}
@gomson
gomson / adders.c
Created February 12, 2017 22:12 — forked from pervognsen/adders.c
typedef struct { uint64_t b[4]; } uint4x64_t;
// Bitsliced 4-bit adder
uint4x64_t add_sliced(uint4x64_t x, uint4x64_t y) {
uint4x64_t s;
uint64_t c = 0;
for (int i = 0; i < 4; i++) {
s.b[i] = x.b[i] ^ y.b[i] ^ c;
c = (x.b[i] & y.b[i]) | (x.b[i] & c) | (y.b[i] & c);
@gomson
gomson / java-8-lambdas-streams
Created January 19, 2017 19:57 — forked from mmonti/java-8-lambdas-streams
Oracle Massive Open Online Course: Java SE 8 Lambdas and Streams
Lesson 1: Lambda Expressions
This week covers the new lambda expressions feature added to Java SE 8. The lessons cover:
Why lambda expressions are needed in Java.
Why this feature was added to Java after twenty years.
The syntax of lambda expressions.
How to use lambda expressions and the rules that govern their use.
Examples of classes and methods that use lambda expressions like the new removeIf and replaceAll methods in the Collections API.
We provide video instruction along with written tutorials that guide you through the process. Please watch each video carefully to ensure that you have your system properly set up to complete this lesson. The videos and tutorials are listed sequentially, and we recommend that you use the instructional materials in that order.