Skip to content

Instantly share code, notes, and snippets.

@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 July 20, 2026 23:11
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 July 16, 2026 10:42
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 May 30, 2026 09:10
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.)

@amanjuman
amanjuman / Install V2RayA Client on OpenWRT and Configure Outline 2023
Last active February 8, 2026 10:33
Install V2RayA Client on OpenWRT and Configure Outline 2023
## You need to remove the default dnsmasq package.
## If you remove straight, it will stop resolving DNS, and that is why we are going to use these following commands
opkg update; cd /tmp/ && opkg download dnsmasq-full; opkg install ipset libnettle8 libnetfilter-conntrack3;
opkg remove dnsmasq; opkg install dnsmasq-full --cache /tmp/; rm -f /tmp/dnsmasq-full*.ipk;
## Install wget if you don't have it.
## You can skip that if you can upload those files using SCP
## Check the official repo as those endpoints update frequently therefore change it accordingly
opkg install wget
wget https://downloads.sourceforge.net/project/v2raya/openwrt/v2raya.pub -O /etc/opkg/keys/94cc2a834fb0aa03
@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
@nerdegem
nerdegem / glinet_overlay
Created August 20, 2023 20:29
Configuring a GL-iNet for Overlay
Taken from: https://forum.gl-inet.com/t/extroot-configuration/27421
These were the only commands that seemed to work:
I used these commands to configure it, it’s working fine so far, just want to check I won’t run into any issues down the line:
opkg update
opkg install block-mount kmod-fs-ext4 e2fsprogs
DEVICE="$(sed -n -e "/\s\/overlay\s.*$/s///p" /etc/mtab)"
uci -q delete fstab.rwm
@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