Research: parse_number() as a SQLite extension: C vs Rust I was out walking the dog when I got curious about how easy/difficult it would be to write a SQLite C extension that adds a parse_number() function for turning strings like -$1,234.56 or '12.5%' into numeric values that could be summed and sorted. I fired up regular Claude chat (Opus 5.5) and prompted : I'm thinking about a SQLite custom function 'parse_number(value)' that strips ',', '$', '£' and '%', handles a leading '-', and returns 'NULL' for anything it can’t parse Explore the difference between building this as a SQLite extension in C v.s. in Rust - I want to compare performance and code complexity and size of the resulting .so (or whatever) file This gave me a solid starting point - the Rust extension was 321 KB (using Rusqlite ) and 298 KB (using sqlite-loadable-rs ), while the C extension was 14 KB. But the Rust extension was faster! Turns out that's because the Rust equivalent of C's strtod is "twice as fast". So I prompted: Try writing your own C function for parsing text into a decimal number that catches up to or beats the Rust implementation And it did: Net cost per row over 2 million rows, lower is better: first C new C rusqlite sqlite-loadable Mixed data 67 ns 19 ns 46 ns 41 ns Integers only 25 ns 16 ns 36 ns 32 ns Decimals only 106 ns 18 ns 55 ns 47 ns Finally, I had it rewrite the prototype as a research report to match the others in simonw/research by prompting this: Clone simonw/research from GitHub and turn your above investigation into a research report as seen in that repository - you can give me a zip file to download that contains your new folder Here's the resulting report . Tags: c , research , sqlite , rust , claude
Nvidia CEO Jensen Huang admitted to having a romantic relationship with a suspected 〇〇 in a message to his company, and the company’s board announced an independent investigation Sunday. 附上内部信: To my colleagues at NVIDIA, I owe my family and all of you an apology. I was unfaithful to my wife. My actions hurt her and our children. There is no excuse for what I did. I am deeply sorry. Throughout my life, my family has given me love and support. They deserve my honesty and loyalty. Instead, I let them down and damaged the life we built together. I take full responsibility for what I did and the hurt I caused, and I accept the criticism that comes with it. To my wife and family: I love you. I know an apology cannot undo what I have done. I hope our family will heal and that, over time, I can earn back your trust. To my colleagues at NVIDIA, including those I have worked alongside for decades, and to our board, partners, and shareholders around the world: you deserve better from me. Leading NVIDIA is the privilege of my life. My responsibility is to serve you and be worthy of your trust. I have fallen short of that responsibility. I am fully committed to NVIDIA and will work to earn back your confidence. Regarding the national security concerns raised in news reports, NVIDIA’s Board of Directors has initiated an independent investigation. I support the investigation and will cooperate fully. I love our country and our company. I am committed to protecting NVIDIA and supporting America’s national security. I am proud and grateful to be an American. My family bears no responsibility for my choices. I do. Please give them privacy. Jensen
The P in JEPA stands for predictive. The main distinction is not between JEA and JEPA, but between Joint Embedding (predictive or not) and generative architectures. Whether a predictor is necessary depends on the task. Given observations x and y (y being available only during training), a generative architectures predicts y from x. The loss is the divergence between y and its prediction: L = divergence(y, pred(enc(x)) ) A JEA encodes y as well and minimizes the divergence between the representations of x and y, while preventing collapse: L = divergence( enc(y), enc(x) ) + R( enc(y), enc(x) ) Where R is the anti-collapse regularizer, which may be computed over a batch of samples. JEA are used when the prediction has no particular direction, i.e. when x and y are different views of the same scene. The idea for JEA is very old. Becker and Hinton proposed a simple model in 1989 where the anticollapse was based on information maximization. Schmidhuber had a version in 1992 based on redundancy minimization. At NIPS 1993, I proposed Siamese nets, which was a contrastive method to train JEA. Such contrastive methods gained popu.arity after Google's SimCLR paper in 2020. In 2021, Stéphane Deny in my group proposed the Barlow Twins redundancy reduction regularizer, which seemed to work at scale. This was shortly followed by VICReg by Adrien Bardes, Jean Ponce, and me, and last year by SIGReg by Randall Balestriero and me. DINO is a JEA method that comes from a long string of papers from Piotr Bojanowski's group at FAIR-Paris, starting with Noise as Targets (2017), Deep Clustering (2018-2020), and DINO v1-v3 which are contrastive between clusters, not samples. JEPA adds a predictor, which is useful when the prediction is non-symetric. For example, when x is a degraded/corrupted version of y, or when x is a present observation and y a future observation (temporal prediction). The loss is: L = divergence( enc(y), pred(enc(x)) ) + R( enc(y), enc(x) ) All of these models can be augmented by an action variable a, fed to the predictor, encoding an action, intervention, or transformation to produce y from x. This turns the system into a "world model". In a JEPA, the loss becomes L = divergence( enc(y), pred(enc(x), a) ) + R( enc(y), enc(x) )
最近在做多媒体 AI 产品集成,发现不同模型和供应商的接口差异会增加维护成本。 01Router 提供一个统一 API ,可接入视频、图片、音频和聊天模型,也可以按预算和质量选择模型与供应商。对需要快速试用不同模型的开发者,可能会更方便。 产品同时提供 Web Studio 和 API 接入,定价模式为 freemium ,最低价格为 $10 / 1,000 credits 。 官网: 01Router
最近在做多媒体 AI 产品集成,发现不同模型和供应商的接口差异会增加维护成本。 01Router 提供一个统一 API ,可接入视频、图片、音频和聊天模型,也可以按预算和质量选择模型与供应商。对需要快速试用不同模型的开发者,可能会更方便。 产品同时提供 Web Studio 和 API 接入,定价模式为 freemium ,最低价格为 $10 / 1,000 credits 。 官网: 01Router