mochi
agency
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
mochi
-
LLMs as Compilers
Totally agree. It is why we're building Mochi, https://github.com/mochilang/mochi a small language that treats AI, datasets, and graph queries as first-class citizens, not just targets for code generation.
It's inspired by the evolution you mentioned: early compilers generating Assembly, now AI tools generating Python or SQL. Mochi leans into that by embedding declarative data queries, AI generation, and streaming logic directly into the language. Here is how it looks:
type Person {
- Adding SQLLogicTest Support to Mochi
-
Ask HN: What Are You Working On? (June 2025)
Repo: https://github.com/mochilang/mochi
I'm building Mochi, a small programming language with a custom VM and a focus on querying structured data (CSV, JSON, and eventually graph) in a unified and lightweight way.
It started as an experiment in writing LINQ-style queries over real datasets and grew into a full language with:
* declarative queries built into the language
- Mochi v0.10.5: A LINQ-style query language with a bytecode VM written in Go
- Mochi 0.9.1: A readable VM for learning compilers and bytecode
-
Implementing Logic Programming
- FFI bindings to expose `fact`, `rule`, and `query` to scripts
Example: [https://chatgpt.com/share/cd\_684d3e3c59c08191b20c49ad97b66e...](https://chatgpt.com/share/cd_684d3e3c59c08191b20c49ad97b66e0...)
Total implementation was \~250 LOC. Genuinely amazed how effective the LLM was at helping bootstrap a real logic layer in one go.
The PR is here https://github.com/mochilang/mochi/pull/616
- Mochi is a small, statically typed programming language
- Mochi Programming Language v0.7.0 – calling Python and Go in one file
- Mochi Programming Language v0.6.0 – LINQ syntax for querying datasets
- Mochi – programming language built using OpenAI Codex
agency
-
Show HN: LLaMA tokenizer that runs in browser
Tokenizers seem to be a massive pain in the neck if you are just calling into an API to use your model. The algorithm itself is non-trivial, and they need pretty sizable data to function: the vocabulary and the merges, which just sit there, using memory. I'm writing https://github.com/ryszard/agency in Go, and while there's a good library for the OpenAI tokenization, if you want a tokenizer for the HF models the best I found was a library calling HF's Rust implementation, which makes it horrible for distribution.
However, at some point I realized that I needed not really the tokens, but the token count, as my most important use was implementing a Token Buffer Memory (trim messages from the beginning in such a way that you never exceed a context size number of tokens). And in order to do that I don't need it to be exactly right, just mostly right, if I am ok with slightly suboptimal efficiency (keeping slightly less tokens than the model supports). So, I took files from Project Gutenberg, and compared the ratio of tokens I get using a proper tokenizer and just calling `strings.Split`, and it seems to be remarkably stable for a given model and language (multiply the length of the result of splitting on spaces by 1.55 for OpenAI and 1.7 for Claude, which leaves a tiny safety margin).
I'm not throwing shade at this project – just being able to call the tokenizer would've saved me a lot of time. But I hope that if I'm wrong about the estimates bring good enough some good person will point out the error of my ways :)
-
Understanding GPT Tokenizers
How I wish this post had appeared a few days earlier... I am writing on my own library for some agent experiments (in go, to make my life more interesting I guess), and knowing the number of tokens is important to implement a token buffer memory (as you approach the model's context window size, you prune enough messages from the beginning of the conversation that the whole thing keeps some given size, in tokens). While there's a nice native library in go for OpenAI models (https://github.com/tiktoken-go/tokenizer), the only library I found for Hugging Face models (and Claude, they published their tokenizer spec in the same JSON format) calls into HF's Rust implementation, which makes it challenging as a dependency in Go. What is more, any tokenizer needs to keep some representation of its vocabulary in memory. So, in the end I removed the true tokenizers, and ended up using an approximate version (just split it in on spaces and multiply by a factor I determined experimentally for the models I use using the real tokenizer, with a little extra for safety). If it turns out someone needs the real thing they can always provide their own token counter). I was actually rather happy with this result: I have less dependencies, and use less memory. But to get there I needed to do a deep dive too understand BPE tokenizers :)
(The library, if anyone is interested: https://github.com/ryszard/agency.)
-
[P] I got fed up with LangChain, so I made a simple open-source alternative for building Python AI apps as easy and intuitive as possible.
I completely agree about langchain being brittle; what I really hate is that it's really hard to make sense about what is going on by reading the code. I was similarly frustrated and rolled my own thing on go (shameless plug): https://github.com/ryszard/agency
- 🏢🤖Agency - An Idiomatic Go Interface for the OpenAI API🚀
- Agency - An Idiomatic Go Interface for the OpenAI API (request for feedback)
What are some alternatives?
LangGraph-Swift - 🚀 LangGraph for Swift. A library for building stateful, multi-actor applications with LLMs, built to work jointly with langchain-swift
tokenizer - Pure Go implementation of OpenAI's tiktoken tokenizer
secai - Platform for AI Agents with a local reasoning layer
feste - Feste is a free and open-source framework allowing scalable composition of NLP tasks using a graph execution model that is optimized and executed by specialized schedulers.
opennars - OpenNARS for Research 3.0+
nn-zero-to-hero - Neural Networks: Zero to Hero