14,081 karma · joined Mar 7, 2014 (12y ago) · 1,887 submissions
comment 9y ago · link · parent
Not to take anything away from the original posting, but if performance is a goal, this may be interesting.
[0]: https://github.com/google/music-synthesizer-for-android
comment 9y ago · link · parent
comment 9y ago · link · parent
However, I suspect that, by volume, most of the WASM code out there is going to be built from open source components, with a little customization sprinkled on top. It takes a little more detective work to find these sources and read them, but I think it's just as worthwhile as in the plain HTML days. Perhaps we could converge on tools and practices that would make it easier to discover the sources from which WASM artifacts were built.
comment 9y ago · link · parent
A bit of description, and ancient but working GPL'ed code here: http://www.levien.com/artofcode/eventone/
A paper containing the basic output-dependent feedback idea: http://levien.com/output_dependent_feedback.pdf
comment 9y ago · link · parent
I still have my slashdot account (number 3148), but rarely use it. I can well imagine the "complicated feelings" that Rob has, and wanted to add my voice to the many saying that Slashdot was an important Internet space.
comment 9y ago · link · parent
comment 9y ago · link · parent
I'd love to see the other direction. One approach that I think is worth exploring is when the file contents correspond to a git hash that the editor has access to. In fact, there is a pretty relationship between "deltas" and git commits, and this could possibly be exploited usefully.
comment 9y ago · link · parent
In a low-level design, your editing operations would be poking at the data structure directly. There, the simplicity of a gap buffer is a pretty big win. I agree in this environment ropes are too complicated. However, I don't see any good reason to architect a text editor in this way. Use abstractions.
The linked article contains a factual error, the referenced Crowley paper does not consider ropes. Thus it cannot be used in support of the argument that piece tables outperform ropes.
There's one other important concern with piece tables I didn't see addressed. It depends on the file contents on disk not changing. If your file system supported locking or the ability to get a read-only snapshot, this would be fine, but in practice most don't. It's very common, say, to checkout a different git branch while the file is open in the editor. Thus, the editor must store its own copy to avoid corruption. In the long term, I would like to see this solved by offering read-only access to files, but that's a deeper change that can be made piecewise.
comment 9y ago · link · parent
I'm also looking to optimize smoothness on window resize, which I've noticed to be pretty janky in many applications.
comment 9y ago · link · parent
comment 9y ago · link · parent
2. Some form of WebWorker is obviously where we're going. But does postMessage() have the potential to cause delay in the worker that receives it? (There are ways to solve this but it requires some pretty heavy engineering)
comment 9y ago · link · parent
If we had gone with the Audio Data API, it wouldn't have been satisfying, because the web platform's compute engine simply could not meet the requirement of reliably delivering audio samples on schedule. Fortunately, that is in the process of changing.
Given these constraints, the complexity of building a signal processing graph (with the signal path happening entirely in native code) is justified, if those signal processing units are actually useful. I don't think we've seen the evidence for that.
I'd personally be happy with a much simpler approach based on running wasm in a real-time thread, and removing (or at least deprecating) the in-built behavior. It's very hard to specify the behavior of something like DynamicsCompressorNode precisely enough that people can count on consistent behavior across browsers. To me, that's a sign perhaps it shouldn't be in the spec.
Disclaimer: I've worked on some of this stuff, and have been playing with a port of my DX7 emulator to emscripten. Opinions are my own and not that of my employer.
comment 9y ago · link · parent
It would make a fun project for somebody to implement it and compare the performance. I'd certainly take the PR for it if the performance was better :)
[edit: followup] The rope implementation in xi has an additional heuristic that tries not to split lines across leaf boundaries (ie most leaves should end in a newline). It also has a hard constraint of not splitting a unicode codepoint. Thus, leaves and subtrees would have an unpredictable number of elements (as opposed to being a clean power of two when full) and I think that pretty much invalidates using the radix to select the child.
comment 9y ago · link · parent
comment 9y ago · link · parent
I say this as someone who has chosen a more sophisticated data structure (ropes) in the editor I'm working on.
comment 9y ago · link · parent
Not surprising to see this, because the rules are quite different for non-monospaced fonts (almost all fonts should have a liga feature for fi, and all modern text layout engines should respect it).
Source: I've worked in this space.
comment 9y ago · link · parent
And yes, the Taylor series is pretty good but you can usually squeeze a bit more accuracy-over-range by, eg, using an optimizer for the coefficients. Also, note that in your notebook you have x^3/5 but x^3/6 is probably what you wanted.
comment 9y ago · link · parent
comment 9y ago · link · parent
This is a rope implementation in Rust with lots of features useful for text editors.
comment 9y ago · link · parent
Congrats!
comment 9y ago · link · parent
[0]: http://blog.cdleary.com/2012/11/arm-chars-are-unsigned-by-de...
comment 9y ago · link · parent
comment 9y ago · link · parent
comment 9y ago · link · parent