Skip to content

Instantly share code, notes, and snippets.

View ArnaudValensi's full-sized avatar

Arnaud Valensi ArnaudValensi

View GitHub Profile
@ArnaudValensi
ArnaudValensi / debug.jai
Created May 15, 2023 14:37
Debug variables and types
// Pretty print the values of a variable recursively.
debug_variable :: (t: $T, prefix: string = "") {
print("%0%0\n", prefix, formatStruct(
t,
use_newlines_if_long_form=true,
use_long_form_if_more_than_this_many_members=1
));
}
// Pretty print the type of a variable recursively like this:
@ArnaudValensi
ArnaudValensi / debug.jai
Last active June 5, 2023 10:06
Jai panic and assert with pretty stack trace
/*
██████████ █████
░░███░░░░███ ░░███
░███ ░░███ ██████ ░███████ █████ ████ ███████
░███ ░███ ███░░███ ░███░░███░░███ ░███ ███░░███
░███ ░███░███████ ░███ ░███ ░███ ░███ ░███ ░███
░███ ███ ░███░░░ ░███ ░███ ░███ ░███ ░███ ░███
██████████ ░░██████ ████████ ░░████████░░███████
use std::error::Error;
use std::fs;
#[derive(PartialEq, Copy, Clone, Debug)]
enum Move {
Rock = 1,
Paper = 2,
Scissors = 3,
}
@ArnaudValensi
ArnaudValensi / .clang-tidy
Created February 27, 2022 13:16
Clion's clang-tidy config to .clang-tidy
---
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,bugprone-argument-comment,bugprone-assert-side-effect,bugprone-bad-signal-to-kill-thread,bugprone-branch-clone,bugprone-copy-constructor-init,bugprone-dangling-handle,bugprone-dynamic-static-initializers,bugprone-fold-init-type,bugprone-forward-declaration-namespace,bugprone-forwarding-reference-overload,bugprone-inaccurate-erase,bugprone-incorrect-roundings,bugprone-integer-division,bugprone-lambda-function-name,bugprone-macro-parentheses,bugprone-macro-repeated-side-effects,bugprone-misplaced-operator-in-strlen-in-alloc,bugprone-misplaced-pointer-arithmetic-in-alloc,bugprone-misplaced-widening-cast,bugprone-move-forwarding-reference,bugprone-multiple-statement-macro,bugprone-no-escape,bugprone-not-null-terminated-result,bugprone-parent-virtual-call,bugprone-posix-return,bugprone-reserved-identifier,bugprone-sizeof-container,bugprone-sizeof-expression,bugprone-spuriously-wake-up-functions,bugprone-string-constructor,bugprone-string-integer-assignme
{
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
"basics": {
"name": "Arnaud Valensi",
"label": "Senior Software Engineer, Full-System Products",
"email": "arnaud.valensi@gmail.com",
"summary": "Over the last four years, I built financial systems for crypto-finance at XBTO, launched a SaaS platform for AI-assisted development (Merlin Cloud), and am shipping Out of Body, a video game in Jai (low-level systems language between C and C++, launching 2026).\n\n\u200c\n\nWith agentic coding, the surface area a single engineer can own has expanded radically. That's how I shipped Merlin Cloud solo: product positioning and pricing, full UX/UI design, marketing landing pages, multi-tenant container infrastructure, reverse tunneling, Stripe billing, Clerk auth, admin dashboard.\n\n\u200c\n\nBut I refuse to let low-level skills atrophy in the AI era. That's why I write the game in Jai, from scratch, by hand. AI makes POCs easy. Production systems still need
[
{
"name": "Zombies",
"owners_before_sale": null,
"owners": 10507000,
"sales": 3708000,
"average_playtime_in_minutes": 4862,
"median_playtime_in_minutes": 2411,
"count": 6,
"median_sales": 348500,
[
{
"name": "Survival",
"owners_before_sale": 126289000,
"owners": 388016000,
"sales": 261727000,
"average_playtime_in_minutes": 739757,
"median_playtime_in_minutes": 339068,
"count": 898,
"median_sales": 32000,
[
{
"name": "Action",
"owners_before_sale": 476197000,
"owners": 1210425000,
"sales": 734228000,
"average_playtime_in_minutes": 3549147,
"median_playtime_in_minutes": 4241544,
"count": 7923,
"median_sales": 10000,
[
{
"name": "Survival",
"owners_before_sale": 126289000,
"owners": 388016000,
"sales": 261727000,
"average_playtime_in_minutes": 739757,
"median_playtime_in_minutes": 339068,
"count": 898,
"median_sales": 32000,
This file has been truncated, but you can view the full file.
[
{
"name": "PLAYERUNKNOWN'S BATTLEGROUNDS",
"owners_before_sale": 0,
"owners": 63688000,
"sales": 63688000,
"price": 29.99,
"metascore": 86,
"median_playtime_in_hours": 199.91666666666666
},