Skip to content

Instantly share code, notes, and snippets.

View githiago-f's full-sized avatar
🚀
Always forward

Thiago githiago-f

🚀
Always forward
View GitHub Profile
@githiago-f
githiago-f / language-processor.js
Created May 25, 2023 03:54
dummy programing language processor preview
// memory registers
const vars = new Map(); // { varName: value }
// constants
const varStatement = /[^\s]\s?\=\s?[^\s]/i;
const conditionStatement = /[^\s]\s?(>=|<=|>|<|==)\s?[^\s]/;
const aritimeticStatement = /[0-9]*\s?(\*|\+|\/|\-|\%)\s?[0-9]*/;
const ifStatement = /^if\([^]+\):$/;
const whileStatement = /^while\([^]+\):$/;
const printStatement = /^print\([^]+\)/;
@githiago-f
githiago-f / cookie.ts
Last active February 27, 2023 02:20
Cookie util for typescript projects
@githiago-f
githiago-f / RuPaulThreadsRace.java
Last active April 5, 2023 12:57
testing threads
public class RuPaulThreadsRace {
static boolean ready = false;
static volatile StringBuffer stringBuffer = new StringBuffer();
private static abstract class Tester extends Thread {
abstract String name();
void recursive(int i) {
if(i==0){ return; }
stringBuffer.append(name());