4 ms·
Past discussion: https://news.ycombinator.com/item?id=13151566 https://news.ycombinator.com/item?id=13151566 (2016, 124 comments)
by asicsp 5y ago
Past discussion: https://news.ycombinator.com/item?id=13151566 https://news.ycombinator.com/item?id=13151566 (2016, 124 comments)
- pcthrowaway 5y agoInteresting, I'm assuming Browsix must have been rewritten in Typescript significantly later; TS must have been much more niche in 2016 (though wikipedia tells me it may be as old as 2012)
- nteon 5y ago(one of the authors here) it was written in Typescript from the start! Typescript eliminated a bunch of type confusion errors when developing the kernel, although the need to marshal data across a MessagePort means we have to do some casting and lose some safety.
- rezonant 5y agoThat's awesome! I wouldn't say it's less compile-time type safety assuming you assert the type of the data as soon as you obtain it. Typescript doesn't give you runtime safety anyway, so I can't really imagine any better way short of adding types to the actual runtime and making the browser assert them across MessageEvent.
- pcthrowaway 5y agoThanks for the response! I don't know what the MessagePort is, but have dealt with the pains of marshaling/unmarshaling in a browser caching library I wrote that stores app data in localStorage (which is string-only)
- sitkack 5y agoSince it is written in Typescript, can parts of Browsix get compiled to Wasm instead of JS via AssemblyScript? Then at some point Browsix could run inside of any compatible wasm env and not just a browser tab? https://www.assemblyscript.org/ https://www.assemblyscript.org/
- dang 5y agoThanks! Also these little ones: Run C, C++, Go and Node.js programs as processes in browsers - https://news.ycombinator.com/item?id=13108027 https://news.ycombinator.com/item?id=13108027 - Dec 2016 (1 comment) Browsix: Unix in the browser tab - https://news.ycombinator.com/item?id=13063232 https://news.ycombinator.com/item?id=13063232 - Nov 2016 (5 comments)