Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

Why is Rust different than many/most programming languages? Alice Ryhl works on Google's Android Rust team, is a Rust language team advisor, and is a core maintainer of Tokio (the most widely-used async runtime in Rust) Timestamps: 00:00 Intro 04:09 Tokio: an overview 05:11 What Alice likes about Rust...

51,776 Aufrufe • vor 2 Monaten •via X (Twitter)

0 Kommentare

Keine Kommentare verfügbar

Kommentare vom Original-Post werden hier angezeigt

Ähnliche Videos

Xavier Leroy (creator of OCaml) is an expert in compilers, formal verification of software and functional programming. This interview should be an approachable resource if you're curious about formal verification of software since I was learning that on the fly during it. In this episode: • OCaml compared with Rust and JavaScript • What is formal verification and how does it work • How languages call each other across boundaries • How to address "almost-correct" LLM code • How type inference works in programming languages Where to watch: • YouTube - • Spotify - • Apple Podcasts - • Transcript - Thank you to the sponsor of this episode for supporting my work: • WorkOS: makes your app Enterprise Ready with easy to use APIs to add SSO, SCIM, RBAC, and more in just a few lines of code, check them out at Chapters: 00:00 - Intro 00:43 - What sets OCaml apart 04:39 - OCaml vs Rust 07:57 - Why is manual memory management more performant 11:21 - Javascript vs OCaml 14:00 - Famous Rob Pike quote 16:05 - Type inference and how it works 22:12 - What is formal verification and how does it work 40:07 - What made multicore support difficult for OCaml 50:17 - How programming languages interface and call each other 57:41 - The danger of almost-correct LLM code 01:05:39 - How LLMs will change programming languages 01:10:26 - Industry vs academia 01:15:05 - Most interesting unsolved problems 01:18:30 - Top book recommendations for engineers 01:21:17 - Advice for his younger self 01:23:31 - Outro

Ryan Peterman

23,728 Aufrufe • vor 21 Tagen

Well that was an adventure. Toad's fuzzy file search boosts first characters, smallest number of groups, and it highlights the best scoring match. So you can locate a file with the bare minimum of keypresses. It's an expensive algorithm as it scores every possible combination of the query characters. For any given path there could be many indices which match, and each of them is scored separately. Still, it was fast enough to search as you type for my largest repository. Alas, it was slow for very large repos. Like Microsoft's Typescript, which has more than 84,000 files. I figured I'd reach the limit of what I could do with Python. So my options were to use something like ripgrep or re-implement the fuzzy searching in a faster language. I didn't want to add the ripgrep dependency, so I built a Rust version (with the help of AI) which eventually yielded a ~14X speedup. Nice. Better. But it could still become painful to type under certain pathological conditions. An inefficient algorithm can always be slow if you add more items. So I scrapped the Rust solution and built an index in Python—so the fuzzy search could throw away most paths that wouldn't match or have low scores. And its faster than the Rust solution was. The only downside is that there is a little additional work upfront (done in the background). I think this will do for a while. Until I get an issue that it is slow with 10million files. Rust is still an option, as is doing the work in parallel. This will be in the next version of Toad. Here I am searching the Typescript repo... #Python

Will McGugan

12,260 Aufrufe • vor 5 Monaten

Can you restore a BlackStone sent to the wasteland...? Some solid tips here on "how-to." You can absolutely restore a rusty curb-find Blackstone griddle from the wasteland and make it last for years with proper care. Start by firing up all the burners on high for about 20 minutes to loosen old seasoning and surface rust, then let it cool slightly. Once it’s manageable, scrape off loose debris with a metal spatula or scraper. Apply a thin layer of cooking oil and scrub vigorously in circular motions using a pumice grill stone (the most effective tool), steel wool, or medium-grit sandpaper. For stubborn rust spots, a vinegar-and-water mix can sit for a few minutes to help dissolve it before wiping everything clean. Rinse lightly with water if needed, but dry the surface completely—using low heat helps evaporate any moisture to prevent new rust. The key to longevity is re-seasoning: spread a very thin layer of high-smoke-point oil like flaxseed (ideal), avocado, or canola across the entire cooktop with a paper towel. Heat it on medium-high until it smokes, usually 15–20 minutes, then repeat this process 3–5 times to build a dark, durable non-stick patina. Over time, food will stick less and the surface will perform like new. To keep it lasting “forever,” always clean it while still hot after every use by scraping residue, wiping with warm water, and applying a light oil coat. Never use soap unless doing a deep clean, avoid leaving it exposed to rain, and store it covered or indoors. Re-season monthly or as needed, and it will reward you with many great cooks ahead. Grab a grill stone, scraper, and some oil, and you’ll have it back in action in just a couple of hours plus seasoning time. 🔥

🚫👁️Drinks on Saturday🇺🇸

116,886 Aufrufe • vor 2 Monaten

Anders Hejlsberg (Anders Hejlsberg) is a living legend: he created Turbo Pascal, Delphi, C# and TypeScript (and today TypeScript is the most-used programming language, globally, as per GitHub.) Timestamps: 00:00 Intro 02:48 How Anders got into programming 05:40 Building his first compiler 07:44 Turbo Pascal 12:25 Delphi 14:53 Joining Microsoft 19:41 Building C# 29:11 Async/await 34:01 The rise of JavaScript 37:52 Building TypeScript 42:58 How the TypeScript compiler works 48:30 JavaScript’s strengths and weaknesses 52:18 How Anders uses AI 56:03 What language features work well with AI 1:02:49 How software craftsmanship is changing 1:07:49 Performance and efficiency 1:09:29 Anders’ tool stack 1:11:30 A 30-year career at Microsoft 1:13:40 Book recommendation Brought to you by: Antithesis – verify your system’s correctness without human review or traditional integration tests – and avoid bugs or outages. WorkOS – Everything you need to make your app enterprise ready. turbopuffer – a vector and full-text search engine built on object storage. It’s fast, cheap, and extremely scalable. Four things that stood out to me: 1. “10x better for 1/10th of the price” is a proven winner. This is what Turbo Pascal did: it sold for $49.95 when competing compilers cost $500, and it was faster and more interactive than competitors’ products. Conveniently, the low price tag also killed off piracy 2. C# might have not existed without a famous court case. Microsoft originally hired Anders to architect its Java tools (Visual J++), but the Sun versus Microsoft lawsuit (1997-2001) meant Microsoft could not build on top of Java, as the company that owned Java’s IP (Sun) sued MS for alleged unauthorized changes to the Java language. Microsoft realized it had to build a new language that combined VB’s productivity with C++’s power. This led to C# and .NET. 3. TypeScript exists because Anders refused to build Script# for the Outlook .com team. Microsoft’s Outlook .com team asked Anders’ C# team to productize “ScriptSharp,” a language to cross-compile C# to JavaScript. Anders and the C# team pushed back, suggesting that a better approach was to fix JavaScript. Anders felt strongly that to be attractive to the best-of-breed developers in the JavaScript ecosystem, you want people to write JavaScript, and not another language like C#. 4. Designing a programming language is a 10-year play. As Anders puts it: “Version one is great, but has all sorts of issues. You’ve got to do version two, but it’s not until version three that it really starts to be great. Then you’ve got to convince people to adopt it.”

Gergely Orosz

129,321 Aufrufe • vor 2 Monaten

There's so much focus on "how can AI do my work for me?" I think the more important question is "what work can I now do with AI that I would have never attempted before?" Earlier this year I wrote freestiler, a vector tiling engine for R and Python, with the help of Claude and Codex. I knew what the ideal engine looked like and how it would work at a high level. I didn't know how to put it together, and I don't know Rust, the language I wanted under the hood. Previously I would never have attempted this project as the ROI wasn't there. It would have taken me a year or more to learn the internals of a vector tiling engine and enough Rust to implement one. With Opus-level models, I could take it on. freestiler now powers all my vector tiling pipelines, including the map below rendering 143 million jobs from LODES, and it has 114 GitHub stars. Building this way has required a different set of skills. I don't review the code line by line. I set up adversarial agents to do that and write the test suites. What I review is the architecture, the behavior, and the results. Agent teams surface findings and explain their reasoning; I evaluate and critique. My job isn't to stress over code formatting, but instead to focus on questions like whether the engine is designed right, whether the output is correct, and if the UX makes sense. This means that I haven't "replaced my work." I've taken on entirely new work, with the help of agents, that I would have never done otherwise. It has taken some getting used to shipping code I haven't personally typed. In the old way of working, I built understanding through writing that code. Now I build understanding through managing the project - writing a spec, reviewing structure, evaluating UX. And that's helped me think a whole lot bigger in terms of what I can now do.

Kyle Walker

13,740 Aufrufe • vor 1 Monat

There’s a popular theory that AI will finally make formal verification mainstream because mathematical proof of correctness will be needed when machines write most or all of the code. But will this happen? Hillel Wayne is one of the best people to answer. Timestamps: 00:00 Intro 04:32 The Crossover Project 11:37 What software engineering does better 15:30 What traditional engineering does better 18:17 Formal methods 29:32 TLA+: what it is and demo 36:58 TLA+ at Amazon 38:10 Ways distributed systems break 41:03 Formal methods and systems thinking 46:20 The value of learning math 50:23 What TLA+ is good for and isn’t 52:50 Alloy: a declarative language for software modeling 58:53 Other formal methods tools 1:01:24 Property-based testing 1:05:31 AI and the need for formal verification 1:12:29 Logic for programmers 1:14:35 Hillel’s 2025 prediction on AI’s impact 1:21:30 Book recommendation Brought to you by: • Antithesis – verify your system’s correctness without human review or traditional integration tests – and avoid bugs or outages. • turbopuffer – a vector and full-text search engine built on object storage. It’s fast, cheap, and extremely scalable. • WorkOS – everything you need to make your app enterprise ready. Two things I found especially interesting, talking with Hillel: 1. Amazon used TLA+ to find a bug almost impossible to locate without formal methods. In the paper How AWS uses formal methods, the AWS team shared that they’d found a complicated bug for which the shortest error trace to exhibit was 35 steps (!!). The bug passed unnoticed through extensive design review, code reviews, and testing. AWS concluded they wouldn’t have uncovered it if they’d stuck to conventional testing approaches. 2. Why not use formal verification for everything, then? It’s because specs in the real world are a nightmare to write. Even a simple problem like “find the file in a directory that has the most lines” gets complicated when modeled with formal methods. We would have to answer questions like: ‘do we look at ASCII or UTF-8 new line characters, what about unreadable files, and Symlinks?’ Without formal methods, we can write a simple verification that is right in 99%+ of cases. Formal methods require a lot of extra effort for the less than 1% of exotic use cases!

Gergely Orosz

34,215 Aufrufe • vor 11 Tagen

Why is nobody talking about Polymarket's official API? You open Polymarket Wait for it to load... Click on a market... Wait again... Try to check another one... More waiting... By the time you see the price, it's already stale The opportunity moved while you were clicking through pages Someone else got there first There's a better way // Found the gem hiding in plain sight - library py-clob-client Official from Polymarket. MIT license I spent a week working with multiple markets Checking prices across different positions Monitoring various categories Tracking market movements Then discovered this library Game changer for workflow efficiency // Real example from last week: UI approach: Checking markets one by one through the interface API approach: Monitoring all relevant markets simultaneously with live updates Having comprehensive real-time data makes a meaningful difference Speed and information clarity are valuable advantages // Want to go deeper? Build an arbitrage bot You'll need Rust for execution speed Deploy the server geographically close to Polymarket's infrastructure Every millisecond counts when opportunities last 1-2 seconds. I built mine in Go for monitoring and analysis. Works great for that. But if you're hunting arbitrage at scale against other bots, Rust + low latency setup is the only way. The infrastructure race is real // "But I can't code" With today's AI tools you actually can Cursor, ChatGPT, Claude, Gemini, Kimi, Grok - they write code for you You just describe what you want AI generates it You copy-paste and run Join Polymarket to create: Programming is no longer a barrier Anyone can build now

BuBBliK

44,204 Aufrufe • vor 7 Monaten

Here's my conversation all about FFmpeg, the legendary open-source software powering most video on the Internet. In the episode, I talk with Jean-Baptiste Kempf and Kieran Kunhya. JB is lead developer of VLC and Kieran is FFmpeg contributor, codec engineer, and the person behind the now-infamous FFmpeg account on X. VLC (VideoLAN), by the way, is also a legendary piece of open-source software: it's a video player that can open basically anything & has been downloaded over 6 billion times. I think both FFmpeg and VLC are two of the most important and impactful software systems ever created, both open source, and both created & maintained by volunteers: brilliant engineers from all walks of life. Thank you to everyone who contributed to FFmpeg and VLC, and in general to all engineers giving their heart & soul to building systems used by millions (or billions) of people, and often doing so not for money, status, or fame, but purely for the love of building great software and doing good for the world. Thank you to the builders! 🙏❤️ Shoutouts in this chat to John Carmack Andrej Karpathy Elon Musk Tim Sweeney and everyone who is a contributor & fan of open source! It's here on X in full and is up everywhere else (see comment). Timestamps: 0:00 - Episode highlight 2:17 - Introduction 5:35 - Weirdest things VLC opens 9:59 - How video playback works 19:20 - Video codecs and containers 30:07 - FFmpeg explained 51:07 - Linus Torvalds 55:46 - Turning down millions to keep VLC ad-free 1:10:04 - FFmpeg & Google drama 1:29:18 - FFmpeg developers 1:35:55 - VLC and FFmpeg 1:40:29 - History of FFmpeg 1:43:46 - Reverse engineering codecs 1:57:01 - FFmpeg testing 2:01:08 - Assembly code (handwritten) 2:25:26 - Rust programming language 2:34:42 - FFmpeg and Libav fork 2:43:04 - Open source burnout 2:50:51 - x264 and internet video 3:04:07 - Video compression basics 3:11:04 - CIA and fake VLC 3:21:39 - Ultra low latency streaming 3:39:07 - AV2 codec and video patents 3:48:59 - VLC backdoors 3:59:14 - Video archiving 4:05:51 - Future of FFmpeg and VLC

Lex Fridman

510,718 Aufrufe • vor 3 Monaten

Why did so many languages copy async/await from C#? Anders Hejlsberg(Anders Hejlsberg) - creator of TypeScript, C# & Turbo Pascal - on what they got right with the design: #1 - async/await was designed to solve a common problem in the event-loop model: "A lot of languages are built around cooperative multitasking in the sense that they have an event loop that sits and dispatches events. Then you handle the event and then you yield back to the event handler loop. And it all runs in a single thread cooperatively. The problem with that is if you then want to do some long running work: how do I stop in the middle of this piece of long running work and yield back to the event loop cooperatively? And then when my result is ready, I can come back and continue executing here." #2 - state machines are the solution, but hard to build: "Well, in order to do that in an inverted architecture like that, you have to build a state machine. State machines are notoriously hard for people to implement because you've got to move all of your state off of the stack into objects. And then you have this big case statement that envelopes your entire logic. It's a nightmare to figure out. But, the transformation from serially executing code into a state machine, its continuation-passing-style translation is actually one that you can do in a machine-based fashion." #3 - compilers are good at writing state machines: "You can have the compiler write the state machine if you introduce syntax that allows you to indicate where you want to yield. And that's what await is. Await is basically saying, I want to yield here, and I want to yield this promise, and then when the promise completes, I want you to come back here and continue executing. Then the compiler writes a state machine around it and it actually turns it into this big switch statement and moves all of the state that survives across the await into something that's heap allocated. So it can be brought back. And doing all of that work is something that compilers are great at. And so that was sort of the idea that we have this new style of programming where we're using promises or the equivalent of promises and the ability to yield and then we have callbacks. But trying to write your program in that style, that's also what JavaScript suffered from a lot. It's like all this callback style stuff. With Async and Await, you get the illusion that you're just writing normal sequential code and then the compiler does the painful transformation for you. That turns out to be really useful."

The Pragmatic Engineer

13,258 Aufrufe • vor 1 Monat

I finally finished my Rust version of Mario Zechner's (Mario Zechner) excellent Pi Agent, which I made with his blessing and which is called pi_agent_rust. You can get it here: If you're not familiar with Pi, it's a minimalist and extensible agent harness (similar to Claude Code and Codex) and, among other uses, serves as the core agent harness inside the OpenClaw project. I say my Rust "version" instead of "port" because it's really quite different in how it's implemented for it to be called a port. Arguably, the incremental functionality in the implementation was more complex than the rest of the project combined. Still, it provides the same features and functionality as the original, and is proven to be compatible with hundreds of popular extensions to Pi (the conformance harness shows 224 out of 224 extensions working perfectly). But the way it's architected has some major changes. Pi Agent relies on node or bun to provide access to the filesystem and for various other tasks, and that is also how Pi's extension system works. I decided early on that I didn't want to do things that way. Instead, I wanted to integrate that functionality directly into the binary itself; that is, to provide equivalent functionality for everything that would normally be provided by node/bun in the original. I did this for several reasons: one, it's a lot more performant in terms of footprint and latency. On realistic end-to-end large-session workloads (not toy microbenchmarks), pi_agent_rust is now: - 4.95x faster than legacy Node and 2.80x faster than legacy Bun at 1mm-token session scale - 4.32x faster than legacy Node and 2.14x faster than legacy Bun at 5mm-token session scale - ~8x to ~13x lower RSS memory footprint in those same scenarios But the other reason is security and control: by handling everything internally in an end-to-end way, we can do all sorts of clever things to harden the system against insecure or malicious extensions. Those extensions no longer have direct access to the ambient filesystem: they now need to go through pi_agent_rust, and we can analyze extensions carefully before ever running them and also block things that look suspicious at runtime. In practice that means explicit capability-gated hostcalls, with policy/risk/quota enforcement and runtime telemetry/auditability. In order to do all this, I had to effectively build the missing runtime substrate from scratch in Rust, not just translate TypeScript syntax: - define and implement a typed hostcall ABI for extension->host interactions - build native Rust connectors for tool/exec/http/session/ui/events instead of ambient Node/Bun access - implement a compatibility/shim layer so real-world Pi extensions still behave correctly - add capability policy evaluation, runtime risk scoring, per-extension quotas, and audit telemetry on the execution path - wire the whole thing through structured concurrency (asupersync) so cancellation/lifetimes are deterministic and failure handling is explicit - build a conformance + benchmark harness large enough to validate behavior/perf across hundreds of extensions and realistic long-session workloads This was a full re-architecture of the execution model while preserving the Pi workflow and extension ecosystem. And indeed, this aspect of it dwarfs the entire rest of the project in size and complexity. To put hard numbers on that: the extension/runtime/security subsystem alone is now about 86.5k lines of Rust across src/extensions.rs (~48.1k), src/extensions_js.rs (~23.4k), src/extension_dispatcher.rs (~13.4k), and src/extension_index.rs (~1.7k), with roughly 2.5k callable units in just those files. For context, the original Pi coding-agent production code is about 27.4k lines total. So this one subsystem by itself is roughly 3.2x the size of the original harness, which is why calling this a “port” would seriously undersell what had to be built. And on top of that, pi_agent_rust introduces a bunch of genuinely new capabilities beyond the legacy harness, not just a faster core: - Security and enforcement are materially stronger at runtime: capability-gated hostcalls with explicit policy profiles (safe/balanced/permissive), per-extension trust lifecycle (pending -> acknowledged -> trusted -> killed), explicit kill-switch operations, and audited state transitions. - Shell execution mediation is deterministic and argument-aware: rule/feature-based risk scoring plus heredoc AST inspection (dcg_rule_hit, dcg_heredoc_hit) before spawn, instead of relying on coarse deny patterns. - Containment and forensics are first-class: tamper-evident runtime risk ledger tooling (verify/replay/calibrate), unified incident evidence bundles, and forced-compat controls that let you contain issues without disabling the whole extension system. - The extension runtime architecture is native: JS extensions run in embedded QuickJS with typed hostcall boundaries and Rust-native connectors for tool/exec/http/session/ui/events, plus compatibility shims for real-world legacy extensions. - Runtime behavior under load is explicitly engineered: deterministic hostcall reactor mesh, fast-lane vs compat-lane routing, and warm-isolate prewarm handoff for more predictable throughput and latency under contention. - Long-session reliability is upgraded: JSONL v3 sessions with indexed sidecar acceleration and optional SQLite-backed sessions, plus operational controls via --session-durability, --no-migrations, and migrate. - Provider and auth coverage are broader and more operationally explicit: native Anthropic/OpenAI (Chat + Responses)/Gemini/Cohere/Azure/Bedrock/Vertex/Copilot/GitLab plus large OpenAI-compatible routing; pi --list-providers currently shows 90 providers with aliases and required auth env keys. - Auth is not just API keys: OAuth (Anthropic/OpenAI Codex/Gemini CLI/Antigravity/Kimi/Copilot/GitLab plus extension-defined OAuth), AWS credential chains (Bedrock), service-key exchange (SAP AI Core), and bearer-token flows. - Operator tooling is stronger: pi doctor supports scoped checks (config, dirs, auth, shell, sessions, extensions), machine-readable output (--format json|markdown), and safe auto-remediation (--fix). - Extension/package lifecycle workflows are built in: install, remove, update, update-index, search, info, and list. I want to thank Mario for making a great harness and for not telling me to get lost when I asked him if he was OK with me porting it to Rust. I may give him a hard time in jest about not going "full clanker," but that doesn't mean that I don't respect his work a huge amount. PS: There could still be bugs. If you find some, please let me know in GitHub Issues and I'll fix them same day. There's always a tradeoff between perfect and getting stuff out the door and I felt like it was time to release this.

Jeffrey Emanuel

116,929 Aufrufe • vor 5 Monaten