I hereby claim:
- I am jackdbd on github.
- I am jackdbd (https://keybase.io/jackdbd) on keybase.
- I have a public key ASBqZ9eR47yxI8eZ6ESHGOTIRaafg_TzBwlo5KIcNQJOFQo
To claim this, I am signing this object:
/** | |
* Uses Singular values of transformation matrix to find the length of the | |
* major and minor axes of the scaled pen. | |
* | |
* Found in the cairo tutorial | |
* https://github.com/freedesktop/cairo/tree/6a6ab2475906635fcc5ba0c73182fae73c4f7ee8/doc/tutorial/src | |
* | |
* Dependencies: | |
* - cairo: sudo apt-get install libcairo2-dev | |
* |
//! Memory leak example with different Zig build modes. | |
//! | |
//! The program does not compile because zig detects a memory leak: | |
//! zig build-exe leak.zig -O Debug && ./leak | |
//! zig build-exe leak.zig -O ReleaseSafe && ./leak | |
//! | |
//! The program compiles, but there will be undefined behavior: | |
//! zig build-exe leak.zig -O ReleaseSmall && ./leak | |
//! zig build-exe leak.zig -O ReleaseFast && ./leak | |
//! See also: |
//! Integer overflow with custom int in Zig | |
//! build and run with: | |
//! zig build-exe integer_overflow.zig && ./integer_overflow | |
const std = @import("std"); | |
pub fn main() void { | |
std.log.info("unsigned int (primitive type) [0, 7)", .{}); | |
// usize is an unsigned pointer sized integer. See also: https://github.com/ziglang/zig/issues/5185 | |
// usize is a primitive type: | |
// https://ziglang.org/documentation/master/#Primitive-Types |
//! Minimal XCB + Cairo example in Zig | |
//! Dependencies: libc, xcb, cairo | |
//! install XCB development files | |
//! sudo apt-get install libxcb1-dev | |
//! install cairo development files | |
//! sudo apt-get install libcairo2-dev | |
//! build and run with: | |
//! zig build-exe xcb.zig -lc -lxcb -lcairo && ./xcb | |
const std = @import("std"); | |
const c = @cImport({ |
//! Example of function reflection in zig. | |
//! | |
//! 1. Compile this gist | |
//! zig build-exe reflection.zig -O Debug && ./reflection | |
//! | |
//! 2. Run the tests | |
//! zig test reflection.zig | |
const std = @import("std"); | |
const Hello = struct { |
//! Example of using the zig standard library and reading command line arguments. | |
//! https://ziglang.org/documentation/master/#WASI | |
//! See also the talk Zig loves WASI! by Jakub Konka | |
//! https://www.youtube.com/watch?v=g_Degmqfo4Q | |
/// In order to run this example you will need a WebAssembly runtime such as wasmtime. | |
/// https://wasmtime.dev/ | |
/// 1. compile the wasm module with the zig compiler | |
/// zig build-exe hello_wasi.zig -target wasm32-wasi | |
/// 2. run the .wasm module with wasmtime and pass the command line arguments |
I hereby claim:
To claim this, I am signing this object: