Skip to content

Instantly share code, notes, and snippets.

View JesseRMeyer's full-sized avatar

Jesse Meyer JesseRMeyer

View GitHub Profile
@harold-b
harold-b / odin.py
Last active June 16, 2024 11:24
Modified version of Laytan's Odin LLDB collection visualizer to support chunked arrays for large dat asets
import lldb
import math
import logging
log = logging.getLogger(__name__)
def is_slice_type(t, internal_dict):
return (t.name.startswith("[]") or t.name.startswith("[dynamic]")) and not t.name.endswith(']')
def slice_summary(value, internal_dict):
@Lperlind
Lperlind / minimal_metal_window_darwin.odin
Last active August 5, 2024 20:55
Odin Minimal Metal Window
/*
Minmal Cocoa Window with Metal API
No error handling intentionally to just show the happy path
IMPORTANT: you odin version needs to be using the commit edcd335 or later!
Otherwise you will get a silent error at runtime as Cocoa would have not been linked!
*/
package minimal_metal_window
import NS "vendor:darwin/Foundation"
@rasa-silva
rasa-silva / libtls_client.odin
Created April 18, 2023 17:36
Basic TLS client in Odin and libtls
package main
import "core:bytes"
import "core:c"
import "core:fmt"
import "core:time"
foreign import libtls "system:tls"
TLS_PROTOCOL_TLSv1_0 :: (1 << 1)
@vurtun
vurtun / compr.c
Last active April 17, 2018 23:28
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <sys/time.h>
#include <unistd.h>
#include <time.h>

API Design: Coroutines APIs (Janurary-2017)

I am currently dealing with a lot of libraries at work. Both third party as well as libraries written or being currently in process of being written by me. I absolutely love writing and working with libraries. Especially if they present or bring me to either a new or different approach to solve a problem. Or at least provide a different view.

Over time I noticed however that quite regulary we had to decide that we cannot use a third party library. Often it is the usual reason.