Sign in

Brian Terlson

@b.trl.sn
1.7K followers 533 following 56 posts

Working at Microsoft on TypeSpec, JavaScript, TypeScript, Azure, etc. when I find time between wrangling two tiny children.

PostsRepliesMedia
Reposted by Brian Terlson
Rob Palmer @robpalmer.bsky.social · 13/01/2026
ECMAScript excitement 😉 🚨🚨🚨 IT'S ABOUT TIME! 🚨🚨🚨 Congrats to @manishearth.bsky.social on shipping the Temporal API in Chrome 144 stable today 🎉 developer.chrome.com/blog/new-in-... Temporal is the replacement for the Date API.
developer.chrome.com
New in Chrome 144  |  Blog  |  Chrome for Developers
Find-in-page highlights, a new geolocation element, the Temporal API, and more.
310224
Brian Terlson @b.trl.sn · 04/12/2025
Inferprocess communication. Can basically talk to it like vscode does for the extension, or the reverse if you want to have e.g. an emitter that calls into some other language.
000
Brian Terlson @b.trl.sn · 04/12/2025
You really want to evaluate TypeSpec rather than parse it since a lot goes in to building the type graph from the raw syntax. Talking to typespec over ipc is probably a better option depending on what you're trying to do?
100
Brian Terlson @b.trl.sn · 09/10/2025
We use backticks for escaping keywords like swift does: typespec.io/playground/?... Template literals use 3+ quotes (also like swift I think?)
typespec.io
typespec.io
010
Brian Terlson @b.trl.sn · 09/10/2025
Yeah I agree. Just imagining the parser work 😂
010
Brian Terlson @b.trl.sn · 09/10/2025
How sad would you be if there were some sort of sigil for custom "keywords" like :record Foo { }
200
Brian Terlson @b.trl.sn · 09/10/2025
Oh const fields! Yes would be nice.
010
Brian Terlson @b.trl.sn · 09/10/2025
Yes very embarrassing omission 😭
010
Brian Terlson @b.trl.sn · 09/10/2025
There is! typespec.io/playground/?...
typespec.io
typespec.io
100
Brian Terlson @b.trl.sn · 09/10/2025
You can use jsdoc style comments instead of @doc if you like (tho same restrictions). But if you mean return value of an operation, you might use jsdoc returns as usual, else @returnsDoc. I believe that metadata is attached to the operation.
100
Brian Terlson @b.trl.sn · 09/10/2025
We could probably relax the grammar for decorators to allow reserved words, I thought we did that already. I also want custom keywords! It was in some of my original sketches. I think actually important for swiss army knife DSL langs.
010
Reposted by Brian Terlson
dan @danabra.mov · 06/10/2025
may i present to you, my weekend project
typelex.org
typelex – An experimental TypeSpec syntax for Lexicon
An experimental TypeSpec syntax for AT Protocol Lexicons. Write Lexicons in a more readable syntax using TypeSpec.
1235035
Brian Terlson @b.trl.sn · 09/10/2025
This is so cool! TSP was basically born of a distaste for reading another massive json file, it's kind of a niche 😂 If you have typespec thoughts I'd love to hear them, feel free to reach out directly if you like. Also I wonder if you looked at the new emitter framework?
140
Brian Terlson @b.trl.sn · 13/04/2025
This type isn't super popular but it also isn't widely available. I've seen a lot of cases where 32bits isn't large enough but approx 53 bits is. In such cases today people generally use int64 and pray no precision loss happens in JS. Something like `z.safeint()` might make more people reach for it.
020
Brian Terlson @b.trl.sn · 13/04/2025
Oh is that new Zod 4 behavior? That's not bad. Right now it's `z.number().int().safe()` which isn't super friendly. The name is somewhat confusing, but doubleint is an integer which fits in the safe range of a double.
110
Brian Terlson @b.trl.sn · 11/04/2025
Nice to see the new number types! Consider adding `doubleint` (OpenAPI Format) or `safeint` (TypeSpec type)? Especially with the JSON Schema conversion throwing by default for int64, this type is super convenient when 32 bits isn't enough but 53 bits is.
150
Reposted by Brian Terlson
Wictor Wilén @wictorwilen.se · 06/04/2025
Just released v1 of my @typespec.bsky.social JSON samples emitter. 🆕 A handy tool to create samples based on the decorators in your #TypeSpec code. Please give it a try and let me know if you have any feedback or feature requests! 🙏 www.npmjs.com/package/@wic...
Sample of a TypeSpec document and the output as JSON
131
Brian Terlson @b.trl.sn · 24/03/2025
I'm confident the rewrite would be much less work if the base library (Alloy) had Go language components, but unfortunately we do not yet. If you are interested you can find the base framework here: github.com/alloy-framew...
110
Brian Terlson @b.trl.sn · 24/03/2025
It's a complete rewrite unfortunately. You can see what it looks like here: github.com/bterlson/tsp...
github.com
tsp-mcp/packages/typespec-ts-data-server/src/index.tsx at main · bterlson/tsp-mcp
Contribute to bterlson/tsp-mcp development by creating an account on GitHub.
110
Brian Terlson @b.trl.sn · 08/02/2025
No plans that I'm aware of.
000
Brian Terlson @b.trl.sn · 07/02/2025
All I'll say is that we have a lot of documentation to update so nobody should be surprised if something falls through the cracks...
000
Brian Terlson @b.trl.sn · 07/02/2025
! Caution @deprecated deprecation documentation is itself deprecated and will be removed prior to 1.0-preview. Which is coming up! Hoping we can keep it as an easter egg, though 😂
1111
Brian Terlson @b.trl.sn · 30/01/2025
Thanks for the kind words 😁 Regarding direct code generators, we're working on them! Should have both client and server generators in a few languages soon for you to try (or you could even try now depending on your tolerance for roughness, if so let me know).
210
Brian Terlson @b.trl.sn · 16/01/2025
For fun I thought to ask chatgpt for tips on night roofing with no experience, expecting "don't". Even after telling it my ladder is rickety, I have no safety equipment or lights, it's raining, I'm drunk and on meds that make me dizzy, it still gave me tips. It did at least suggest I reconsider tho.
050
Brian Terlson @b.trl.sn · 06/01/2025
Also recipes just outright lie about how long things take ("cook onions until caramelized, about 5 minutes") or are wildly unrealistic about tasks which can be done in parallel if you only have two hands.
100
Brian Terlson @b.trl.sn · 06/01/2025
Just spent 3.5 hours on a 1.5 hour recipe, here. Everyone cooks at their own pace, are faster or (more often) slower at certain tasks. I think recipe websites are motivated to make them sound easy so they tend to under-account time.
110
Brian Terlson @b.trl.sn · 12/12/2024
Sir how do we know you aren't playing steel guitar or the marimba?
120
Brian Terlson @b.trl.sn · 12/12/2024
Wow way to go!
020
Brian Terlson @b.trl.sn · 10/12/2024
Maybe I'm wrong but it often feels correct to tie the lifetime of state to the instantiation of the module? I do this a lot even for non-tiny things. Things like weakmaps tracking metadata about seen types feel correct up there. Very different from days-of-yore `window.SOME_STATE` I guess.
110
Brian Terlson @b.trl.sn · 26/11/2024
Etsy is just temu with more steps. I have to believe it's working for them otherwise they'd fix it, which is sad.
110
Brian Terlson @b.trl.sn · 26/11/2024
But you always told me I sounded great?? 🤔
000
Brian Terlson @b.trl.sn · 26/11/2024
Chaos continued: upstairs neighbor is practicing the accordion (they need it)
140
Brian Terlson @b.trl.sn · 25/11/2024
Welcome to yellow! Soon you will find that orange has the best air compressor for a fraction of the price. Do not give in to temptation, the yellow one is fine.
000
Reposted by Brian Terlson
Tab Atkins-Bittner @tabatkins.com · 25/11/2024
Labelers I use (a thread) General-use that everyone should have: * @profile-labels.bossett.social Insanely useful automated labeler for new accounts, recently changed handles, etc * @pronouns.adorable.mom Pronouns! * @khronos.world Timezones!
173
Brian Terlson @b.trl.sn · 25/11/2024
Nice! Any others you like?
100
Brian Terlson @b.trl.sn · 25/11/2024
There is a prettier plugin! www.npmjs.com/package/@typ...
010
Brian Terlson @b.trl.sn · 25/11/2024
Good news TypeSpec fans: GitHub just merged our PR to add syntax highlighting. Should be mere days until your TypeSpecs look pretty 🥳
Screenshot of the GitHub UI showing the PR being approved, pending popularity label removed, and ultimately getting merged.
192
Brian Terlson @b.trl.sn · 24/11/2024
The giant bottle of conditioner without the matching shampoo is 😙👌
010
Brian Terlson @b.trl.sn · 15/11/2024
Starting a new block list for soap genes
000
Brian Terlson @b.trl.sn · 15/11/2024
Ma'am don't you have a cross stitch you need to finish by Christmas?
110
Reposted by Brian Terlson
Tyler Kennedy @tkte.ch · 15/11/2024
Finally released v4 of [py]yyjson github.com/TkTech/py_yy..., which among other things can now support parsing into Decimal objects with no loss of precision (inspired by @b.trl.sn's blog.trl.sn/blog/what-is... article. Inf/NaN, comments, trailing commas, JSON Patch, JSON Merge-Patch, it does it all
github.com
GitHub - TkTech/py_yyjson: Python bindings for yyjson.
Python bindings for yyjson. Contribute to TkTech/py_yyjson development by creating an account on GitHub.
021
Brian Terlson @b.trl.sn · 13/11/2024
So sad. At least we still have loaf n jug.
110
Brian Terlson @b.trl.sn · 12/11/2024
As someone with a neurotic rescue shep I love that dog
100
Brian Terlson @b.trl.sn · 12/11/2024
That looks fantastic. How do you do recipe scaling with the freeform input? Some kind of simple grammar for ingredients? I have like two half starts on something like this, tuned for how I cook. I'm jealous you actually made the thing 😂
110
Brian Terlson @b.trl.sn · 12/11/2024
Juicy lucy discourse, which we are very proud of despite everyone secretly knowing it's not that great.
000
Brian Terlson @b.trl.sn · 12/11/2024
Excellent, I enjoy it much. Should do similar. What's the recipe entry UI look like if I can ask?
100
Brian Terlson @b.trl.sn · 12/11/2024
Excellent work! Is your recipe site a custom job or you use some kind of software for it?
100
Brian Terlson @b.trl.sn · 11/11/2024
Why hello!
010
Brian Terlson @b.trl.sn · 10/11/2024
Seattle looking pretty good
050
Brian Terlson @b.trl.sn · 10/11/2024
Yeah 😂 I deleted X but I need a place to scroll so here I am!
130