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 October 21, 2025 21:33
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 November 25, 2025 23:26
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
@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

@4wk-
4wk- / README.md
Last active December 8, 2025 01:40
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
@mmozeiko
mmozeiko / !README.md
Last active December 6, 2025 21:26
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for native desktop app development.

Run py.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK from newest Visual Studio.

You can list available versions with py.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe first run setup_TARGET.bat - after that PATH/INCLUDE/LIB env variables will be updated to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@muink
muink / Universal-Captive-Portal-Server.md
Last active November 6, 2025 07:15
通用 Captive Portal 檢測伺服器, 在中國大陸也可用

Universal Captive Portal Detection Server

http(s)://edge.microsoft.com/captiveportal/generate_204
http(s)://cp.cloudflare.com/generate_204
http(s)://www.qualcomm.cn/generate_204
http(s)://connectivity.samsung.com.cn/generate_204
http(s)://captiveportal.kuketz.de