Skip to content

Instantly share code, notes, and snippets.

View iemelyanov's full-sized avatar

Igor Yemeliyanov 🇺🇦 iemelyanov

  • Spain
View GitHub Profile
#include <sys/select.h>
#include <termios.h>
#include <unistd.h>
#include <csignal>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
@iemelyanov
iemelyanov / preced_climb_parser.rs
Last active July 8, 2024 14:01
Precedence climbing
// Precedence climbing
//
// Source: https://www.engr.mun.ca/~theo/Misc/exp_parsing.htm#climbing
//
//
// Eparser is
// var t : Tree
// t := Exp( 0 )
// expect( end )
// return t
@iemelyanov
iemelyanov / ringbuffer.go
Created April 2, 2025 13:09
lock-free ringbuffer
package main
import (
"fmt"
"runtime"
"sync"
"sync/atomic"
"time"
"unsafe"
)