14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
As I said elsewhere, increasingly we're in a world where there isn't a standard set of platform UI widgets. I think that was the case when we had Cocoa on macOS, but on Windows it's a choice between MFC, WinForms, WPF, WinUI, and those are only some of the choices offered by Microsoft itself.
It's a good question, though. It's possible somebody will figure out a good way to abstract over officially supported platform UI toolkits, and if so, that might become a compelling choice. This is one reason why the main point of my blog is that we need to figure out the best approach, rather than just assuming we know what to build.
comment 7y ago · link · parent
That said, it's not the main goal of the druid project. There, we're focusing on writing a real application in Rust. Dealing with language binding issues is hard, and anything that increases the scope too much puts the project at risk.
So if you want a multi-language GUI toolkit written in Rust, asking me is not the way to get that, because I'm not going to build that. But if you want to be part of a community effort to build it, I'd be open to collaboration.
comment 7y ago · link · parent
And I also agree that IMGUI is one of the most interesting of these, mostly because it's very simple. You'll find makepad (mentioned in my blog post and in comments here) is fairly directly based on IMGUI ideas, but also has the ability to retain intermediate results. Also, I've been admiring the architecture of Jetpack Compose, and feel it's true to the ideals of IMGUI - you can think of it as IMGUI + "positional memoization."
And yeah, it's one thing to build toys and another to build real applications. This is one reason the focus of druid is to build a font editor, as opposed to making a GUI toolkit first and hoping for adoption.
comment 7y ago · link · parent
Of course, things have gotten a bit postmodern, even on macOS there is no single widget toolkit, but basically a series of choices of what technology to build on. I'm actually not sure that binding other languages to SwiftUI is going to work well at all, but in Objective-C it works fine, just isn't very smooth. On Windows, I've generally found COM to be quite pleasant, and noises coming from Microsoft suggest that story will become even better.
comment 7y ago · link · parent
Apps can set locale explicitly to override that, but almost none do. Probably the motivating example is a translation app, which can then render both, say, Chinese and Japanese correctly.
Input methods are technically a separate setting from your locale list, which is maybe confusing but that's the way it is.
comment 7y ago · link · parent
I haven't been involved in day-to-day engineering on Android in 3 years though. Maybe of the current team will feel like chiming in.
comment 7y ago · link · parent
I gave a talk at ATypI 4 years ago on Android typography, it might be interesting: https://youtu.be/L8LD0BM-Vjk
comment 7y ago · link · parent
For almost five years, I was tech lead of the text stack in Android. There are a few things about the architecture not to like, but overall it is a world-class implementation - it has refinements like hyphenation and Knuth-Plass style paragraph layout, and of course emoji. It also had the benefit of Roozbeh Pournader's work for much of that time, so it gets Unicode and locales right. Among other things, I claim it does one of the best jobs on the "CJK problem" of any stack out there, using both font selection and the locl OpenType feature to adapt rendering for the preferred language(s). It's open source of course, but does suffer from thin public documentation.
Another good source is Chromium, which tends to be a bit more open, with discussions in the bug tracker and published documents, such as https://www.chromium.org/teams/layout-team/eliminating-simpl...
I'm interested in building the next stack in Rust, and have done some work in this direction. I'd love to see solid documentation as part of that effort, but of course writing takes time and effort, and the target audience is quite specialized.
comment 7y ago · link · parent
A good example is inserting indentation in response to, say, the "Enter" key. In a synchronous model, this is pretty straightforward. You calculate the indentation as essentially a function of the contents of the buffer and the delta (the insert of the newline), then any other typing gets processed after that. In a CRDT model, the additional typing can be interleaved in any order, and the merge operation has to converge to the correct results. You can think about how bad that is: the user could type a hundred lines of code, complete with complex editing operations including cut and paste, deletions, undo, and then the auto-indent plugin wakes up, calculates the diff, and sends it to the core. Meanwhile, the user has typed another hundred lines, including more cut'n'pasting of the affected lines. This is perhaps unrealistic, but the CRDT model requires it. And I think it is possible to solve it (I wrote some "rope science" articles, then there was more discussion in several issues), but it's a hugely intricate puzzle compared with just applying it synchronously, and the benefit is not worth it. It's quite practical to compute indentation for any realistic source file in under a millisecond, if you've got a nice fast language.
comment 7y ago · link · parent
Previous HN discussion on the mini-retrospective might be interesting: https://news.ycombinator.com/item?id=19886883
comment 7y ago · link · parent
comment 7y ago · link · parent
comment 7y ago · link · parent
[1]: https://xi-editor.io/docs/rope_science_01.html
[2]: https://raphlinus.github.io/personal/2018/04/25/gpu-unescapi...
comment 7y ago · link · parent
comment 7y ago · link · parent
There are any number of colorspaces that have been proposed that are better. Some are complex and ad hoc, such as two different releases of CIECAM. Others are relatively simple, such as Jzazbz. IPT also comes up a lot. I think the issue is that there isn't anything resembling consensus on which of these "more perceptually uniform" color spaces we should use. So a bunch of efforts, including freieFarbe, use Lab.
comment 7y ago · link · parent
I'm still doing 2D graphics software! It flows more or less directly from the work I did as a teenager.
comment 7y ago · link · parent
comment 7y ago · link · parent
[1]: https://leanprover.github.io/theorem_proving_in_lean/theorem...
comment 7y ago · link · parent