Skip to content

Instantly share code, notes, and snippets.

@mbrubeck
mbrubeck / parallel-layout.md
Created September 22, 2017 23:48
Parallel layout in Gecko

Parallel Layout in Gecko

Now that Gecko uses Servo's parallel style system, we want to work outward from there. The next phase could be parallel frame construction, and after that, parallel layout using Servo layout code.

Dividing work between Gecko and Servo

We want to ship this work incrementally (every six weeks), without needing to replace the entire layout system at once. There are a few ways we can convert

actors
asciiutils
autoimpl
basichll
bloomfilter
cargotest
concurrenthashmap
corefoundationsys
coremidi
coremidisys
extern crate unicode_segmentation;
use unicode_segmentation::UnicodeSegmentation;
fn main() {
let namaste = "नमस्ते";
println!("{}", namaste);
let etsaman = namaste.graphemes(true).rev().collect::<String>();
println!("{}", etsaman);
}
<table>
<tr>
<td></td>
<td rowspan=3></td>
<td rowspan=2></td>
</tr>
<tr> incoming_rowspan: [0, 2, 1]
<td></td>
</tr>
<tr> incoming_rospwan: [0, 1, 0]
This file has been truncated, but you can view the full file.
--- powi.txt 2018-02-15 10:00:35.322876392 -0800
+++ powf.txt 2018-02-15 10:00:51.822900588 -0800
@@ -171,13 +171,13 @@
22528399544939170000000000000000000.0,
67585198634817530000000000000000000.0,
202755595904452570000000000000000000.0,
- 608266787713357700000000000000000000.0,
+ 608266787713357740000000000000000000.0,
1824800363140073200000000000000000000.0,
5474401089420219000000000000000000000.0,
@mbrubeck
mbrubeck / ssh2-sample.rs
Created February 21, 2018 22:27 — forked from opensourcegeek/ssh2-sample.rs
Failing code
extern crate ssh2;
use std::net::TcpStream;
use ssh2::Session;
fn create_session() -> (TcpStream, Session) {
let tcp = TcpStream::connect("test:22").expect("Cannot connect");
let mut sess = Session::new().expect("cannot start session");
sess.handshake(&tcp).expect("handshake failed");
@mbrubeck
mbrubeck / current.rs
Last active April 2, 2018 17:00
Rust buffered I/O convenience functions idea
use std::io::{BufReader, BufWriter};
use std::fs::File;
let src = BufReader::new(File::open("input.txt"))?;
let dst = BufWriter::new(File::create("output.txt"))?;
$ hg log -r FIREFOX_59_0_2_RELEASE..FIREFOX_59_0_3_RELEASE
changeset: 471206:239e434d6d2b
tag: FENNEC_59_0_2_BUILD1
tag: FENNEC_59_0_2_RELEASE
tag: FIREFOX_59_0_2_BUILD1
tag: FIREFOX_59_0_2_RELEASE
user: Vlad Baicu <[email protected]>
date: Thu Mar 22 13:46:41 2018 -0700
summary: Bug 1444549 - Remove unused IconTabWidget XML attr. r=mcomella, a=RyanVM
armv7_unknown_cloudabi_eabihf cortex-a8
i686_apple_darwin yonah
i686_linux_android pentiumpro
i686_pc_windows_gnu pentium4
i686_pc_windows_msvc pentium4
i686_unknown_cloudabi pentium4
i686_unknown_dragonfly pentium4
i686_unknown_freebsd pentium4
i686_unknown_haiku pentium4
i686_unknown_linux_gnu pentium4
@mbrubeck
mbrubeck / main.rs
Last active May 22, 2018 16:36 — forked from Yatekii/main.rs
pub fn render(library: &Library, state: &mut State, mut stack: Vec<String>, expression: &mut Expression) -> Expression {
match expression {
// We have a symbolic expression that we have to evaluate
Expression::Symbolic(ref mut args) | Expression::NotDone(ref mut args) => {
// If we have a valid expression (unnamed ones are not allowed)
if args.len() > 0 {
// Get the first nested expression
return match args.remove(0) {
// If the first expression is a plain literal
Expression::Literal(Literal::S(name)) => {