14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions
comment 6y ago · link · parent
Lazy HN: does this support Vulkan 1.2? Descriptor indexing? Memory model? Subgroup size control?
Will it work on a Pine RockPro64? If so, what's the least-hassle way to get up-to-date drivers? If someone is interested in helping get piet-gpu running on the hardware, let me know.
comment 6y ago · link · parent
comment 6y ago · link · parent
I'm about 90% sure this is possible using techniques broadly similar to piet-gpu. The problem is a lot less constrained if you have access to compute shaders (ie WebGPU), otherwise it looks a lot like RAVG (Nehab and Hoppe) and you have kinda nasty branching and memory access patterns in the fragment shader, plus still having to do coarse rasterization on CPU.
One of the operational challenges here is that the renderer would likely be a one-off, as the requirements are just so different than most other clients of a 2D rendering engine.
There's been a bit of discussion on #gpu on xi.zulipchat.com. I consider this an interesting problem but can't really justify spending time on Flash-specific features myself.
comment 6y ago · link · parent
A particularly good paper explaining the problem (and how the NV_path_rendering extension solves it) is "GPU-accelerated Path Rendering", Kilgard and Bolz, 2012.
Does Ruffle solve these? If so, how?
comment 6y ago · link · parent
For reference, I started programming when I was 6, did a little hardware design (easy stuff, interfacing DACs and RAM chips to 8 bit CPUs), wrote an assembler at 9, got a patent when I was 12, etc. My dad did a lot to inspire me and provide me with resources, and had some knowledge of electrical stuff (he had been an electrician in the Navy in WW2), but all the programming I did was very much mine. So it's not hard at all for me to believe that this young man completed a training course intended to get people up to speed on this technology.
comment 6y ago · link · parent
And one of the efforts I personally find most interesting is Metamath Zero, which attempts to be an interchange format among other things, with connections to HOL and Lean. See section 5 of: https://arxiv.org/abs/1910.10703
I think there are many provers which theoretically could be used for this effort, and am not convinced Lean is the absolute best, but I applaud the community for actually going ahead and doing it, instead of farting around with tools and hoping the library will magically happen (a valid critique of HoTT in my opinion).
comment 6y ago · link · parent
As flohofwoe suggests in a sibling, combining an imgui-like API with an actual retained widget tree would be something of the best of both worlds. That is indeed pretty close to what the Crochet prototype does. We're not trying to exactly match the imgui but it's pretty close. In particular, getting actions back from widgets (like button presses) is the return value from calling the widget-creating function. That's a notable difference from, say, Jetpack Compose, which is fairly imgui-like on widget creation but pretty much uses callbacks for those actions. Crochet does solve the page tearing problem (though the current implementation is hacky, don't look too closely under the hood).
Another note - the Dear ImGui implementation has become a lot more sophisticated over the years, and is no longer a simplistic implementation of the immediate mode GUI concept. It has unique id's for widgets, its text processing has become better, etc.
comment 6y ago · link · parent
comment 6y ago · link · parent
They're also good for forming larger strings by concatenating smaller ones. But if you can structure your code so that it just appends to a buffer, for example, by threading a mutable string buffer reference through function calls rather than returning strings, that's also faster.
So, as with most such tradeoffs, it depends on what you're trying to do.
comment 6y ago · link · parent
These all have Emoji_Presentation=No as specified in emoji-data.txt, for precisely this reason (to avoid discrepancies in rendering), but most platforms don't respect these defaults, as it's common to get strings containing emoji from mobile devices, which usually default to emoji presentation. I talk about this a little in my recent "Text layout is a loose hierarchy of segmentation" blog post.
comment 6y ago · link · parent
1036.
Text layout is a loose hierarchy of segmentation(raphlinus.github.io ↗)
13 points · by raphlinus · 6y ago · 2 comments
comment 6y ago · link · parent
The article is not biased or out of date at all. Most people can't figure out how to get around "secure boot" technology, which has the effect of locking people out. Big companies, both those that make hardware and software, work together to lock ordinary people out of creating alternatives. If an independent creator were to make something good, the big companies would just make their own version, that would be just as good for most users.
Yeah, this article seems like it accurately predicted the future when it was written.
comment 6y ago · link · parent
comment 6y ago · link · parent
SwiftUI and Jetpack Compose are completely different beasts, though they might look similar from the outside. SwiftUI relies heavily on observable objects and basically a shared-mutable-state architecture. I believe that adapting it into Rust would be a nightmare.
Jetpack Compose, on the other hand, lets the app logic build the UI with method calls that resemble immediate mode GUI (though there are of course important differences, as it is building a retained widget tree). These updates are mediated through a mutable context object ("Composer" in the Jetpack Compose world), which adapts quite nicely into the Rust world. In particular, it does not depend on shared mutable references.
I strongly believe that it is possible to express UI in Rust quite naturally and expressively. I've written a fair amount about this recently and have provided evidence in the form of the existing Druid work and the Crochet research prototype, which represents an evolution of its reactive architecture to better support dynamic reconfiguration (a current weak spot in Druid). Of course, we won't know for sure til we get there, but in the meantime it would be nice if the naysayers at least made informed criticism.
comment 6y ago · link · parent
Building a GUI toolkit is a huge task, with many subtasks that are themselves serious efforts (2D drawing, text, reactive architecture, etc). The Druid project has been engaging these problems and coming up with pretty good solutions. Trying to rush the effort (for example, by trying to lash together existing modules) won't be helpful. In coming months, the project will continue focus on trying to deliver one application, the Runebender font editor, rather than trying to be a general purpose GUI toolkit product. We've been growing a really good community and there are lots of opportunities to learn more about GUI technology and help the project along.
I'm a bit biased, perhaps, but I'm extremely optimistic about the prospects for GUI in Rust. But if people are impatient and hoping for a solution they can deploy right now, no, it's not there yet.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
Obviously if APIs cannot be copyrighted, then a ton of open source work geared towards making things compatible remains viable. Wine is one of the most obvious, but I can think of many others. Efforts to port CUDA code to non-Nvidia hardware. A potential effort to reimplement SwiftUI. And there are many more.
On the other hand, if APIs can be copyrighted, then buyers now know that there's a single-source risk for any API that's not released under a permissive open source license. So, to continue this example, Apple has the legal right to shut down any port of code written in SwiftUI to non-Apple hardware, and similarly for CUDA. This would immediately increase interest in actually open source alternatives; Flutter already exists, a Vulkan based runtime could be developed for TensorFlow, etc.
Sadly, I think this outcome is unlikely. What's more likely is that the ruling will be specific to the facts of the case. That basically means that there won't be clear guidance that you need to run away from proprietary APIs, but also not clear guidance that you can continue to rely on open source interop projects. Rather, any time any of this gets sticky, the only way through the mess will be to pay lawyers millions of dollars. That will have the effect of making it easier for the big players to dominate the market further, and harder for independent people to play. That's very much to the advantage of those in power, so I'm pretty sure that's what we'll see.
comment 6y ago · link · parent
comment 6y ago · link · parent
This effort did not end up succeeding. Instead, a more organic, informal process seems to be working pretty well. Lists like this seem to be useful, even if none is officially blessed.
comment 6y ago · link · parent
I'd love it if we're able to preserve the high trust nature of open source. I also wouldn't be surprised if it starts eroding. If that's the case, this kind of thing is the tip of the spear, and in that light it makes sense to get pretty upset about it.
comment 6y ago · link · parent
2. The xi-editor project had other problems which I've written about extensively in my retrospective.
3. It's hard to compete against MS VS Code. When I started xi, the competitive landscape had a huge gap between performant and feature-rich but bloated editors.
4. We got funding for the font editor project.
comment 6y ago · link · parent
Regarding IME, we haven't done it yet (we're trying to be fairly conservative in our roadmapping), but we plan to wire up actual composition regions and so on, and hope to plumb IME to it using a cross-platform abstraction. My understanding of the winit code is that it varies a lot from platform to platform, but seems to mostly be synthesizing keyboard events (ReceivedCharacter) when an IME request such as "insertText" happens.