Mathieu Hofman's Avatar

Mathieu Hofman

@mhofman.bsky.social

Building a platform for securely executing distributed JavaScript programs @Agoric TC39 delegate. Tinkerer.

47 Followers  |  69 Following  |  20 Posts  |  Joined: 27.06.2023  |  2.2887

Latest posts by mhofman.bsky.social on Bluesky

I also had an alternative design that would allow a framework / library to track when a promise it created (e.g. a network query) becomes the eventual result of a promise it receives (e.g. userland handler that triggers the network query). But that'd require a significant JS engine and spec change.

26.07.2025 00:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

The approach we're taking is to forego native promises and thenables altogether, and use another object that represents an eventual result. I need to write up our design somewhere (it leverages some of the concepts for eventual send).

26.07.2025 00:46 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

It's fragile in the face of some user code refactors too. Anything that introduces a tick before these trapping thenable are adopted into a promise prevents the detection.

Having faced similar problems of trying to track the flow of eventual results, I'm confident thenable tricks isn't a solution.

26.07.2025 00:43 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I really didn't expect to see then getters (ab)used like that in the wild! I'm quite suspicious of how fragile this all actually is. This is effectively another form of Zalgo being released.

26.07.2025 00:27 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Don't understand how the solution aligns to the problem Β· Issue #16 Β· tc39/proposal-composites The problem statement is that Map and Set don't allow clients to override equality. It seems that the straightforward solution would be to have an option to pass a comparer function to those struct...

There is a long discussion on the topic at github.com/tc39/proposa.... Besides some of the performance concerns raised, my main concern is preventing the ability of some code to confuse other code it interacts with in the same realm. Adding an object to a collection should not have side effects.

24.04.2025 16:36 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

'user" is a bit confusing here. If the hashCode / equal is a protocol implemented by the object, then the author of the object can affect all collections in which the object is added πŸ‘Ž. If the functions are per collection, then you lose the standard synchronization point πŸ‘Ž

24.04.2025 16:36 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

An equality predicate is not sufficient for collections. Something like hashCode is also needed.
The problem with those is stability. There is no way to guarantee that user code will be side effect free and produce stable results.

21.04.2025 17:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Hey there, any update on the recordings of the presentations? Would love to reference it.

27.03.2025 00:39 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
SeattleJS presents: The Future of JavaScript with TC39 Β· Luma πŸŽ‰ Get ready to learn and connect at SeattleJS! πŸŽ‰ This SeattleJS special event is presented in partnership with: TC39, the technical committee that maintains…

Next week TC39 will meet in Seattle to discuss new JavaScript language features πŸŽ‰

Please join us on Thursday 20th Feb at Docusign for a free @seattlejs.com community event featuring Linus Groh @ptomato.name @nicr.dev @ashley-c.bsky.social @lcas.dev @mhofman.bsky.social

lu.ma/s97y24jd

13.02.2025 01:57 β€” πŸ‘ 23    πŸ” 10    πŸ’¬ 1    πŸ“Œ 2
Mathieu speaking to a room of people about realms in JavaScript

Mathieu speaking to a room of people about realms in JavaScript

Don't what a realm is in JavaScript? Ask @mhofman.bsky.social ! He is talking all about them :)

21.02.2025 04:42 β€” πŸ‘ 5    πŸ” 3    πŸ’¬ 2    πŸ“Œ 0

Really insightful read of @kriskowal.bsky.social's experience of helping bring modules to the JavaScript ecosystem.

06.02.2025 21:23 β€” πŸ‘ 5    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

And even though there was no actual vulnerability, we did pay out the researcher as it was a really informative report.

06.12.2024 14:48 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Got a similar report a few months ago. We were not actually vulnerable (CI is powerless on forks, and it couldn't affect any output), but it was a really good learning experience. Use env variables as much as possible in GH actions, those are sanitized.

06.12.2024 14:47 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Security Issue in JWT Secret Poisoning (Updated) We discovered a new high-severity vulnerability (CVE-2022-23529) in the popular JsonWebToken open source project.

Reminds me of an "RCE" last year where a JWT library was "vulnerable" to an object with a `toString` method. How do you think that method got there in the first place...
unit42.paloaltonetworks.com/jsonwebtoken...

06.12.2024 14:22 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

my view is that large mission-critical systems that are targeted by threat actors are in fact multi-tenant systems (whether their authors realize it or not) and immutability is one of the tools for writing defensive code against potential threats running in the same process

30.11.2024 02:44 β€” πŸ‘ 3    πŸ” 2    πŸ’¬ 1    πŸ“Œ 0

Shoot, once again I'm away!

02.12.2024 16:15 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yeah I'd say in general control flow based on API calls is a weakness in TS. Possible to implement yourself but very complex, and the standard library types don't do it.

02.12.2024 16:02 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Oh interesting. Wondering if this has something to do with integer index properties.

29.11.2024 21:07 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I was seeing similar scroll resetting weirdly on back navigation on Chrome on Android, but I haven't seen it today.

24.11.2024 13:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

I have to admit, Twitter has a really good mobile web experience, even after the sabotages from Elon. The navigation in BlueSky mobile web is not great, and don't get me started on the lack of a manifest to support installing the web app and push notifications.

24.11.2024 12:46 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

A flag which bans TS features with runtime emit (enums, namespaces, experimental decorators, etc) will come in 5.8 to help people executing TS code via Node.js (or who want to avoid using those features for "reasons").

23.11.2024 06:21 β€” πŸ‘ 126    πŸ” 28    πŸ’¬ 5    πŸ“Œ 3

Yeah it's been a known won't fix issue since 2020: github.com/microsoft/Ty...

23.11.2024 09:47 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Unfortunately TS is already not a superset of JS. Its syntax is ambiguous enough that some valid JS programs have different semantics when handled by a TS parser. Also not all TS programs can simply have their types stripped off.

23.11.2024 00:24 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

GitHub can recognize and hide some generated files (e.g. from protobuf), not sure what the heuristics are. To enforce they are up to date, we just have a CI job that regenerates them and a check there are no dirty files (also good to handle lock files and similar)

19.11.2024 09:58 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@mhofman is following 20 prominent accounts