Skip to content

Instantly share code, notes, and snippets.

View gubatron's full-sized avatar

Angel Leon gubatron

View GitHub Profile

GitHub Commit Productivity — @gubatron

Jun 2023 – Apr 2026

Source: GitHub GraphQL contributionsCollection API (includes both public and private commits).


Monthly Contr

@gubatron
gubatron / mentisdb_0_7_x.md
Last active March 29, 2026 12:38
MentisDB 0.7.x: Memory That Agents Can Actually Use

MentisDB 0.7.x: Memory That Agents Can Actually Use

Most agent memory systems fail in the same boring way.

They store something. Then the agent reconnects later and does not know the memory exists, does not know when to use it, or retrieves the wrong thing at the wrong time.

So the human repeats the context. Again.

@gubatron
gubatron / tarski.rs
Created March 6, 2026 22:12
tarski.rs
use std::collections::HashMap;
use std::env;
use std::fs;
#[derive(Debug)]
enum Formula {
Atom(char),
Not(Box<Formula>),
And(Box<Formula>, Box<Formula>),
}
@gubatron
gubatron / tetris_planner_output.txt
Created February 17, 2026 22:33
CloudLLM RALPH Planner powered orchestration with Claude Sonnet 4.6 one shotting a Tetris Game in a single HTML File
MBP14inchDec2024:cloudllm gubatron$ cargo run --example tetris_planner_team
Compiling cloudllm v0.10.6 (/Users/gubatron/workspace/cloudllm)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.35s
Running `target/debug/examples/tetris_planner_team`
╔════════════════════════════════════════════════════════════════╗
║ TETRIS BUILDER — RALPH Orchestration Demo ║
║ Claude Sonnet 4.6 Agent Team ║
╚════════════════════════════════════════════════════════════════╝
@gubatron
gubatron / High-Performance Rust Audit: Low-Latency Optimization & Issue Generation Framework
Created January 20, 2026 16:52
High-Performance Rust Audit: Low-Latency Optimization & Issue Generation Framework
[Title]: <concise, action-oriented title>
Component(s): <e.g., crates/transport/src/engine.rs, src/storage/cache.rs, src/protocol/codec.rs>
Severity: <critical|high|medium|low>
Category: <CPU|Allocation|I/O|Concurrency|Networking|Async|Data-Structures|Syscall|Build|Safety>
Labels: perf, <more>, linux|windows|macos|cross
Problem
<What’s slow/fragile; where it occurs; why it matters (e.g., pointer indirection, branch misprediction, async overhead)>
Evidence/Heuristics:
<Cite files/lines, types, stack traces, flamegraphs (cargo-flamegraph), or smells (e.g., excessive cloning, large futures)>
@gubatron
gubatron / venezuela_regime_change_strategy_debate.md
Last active October 14, 2025 03:14
Venezuela Regime Change Strategy Debate

Venezuela Regime Change Strategy Debate

Demonstrating Multi-Agent Council Collaboration

Powered by cloudllm 0.4.0

Setting up council agents...

Council configured with 5 agents

Question:

@gubatron
gubatron / libtorrent_performance_opportunities.md
Created October 12, 2025 17:27
libtorrent performace optimization opportunity

Top 5

  1. Cache POSIX file handles inside posix_storage::read/write to avoid reopening on every block and collapse syscall churn on Linux/macOS builds.
  2. Replace disk_buffer_pool’s per-buffer malloc + global mutex with an actual freelist/slab allocator to cut allocator latency and cross-thread contention.
  3. Make piece_picker::pick_pieces’ ignored-piece bookkeeping O(1) to remove quadratic scans in large swarms.
  4. Back peer_connection’s request queue with a queue/deque structure so front removals stop mem-moving full vectors on every send.
  5. Drop the hot socket.available() ioctl inside peer_connection::on_receive_data and rely on buffered reads to avoid extra syscalls.

[Title]: Cache file handles in posix_storage to eliminate per-block fopen/fclose Component(s): src/posix_storage.cpp, src/storage_utils.cpp, include/libtorrent/aux_/posix_storage.hpp

@gubatron
gubatron / dbtc_newsletter_stories_getter
Created October 7, 2025 14:31
Tool to extract the text of the articles pointed by our DiarioBitcoin newsletter, done by Codex autonomously in 5 minutes
#!/usr/bin/env bash
set -euo pipefail
if [ "$#" -ne 1 ]; then
echo "Usage: $(basename "$0") <newsletter_url>" >&2
exit 1
fi
NEWSLETTER_URL="$1"
@gubatron
gubatron / embed_tweet_html.php
Last active September 27, 2025 11:28
PHP function to return HTML to embed a tweet like publish.x.com would
<?php
/**
* Returns HTML to embed a tweet like publish.x.com would
*/
function embed_tweet_html(string $tweet_url) : ?string {
// Encode the tweet URL for the query parameter
$encoded_url = urlencode($tweet_url);
// Construct the oEmbed API URL
$api_url = "https://publish.twitter.com/oembed?url=" . $encoded_url;
@gubatron
gubatron / gist:2cf9ed6d9b76ade18f4d699ba8aa6bf3
Created July 31, 2025 03:36
Elusive crash, seen on x86_64
Maybe there's a symbol missing.
The class 'NSOpenPanel' overrides the method identifier. This method is implemented by class 'NSWindow'
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: 'long com.frostwire.jlibtorrent.swig.libtorrent_jni.session_handle_find_torrent__SWIG_0(long, com.frostwire.jlibtorrent.swig.session_handle, long, com.frostwire.jlibtorrent.swig.sha1_hash)'
at com.frostwire.jlibtorrent.swig.libtorrent_jni.session_handle_find_torrent__SWIG_0(Native Method)
at com.frostwire.jlibtorrent.swig.session_handle.find_torrent(session_handle.java:95)
at com.frostwire.jlibtorrent.SessionManager.find(SessionManager.java:452)
at com.frostwire.bittorrent.BTEngine.download(BTEngine.java:303)
at com.frostwire.gui.bittorrent.BTDownloadMediator.lambda$openTorrentFile$2(BTDownloadMediator.java:654)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)