Skip to content

Instantly share code, notes, and snippets.

@noghartt
noghartt / godel2tnt.js
Last active July 20, 2025 21:51
A small utility function to map from Godel numbering into Typographical Number Theory (for GEB readers)
const table = {
666: "0",
123: "S",
111: "=",
112: "+",
236: " x ",
362: "(",
323: ")",
212: "<",
213: ">",
@noghartt
noghartt / revprox.go
Created May 12, 2024 01:51 — forked from JalfResi/revprox.go
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@noghartt
noghartt / fetchVersion.js
Created January 5, 2024 17:44
fetchQuery relay toPromise
import { fetchQuery, graphql } from 'relay-runtine';
export const fetchVersion = async (environment) => {
const response = fetchQuery(
environment,
graphql`
query fetchVersionQuery {
version
}
`,

In this tutorial we're going to build a set of parser combinators.

What is a parser combinator?

We'll answer the above question in 2 steps.

  1. What is a parser?
  2. and, what is a parser combinator?

So first question: What is parser?

@noghartt
noghartt / cc.md
Last active June 9, 2025 18:37
Resources to learn more about Computer Science and related stuffs

Books

Links

  • Build your own X, a repo containing a lot of projects teaching how to build cool things, from a database from scratch, 3D stuffs and other cool features
  • tpetricek/Teaching a repo containing study material to things like PL
@noghartt
noghartt / ts-compiler.ts
Created March 1, 2023 03:02
Some example using TypeScript compiler API
import ts from 'typescript';
import { readFile, writeFile } from 'fs/promises';
const sourceText = await readFile('./input.ts', { encoding: 'utf8' });
const source = ts.createSourceFile('input.ts', sourceText, ts.ScriptTarget.Latest);
const newArticle = ts.factory.createObjectLiteralExpression(
[
ts.factory.createPropertyAssignment(
@noghartt
noghartt / rss.opml
Last active July 23, 2025 20:26
My current list containing all RSS feeds that I think that is useful
<?xml version="1.0" encoding="UTF-8"?>
<!-- OPML generated by NetNewsWire -->
<opml version="1.1">
<head>
<title>Subscriptions-OnMyMac.opml</title>
</head>
<body>
<outline text="AAAS: Keyword search for query" title="AAAS: Keyword search for query" description="" type="rss" version="RSS" htmlUrl="https://www.science.org/" xmlUrl="https://www.science.org/blogs/pipeline/feed"/>
<outline text="News" title="News">
<outline text="Ars Technica - All content" title="Ars Technica - All content" description="" type="rss" version="RSS" htmlUrl="https://arstechnica.com/" xmlUrl="https://feeds.arstechnica.com/arstechnica/index"/>
@noghartt
noghartt / table.tsx
Created August 5, 2022 15:23
@tanstack/table + @tanstack/virtual@beta + @mui/material v5 | A table with infinite scrolling and virtualized rows
import Paper from '@mui/material/Paper';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
import TableCell from '@mui/material/TableCell';
import TableContainer from '@mui/material/TableContainer';
import TableHead from '@mui/material/TableHead';
import TableRow from '@mui/material/TableRow';
import {
useReactTable,
getCoreRowModel,