Ugur Toprakdeviren retweeted
Replying to @NoemiTitarenco
TypeScript isn't just about type safety or being trendy. It also encourages you to write JavaScript in ways that are more JIT-friendly, making it easier for engines to take advantage of speculative optimizations.
Ugur Toprakdeviren retweeted
Replying to @xah_lee
I got genuinely curious and dug into my own codebase to see what was actually going on.
Here’s what happens under the hood: Date.prototype isn't actually a Date instance. While new Date() constructs a Date object, Reflect.getPrototypeOf returns that object's prototype.
JSON.stringify checks if this prototype has a toJSON method, and it finds one. The catch is that toJSON tries to coerce it into a number internally, which in turn triggers valueOf. And before valueOf does anything, it validates whether this is truly a Date object.
static JSValue native_date_valueOf(JSValue t, JSValue *args, int argc)
{
(void)args; (void)argc;
return js_number(this_date_value(t, "valueOf"));
}
double this_date_value(JSValue t, const char *who)
{
if (js_type(t) == JS_OBJECT && ((JSObject *)js_as_object(t))->has_date_data && (JSObject *)js_as_object(t) != g_date_proto)
return ((JSObject *)js_as_object(t))->date_ms;
type_error(ERR_REQUIRES_TYPE, "Date.prototype", who, "Date");
return js_nan();
}
Since it isn't, it just throws "Date.prototype.valueOf requires a Date" 😀
Ugur Toprakdeviren retweeted
C# running in your browser.
minisharp.run/
No server compile, no .NET SDK, no Roslyn, no LLVM.
Ugur Toprakdeviren retweeted
The MiniSwift macOS Emulator is nearing completion. Below is a sample video showcasing the Siri emulation.
I’d like to clarify a few points here:
1. This visual output is not a CSS or JS emulation.
2. It takes your Swift project's SiriKit integration code, processes it through UIIR, and renders it directly onto a web canvas.
As for the AI side of things, I’d like to share a few thoughts.
Initially, the Foundation library that came with macOS 26 was more ideal for my needs, as it featured a 3B local model. This aligned perfectly with MiniSwift’s core philosophy of offline-first operation.
So, how did I tackle the challenge when things shifted?
I developed an end-to-end LLM architecture called llm.istanbul/ written entirely in WebGPU, giving me absolute control over the system.
After extensive trial and error, I built my own foundation model and successfully embedded it into this project, leveraging WebGPU once again.
Since Apple’s 3B foundation model wasn't highly efficient to begin with, I was confident that I could replicate and reflect the core capabilities it offered.
However, with the upcoming Apple 27 update, it looks like they are transitioning to a completely cloud-based architecture.
Consequently, I likely won't be able to utilize Apple's native Siri services. Because of this, the cloud-based Siri model currently remains a gray area for MiniSwift.
But it’s not a major setback. I’ve overcome plenty of hurdles before, and I’m confident I’ll find a way around this one too ;-)
Ugur Toprakdeviren retweeted
Stop diffing the iOS & macOS 27 SDK framework by framework.
Every public Swift API added, deprecated, and removed from 26 → 27 — 3,760 new across 149 frameworks, searchable, with Apple's own doc comments. Diffed straight from the .swiftinterface dumps.
miniswift.run/whats-new/
Ugur Toprakdeviren retweeted
What has changed in iOS and MacOS 27 SwiftUI?
Ready to eat without watching WWDC etc. ;-)
miniswift.run/whats-new/swif…
Ugur Toprakdeviren retweeted
MiniSwift Async Adventure
The browser is like, "Listen buddy, there are no native threads inside WASM. You need to spawn a Web Worker, pass a SharedArrayBuffer, set up cross-origin isolation, and if you dare call Atomics.wait on the main thread, I will personally smack you." 😀
Which basically means:
- The WASM memory must be shared.
- The program needs to run inside a Worker, not on the main thread.
- Task.sleep can’t just be a JS setTimeout; it has to perform actual blocking inside the Worker using Atomics.wait.
- Task {} closures can't run inline anymore; they have to be dispatched to a worker pool.
- This requires setting COOP/COEP headers on the deployment side.
- Even Google Fonts becomes a massive pain because it can break cross-origin isolation; everything needs to be self-hosted.
I’m literally going to run Swift async natively in the browser without any hacky workarounds, but the price for that is diving straight into the tar pit of Web Workers, SharedArrayBuffer, and atomics.
Luckily, the worst is behind me ;-)
Ugur Toprakdeviren retweeted
Fatbobman’s Swift Weekly #138 is now available!
Stability > New Features
🧷 Stateless Actors
⚡ Building a Custom Data Store in SwiftData
🔧 Task Names in Swift Concurrency
🖥 Letting Server-Side Swift Access CloudKit
more...
weekly.fatbobman.com/p/fatbo…


