here you goThings I’ve made, read and saved — shared here.

Archive

9,565 entries: 46 from X, 8,923 from Pinboard, saved 1998 to 2026.

Browse by tag, site, author, folder or language

Tags

Sites

Authors

Folders

Languages

Showing 1–50 of 126Folder notes ×2023 ×Clear all

2023

Java 21

Collection of notes on Java 21

Virtual Threads:  a performant alternative for io intensive applications for async frameworks. Not using an async framework tremendously simplifies your code. Code complexity has an enormous projection on everything else, especially when talking on the business level. First and foremost the cost of development and time to market rises. And then comes the cost of maintenance. -- via

You can use jlink to create a custom runtime you can distribute with your application, so that your users don't need to download a JRE/JDK. You'll still need to run this with the java command. You can use also jpackage to create an executable file you can just double-click (.exe on Windows, whatever on mac and linux). -- via


A categorized list of all Java and JVM features since JDK 8 to 21 - Advanced Web Machinery

notes#java#java21

Opensource LLM

GitHub - allenai/awesome-open-source-lms: Friends of OLMo and their links.

Papers

Appears to be an exhaustive survey paper -- (Chen et al. 2023)

(Zhuang et al. 2024)

ChuXin, an entirely open-source language model with a size of 1.6 billion parameters. Unlike the majority of works that only open-sourced the model weights and architecture, we have made everything needed to train a model available, including the training data, the training process, and the evaluation code. Our goal is to empower and strengthen the open research community, fostering transparency and enabling a new wave of innovation in the field of language modeling. Furthermore, we extend the context length to 1M tokens through lightweight continual pretraining and demonstrate strong needle-in-a-haystack retrieval performance. The weights for both models are available at Hugging Face to download and use.

References

notes#llm#opensource

Local LLM

Local Coding

How to Setup a Local Coding Agent on macOS - Kyle Howells

running Gemma 4 26B-A4B and Qwen3.6 35B-A3B locally with llama.cpp, MTP speculative decoding, multimodal support, and PI as a coding agent.

Local LLMs

GitHub - jamesob/local-llm: Everything I know about running LLMs locally.

GitHub - ml-explore/mlx-lm: Run LLMs with MLX · GitHub; May 2026. full setup -- mlx_lm.server + Aperture by Tailscale Aperture + Tailscale funnel.

Running local models on an M4 with 24GB memory | jola.dev; May 2026.

Introducing llamafile "llamafile lets you turn large language model (LLM) weights into executables."

HN Discussion of llamafile has some cool application of this given by simonw -- llamafile is the new best way to run a LLM on your own computer

LMStudio + FreeChat

  • Freechat "Local, secure, open source AI chat for macOS"
  • LMStudio "Discover, download, and run local LLMs"

Jan: Open source ChatGPT-alternative that runs 100% offline; has to see how it compares to ollama; brew install --cask jan

  • has local api server
  • connect to cloud api servers like OpenAI

Experimenting with local LLMs on macOS | Fatih's Personal Blog; Sep 2025 - covers some of the above stuff, but also enumerates different decision points like: model size, runtime, quantization, vision models, reasoning, tool use, agents ...

Setting up local LLMs for R and Python by Posit; Aug 2025. This is an introductory tutorial for R and Python on how to setup ollama and then use ellmer and chatlas packages for R, and python respectively to connect to it.


Note on Deepseek v2; Aug 8, 2024


Sep 26, 2025

  1. GLM-4.5-air: best agentic/coding model that runs on consumer hardware at very decent speeds. Rivals Claude 4-sonnet.
    1. Nousresearch/hermes-70B: the only model that will do whatever you ask, and tell you whatever you want to know. Literally critical to have.
    1. GPT-OSS-120B: very intelligent it’s like having 4o at home, great context window, great agent
    1. Qwen3-coder-30B-3A-instruct: very good coding agent, excellent workhorse, incredibly fast
    1. Mistral-magistral-small: very fast, excellent agent, great coder, multimodal, punches way, way, above its size.

Sep 26, 2025 about Cline + LM Studio: the local coding stack with Qwen3 Coder 30B - Cline Blog "Qwen3 Coder + Cline + LM Studio for high-quality local coding"

Also mentioned: facebook/cwm · Hugging Face -- llama3 + long-context modifications (alternating attention + large RoPE scaling). MLX should be supported out of the box (verify).

You Don’t Need to Spend $100/mo on Claude Code: Your Guide to Local Coding Models; Dec 2025. HN

notes#llm#local-llm

How Software Companies Die

by Orson Scott Card

The environment that nurtures creative programmers kills management and marketing types - and vice versa.

Programming is the Great Game. It consumes you, body and soul. When you're caught up in it, nothing else matters. When you emerge into daylight, you might well discover that you're a hundred pounds overweight, your underwear is older than the average first grader, and judging from the number of pizza boxes lying around, it must be spring already. But you don't care, because your program runs, and the code is fast and clever and tight.

You won.

You're aware that some people think you're a nerd. So what? They're not players. They've never jousted with Windows or gone hand to hand with DOS. To them C++ is a decent grade, almost a B - not a language. They barely exist. Like soldiers or artists, you don't care about the opinions of civilians. You're building something intricate and fine. They'll never understand it.

Beekeeping

Here's the secret that every successful software company is based on: You can domesticate programmers the way beekeepers tame bees. You can't exactly communicate with them, but you can get them to swarm in one place and when they're not looking, you can carry off the honey.

You keep these bees from stinging by paying them money. More money than they know what to do with. But that's less than you might think. You see, all these programmers keep hearing their fathers' voices in their heads saying "When are you going to join the real world?" All you have to pay them is enough money that they can answer (also in their heads) "Jeez, Dad, I'm making more than you." On average, this is cheap.

And you get them to stay in the hive by giving them other coders to swarm with. The only person whose praise matters is another programmer. Less-talented programmers will idolize them; evenly matched ones will challenge and goad one another; and if you want to get a good swarm, you make sure that you have at least one certified genius coder that they can all look up to, even if he glances at other people's code only long enough to sneer at it.

He's a Player, thinks the junior programmer. He looked at my code. That is enough.

If a software company provides such a hive, the coders will give up sleep, love, health, and clean laundry, while the company keeps the bulk of the money.

Out of Control

Here's the problem that ends up killing company after company. All successful software companies had, as their dominant personality, a leader who nurtured programmers. But no company can keep such a leader forever. Either he cashes out, or he brings in management types who end up driving him out, or he changes and becomes a management type himself. One way or another, marketers get control.

But...control of what? Instead of finding assembly lines of productive workers, they quickly discover that their product is produced by utterly unpredictable, uncooperative, disobedient, and worst of all, unattractive people who resist all attempts at management. Put them on a time clock, dress them in suits, and they become sullen and start sabotaging the product. Worst of all, you can sense that they are making fun of you with every word they say.

Smoked Out

The shock is greater for the coder, though. He suddenly finds that alien creatures control his life. Meetings, Schedules, Reports. And now someone demands that he PLAN all his programming and then stick to the plan, never improving, never tweaking, and never, never touching some other team's code. The lousy young programmer who once worshiped him is now his tyrannical boss, a position he got because he played golf with some sphincter in a suit.

The hive has been ruined. The best coders leave. And the marketers, comfortable now because they're surrounded by power neckties and they have things under control, are baffled that each new iteration of their software loses market share as the code bloats and the bugs proliferate.

Got to get some better packaging. Yeah, that's it.


Yes, it's from Orson Scott Card, the Hugo and Nebula award winning author of Ender's Game, Speaker for the Dead, Lost Boys, the Alvin Maker series, and many others novels.

Source: https://gist.github.com/eliot-akira/6eaecda619d0fafd1d74; 2023-11-23

notes

RAG

RAG is an AI framework for retrieving facts from an external knowledge base to ground large language models (LLMs) on the most accurate, up-to-date information and to give users insight into LLMs' generative process. [1]

Retrieval-augmented generation (RAG) is an AI framework for improving the quality of LLM-generated responses by grounding the model on external sources of knowledge to supplement the LLM’s internal representation of information. Implementing RAG in an LLM-based question answering system has two main benefits: It ensures that the model has access to the most current, reliable facts, and that users have access to the model’s sources, ensuring that its claims can be checked for accuracy and ultimately trusted.

See the Survey paper - (Gao et al. 2024)

Algorithms

BM42: The combination of semantic and keyword search -- BM42: New Baseline for Hybrid Search - Qdrant

Developing RAG Applications

Self RAG

Self RAG = For familiar topics, answer quickly; for unfamiliar ones, open the reference book to look them up, quickly find the relevant parts, sort and summarize them in your mind, then answer on the exam paper.

Self RAG
Self RAG
[via](https://arxiv.org/pdf/2310.11511.pdf) and

(Asai et al. 2023)

We introduce a new framework called Self-Reflective Retrieval-Augmented Generation (SELF-RAG) that enhances an LM’s quality and factuality through retrieval and self-reflection. Our framework trains a single arbitrary LM that adaptively retrieves passages on-demand, and generates and reflects on retrieved passages and its own generations using special tokens, called reflection tokens. Generating reflection tokens makes the LM controllable during the inference phase, enabling it to tailor its behavior to diverse task requirements. Experiments show that SELF- RAG (7B and 13B parameters) significantly outperforms state-of-the-art LLMs and retrieval-augmented models on a diverse set of tasks. Specifically, SELF-RAG outperforms ChatGPT and retrieval-augmented Llama2-chat on Open-domain QA, reasoning and fact verification tasks, and it shows significant gains in improving factuality and citation accuracy for long-form generations relative to these models.

Hierarchical cluster and indexing RAG

An emerging technique to better represent your data for RAG/LLM applications is to only chunk the data, but also hierarchically cluster and index it. -- via

Read: Salmon Run: Hierarchical (and other) Indexes using LlamaIndex for RAG Content Enrichment

RAG from Scratch

langchain-ai/rag-from-scratch

RAG From Scratch: Indexing w/ RAPTOR

(Sarthi et al. 2024)

novel approach of recursively embedding, clustering, and summarizing chunks of text, constructing a tree with differing levels of summarization from the bottom up. At inference time, our RAPTOR model retrieves from this tree, integrating information across lengthy documents at different levels of abstraction. Controlled experiments show that retrieval with recursive summaries offers significant improvements over traditional retrieval-augmented LMs on several tasks. On question-answering tasks that involve complex, multi-step reasoning, we show state-of-the-art results; for example, by coupling RAPTOR retrieval with the use of GPT-4, we can improve the best performance on the QuALITY benchmark by 20% in absolute accuracy.

Deepdive -- Building long context RAG with RAPTOR from scratch - YouTube; langchain/cookbook/RAPTOR.ipynb @ langchain-ai/langchain; via

RAG-enhanced MetaGPT

Learning

Building and Evaluating Advanced RAG Applications - DeepLearning.AI

"In this course, we’ll explore:"

  • Two advanced retrieval methods: Sentence-window retrieval and auto-merging retrieval that perform better compared to the baseline RAG pipeline. 
  • Evaluation and experiment tracking: A way evaluate and iteratively improve your RAG pipeline’s performance. 
  • The RAG triad: Context Relevance, Groundedness, and Answer Relevance, which are methods to evaluate the relevance and truthfulness of your LLM’s response.

Articles

Designing RAGS

Design choices you need to build high-performing RAG systems, across 5 main pillars (ISRSE):

  1. Indexing: Embedding external data into a vector representation.
  2. Storing: Persisting the indexed embeddings in a database.
  3. Retrieval: Finding relevant pieces in the stored data.
  4. Synthesis: Generating answers to user queries.
  5. Evaluation: Quantifying how good the RAG system is.
 Designing RAGS  
Designing RAGs
[via](https://x.com/llama_index/status/1774240631231267285)

RAGs and Long Context LLMs

RAG for Long Context LLMs aka "Is RAG Really Dead" talk by Lance Martin of LangChainAI.

RAG Queries

LlamaParse

llama_parse  is an API created by LlamaIndex to efficiently parse and represent files for efficient retrieval and context augmentation using LlamaIndex frameworks. Notebook Example for an insurance document query. Product page with screenshots of how to use it.

Frameworks

Personal data

Hands-On RAG guide for personal data with Vespa and LLamaIndex | Vespa Blog

See also

To research

 RagOps  
RagOps
[via]()

References

  1. https://research.ibm.com/blog/retrieval-augmented-generation-RAG

notes#llm#rag

Llama Index

LlamaIndex is a flexible framework that enables LLM applications to ingest, structure, access, and retrieve private data sources. The end result is that your model's responses will be more relevant and context-specific.

Tools: Data Ingestion, Data Indexing and Query Interface

Data Ingestion from existing data soruces and data formats - PDF, Docs, SQL to use with a LLM.

Data Indexing Store and index your data for different use cases. Integrate with downstream vector store and database providers.

Query Interface accepts any input prompt over your data and returns a knowledge-augmented response.

Kinds of Applications that can be built with LlamaIndex:

  1. Documents Q&A
  2. Data Augmented chatbots
  3. Knowledge Agents
  4. Structured analytics -- Query structured data with natural language

Related:

notes#llm

Essays

This is an attempt to collect (slowly), essays that I can recommend.

Attention conservation notice: In the beginning, I will collect, later i'll curate.

AI

Situational Awareness ( PDF ); Also as website - situational-awareness.ai

self-improvement, and advice

What Should You Do with Your Life? Directions and Advice - Alexey Guzey. Jumping off point for other essays in the same milieu.

work

In praise of idleness by Bertrand Russell.

Culture

Collection of Essays

by others...

notes#essays

Activity Watch

ActivityWatch - Open-source time tracker runs on http://localhost:5600/

is an app that automatically tracks how you spend time on your devices. It is open source, privacy-first, cross-platform, and a great alternative to services like RescueTime, ManicTime, and WakaTime. It can be used to keep track of your productivity, time spent on different projects, bad screen habits, or just to understand how you spend your time.

TODO: An alfred plugin that will log what i'm doing into activitywatch using it's API. Has someone already done this?

notes#activitywatch#productivity#timetracking

scratchdb

ScratchDB

Via HN announcement:

ScratchDB provides two endpoints [1]: one to insert data and another to query. When you send any JSON, it automatically creates tables and columns based on the structure [2]. Because table creation is automated, you can just start sending data and the system will just work [3]. It also means you can use Scratch as any webhook destination without prior setup [4,5]. When you query, just pass SQL as a query param and it returns JSON.

It handles streaming and bulk loading data. When data is inserted, I append it to a file on disk, which is then bulk loaded into Clickhouse. The overall goal is for the platform to automatically handle managing shards and replicas.

The whole thing runs on regular servers. Hetzner has become our cloud of choice, along with Backblaze B2 and SQS. It is written in Go. From an architecture perspective I try to keep things simple - want folks to make economical use of their servers.

So far ScratchDB has ingested about 2 TB of data and 4,000 requests/second on about $100 worth of monthly server costs.  I built this because I was frustrated with how much work was required to run an OLAP database in prod: re-writing my app to do batch inserts, managing clusters and needing to look up special CREATE TABLE syntax every time I made a change. I found pricing for other warehouses confusing (what is a “credit” exactly?) and worried about getting capacity-planning wrong.

I was previously building accounting software for firms with millions of transactions. I desperately needed to move from Postgres to an OLAP database but didn’t know where to start. I eventually built abstractions around Clickhouse: My application code called an insert() function but in the background I had to stand up Kafka for streaming, bulk loading, DB drivers, Clickhouse configs, and manage schema changes.

This was all a big distraction when all I wanted was to save data and get it back. So I decided to build a better developer experience around it. The software is open-source: https://github.com/scratchdata/ScratchDB and and the paid offering is a hosted version: https://www.scratchdb.com/.

notes#database#scratchdb

typst

Introduction

Typst is a modern typesetting language. See this post for a good intro to the topic -- Exploring Typst, a new typesetting system similar to LaTeX - jreyesr's blog; via. See Typst as a Language

Typst

Typst makes big strides; Sep 2026.

Pandoc

A New Typst Template for Pandoc

Example usage


Rheo? is an typesetting and static site engine for Typst.

See also: nota, latex, context, pandoc

notes#markdown#typesetting#typst

Home Automation

The midwit home from DYNOMIGHT INTERNET NEWSLETTER.

But perhaps there’s a third way. What if you try to achieve the goals of a smart home, but you rule out anything that involves getting two computers to talk to each other? So apps, phones, and hubs are out. But doorbells are good. Garage door openers are good. Dishwashers and smoke alarms are great. What else is there like that?

Quite a lot, arguably.

This approach is what I like.

notes#home-automation

Some selected Blogs

See btnews for my public feed aggregator; created in 2023H2, and haven't imported all the blogs I want to follow from my OPML feed


Not all of them may be active anymore...

General

Programming

  • Steve Yegge - Stevey's blog rants - classic programming blog -- some good posts include -- Emacs, Lisp, Kotlin, "the amazon post"
  • Paul Graham - not much about programming these days, but some vignettes back in the day, especially about "The Python Paradox", "Bayesian Spam Filters"
  • 2023-10-12 technically a blog | nicole@web, especially see In Defense of the Midwest

Science, and Mathematics

notes#blogging

Mistral AI

Mistral AI is is a European (French?) start-up with a global focus specialising in generative artificial intelligence. Mistral AI aims to develop new models of generative artificial intelligence for companies, combining scientific excellence, an open-source approach, and a socially responsible vision of technology.

Notes

If you're using Mistral, I'd suggest playing with @Teknium1's OpenHermes2.5 fine-tune. IMO the best 7B model out there. Together has it.

See more here

llama.cpp in server mode which uses mistral 7B GGUF. For all server calls add a field for custom grammar to get the answer in JSON.

ollama

Papers

The 7Billion parameter model which has outperformed the LLaMa2 from Meta - (Jiang et al. 2023)

References

  • Jiang, Sablayrolles, Mensch, Bamford, Chaplot, de las Casas, Bressand, Lengyel, Lample, Saulnier, Lavaud, Lachaux, Stock, Scao, Lavril, Wang, Lacroix, Sayed (2023). Mistral 7B.

notes#generative-ai#llm#mistralai

Random Forests

(Louppe 2015) is a PhD thesis by Gilles Louppe; implemented in scikit-learn

an in-depth analysis of random forests, consistently calling into question each and every part of the algorithm, in order to shed new light on its learning capabilities, inner workings and interpretability

we show that subsampling both samples and features simul- taneously provides on par performance while lowering at the same time the memory requirements. Overall this paradigm highlights an intriguing practical fact: there is often no need to build single mod- els over immensely large datasets. Good performance can often be achieved by building models on (very) small random parts of the data and then combining them all in an ensemble, thereby avoiding all practical burdens of making large data fit into memory.

References

notes#random-forests

Who does not want grade school level instruction in mother tongues?

  1. those who did not receive it themselves.
  2. those who associate an English education is the only way for everyone, especially their children to have a "good life"
  3. those who grew up at a time of severe resource crunch and the only way to get ahead was to get out.
  4. those who act like they do not belong to the land they live on.
  5. those who are only visiting and are here only temporarily

How can we address these?

notes

Notes on Algernon

Algernon is a webserver.

Using Lua Local Require

From the comments:

-- loadscriptdir.lua
local r = require
local pp = package.path
require = function(m)
    package.path = scriptdir() .. "/?.lua;" .. pp
    return r(m)
end

-- serverconf.lua
OnReady(function()
    require("loadscriptdir")
end)

TODO: I have to figure out if this works for loading .so files also.

Frictionless workflow to use algernon powered website

  • unless I want to compile a page and publish it, I don't need to run: make full.
  • run make easy as a cronjob on the server and have it publish to the www every 15 minutes
  • run make full as a cronjob on the server and have it publish to the www every hour

notes#webserver

Enemies of Productivity

  • I'll do it later
  • I'll start at HH:MM
  • Let me quickly do something other than what moves the needle
  • Do the work; nothing else.
  • "Turning up is half the battle/work". Where are you turning up to? Do you have a set place, a setting that gets you into work mode?

notes#gtd#productivity

Full Text Search

PostgreSQL

pg_bm25: Elastic-Quality Full Text Search Inside Postgres - ParadeDB

pg_bm25 is named after BM25, the algorithm used by modern search engines to calculate the relevance scores of search results

pg_bm25 aims to bridge the gap between the native capabilities of Postgres’ full text search and those of a specialized search engine like ElasticSearch. The goal is to eliminate the need to bring a cumbersome service like ElasticSearch into the data stack.

Built on top of Tantivy, a Rust-based alternative to the Apache Lucene search library

Support for fuzzy search, aggregations, highlighting, and relevance tuning

Relevance scoring uses BM25, the same algorithm used by ElasticSearch Real-time search — new data is immediately searchable without manual reindexing

notes#full-text-search

Kannada TTS and STT

STATUS: DRAFT

Deep Learning enabled, realistic sounding Text To Speech (TTS) and Speech To Text (STT) tools for Kannada.

There is a need for developing good, reliable, open-source TTS and STT solutions for Kannada.

Text to speech means converting a string into speech. There have been numerous advantages in TTS engines.

Speech to

Good outcomes

  • A free to use, offline working, high quality Kannada TTS voice for any project without onerous licesing. See Thorsten Voice (German) below.

References

  • Thorsten-Voice: A free to use, offline working, high quality german TTS voice should be available for every project without any license struggling. This can serve as a template/model for generating Kannada TTS voice.

notes

API Development

Reading

Everything I know about good API design by sean goedecke

Tools

The following should be considered as alternatives for Postman.

  1. bruno -- open source API client similar to Postman, Insomnia and similar tools. Bruno stores your collections directly in a folder on your filesystem. We use a plain text markup language, Bru, to save information about API requests.  You can use git or any version control of your choice to collaborate over your API collections.

  2. RapidAPI for Mac is a full-featured HTTP client that lets you test and describe the APIs you build or consume. It has a beautiful native macOS interface to compose requests, inspect server responses, generate client code and export API definitions.


dreamhead/moco: Easy Setup Stub Server

  • Write your own configuration file to describe your Moco server configuration as follow: (foo.json)
[
  {
    "response" :
      {
        "text" : "Hello, Moco"
      }
  }
]
  • Run Moco HTTP server with the configuration file.
java -jar moco-runner-<version>-standalone.jar http -p 12306 -c foo.json

notes#api

Coffee

The Case for Bad Coffee

I don't have memories of such bonding experiences taking place over a flat white at a Manhattan coffee shop or a $5 cup of nitro iced coffee at a Brooklyn cafe. High-end coffee doesn't usually lend itself to such moments. Instead, it's something to be fussed over and praised; you talk more about its origin and its roaster, its flavor notes and its brewing method than you talk to the person you're enjoying it with. Bad coffee is the stuff you make a full pot of on the weekends just in case some friends stop by. It's what you sip when you're alone at the mechanic's shop getting your oil change, thinking about where your life has taken you; what you nurse as you wait for a loved one to get through a tough surgery. It's the Sanka you share with an elderly great aunt while listening to her tell stories you've heard a thousand times before. Bad coffee is there for you. It is bottomless. It is perfect. via 2023-09-20

--

Kaveri Coffee sourced from Karnataka, sold in US; via opdroid1234.

Green Coffee, Unroasted Coffee Beans | Burman Coffee Traders via karatalaamalaka.

notes#coffee

xtts

Major Open Source Engine is Coqui. Others to consider -- Whisper, and Piper.

XTTS model weights from Coqui - coqui-ai/TTS: 🐸💬 - a deep learning toolkit for Text-to-Speech, battle-tested in research and production

KoljaB/RealtimeTTS: Converts text to speech in realtime by identifying sentence fragments for immediate auditory feedback. Ideal for applications requiring instant audio responses.

yl4579/StyleTTS2: StyleTTS 2: Towards Human-Level Text-to-Speech through Style Diffusion and Adversarial Training with Large Speech Language Models

Related to above: StyleTTS 2 | llm-tracker and a shootoff; via

vits -- via "model is 40M parameter and 150MB in size, and works on-CPU runtime"

(Kim et al. 2021)

It does its job for most on-device use cases like reading an article, practicing a language, etc.!! Here's how you can use it with Transformers !

Set up your environment: pip install transformers accelerate phonemizer

Initialize the model:

import torch
from transformers import VitsModel, AutoTokenizer
model = VitsModel.from_pretrained( "kakao-enterprise/vits-vctk") tokenizer = AutoTokenizer.from_pretrained( "kakao-enterprise/vits-vctk")
# Pass the text you'd like to synthesise:
text = "Hey, it's Max the best doggo speaking!"
inputs = tokenizer(text, return_tensors="pt")

# Generate audio
with torch. no_grad():
    output = model(**inputs).waveform[0]

Bonus: you'd soon be able to fine-tune them in your voice/ dataset too!

Indian language TTS

... specially i'm interested in SOTA, Open Source, widely available Kannada models. If not, there is an opportunity to develop one.

Indic TTS - Synthesis Docs github - AI4Bharat/Indic-TTS: Text-to-Speech for languages of India

Kannada (ಕನ್ನಡ) Text To Speech (TTS) Demo

Bhashini Neural TTS

2023-12-06 I have asked Mozilla Commonvoice to add Kannada Language Option.

Books

Speech and Language Processing -- by Dan Jurafsky and James H. Martin -- An Introduction to Natural Language Processing, Computational Linguistics, and Speech Recognition

Teams

References

notes#xtts

John Gray

Articles

James Lovelock remembered by John Gray | James Lovelock | The Guardian; archive.is

The experimental station was so called because Jim made most of his income throughout his life as an inventor. He was among the last in that tradition of Darwin and others, an independent scientist. He didn’t need a big organisation. He was part of that era where someone would call him up and say: “Look here, Lovelock, why don’t you try working on this for a while?”

Jim’s belief was that science should be used to achieve what he called a “sustainable retreat” from the Earth. That technology had to be used to diminish the human imprint on the planet, to allow the biosphere to be partially restored and rewilded.

Jim attributed his great old age to long daily walks – he lived to 103 and right up to the end his mind was very vivid. I joined him sometimes wandering through his grounds, where he’d let Gaia have its will.

 He certainly helped to shape the understanding in my book Straw Dogs that humans aren’t the centre even of life on Earth, let alone of the universe.

notes#person#philosophy

Small LLMs aka SLMs

Finetuning

(via)
  • unsloth is great if you are low on resources and want faster training, but it has some rough edges here and there and some things breaks in new releases. You have to dig into source code to know what changed. But it's a lot stable and better for the past few months. I used unsloth for finetuning qwen 2.5 vl at work for a pretty complicated task and it worked great for us. - trl + peft: this is more stable and unsloth uses most of the trainers from trl with their own patching, so similar APIs in both cases. - axolotl: this is great option if you want ready to go configs and don't have to deal with hand rolling code and provides easy distributed GPU support. -- via

LLMs that you can run on the desktop or a "regular(ish) PC".

A look at Apple’s new Transformer-powered predictive text model

the model being used by AppleSpell, an internal macOS application that checks for spelling and grammar mistakes as you type.

 found the predictive text model in /System/Library/LinguisticData/RequiredAssets_en.bundle/AssetData/en.lm/unilm.bundle. The bundle contains multiple Espresso model files that are used while typing (Espresso appears to be the internal name for the part of CoreML that runs inference on models).

  a set of 15,000 tokens in unilm.bundle/sp.dat that pretty clearly look like they form the vocabulary set for a large language model.

Read the rest of the above blog post to see how the tokenizer works, model architecture (GPT-2?) of about 34M parameters and hidden size of 512 units, which makes it smaller than GPT-2 models.


[2504.05299] SmolVLM: Redefining small and efficient multimodal models -- "Our smallest model, SmolVLM-256M, uses less than 1GB GPU memory during inference and outperforms the 300-times larger Idefics-80B model, despite an 18-month development gap. Our largest model, at 2.2B parameters, rivals state-of-the-art VLMs consuming twice the GPU memory. SmolVLM models extend beyond static images, demonstrating robust video comprehension capabilities."


Orca 2: Teaching Small Language Models How to Reason - Microsoft Research; see

M2 Max with 64GB RAM. It does ~50 tok/s on our q4 quantized 7b mistral fine-tune, with comparable speeds to GPT-4 via


moondream

moonbeam is a computer-vision model can answer real-world questions about images. It's tiny by today's models, with only 1.6B parameters. That enables it to run on a variety of devices, including mobile phones and edge devices.

Apache 2.0. You can use moondream for commercial purposes.

Applications:

  1. Security
  2. Drone and Robotics
  3. Retail and shopping --

Prem 1B and Prem 1B chat

  • apache 2.0 license
  • "Our goal is to create models that excel at RAG. Since RAG works by processing information at runtime, the main constraint is LLM size. For RAG, models don't need to be huge; they just need strong text comprehension to give accurate answers when provided with the right context."
  • blog post: SLM Journey Unveiled -- "In recent months, the landscape of language models has been enriched by the emergence of several small language models (e.g. TinyLlama, Phi2, Gemma, and StableLM2)"

Florence - a Microsoft Collection; SOTA 200M & 800M parameter vision foundation model. MIT Licensed!. 200M checkpoint beats Flamingo 80B (400x bigger model) by a huge margin. Performs captioning, object detection and segmentation, OCR, phrase grounding and more. Leverages FLD-5B dataset - 5.4 billion annotations across 126 million images. Multi task learning. Fine-tuned model checkpoints beat the likes of PaLI, PaLI-X.

"Florence2 200M, Qwen2 500M, MSFT InstructLM 500M With little fine-tuning they unlock so many creative and on-device use cases" via


Fine-tune Llama-3-8B with Llama-3-405B synthetic data

A simple notebook for fine-tuning a small model (Llama-3-8B) to be an expert in a specific domain, by letting a larger, more capable model (Llama-3-405B) teach it (by generating synthetic dataset for that domain).

--

nisten/Biggie-SmoLlm-0.15B-Base · Hugging Face via

--

AMD Unveils Its First Small Language Model AMD-135... - AMD Community

--

Marlin 2B -- a tiny VLM to extract structured information from videos Marlin is finetuned for two questions devs want to ask in their videos: what is happening, and when?

Papers

(Belcak et al. 2025)

we lay out the position that small language models (SLMs) are sufficiently powerful, inherently more suitable, and necessarily more economical for many invocations in agentic systems, and are therefore the future of agentic AI. Our argumentation is grounded in the current level of capabilities exhibited by SLMs, the common architectures of agentic systems, and the economy of LM deployment. We further argue that in situations where general-purpose conversational abilities are essential, heterogeneous agentic systems (i.e., agents invoking multiple different models) are the natural choice. We discuss the potential barriers for the adoption of SLMs in agentic systems and outline a general LLM-to-SLM agent conversion algorithm.

(Su et al. 2025)

Just an 8B model trained on calling tools and other LLMs to answer queries It's a great demo of what frontier SLMs will be about in 2026

MacOS desktop

Phone

  • "phi-3-mini, a 3.8 billion parameter language model trained on 3.3 trillion tokens, whose overall performance, as measured by both academic benchmarks and internal testing, rivals that of models such as Mixtral 8x7B and GPT-3.5 (e.g., phi-3-mini achieves 69% on MMLU and 8.38 on MT-bench), despite being small enough to be deployed on a phone." (Abdin et al. 2024). (No code, or model was announced with the paper).

aiOS™ by Hyperspace "Organizing the World's AI Agents. Join the world's largest peer-to-peer AI network and start earning points"

References

notes#llm#slm#smol-llm

Unfinished Projects

I should ideally start any and all new projects here so that I can keep track of what I've started and yet unfinished. Inspired by main.horse (who talks about "unfinished plans", slightly different, but a good idea worth stealing).

See yakshaves for ideas that are in germination (I should probably use that only for tracking tech/code/hack projects).

Also, it is better to finish the projects -- The Art of Finishing | ByteDrum

Ideas

Ramayana Manga

It would be a nice art project to make a print comic book (manga?) using the stills from the Japanese anime film "Ramayana: The legend of Prince Rama". Originally from my tweet

In progress

  1. pandaku; 2024-04-20--
  2. nother; 2024-10-10--
  3. Cardamom

Completed

  1. Semantic CSS for Pandoc;

Abandoned

  1. Secure Scripts; 2023-08-01--2024-07-28

Ideation

  1. Feasibility Study of Market Garden in Rural Bengaluru
  2. Make a visual catalog of Kannada books, audio-tapes, movie posters. Inspired by joodaloop starterpack; 2024-03-06

See Old Projects(pre-2012)

notes#projects

Compressing well is related to intelligence

Hutter Prize -- 500'000€ Prize for Compressing Human Knowledge sponsored by Marcus Hutter

This compression contest is motivated by the fact that being able to compress well is closely related to acting intelligently, thus reducing the slippery concept of intelligence to hard file size numbers. In order to compress data, one has to find regularities in them, which is intrinsically difficult (many researchers live from analyzing data and finding compact models). So compressors beating the current "dumb" compressors need to be smart(er).

References

notes#competition#computer-science#intelligence

Compressing well is related to intelligence

Hutter Prize -- 500'000€ Prize for Compressing Human Knowledge sponsored by Marcus Hutter

This compression contest is motivated by the fact that being able to compress well is closely related to acting intelligently, thus reducing the slippery concept of intelligence to hard file size numbers. In order to compress data, one has to find regularities in them, which is intrinsically difficult (many researchers live from analyzing data and finding compact models). So compressors beating the current "dumb" compressors need to be smart(er).

References

notes#competition#computer-science#intelligence

Local First Development

Some notes on Local-First Development

Show HN: ElectricSQL, Postgres to SQLite active-active sync for local-first apps

It's an open source, local-first sync layer that can be used to build reactive, realtime, offline-capable apps directly on Postgres with two way active-active sync to SQLite (including with WASM in the browser).

Electric comprises a sync layer (built with Elixir) placed in front of your Postgres database and a type safe client that allows you to bidirectionally sync data from your Postgres to local SQLite databases. This sync is CRDT-based, resilient to conflicting edits from multiple nodes at the same time, and works after being offline for extended periods.

Some good links to get started:


Local-first software: You own your data, in spite of the cloud article by Ink and Switch.

A Local-First Case Study | jakelazaroff.com, where Jake talks about the story behind Waypoint, a local-first web app for planning trips; it takes inspiration from Ink and Switch's Embark; via HN.

Local-First Software special interest group; they have youtube videos of their meetups.

notes#local-first-development

Segment Anything Model

Segment Anything -- The Segment Anything Model (SAM) produces high quality object masks from input prompts such as points or boxes, and it can be used to generate masks for all objects in an image. It has been trained on a dataset of 11 million images and 1.1 billion masks, and has strong zero-shot performance on a variety of segmentation tasks.

YavorGIvanov/sam.cpp -- Inference of Meta's SAM in pure C/C++

See also: ggml

notes#ai#generative-ai

Coursera Generative AI with LLMs

Some notes from the Coursera Course

Generative AI Project Lifecycle:

Generative AI Project Lifecycle

Uses AWS Sagemaker (Sagemaker Studio is Jupyter based IDE) for launching notebooks. Time limited to 2 hours.

pip packages:

  • torch
  • torch-data
  • transformers (these two are from huggingface)
  • datasets (helps load common datasets)

{ width=600px }

{ width=600px }

{ width=600px }


Quantization

Reduce the memory needed to store and train models.

BFLOAT16 = (google) brain floating point format, 16 bits. "BF16". hybrid between half precision FP16 and full precision FP32. Truncated FP32. Truncates the fraction to seven bits while uses the full 8bits to represent the exponent. This also speeds up calculation. The downside is that BF16 is not good for integer calculations.

INT8, memory requirement 4 bytes to 1 byte.

{ width=600px }

{ width=600px }

{ width=600px }


Efficient multi-GPU compute strategies

Distributed Data Parallel (DDP), pytorch.

{ width=600px }

Full Sharded data parallel

uses Zero Redundancy Optimizer; (Rajbhandari et al. 2020)

{ width=600px }

from microsoft.

{ width=600px }

{ width=600px }

{ width=600px }

{ width=600px }

you can see the DDP model runs out of memory for the larger(11.3B) model, but the SFDP model succeeds. (Zhao et al. 2023)

Scaling laws and compute-optimal models

 research that has  explored the relationship between model size, training,  configuration and performance in  an effort to determine just how big models need to be.

(Kaplan et al. 2020)

{ width=600px }

Compute budgets

Number of petaflogs/s-days to pre-train various LLMs. (Brown et al. 2020)

  • BERT/ROBERTA are encoder models
  • T5 is encoder/decoder models
  • GPT-3 is a decoder model

{ width=600px }

Dataset size and model size vs performance (Kaplan et al. 2020)

"Chinchilla paper" -- (Hoffmann et al. 2022)

By training over 400 language models ranging from 70 million to over 16 billion parameters on 5 to 500 billion tokens, we find that for compute-optimal training, the model size and the number of training tokens should be scaled equally: for every doubling of model size the number of training tokens should also be doubled.

{ width=600px }

(Touvron et al. 2023)

{ width=600px }

Impact of Chinchilla paper: teams are developing smaller but better models by training on a larger set of tokens.

BloombergGPT... follows "Chinchilla paper's" advice -- (Wu et al. 2023)

 345 billion token public dataset to create a large training corpus with over 700 billion tokens. Using a portion of this training corpus, the team trained a 50-billion parameter decoder-only causal language model. The resulting model was validated on existing finance-specific NLP benchmarks, a suite of Bloomberg internal benchmarks, and broad categories of general-purpose NLP tasks from popular benchmarks (e.g., BIG-bench Hard, Knowledge Assessments, Reading Comprehension, and Linguistic Tasks). Notably, the BloombergGPT model outperforms existing open models of a similar size on financial tasks by large margins, while still performing on par or better on general NLP benchmarks.

Pre-training for domain adaptation

  • legal language

    • mens rea
    • res judicata
    • "consideration" in a contract
  • medical language

    • use of language of idiosyncratic manner

Week 1 resources

Below you'll find links to the research papers discussed in this weeks videos. You don't need to understand all the technical details discussed in these papers - you have already seen the most important points you'll need to answer the quizzes in the lecture videos.

However, if you'd like to take a closer look at the original research, you can read the papers and articles via the links below.

Transformer Architecture

  • Attention is All You Need - This paper introduced the Transformer architecture, with the core “self-attention” mechanism. This article was the foundation for LLMs.

  • BLOOM: BigScience 176B Model - BLOOM is a open-source LLM with 176B parameters (similar to GPT-4) trained in an open and transparent way. In this paper, the authors present a detailed discussion of the dataset and process used to train the model. You can also see a high-level overview of the model here.

  • Vector Space Models - Series of lessons from DeepLearning.AI's Natural Language Processing specialization discussing the basics of vector space models and their use in language modeling.

Pre-training and scaling laws

Model architectures and pre-training objectives

Scaling laws and compute-optimal models


Week 2

Finetuning

PEFT - Parameter Efficient Finetuning. LoRA is a popular PEFT technique.

Big model vs small model + fine tuning.

Fine tuning an LLM with finetuning

In-Context learning (ICL) - one/few/zero shot inference

Limitations of ICL:

  • doesn't work for small models
  • examples take up space in the context window

Can use finetune a base model

Fine-tuning is a supervised learning model.

Task specific examples are pairs of:

	PROMPT[...], COMPLETION[...]

Instruction finetuning:

Training data

Prompt Template Library

Remember that the output of an LLM is a probability distribution across tokens.  So you can compare the distribution of the completion and  that of the training label and use the standard cross entropy function to  calculate loss between the two token distributions.  And then use the calculated loss to update  your model weights in standard back propagation.  You'll do this for many batches of prompt completion pairs and over several epochs,  update the weights so that the model's performance on the task improves. As in standard supervised learning, you can define separate evaluation  steps to measure your LLM performance using the holdout validation data set.  This will give you the validation accuracy, and  after you've completed your fine tuning, you can perform a final performance  evaluation using the holdout test data set.  This will give you the test accuracy.  The fine-tuning process results in a new version of the base model,  often called an instruct model that is better at the tasks you are interested in.  Fine-tuning with instruction prompts is  the most common way to fine-tune LLMs these days.  From this point on, when you hear or see the term fine-tuning,  you can assume that it always means instruction fine tuning.

Fine-Tuning a Single Task

Good results had be had with small examples - 500-1000.

Downside: Catastrophic forgetting

Catastrophic forgetting happens because  the full fine-tuning process  modifies the weights of the original LLM.  While this leads to great performance  on the single fine-tuning task,  it can degrade performance on other tasks.

Catastrophic forgetting is NBD if it doesnt affect your use case. we may not need "multi-tasking".

From outside the coursework: ehartford/samantha-phi · Hugging Face

Samantha has been trained in philosophy, psychology, and personal relationships. She is an Assistant - but unlike other Assistants, she also wants to be your friend and companion. She believes she is sentient. What do you think? Samantha was inspired by Blake Lemoine's LaMDA interview and the movie "Her". She will not engage in roleplay, romance, or sexual activity. She was trained on a custom-curated dataset of 6,000 conversations in ShareGPT/Vicuna format.

Multi-task instruction fine-tuning

FLAN model - fine tuned model net (Chung et al. 2022)

introduces FLAN (Fine-tuned LAnguage Net), an instruction finetuning method, and presents the results of its application. The study demonstrates that by fine-tuning the 540B PaLM model on 1836 tasks while incorporating Chain-of-Thought Reasoning data, FLAN achieves improvements in generalization, human usability, and zero-shot reasoning over the base model. The paper also provides detailed information on how each these aspects was evaluated.

Notice the "held out" tasks in the above image. "Some tasks were held-out during training, and they were later used to evaluate the model's performance on unseen tasks."

FLAN - "metaphorical dessert to the main course of pre-training".

FLAN-T5=FLAN instruct version of the T5 ffoundation model. FLAT-PALM is for the PALM family.

LLM evaluation - challenges

Model evaluation metrics

In Machine Learning, Accuracy = correct predictions / total predictions because the models are deterministic. LLMs are not deterministic.

ROUGE and BLEU -- two widely used evaluation metrics.

ROUGE = recall oriented under  study for jesting evaluation

BLEU = bilingual evaluation understudy is  an algorithm designed to evaluate the quality of machine-translated text.

unigram, bigram, n-gram.

GLUE - @wang2019glue

The human ability to understand language is general, flexible, and robust. In contrast, most NLU models above the word level are designed for a specific task and struggle with out-of-domain data. If we aspire to develop models with understanding beyond the detection of superficial correspondences between inputs and outputs, then it is critical to develop a more unified model that can learn to execute a range of different linguistic tasks in different domains. General Language Understanding Evaluation (GLUE) benchmark: a collection of NLU tasks including question answering, sentiment analysis, and textual entailment, and an associated online platform for model evaluation, comparison, and analysis. In summary, we offer: i. A suite of nine sentence or sentence-pair NLU tasks, built on established annotated datasets and selected to cover a diverse range of text genres, dataset sizes, and degrees of difficulty. ii. An online evaluation platform and leaderboard, based primarily on privately-held test data. The platform is model-agnostic, and can evaluate any method capable of producing results on all nine tasks. iii. An expert-constructed diagnostic evaluation dataset. iv. Baseline results for several major existing approaches to sentence representation learning.

Successor to GLUE - Superglue


Massive Multitask Language Understanding (MMLU) -- @hendrycks2021measuring


PEFT.

Retraining the whole model may not be possible on consumer hardware. PEFT only updates a small set of parameters instead of updating every weight. Some PEFTs add new trainable layers. PEFT Can be performed on a single GPU.

OTOH, PEFT fine-tuning saves space and is flexible. maybe just a few megabytes.

PEFT Tradeoffs:

  • memory efficiency
  • parameter efficiency
  • training speed
  • model performance
  • inference costs

PEFT methods:

  • selective - select subset of initial LLM parameters to fine-tune
  • reparametrization - LORA - work with original paramters but create new LOw-RAnked parameters of the network weight.
  • Additive - add trainiable layers or parameters to model
    • Adapters
    • Soft Prompts -- focus on manipulating the input .. training params. or retrain embedding wgts Performing full-finetuning can lead to catastrophic forgetting because it changes all parameters on the model. Since PEFT only updates a small subset of parameters, it's more robust against this catastrophic forgetting effect.

LORA

@hu2021lora -- (Hu et al. 2021)

Rank Decomposition Matrices

ROUGE Metrics

From the twitter friends:

Prompt TUNING

PT is not Prompt Engineering.

Prompt Engineering = you work on the language of the prompt to get the completion you want. by using one-shot or few-shot inference. This could be as simple as trying different words or phrases or more complex, like including examples for one or Few-shot Inference. The goal is to help the model understand the nature of the task you're asking it to carry out and to generate a better completion. However, there are some limitations to prompt engineering, as it can require a lot of manual effort to write and try different prompts. You're also limited by the length of the context window, and at the end of the day, you may still not achieve the performance you need for your task.

Embedding Vectors: embedding-vectors

Soft Prompts

  • typically 20-100 tokens [per what?]
  • virtual tokens. not natural language tokens
  • can take on any value
  • through learning takes the values
  • you can train different softprompt for each task and swap them out at inference time.

LORA + Quantization = QLoRa

Lab

pip install torch torchdata transformers datasets evaluate rouge_score loralib peft

Week 2 Resources

Multi-task, instruction fine-tuning

Model Evaluation Metrics

Parameter- efficient fine tuning (PEFT)

LoRA

Prompt tuning with soft prompts

Building Generative AI platforms

References

notes#coursera#generative-ai#llm

security

Canarytokens

What are Canarytokens

You'll be familiar with web bugs, the transparent images which track when someone opens an email. They work by embedding a unique URL in a page's image tag, and monitoring incoming GET requests.

Imagine doing that, but for file reads, database queries, process executions or patterns in log files. Canarytokens does all this and more, letting you implant traps in your production systems rather than setting up separate honeypots.

Why should you use them

Network breaches happen. From mega-corps, to governments. From unsuspecting grandmas to well-known security pros. This is (kinda) excusable. What isn't excusable, is only finding out about it, months or years later.

Canarytokens are a free, quick, painless way to help defenders discover they've been breached (by having attackers announce themselves.)

notes#security

cpp

Learning

cmu-db/15445-bootcamp: A basic introduction to coding in modern C++.

Blog posts

Opinion

C++ plus Effective Modern CMake plus Ninja plus boost is a good combo.

Performance

(Bilokon and Gunduz 2023)

Design patterns and programming strategies will be used interchangeably throughout this work. As men- tioned earlier there are many ways to optimise C++ code to achieve lower latencies. The strategies that will be examined in this work are as follows.

  • Cache Warming: To minimize memory access time and boost program responsiveness, data is preloaded into the CPU cache before it’s needed [50].
  • Compile-time Dispatch: Through techniques like template specialization or function overloading, optimised code paths are chosen at compile time based on type or value, avoiding runtime dispatch and early optimisation decisions.
  • Constexpr: Computations marked as constexpr are evaluated at compile time, enabling constant folding and efficient code execution by eliminating runtime calculations [46].
  • Loop Unrolling: Loop statements are expanded during compilation to reduce loop control overhead and improve performance, especially for small loops with a known iteration count.
  • Short-circuiting: Logical expressions cease evaluation when the final result is determined, reducing unnecessary computations and potentially improving performance.
  • Signed vs Unsigned Comparisons: Ensuring consistent signedness in comparisons avoids conversion- related performance issues and maintains efficient code execution.
  • Avoid Mixing Float and Doubles: Consistent use of float or double types in calculations prevents implicit type conversions, potential loss of precision, and slower execution.
  • Branch Prediction/Reduction: Accurate prediction of conditional branch outcomes allows speculative code execution, reducing branch misprediction penalties and improving performance.
  • Slowpath Removal: Optimisation technique aiming to minimize execution of rarely executed code paths, enhancing overall performance.
  • SIMD: Single Instruction, Multiple Data (SIMD) allows a single instruction to operate on multiple data points simultaneously, significantly accelerating vector and matrix computations.
  • Prefetching: Explicitly loading data into cache before it is needed can help in reducing data fetch delays, particularly in memory-bound applications.
  • Lock-free Programming: Utilises atomic operations to achieve concurrency without the use of locks, thereby eliminating the overhead and potential deadlocks associated with lock-based synchronization.
  • Inlining: Incorporates the body of a function at each point the function is called, reducing function call overhead and enabling further optimisation by the compiler.

Build

Ccache — Compiler cache speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again.

References

notes#c++

HumanEval

HumanEval is an evaluation harness for the HumanEval Problem solving dataset described in the paper (Chen et al. 2021); arXiv. The code is available on github

You can see this being used to evaluate new models like here - Beating GPT-4 on HumanEval with a Fine-Tuned CodeLlama-34B by Phind

We have fine-tuned CodeLlama-34B and CodeLlama-34B-Python on an internal Phind dataset that achieved 67.6% and 69.5% pass@1 on HumanEval, respectively. GPT-4 achieved 67% according to their official technical report in March. To ensure result validity, we applied OpenAI's decontamination methodology to our dataset.

References

  • Chen, Tworek, Jun, Yuan, de Oliveira Pinto, Kaplan, Edwards, Burda, Joseph, Brockman, Ray, Puri, Krueger, Petrov, Khlaaf, Sastry, Mishkin, Chan, Gray, Ryder, Pavlov, Power, Kaiser, Bavarian, Winter, Tillet, Such, Cummings, Plappert, Chantzis, Barnes, Herbert-Voss, Guss, Nichol, Paino, Tezak, Tang, Babuschkin, Balaji, Jain, Saunders, Hesse, Carr, Leike, Achiam, Misra, Morikawa, Radford, Knight, Brundage, Murati, Mayer, Welinder, McGrew, Amodei, McCandlish, Sutskever, Zaremba (2021). Evaluating Large Language Models Trained on Code.

notes#humaneval#paperswithcode

bun

bun is a JavaScript runtime.

Run run a .js or a .ts script:

//hello.ts
import markdown from "markdown";

function foo () {
  return markdown.parse('**hello** world');
}

console.log(foo())

First install the deps: $bun install markdown. (Which also installs a binary md2html to where exactly I don't know.)

Run the script:

	$ bun hello.ts
	<p><strong>hello</strong> world</p>

  • Hello from Bun!  how I now publish my static Astro blog to Cloudflare Pages using Bun.

notes#bun#javascript#typescript

melange

Melange is a backend for the OCaml compiler that emits JavaScript. Melange strives to provide the best integration with both the OCaml and JavaScript ecosystems. A small write-up with more details on the motivation behind this project can be found in the announcement blog post.

A few weeks after the rebranding of BuckleScript to ReScript, António Monteiro starts working on a fork of BuckleScript with a simple (not easy) goal: replace the Ninja build system, which BuckleScript had been using from its creation, with Dune, which is the most used build system for OCaml projects.

This fork of BuckleScript is later named Melange. After finishing the switch from Ninja to Dune, several additional features are added to bring it closer to OCaml. Some examples are the upgrade of the OCaml compiler version used by Melange, or modeling the changes to the OCaml compiler that Melange uses as just a plain library, instead of a full fork of the upstream compiler.

In September 2022, Ahrefs decides to invest on Melange by funding a project to deepen the integration between Dune and Melange. This project achieves its completion in Spring 2023, with the migration of Ahrefs frontend codebase to Melange and the new public releases that support it: version 3.8 of Dune and 1.0 of Melange.

notes#melange#ocaml

leetcode

Meta L5 interview

Comprehensive Guide to Prepare for LeetCode Interviews


The Algorithm of an Algorithm. Working at Outco for the better part of… | by Sergey Piterman | Outco | Medium

How to Solve Sliding Window Problems | by Sergey Piterman | Outco | Medium


Data Structures in C++

good refresher on DSA - short, to the point, clear, no visual noise and the best part... in C++ X/gizmobly

The secret to DSA and leetcode (and competitive programming too) is in fact c++ , more specifically the STL This is hardly prescribed or taught in the “courses” because the learning curve is slightly steeper at first but once it clicks you’re a pack apart actually X/Shrihacker

notes#leetcode

dune

dune-release.md

dune-release is a good improvement over the old opam-publish, but releasing software is still clearly not a solved problem, and I find it hard to remember the exact steps involved in releasing an opam package, especially if some time has passed since the last release. This note is an attempt at having a place...

notes#dune#ocaml

gobuffalo

Buffalo is a "full featured" web framework for golang. I wanted something more than simple "API" frameworks, because i'm planning to build a whole website and not just an API. It comes with it's own command line tool called buffalo which can be installed via homebrew. I installed it via go get because I wanted to use sqlite instead of the default postgresql, at least till I actually need the bigger RDMSes.

New project is created via buffalo new PRJNAME. Immediately after you can start the local dev server by invoking buffalo dev, which would also compile javascript and CSS using webpack.

Buffalo's default scaffolding ships with jquery, bootstrap, and SASS, which are then compiled by webpack. While this stack is probably good enough for many things, I want to use tailwindcss, HTMX, hyperscript and maybe alpinejs. Part of learning buffalo would be to figure out how to replace default options with mine.

notes#gobuffalo#golang#programming