Better HN
topnewbestaskshowjobs
Log inSign up

raphlinus

14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions

I do research on fundamental UI technology and 2D graphics, with a focus on Rust and fonts. @raph@mastodon.online
Submissions

comment 7y ago · link · parent

Flutter is implemented in layers. The RenderObject layer looks very much like a traditional retained mode UI. It's possible to write Flutter entirely at this level, nobody forces you to use the Widget layer above it. The Widget layer is basically React-style, where the API looks fairly similar to immediate mode, but it uses caching and diff computation to reflect everything into the retained RenderObjects below it.

comment 7y ago · link · parent

I'm not super-expert, but know of some background. I think Rosyln grew very much out of Delphi, and Anders Hejlsberg is the common thread to both. Before that, he did Turbo Pascal, which might have been incremental in some ways (it certainly was very fast).

Another earlier example of successful incremental technology was the Java compiler in Eclipse.

I'm sure there are academic efforts as well, but don't know as much about these.

comment 7y ago · link · parent

You might wish for that, but the ship has sailed. Undefined behavior means that the implementation can do whatever it can. That said, I do expect tools, both sanitizers and static analyzers to improve to detect more of these kinds of cases.

comment 7y ago · link · parent

From the article:

> Dereferencing a nullptr gives a segfault (which is not a security issue, except in older kernels).

I know a lot of people make that assumption, and compilers used to work that way pretty reliably, but I'm pretty confident it's not true. With undefined behavior, anything is possible.

comment 7y ago · link · parent

The gold standard for redaction is to replace the redacted text with nonsense of similar length. Otherwise, you retain precise metrics for the redacted text. With guesses or context you can fill those in with high probability. In an extreme case, the redaction might be a name of let's say a member of Congress, so the candidates can be narrowed down to a tiny number. There's considerable work on this, notably the "Declassification Engine" [0]. I believe it would be possible to apply even better word models (such as GPT-2) to improve the results even more.

I'm interested in whether this document was redacted in such a military-secure way, or whether black bars were simply placed over the text. I've reached out to a couple of news organizations offering my consulting help, but didn't get a nibble.

[0]: https://www.newyorker.com/tech/annals-of-technology/the-decl...

comment 7y ago · link · parent

This is true. The philanthropy scene is probably one of the few areas that has even more screwed-up incentives than academia.

comment 7y ago · link · parent

This post resonated with me strongly. Yes, resigning sounds like the obvious best choice. I hope it works out well!

I can certainly understand why Prof. Stein doesn't want to trash his colleagues, but I'll come out and say it: if academia wasn't completely dysfunctional, it would find a way to support this work.

For my own work (which is nowhere nearly as academically relevant as CoCalc and Sage) I'm planning on doing it myself without worrying too much about funding. I can use a combination of savings, random consulting gigs, Patreon, etc. I can imagine doing more "company" kinds of things, but only to the extent it supports the work. This is not an easy problem, and again I wish Prof. Stein well.

comment 7y ago · link · parent

In addition, it is entirely possible that when Rust has a formal semantics, it will use exactly such a provenance-aware memory object model to describe which pointer operations are safe and which lead to UB. People using the safe fragment of Rust won't care about this, but that's certainly not all of Rust.

comment 7y ago · link · parent

Fair enough. cmix is awesome work, obviously, and I'm looking forward to the ideas becoming production-ready. Probably the most notable contribution by Fabrice Bellard is having something relatively simple.

comment 7y ago · link · parent

I meant it as something of a joke (10x compression speed vs 10x the productivity of the average programmer), but also to summarize useful information from the paper.

comment 7y ago · link · parent

And this is why Fabrice Bellard is so often cited as an example of a 10x programmer: his relatively simple LSTM-based neural net compressor is 10x faster than one of the more complex state of the art algorithms while delivering comparable compression ratios.

comment 7y ago · link · parent

You could probably do this less invasively by setting font-variant-ligatures: none;

comment 7y ago · link · parent

It does, thanks! This does indeed look like good stuff. It is true that font-rs is not fully optimized for large areas, as it depends on memory fill and cumulative sum for each pixel. These are not hugely expensive, but it sounds like a sophisticated approach (as taken by Blend2D) can do better. Happy to see the work.

comment 7y ago · link · parent

When listing approaches, people should look at Skia Compute[0]. While it is true that traditional GPU's are not a super-great match for 2D graphics, modern GPU's are becoming more and more CPU-like, just with more parallelism. I haven't done careful quantitative evaluation of compute myself, but don't feel that any understanding of modern 2D graphics performance would be complete without that.

[0]: https://github.com/google/skia/tree/master/src/compute/skc

comment 7y ago · link · parent

How does the performance of path filling compare to font-rs?

comment 7y ago · link · parent

There's a pretty long history of technical efforts to achieve censor resistance, of which Ross Anderson's 1996 "Eternity Service" is probably the most influential. I'm not very hopeful, but it would be cool to see something like it come into existence.

See this interesting 2004 review by George Danezis: https://www.freehaven.net/anonbib/cache/redblue.pdf

comment 7y ago · link · parent

Sci-hub is truly a modern-day Library of Alexandra. I hope the modern day counterparts of Julius Caesar fail.

comment 7y ago · link · parent

The DX7 was 6 operators, and the module in the CX5M (I had one) was 4 operators, like the DX21. It used the YM2151 sound chip, which was also present in a number of video games.

This was an awesome computer, very fun to play with.

comment 7y ago · link · parent

I talk a little about why in my "fearless SIMD" blog post (also introducing a prototype that wraps the unsafety but at the moment is very limited in exactly what SIMD operations are exposed). https://raphlinus.github.io/rust/simd/2018/10/19/fearless-si...

comment 7y ago · link · parent

Yes, you want to set processSectionDelay to 0. Here's an example: https://github.com/raphlinus/ghilbert/blob/master/src/htmlou...

comment 7y ago · link · parent

A huge amount of the speed problem in MathJax is just the default configuration, which does the math typesetting in a deferred callback and throttles the work, basically guaranteeing that the browser will go through a full relayout and repaint many times if there are lots of math on the page. It's possible to change this, but I don't think many people do.

Another reminder of the power of defaults.

comment 7y ago · link · parent

I think you're right about GPU tending to have worse latency, but I think it's because that's the way the swap chain is set up and the use of blocking present calls. I've been studying this and am pretty sure I know how to make low latency on Windows work, mostly it's following the advice in [1]. If you do it right, then on modern hardware, DirectFlip kicks in and that saves you an additional frame that would ordinarily be eaten by the compositor. I plan to measure this at some point in the not too distant future, or would be happy to mentor somebody interested in taking it on.

[1]: https://devblogs.microsoft.com/directx/dxgi-flip-model/

comment 7y ago · link · parent

This. I believe the value proposition of Rust is that it decreases the cost of developing high quality software, much as the value proposition of PHP is that it decreases the cost of medium-quality software. It is not a magic bullet, but requires a nontrivial learning curve. If the goal is safe, performant code, then I think there's a good argument it's worth it. If that's not the goal, then other languages might be better choices.

comment 7y ago · link · parent

No, the policy is to use your google.com address, with some exceptions[1]. This confuses a lot of people, as things done for fun by one person on weekends (maybe not even official 20% time) are mixed in with official projects.

[1]: https://opensource.google.com/docs/patching/

comment 7y ago · link · parent

Feel free to include http://levien.com/Social%20rule.puz , which has a Recurse theme. It's not top quality but I've had a number of people tell me they enjoy it.

comment 7y ago · link · parent

It also has a SAT based-solver telling you when you get stuck (ie when there is no completion of the grid using words from its dictionary), but I'm not sure whether the WASM integration for it still works.

comment 7y ago · link · parent

It is indeed hard to strike that balance. I've not properly written up my return statement but based on my experiences I would recommend not trying to do a hugely ambitious project, expect the experience to be social, and, if you're already a senior programmer, expect do to mentoring.

RC is definitely a cool and unique place! One thing people might not recognize if they're not keeping track is that there's usually about one item by a Recurser on the front page of HN.

comment 7y ago · link · parent

Of these two, I find the second more appealing. The main use cases I have in mind are linking discussions from issues, and in general creating a permanent record of the work we do (our IRC logs got lost, I should have been on the ball to preserve them).

For people who actually want the Zulip experience, I have no problem just asking them to sign up for real. Since we have open signup based on github login, it's a pretty small barrier.

comment 7y ago · link · parent

I have used Discourse quite a bit, and it was a top consider when we were looking for a new platform.

Public web archives are a goal, and either we'll deploy a bot to publish them, or I've heard rumors this feature may be added to Zulip itself.

In the meantime, it's kind of nice not having everything immediately publicized. We've had (knock on wood) exactly zero problems with spam users, even though it's open to everybody with a Github account. I'm also (if temporarily) enjoying the freedom to talk a bit more intimately, for example I'm discussing a major project I'm considering taking on.

comment 7y ago · link · parent

I haven't found this a problem. We tend to just have general topics, like very often the "what's everybody working on this week" topic.
1
515253
63