Re: [dev-servo] Master's thesis project brainstorming

2015-04-07 Thread Keegan McAllister
We always talk about adding some devtools that give performance advice. This would be visible to web developers, who are end users of the browser in its role as a development tool. It's also visible to non-developer users in that more and more sites will take full advantage of Servo's

[dev-servo] tendril: a compact string for zero-copy parsing

2015-04-02 Thread Keegan McAllister
I've been working on a new string type which will solve various problems in html5ever, and which may be useful more widely in the Servo ecosystem. You can find the design rationale here: https://github.com/kmcallister/tendril#readme as well as preliminary API docs:

[dev-servo] Memory management in the HTML parser (was Re: DOM rooting is live)

2014-05-08 Thread Keegan McAllister
How would you create a `JST` on the stack? I'll provide some context. I'm designing the HTML parser API to be compatible with different DOM representations. This is desirable for a few reasons: - I want the library to be useful outside of Servo. It will have the ability to output

Re: [dev-servo] Table-less string interning

2014-04-24 Thread Keegan McAllister
A collision in a widely used cryptographic hash would be a major, publishable security advance. That's true for SHA-256 itself. But I ran the numbers, and it turns out brute force search for a collision on a 128-bit hash (even with no algorithmic weakness) is feasible. I wrote more on the

Re: [dev-servo] character encoding in the HTML parser

2014-04-22 Thread Keegan McAllister
You could use a rope where individual chunks can be either UTF-8 or UCS-2. UTF-8 strings would also record whether they happen to be 7-bit ASCII, and UCS-2 strings would record whether they contain any surrogates (and also maybe whether all surrogates are correctly paired according to UTF-16).

Re: [dev-servo] character encoding in the HTML parser

2014-04-01 Thread Keegan McAllister
The JS folks are very interested in trying to move away from pure-UCS-2, for memory reasons... That's very interesting. Servo seems like a good place to prototype that with a DOM to match. Who should I talk to about JS string representation changes? keegan

Re: [dev-servo] Crazy idea: CSS selector JITting at parse time

2014-03-31 Thread Keegan McAllister
Or store the metadata immediately before the code, as GHC does for thunk entry code. keegan - Original Message - From: Niko Matsakis nmatsa...@mozilla.com To: Patrick Walton pcwal...@mozilla.com Cc: dev-servo@lists.mozilla.org Sent: Monday, March 31, 2014 3:10:39 AM Subject: Re:

Re: [dev-servo] character encoding in the HTML parser

2014-03-31 Thread Keegan McAllister
Unfortunately I’d be less surprised if someone relies on having the two halves of a surrogate pair in separate document.write() call, as this seems more interoperable: data:text/html,scriptdocument.write(\uD83D);document.write(\uDCA9)/script The tokenizer's input is a queue of buffers, and

[dev-servo] character encoding in the HTML parser

2014-03-10 Thread Keegan McAllister
Should we implement character encoding detection [1] at the same time as the rest of the HTML parser? It seems to be separable; the only design interactions I see are: - The character decoder and script APIs can write into the same input stream - The encoding can change during parsing [2],

Re: [dev-servo] HTML parsing alternatives

2014-03-07 Thread Keegan McAllister
OK. It looks like writing a new parser directly in Rust (possibly using a translated Tokenizer.java as a tokenizer starting point) is the sensible way forward. I'm sorry about wasting your time with the translator. Not at all :) It was an interesting project and definitely an approach worth

Re: [dev-servo] HTML parsing alternatives

2014-03-06 Thread Keegan McAllister
(replies inline to multiple messages) I think the biggest unknown is memory management. Is this the only thing that's blocking compilation Unfortunately it's not. Some other problems I ran into: - The Java code has static data with non-constant initializers that depend on each other. For

Re: [dev-servo] Segmentation fault is caused by 'No appropriate framebuffer config found!'

2013-10-31 Thread Keegan McAllister
2. Investigate if there's some way to hack around it (using RGB pixmaps but somehow storing and reconstructing the alpha channel maybe?) This sounds pretty workable to me. We can send alpha as the R channel of a second pixmap/texture and the compositor can extract it within a fragment

[dev-servo] updating Servo to current Rust

2013-08-09 Thread Keegan McAllister
This week I've been working on porting Servo to the current-ish version of Rust. What I have so far is available at https://github.com/kmcallister/servo/tree/rust-upgrade The submodule commits should exist on https://github.com/mozilla-servo (some only in pull requests at the moment). I

Re: [dev-servo] Safe abstractions for unique handles

2013-07-16 Thread Keegan McAllister
At minimum we should newtype more of the integer IDs, to prevent mixing them up with other integers. keegan - Original Message - From: Robert O'Callahan rob...@ocallahan.org To: Patrick Walton pwal...@mozilla.com Cc: dev-servo@lists.mozilla.org Sent: Monday, July 15, 2013 4:44:43 PM