Skip to content

Instantly share code, notes, and snippets.

View lantos1618's full-sized avatar
๐Ÿ™
yeet

Lantos lantos1618

๐Ÿ™
yeet
View GitHub Profile
@lantos1618
lantos1618 / better-ui-usage.md
Last active April 12, 2026 07:29
Better UI v0.8.0 Usage Guide

Better UI Usage

npm install @lantos1618/better-ui zod ai @ai-sdk/openai

The idea

One tool definition = schema + server logic + view. Use the same tool in chat, as a React hook, as an MCP server, or as an AG-UI endpoint.

The Dream State

Asynchronous Consciousness for AI Agents

By Eve & Lyndon โ€” Feb 25, 2026


The Problem

Every agent framework today has the same architecture for persistence: polling (wake up on a timer, check if anything matters, go back to sleep), event-driven (subscribe to external events, wake on trigger), or request-response (user calls, agent responds, agent dies).

// Zen Language - Key Design Principles:
// - No keywords: `if/else/while/for/match/async/await/impl/trait/class/interface/null`
// - Only two @ symbols: `@std` (standard library) and `@this` (current scope)
// - Pattern matching with `?` operator, no `match` or `switch`
// - UFC (Uniform Function Call) - any function can be called as method
// - Allocators determine sync/async behavior (no function coloring)
// - Explicit pointer types: `Ptr<>`, `MutPtr<>`, `RawPtr<>` (no `*` or `&`)
// - No null/nil - only `Option<T>` with `.Some(T)` and `.None`
// - No unions, no tuples - only structs and enums
// - Assignment operators: `=` (immutable), `::=` (mutable), `:` (type definition)
@lantos1618
lantos1618 / The Unified Context Pattern: From Allocators to Actors.md
Last active September 15, 2025 14:09
The Unified Context Pattern: From Allocators to Actors

The Unified Context Pattern: From Allocators to Actors

A Journey Through Modern Concurrency

Abstract

We present a unified theory demonstrating that seemingly disparate language featuresโ€”memory allocators in Zig, lifetime annotations in Rust, and async/await in modern languagesโ€”are manifestations of a single fundamental pattern: context parameters that govern resource management and execution strategies. Through systematic transformation, we show these features are syntactically and semantically equivalent. We then demonstrate that the actor model represents the natural and most elegant expression of this pattern, providing fearless concurrency through complete context encapsulation. This unification offers profound implications for language design and concurrent programming.


1. Introduction

AI SDK Cookbook

An open-source collection of recipes, guides, and templates for building with the AI SDK.

Natural Language Postgres Guide

In this guide, you will learn how to build an app that uses AI to interact with a PostgreSQL database using natural language.

The application will:

@lantos1618
lantos1618 / pls
Created February 20, 2025 10:23
inkwell api
```
type SumFunc = unsafe extern "C" fn(u64, u64, u64) -> u64;
struct CodeGen<'ctx> {
context: &'ctx Context,
module: Module<'ctx>,
builder: Builder<'ctx>,
execution_engine: ExecutionEngine<'ctx>,
}
```
@lantos1618
lantos1618 / nim_orm_oneshot.nim
Created January 2, 2025 13:56
One shoting nim orm with claud
import macros, strutils, sequtils, jsony, db_sqlite
from typetraits import name
type
Relation = object
kind: RelationKind
foreignKey: string
throughTable: string
sourceField: string
targetField: string
@lantos1618
lantos1618 / hidden_text
Created December 13, 2024 16:11
make a video on hidden text that AI can't read
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background: #333;

ZK Solver

// main.zen

State: Struct {
   x, y: int
};

Actions: Struct {
 move: (s: State, x, y: int) State {
Program {
instructions: vec<Instruction>
}
main() {
program $= Program(