Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdbool.h>
typedef int8_t i8;
typedef int16_t i16;
typedef int32_t i32;
typedef int64_t i64;
typedef uint8_t u8;
@rcalixte
rcalixte / libqt6-docs.md
Created November 30, 2025 21:19
Online Documentation for Qt 6, KDE Frameworks, etc. for C & Zig

Online Documentation for Qt 6, KDE Frameworks, etc. for C & Zig

Hi all,

As a brief follow-up to the initial announcement of Qt 6 for C & Zig, the online documentation for the libraries is now available. Browsing the documentation may be sluggish in parts due to the sheer volume of generated content, but this should not deter usage. Both libraries also support offline and local execution of the generation of the documentation. Feel free to dive in!

Regarding the initial post, much of the core guidance remains: these libraries are ready for exploration and use, but not yet prepared for community contributions. Feedback from the vantage of consumption is always welcome. As @dayvster showed in the write-up of his experience, there are some amazing possibilities to be had for the truly curious. I'm deeply grateful for his time a

@diegopacheco
diegopacheco / c3-lang-tiny-essay.md
Last active August 11, 2025 19:59
C3 Lang Tiny Essay

C3 Lang Tiny Essay

created: 16.MAR.2025

I love to learn new programing languages, it help to open the mind to new possibilities and compare different approaches. For instance, I learned Ruby and Scala in 2010, Clojure and Haskell in 2011, Go in 2015, Kotlin 2016, Rust in 2018 and Idris, TypeScript in 2019, 2020 Pandemic strike did a bunch of pocs but not with new langs(crazy year), Zig in 2021, 2022(coding in lots of langs but nothing new) - in 2023 I'm learning Nim and V. Learn at least one lang per year. This post is not complain, it's just to share some toughts, notes and impressions.

Why C3

  • Created in 2021 by Christoffer Lernö
  • Evolution not Revolution
@kepler-5
kepler-5 / comp_multi.rs
Last active December 23, 2025 20:30
Python comprehension proc macro that handles multiple nested for-if-clauses, flattening nested structure
// This is free and unencumbered software released into the public domain.
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
@ydewit
ydewit / lean-ffi-article.md
Last active December 22, 2025 10:59
Understanding Lean's Foreign Function Interface (FFI)

Understanding Lean's Foreign Function Interface (FFI)

WARNING

Note on FFI Interface Stability The current Foreign Function Interface (FFI) in Lean 4 was primarily designed for internal use within the Lean compiler and runtime. As such, it should be considered unstable. The interface may undergo significant changes, refinements, and extensions in future versions of Lean. Developers using the FFI should be prepared for potential breaking changes and should closely follow Lean's development and release notes for updates on the FFI system.

Table of Contents

@Chubek
Chubek / README.md
Last active July 12, 2025 22:19
EBNF Grammar for AWK

Note: if you wish to understand these notations, please read this: https://gist.github.com/Chubek/52884d1fa766fa16ae8d8f226ba105ad

So, again, why did I write the EBNF grammar for AWK?

Basically, I have two ongoing projects where AWK is involved. Firs is Squawk, and implementation of AWK and second is AWK2c, which obviously translates AWK to C.

Plus, I am thinking of making a Github page called 'The Internet Grammar Database' where I would post EBNF, Yacc, PEG, Lex, definitions of languages. However, I don't have much experience in web development, so if you can help me, let me know (chubakbidpaa [at] riseup [dot] net).

So anyways, awk.ebnf contains the EBNF grammar for AWK. Some considerations:

@Chubek
Chubek / README.md
Last active November 21, 2025 18:08
EBNF Grammar for C

c.ebnf contains grammar ofr C99. Note that this is ANSI C, not ISO C, so there are some omissions. The reason I wrote this is, I am currently writing a C compiler, with my own backend (and hopefully, frontend) in OCaml. And I needed to collect the grammar in one place.

How to Read EBNF Grammars?

Reading EBNF grammars is pretty simple:

  • Enclosed within two ?s is a global capture, it does not mean optional. It means 'I am writing a free-style sentence'.
  • Enclosed within { and } means : repeat at least zero times
  • Enclosed within [ and ] means : this is optional
  • Enclosed within ( and ) means : this is a group

What is the kernel?

The kernel is an implementation of Lean's logic in software; a computer program with the minimum amount of machinery required to construct elements of Lean's logical langauge and check those elements for correctness. The major components are:

  • A sort of names used for addressing.

  • A sort of universe levels.

  • A sort of expressions (lambdas, variables, etc.)

@vnext-nguyen-quyen
vnext-nguyen-quyen / emeditor.key
Created September 9, 2023 14:43
emeditor v22 lifetime key
DEMZF-UCKEE-HB222-DJDDH-594U5
DMAZF-UCKEE-A6222-8CADP-HQZ7H
DPAZF-UCKEE-FH222-ET546-DLRGT
DRNZF-UCKEE-UK222-RWNLU-XVZH7
DSBZF-UCKEE-BF222-K24JB-S9JLC
DSHZF-UCKEE-D3222-NMB93-UKSQF
DTHZF-UCKEE-BW222-Q2BKZ-NXPU8
DVAZF-UCKEE-J7222-5UHCT-QSRFE
DVEZF-UCKEE-PR222-ZAPFE-4C49Q
@burrielrush
burrielrush / AllAmericanRegex.md
Last active September 25, 2025 20:55
This is a Gist breaking down credit card validation Regex

All American Regex

(Credit card # validation regular expression)

The regex \b(?:\d[ -]*?){13,16}\b is a powerful tool used for validating credit card numbers. Credit card numbers typically consist of a sequence of 13 to 16 digits, with optional spaces or dashes in between. This regular expression applies the Luhn algorithm to ensure the validity of credit card numbers by checking for the correct number of digits and the proper formatting. By using this regular expression, developers can easily implement credit card number validation in their applications, helping to enhance security and prevent errors during data entry.

Summary