Skip to content

Instantly share code, notes, and snippets.

View cognominal's full-sized avatar

Stéphane Payrard cognominal

View GitHub Profile

jq tutorial: munging tuios ls --json from Nushell

jq is a small functional language for JSON: a program is a filter that takes one JSON document and emits zero, one, or many values. Learning it is mostly learning the handful of shapes below, then composing them.

The first half of this tutorial is generic jq. The second half is a running example in Nushell: a question about a running TUIOS daemon is answered by reshaping tuios ls --json, and a question about its git worktrees by reshaping tuios worktree ls --json.

@cognominal
cognominal / shell.md
Last active October 3, 2026 09:35
Forking rakudo to make rak

Forking rakudo to make rak

Rak is both a full programming and a shell, interactive or not. We use present tense but this is work in progress in different the rak git branch or branch derived from it and intended to be merged to it.

Raku proposes by default rarely useful features like integer of indefinite lengh or references to integer/float/strings at the cost of performance. To support synthetics, utf-8 was not used internally.

@cognominal
cognominal / AI ressources.md
Last active January 2, 2026 10:25
AI resources

🤖 AI Learning & Tools Directory

This directory contains direct links to high-value AI resources, bypassing redirects for faster access.

# Resource Topic Key Benefit Direct Link
01 Start with AI Foundations for beginners starting their AI journey. View Guide
02 Deepdive into LLMs Andrej Karpathy's world-class intro to how LLMs work. Watch Video
03 Set up your ChatGPT How to use Custom Instructions for better outputs. Setup Guide
04 Replace a consultant Frameworks for automating business strategy tasks. Notion Page
#!/bin/bash
# Script: gc1
# Description: Clones a GitHub repository with depth 1 into ~/git/user----repo
# Usage: gc1 <GitHub_URL|user/repo>
# Examples:
# gc1 https://github.com/torvalds/linux
# gc1 torvalds/linux
# Check if git is installed
@cognominal
cognominal / green-run-button-missing.md
Last active June 16, 2024 15:44
green run button missing

In vscode EDU introduction, the green triangle run button to run code is missing from the .py editor. In chrome MacOS. screenshot

@cognominal
cognominal / Makefile.in
Created May 13, 2024 12:45
messing with Makefile generation for integrating HAMT as a MoarVM repr
.PHONY: clean test
SRCS := src/hamt/cache.c
# src/hamt/hamt.c \
# src/hamt/murmur3.c \
# src/hamt/uh.c \
# src/reprs/hamt-node.c
OBJS := $(SRCS:.c=%O%)
@cognominal
cognominal / Makefile.in
Created May 13, 2024 12:41
messing with makefile generation
‎‎​
@cognominal
cognominal / ast-bingo.md
Last active December 3, 2023 04:24
AST bingo

AST TS Bingo

What is AST TS Bingo

The game is to write typescript programs that generate an AST that scores the most according to the rules stated below. An abstract typescript syntax tree is a data structure that represents the source code of a typescript program.

The left panel contains your program. The right panel contains generated AST

@cognominal
cognominal / .tours---quickpick-menus.tour
Last active October 26, 2023 22:27
quickpick-menus tour
{
"$schema": "https://aka.ms/codetour-schema",
"title": "quickpick menus",
"steps": [
{
"title": "Introduction",
"description": "I am exploring how Quickpick menus to program my 'shortcut extension', the goal is to create a provider that find the shortcut for each command in the shortcut menu for a given categoty\n"
},
{
"file": "src/vs/workbench/contrib/quickaccess/browser/quickAccess.contribution.ts",
@cognominal
cognominal / main.tour
Created September 5, 2023 00:51
treesitter codetout
{
"$schema": "https://aka.ms/codetour-schema",
"title": "treesitter",
"steps": [
{
"title": "Introduction",
"description": "I use playground as a way to familiarize myself with playground.js"
},
{
"file": "docs/assets/js/playground.js",