HNHacker News
TopNewBestAskShowJobs

rixtox

61 karma · joined April 12, 2014

submissionscomments
rixtox··on Jujutsu megamerges for fun and profit
I found octopus megamerge hard to collaborate - my colleagues don't use JJ so they may introduce changes that would cause conflitcts to my megamerge. When you have a conflict on a change that has more than 2 parents, the conflict resolution becomes unmanageable very quickly. No merge tool can handle more than 3-way merge, so you have to do that manually.

Eventually I settled on a tree-like megamerge that's more practical: merge 2 branches at a time and merge the merged branch with the next branch. This way I only need to handle 2-way conflicts at a time which is more manageable.

Also you have to be very careful to decide the order when you (and your colleagues) are going to land the branches, or if you expect any new features other people are working on that's going to conflict with your branches. When using megamerger workflow, most of the problems come from coordinating with other colleagues.

rixtox··on Why Objective-C
The most difficult part of Objective-C is its ARC rules, and mixing ARC and non-ARC code in the same project.
rixtox··on Welcoming Discord users amidst the challenge of Age Verification
But no one is claiming w3c is not running a website.
rixtox··on Welcoming Discord users amidst the challenge of Age Verification
It’s unfortunate that they claimed “Matrix is a protocol not a service” while they are literally running a home server on the Matrix domain.

They should really rebrand their home server to another name, so the Matrix name is unambiguously referring to the protocol.

rixtox··on The history of C# and TypeScript with Anders Hejlsberg [video]
If you feel that TypeScript, or hell even JavaScript, is becoming more alike C#, it's actually deliberately done by Microsoft in benefiting their ecosystem. In this interview they mentioned they had internal demands to convert/transpile C# into JavaScript or TypeScript. So by making these target languages more like C#, it directly benefits their need. But I don't think this should be the driving force in designing ECMAScript. When they are pushing a language feature, they have an unspoken internal goal, and every choice they make is to make JS/TS look more like C#, and they are more likely to dismiss proposals that preventing them from deliverying that goal. There's likely a bit of conflict of interest there.
rixtox··on Stochastic Terrorism
“Stand Alone Complex”
rixtox··on The U.S. Government Just Followed Through on Its Ban of DJI Drones
If US and China, two nuclear powers, engaged in direct wars, drone attacks would be the least to be worried about.
rixtox··on Control structures in programming languages: from goto to algebraic effects
Does implementing algebraic effects requires stack switching support? If so, I wonder what runtime cost we must pay when heavily using algebraic effects. Is there any empirical study on the performance of algebraic effects implementations?
rixtox··on Crunchyroll is destroying its subtitles
Netflix implements "imgsub"[1] - it actually delivers a zipped archive of transparent images to the player. So technically they can pre-render positioned typesetted subtitles on server and render them as images overlay, as long as there's no animated text effects.

In general, streaming services have to ensure maximum compatibility when playing their contents on all kinds of devices - high end and low end. For which on low end device it could be very resource constraining to render typesetted subtitles. There are other platforms where all video playback have to be managed by the platform system frameworks with limited format support, and streaming services can't do much about it.

The priority of streaming service is extending their market reach, and I think Crunchyroll itself is facing the same challenge of market reaching.

I think the right solution is trying to get typesetted subtitles, and the end-to-end workflow - creation, packaging, delivery, rendering with adaptation (device capabilities, user preferences, localizations etc) all standardized. A more efficient workflow is needed, so a single source of subtitle is able to generate a set of renditions suitable for different player render capabilities. Chrunchyroll should actively participate in these standard bodies and push for adaption for more features and support in the streaming industry.

[1]: https://netflixsubs.app/docs/netflix/features/imgsub

rixtox··on Go beyond Goroutines: introducing the Reactive paradigm
I also explored Rx in Go several years ago. https://dev.to/rix/rx-with-go-generics-2fl6
rixtox··on Wind turbine blade transportation challenges
They should call it Blade Runner
rixtox··on UndoDB – The interactive time travel debugger for Linux C/C++ for debugging
Another more powerful option: Intel SDE / PinPlay
rixtox··on Ron Buckton laid off from Microsoft
I remember arguing with Ron on the TC39 disposable proposal that I think Go's `defer` is a better pattern than C#'s `using`, and he tried to convince me the otherwise.

I was surprised to see they choose Go instead of C# for the TypeScript compiler port. Microsoft has been trying to make ECMAScript look more similar to C#, and their Windows Universal SDK has made a lot of efforts to provide a seamless transition for developers to port their code between C# and TypeScript. And yet they still think porting TypeScript compiler to Go is easier to do than porting it to C#.

Despite my different tech view with Ron, I appreciate and respect the great work he has done to TypeScript & ECMAScript. And I wish him the best with his next adventure.

rixtox··on Visualizing binary files with ImHex's DSL, the "pattern language"
Kind of related, a tool that allows you to hand write ASCII-art-annotated hex dump files, while also able to generate the original binary file from such text file: https://github.com/netspooky/xx/blob/main/examples/elf.xx
rixtox··on Should JavaScript be split into two languages?
This is also a result of the detachment of TC39 and the developer community. Just how many JS developers are participating TC39? I can recall multiple TC39 proposals that didn't even consult opinions from authors of notable open-source stakeholder libraries, and went straight into stage 3.

And btw, the TypeScript tooling scene is far from being able to get standardized. TypeScript is basically a Microsoft thing, and we don't see a single non-official TypeScript tool can do type-checking. And there's no plan to port the official tools to a faster language like Rust. And the tsc is not designed for doing tranditional compiler optimizations. The TypeScript team made it clear that the goal of tsc is to only produce idiomatic JavaScript.

rixtox··on Understanding React Compiler
I think React would get better developer experience and performance if they adopt language coroutine feature to implement direct style algebraic effect. In fact the React Fiber system is already an implementation of algebraic effect.[1] However, it’s “suspending” a routine by raising an exception. Thus unwinding all the call stack, therefore, it needs to re-run that same routine on resume. This is the core reason why they have a performance issue and why they created the compiler to cache values on reruns.

JavaScript has language level coroutine features like async/await or yield/yield* and we have seen libraries using these features to implement direct style algebraic effect. For example Effect[2] and Effection[3]. You don’t need to memoize things if the language runtime can suspend and resume your functions instead of throwing exceptions and rerun them.

[1]: https://youtu.be/7GcrT0SBSnI

[2]: https://effect.website/

[3]: https://frontside.com/effection/

rixtox··on React Compiler is now open source
I wish the TypeScript team can actually make a good and fast compiler with type inference support. There are so many opportunities for minimization, optimization, conditional builds, instrumentation, and so on if we can utilize the type info from the TypeScript compiler. Unfortunately the TypeScript team never commit to requests like these, and only commit to idiomatic JavaScript transpilation.[1][2]

And because TypeScript is so complex and development is so heavy, third party attempts on making a type checker have never succeeded.[3]

I'm curious how far React Compiler can go without the access to TypeScript type info, and if they would invest in compiler tooling for TypeScript in the future. But considering Meta has Flow as their in-house alternative to TypeScript, they might not have the incentive in investing in the TypeScript ecosystem.

[1]: https://github.com/microsoft/TypeScript/issues/8#issuecommen...

[2]: https://github.com/microsoft/TypeScript/issues/661#issuecomm...

[3]: https://github.com/dudykr/stc/issues/1101

rixtox··on Main-Thread-Scheduling
You should do some measurement before calling it an improvement. If you read the ECMAScript standard[1] or this blog post from V8[2] about the inner workings of the `await` keyword, you would know even if you `await` a non-Promise value, it would still create a new Promise and put the suspended routine onto the microtask queue. So the change you made won't make a difference.

Besides, there is a JavaScript language feature that can give you finer control on routine suspension and resumption, decoupled from any of the microtask or macrotask queue. It's called the generator function. There are some good coroutine libraries based on generator functions, e.g. co.js[3] and redux-saga[4]. You can easily make something similar that can resume the suspended routine according to your scheduling policy that prioritize main thread rendering.

[1]: https://tc39.es/ecma262/#sec-promise-executor [2]: https://v8.dev/blog/fast-async#await-under-the-hood [3]: https://github.com/tj/co [4]: https://redux-saga.js.org

rixtox··on Secrets of the Fn Key
Most third party keyboards cannot emulate the Globe key. Apple would only recognize it if the USB PID/VID matches real Apple USB keyboards, which third party keyboards are not allowed to use.
rixtox··on Dogbolt Decompiler Explorer
I really wish a similar tool for exploring binary lifting to different IRs. Like Ghidra p-code with sleigh, LLVM Machine IR, Qemu TCG etc
rixtox··on California employers must reimburse remote workers for all necessary expenses
I ask the opposite - should employers reimburse commute expenses for return to office workers? Gas / electric, and time wasted on traffics etc?
rixtox··on I paid for Sublime Text
I shamefully paid for both Sublime Text and WinRAR
rixtox··on Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo
Another one in Chinese: 人要是行,干一行行一行,一行行行行行,行行行干哪行都行,要是不行,干一行不行一行,一行不行行行不行,行行不行,干哪行都不行
rixtox··on TypeScript 5.2's new keyword: 'Using'
There's a conversation I had with Ron Buckton, the proposal champion, mainly on this specific issue. [1]

Short answer: Yes, Disposable can leak if you forget "using" it. And it will leak if the Disposable is not guarded by advanced GC mechanisms like the FinalizationRegistry.

Unlike C# where it's relatively easier to utilize its GC to dispose undisposed resources [2], properly utilizing FinalizationRegistry to do the same thing in JavaScript is not that simple. In response to our conversation, Ron is proposing adding the use of FinalizationRegistry as a best practice note [3], but only for native handles. It's mainly meant for JS engine developers.

Most JS developers wrapping anything inside a Disposable would not go through the complexity of integrating with FinalizationRegistry, thus cannot gain the same level of memory-safety, and will leak if not "using" it.

IMO this design will cause a lot of problems, misuses and abuses. But making JS to look more like C# is on Microsoft's agenda so they are probably not going to change anything.

[1]: https://github.com/tc39/proposal-explicit-resource-managemen...

[2]: https://stackoverflow.com/a/538238/1481095

[3]: https://github.com/tc39/proposal-explicit-resource-managemen...

rixtox··on Ask HN: Is there a spiritual successor to del.icio.us?
I’m using Telegram for this. Create a channel, sends your bookmarked links there, use the hashtags to tag things. You can share the channel with others and you can write bots for integration with other apps/browsers.
rixtox··on A userspace WireGuard client that exposes itself as a proxy
A Docker solution[1] for the same thing using the official client. Performance can’t be compared with native kernel mode of course, but same technique can be used for other global proxy like OpenVPN.[2]

[1] https://hub.docker.com/r/curve25519xsalsa20poly1305/wireguar...

[2] https://hub.docker.com/r/curve25519xsalsa20poly1305/openvpn/

rixtox··on Ask HN: Whatever happened to Wolfram Alpha?
I use their online notebook environment a lot. https://lab.wolframcloud.com/ It's almost a free web version of their Mathematica.
rixtox··on GitHub Should Start an App Store
What we need is actually the Matrix protocol for app distribution. That is, a decentralized yet federated platform replacement for App Store. So the longevity and transparency of the platform is ensured by the distributed property.
rixtox··on The Privacy Properties of the Nym Mixnet
Although the original title is a little clickbait and not exactly correct, this article written by Ania M. Piotrowska, one of Nym’s main researcher, explained in details what are the privacy properties you need against state level mass surveillance.

The importance of this article is to see a privacy project introspectively admitting its current limitation. In Nym’s case, it still doesn’t have hidden service, sender anonymity and receiver anonymity. This is the level of transparency we want to see from any privacy project.

Having flaws or limitations are okay, but not communicating them with users while advertising itself as a privacy project is just dishonest. I hope to see more articles like this from other privacy projects.

Nym explained its ambition to achieve much stronger privacy properties under much stronger threat model. Until then, they can truly claim to protect privacy against state surveillance.

rixtox··on Update on Firefox Send and Firefox Notes
I started to used wormhole: https://github.com/warner/magic-wormhole

There is also a Golang port: https://github.com/psanford/wormhole-william

Page 1 of 2Next →