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 "github.com/peterhellberg/gfx" | |
const ( | |
numLines = 16 | |
frames = 300 | |
) | |
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
const std = @import("std"); | |
const ray = @cImport({ | |
@cInclude("raylib.h"); | |
}); | |
pub fn main() void { | |
// Initialization | |
//-------------------------------------------------------------------------------------- | |
const screenWidth = 800; |
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 std = @import("std"); | |
const input = @embedFile("input"); | |
const testing = std.testing; | |
const expect = testing.expect; | |
const print = std.debug.print; | |
pub fn main() anyerror!void { | |
var nums = try numberList(std.heap.page_allocator); |
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 ( | |
"math" | |
"time" | |
) | |
func main() { | |
delay := 16 * time.Millisecond | |
coreString := ".,-~:;=!*#$@" |
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
diff --git a/Lesson01/build.zig b/Lesson01/build.zig | |
index 7d1fc5b..83e4ee4 100644 | |
--- a/Lesson01/build.zig | |
+++ b/Lesson01/build.zig | |
@@ -1,5 +1,5 @@ | |
-const Builder = @import("std").build.Builder; | |
-const builtin = @import("builtin"); | |
+const std = @import("std"); | |
+const Builder = std.build.Builder; | |
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 ( | |
"context" | |
"encoding/json" | |
"flag" | |
"os" | |
"time" | |
"github.com/c7/graphql" |
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
// based on https://stackoverflow.com/a/59596600 | |
// Minimal Pure C code to create a window in Cocoa | |
// $ clang minimal.c -framework Cocoa -o minimal.app | |
#include <objc/runtime.h> | |
#include <objc/message.h> | |
#include <Carbon/Carbon.h> | |
#define cls objc_getClass |
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 ( | |
"fmt" | |
"net" | |
"net/http" | |
"sync" | |
"text/template" | |
"github.com/zserge/webview" |
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
diff --git a/hellos.zig b/hellos.zig | |
index 8563852..506f2c9 100644 | |
--- a/hellos.zig | |
+++ b/hellos.zig | |
@@ -20,8 +20,9 @@ export var multiboot align(4) linksection(".multiboot") = MultiBoot{ | |
export var stack_bytes: [16 * 1024]u8 align(16) linksection(".bss") = undefined; | |
const stack_bytes_slice = stack_bytes[0..]; | |
-export nakedcc fn _start() noreturn { | |
- @newStackCall(stack_bytes_slice, kmain); |
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 ( | |
"github.com/hajimehoshi/ebiten" | |
"github.com/peterhellberg/gfx" | |
) | |
type Game struct { | |
gfx.Vec | |
Image *gfx.Paletted |