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 8y ago · link · parent

Word.

comment 8y ago · link · parent

CVD-Jet is not the new color scale, it's a simulation of what Jet looks like for certain colorblind users.

To my eyes, cividis (which is the new scale) is good by the numbers, and there's a strong argument it's more robust for colorblind users, but viridis looks better.

comment 8y ago · link · parent

Given that it was already on a very old version, not doing further development counts as "killing it off" in my book. I'm bummed because I did an OpenGL based text renderer in xi-editor, and now have to decide whether to go back to CoreGraphics (assuming they've fixed the performance problems there) or forward with something like this.

comment 8y ago · link · parent

Machine readable as well as machine washable[0]!

[0]: http://cypherpunks.venona.com/archive/1995/10/msg00317.html

comment 8y ago · link · parent

It's simply a different setting for stem thickening, the subpixel AA modes added a lot. It would definitely be possible to set the same stem thickening for grayscale rendering, and on hi-res monitors it would look pretty similar.

comment 8y ago · link · parent

Emulators add a lot of extra latency, both on input and on display. Actually it isn't so much the emulator as the host os, with its compositor etc. An FPGA has the possibility of running with dramatically better latency. Similar issues go for startup time.

comment 8y ago · link · parent

I read a bit of original Euler material on the elastica and Euler spiral for my PhD thesis [0] on interactive curve design, devoting two chapters to such history. I personally found it fascinating and beautiful.

[0] http://levien.com/phd/phd.html

comment 8y ago · link · parent

Glad you liked it! Unfortunately there was going to be a video but it didn't happen for technical reasons. I'd love to have the opportunity to do another spin of that talk.

Of course I had to pick and choose, and Metafont is near and dear to my heart, but since the audience for this was mostly humanities rather than a more technical crowd, it didn't make the final cut.

comment 8y ago · link · parent

I used a Nixie tube as an example in my presentation on the evolution of digital typography [0]. I actually brought a nixie clock with me, which was a nice visual aid.

[0] https://docs.google.com/presentation/d/14o7vtyxz79Xto4JeDFcr...

comment 8y ago · link · parent

I think it was just overly aggressive settings of compression parameters. I don't see any evidence that the jbig2 compressor was implemented incorrectly. Source: [1]

[1]: https://www.xerox.com/assets/pdf/ScanningQAincludingAppendix...

comment 8y ago · link · parent

It's the lossy jbig2 compression in Xerox copiers: http://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_...

And yes, I think this is a relevant comparison. As the entropy model becomes more sophisticated, errors are more likely to be plausible texts with different meaning, and less likely to be degraded in ways that human processing can intuitively detect and compensate for.

comment 8y ago · link · parent

I don't think there are good arguments against it, and I agree it would be great to fix it. But I think it's very important to understand the reasons why Regehr's proposal failed. I also think it's incumbent on new proposals to argue why their effort is likely to succeed where Regehr's did not.

If I were more cynical, I'd say that the C-standards community has simply ceded the ecosystem niche of a low-level language which has common-sense behavior, creating an opportunity for other languages such as Rust, D, Zig, etc. But I don't really believe that. Almost everything we do relies on C at the bottom, and it's pretty much the only viable way to publish an API that can be consumed by multiple languages.

comment 8y ago · link · parent

This sounds like Regehr's "Proposal for a Friendly Dialect of C" [1]. I believe that was a well thought out argument, but ultimately did not make headway [2].

[1] https://blog.regehr.org/archives/1180 [2] https://blog.regehr.org/archives/1287

comment 8y ago · link · parent

Surely just a coincidence. Given the topic and current events, the chance of this happening randomly is quite high.

comment 8y ago · link · parent

Yes, it's similar to C++. A Rust `fn()` type is similar to a C++ `(*foo)()` type and at the low level is just a pointer to code. A Rust `Fn` trait object (of which there are several variants) is roughly similar to a C++ std::function and is "fat" in that it can contain data as well as code. Most higher level languages don't make the distinction, buying conceptual simplicity at the cost of potential optimizations when a simple code pointer will do.

comment 8y ago · link · parent

Closures are, but functions defined using "fn" syntax cannot capture from the environment. This is a useful feature, and I can see why people would want it, but it was considered ultimately not consistent with Rust's aims to be excellent at the low level. See [1] for more discussion of the tradeoffs and why Rust chose not to include the feature.

[1] https://users.rust-lang.org/t/inner-functions-not-closed-ove...

comment 8y ago · link · parent

The fix that's probably closest to the author's intent is to use an atomic. There's no atomic boolean in the language, but if you store 0 or 1 in an int32 it works.

comment 8y ago · link · parent

Unicode 0+00A0 (decimal Unicode codepoint 160). ASCII only defines 0..127.

comment 8y ago · link · parent

I've been playing in the space too, and basically agree with what you say but have some other observations.

1. The "fancy" operations like the blending modes (I believe these were originally from Photoshop and are now part of PDF, among other things) are definitely doable on GPU, but many of them require shaders and cannot be done in the fixed-function blend pipeline.

2. There are a bunch of optimizations that are still very useful on GPU, including reordering to improve batching of draw calls, and techniques to reduce overdraw when an operation will be completely painted over. Webrender uses hierarchical z-buffer to GPU-accelerate these.

3. There are advanced things like linear-sRGB colorspaces that are very useful, well supported on modern GPU hardware.

4. CoreGraphics on MacOS is pretty slow. On Windows, I've had varying results with Direct2D (I know we chatted some in a previous thread). I think it depends a lot on the quality of drivers.

4. Incremental repaint (as opposed to painting the surface in full) is still useful, if for no other reason than to reduce energy use. It's difficult on some platforms (Mac), well supported on others (Windows), and optional/driver dependent on others (Linux/Android).

5. Clipping is still where much of the performance dies. Sure, you _can_ specify everything in terms of bitmap blending, but do you want to? That's an awful lot of gmem bandwidth you're churning.

And yes, text is fantastically complicated.

Long story short, I don't see any good one-size-fits-all solution here.

comment 8y ago · link · parent

Gilad left Google last July and is now at Tensyr.

Source: http://bracha.org/cv.pdf

comment 8y ago · link · parent

I've actually some nontrivial progress on xi-win in the past month or two. I still consider it experimental, but it offers basic editing functionality now. It's written basically directly on top of winapi, no toolkits or frameworks, which I'm doing partly because I enjoy tinkering, and partly because I expect to be able to achieve significantly better performance than would otherwise be possible.

Syntax highlighting is not working, largely because I can't figure out how to compile onig. But we'll figure that out one way or another (if it's too hard, we'll switch to fancy-regex, which is pure Rust).

comment 8y ago · link · parent

I didn't post this, but am happy to answer questions. It's not quite yet at the point where you want to use it as your daily editor, but we are slowly and steadily getting there.

comment 8y ago · link · parent

The title is well supported by a statement in the paper (section 2.1, next to last para): "This clearly indicates that the “thrust” is not coming from the EMDrive but from some electromagnetic interaction." I think the conclusion is written in carefully understated scientific style.

comment 8y ago · link · parent

Not actually that hard. You want a WaveShaperNode. Of course, tuning the curve and other parameters so it sounds _good_ is nontrivial.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/WaveShaperN...

comment 8y ago · link · parent

I had one of those too, an ASR 33 with RS-232. I connected it to an Intel SDK-85, which had optional RS-232 stuff on it. Fun times!

If I recall, the teletype was sourced from the Green Bank Observatory, which had some really impressive old equipment - racks of hardware with nixie tube displays, all that kind of stuff.

1706.

A sketch of string unescaping on GPGPU(raphlinus.github.io ↗)

6 points · by raphlinus · 8y ago · discuss

comment 8y ago · link · parent

We've done quite a bit of performance work, and there's a bit more in the pipeline, especially horizontal scrolling of very large lines. Some of the slowness at the latter is performance bugs in CoreText; we're considering more aggressively working around those. If you're still seeing slow performance, please file an issue.

comment 8y ago · link · parent

I probably should have said "common" notation; it's certainly what I learned. I think you're right in that many authors prefer ≡ to emphasize that it is an equivalence rather than equality relation.

Source that both are in use: https://math.stackexchange.com/questions/196081/the-right-wa...

comment 8y ago · link · parent

There are few more examples that come to mind, like statements about intervals (π = 3.14 ± 0.01) and the usual notation for modular arithmetic; 3 * 3 = 1 (mod 4).

Oh, and the wonderful notation for integrals, ∫ 2x dx = x² + C

comment 8y ago · link · parent

Thanks for the shout-out. You can also read the docs[0] about the rope data structure (the release is a bit old, if you're really curious git master is better).

I admit this is a fairly specialized use case, for most things xi uses mutability in a controlled way.

[0] https://docs.rs/xi-rope/0.2.0/xi_rope/tree/index.html

1
565758
63