hyperbo.la :: lifestream
permalink

Another fun #rust update: `intaglio`, my string interning crate, recently got support for C strings (not yet released).

permalink

It's been a while since I've posted about #artichoke, but I recently landed a #rust implementation of #ruby's `String` class. #win https://github.com/artichoke/artichoke/pull/1222

permalink

Most crates are no-std when possible, 100% documented, and I think pretty high quality. #patch #rust

permalink

focaccia and roe are UTF-8 case manipulation crates for implementing parts of `String` and `Symbol` in #artichoke. intaglio is Artichoke's symbol table, boba is an implementation of Bubble Babble Encoding which will be used in the `digest` stdlib package. #rust #patch

permalink

Published a few more #rust crates since I last checked in: boba, focaccia, intaglio, and roe. https://crates.io/crates/boba https://crates.io/crates/focaccia https://crates.io/crates/intaglio https://crates.io/crates/roe #patch

permalink

Once GH-670 was merged, I had a segfault that only (and reliably) reproduced on one test in Windows #artichoke #rust #windows

permalink

After 50 PRs, I was able to put GH-442 to bed and remove the Rc wrapper from the Artichoke state https://github.com/artichoke/artichoke/pull/670 #win This refactor took 4 months #fail #rust #artichoke

permalink

I published my first #rust crate (and package of any kind, ever)! rand_mt is a fork of an existing Mersenne Twister crate which adds compatibility with the latest rand_core and makes it no_std https://crates.io/crates/rand_mt #patch

permalink

I contributed a feature to #rust! Added an implementation to allow turning a &mut str into a String using the standard From trait #win #patch https://github.com/rust-lang/rust/pull/69661

permalink

Some folks have been contributing #Ruby and #Rust code to #artichoke! #win #github

permalink

I reported an undocumented panic in #rust that was fixed today #patch #win https://github.com/rust-lang/rust/issues/63456

permalink

I'm trying to improve Regexp performance in #artichoke by using the regex crate instead of oniguruma in some cases. It turns out not to be faster in all cases #patch #rust #fail https://github.com/rust-lang/regex/issues/604

permalink

This was hard to track down: emscripten linker error with a particular function signature #rust #wasm #patch #github #fail https://github.com/emscripten-core/emscripten/issues/9135

permalink

I forked onig and hope to add support for the wasm-unknown-unknown build target. For #artichoke though, it's too soon. Once mruby-sys is pulled into #Rust I'll try again #ruby #mruby #fail #patch #Wasm

permalink

Reported a bug in layout generation for structure with flexible array members to #rust bindgen that was recently fixed #patch https://github.com/rust-lang/rust-bindgen/issues/1589

permalink

That memory leak turned out to be quite the yak shave. setjmp/longjmp from C leaving #rust memory in inconsistent state #fail https://github.com/artichoke/ferrocarril/pull/168

permalink

Optimized String#scan in ferrocarril to be comparable to CRuby performance #rust #ruby #mruby #performance https://github.com/artichoke/ferrocarril/pull/138

permalink

Added a feature (both a new capability and a compile time feature!) to rust-embed to allow it to embed sources relative to crate root which is useful in workspaces #rust #patch https://github.com/pyros2097/rust-embed/pull/67

permalink

I reported a compiler improvement for suggestion diagnostics #rust #patch https://github.com/rust-lang/rust/issues/61555

permalink

I have Regexp#match? https://github.com/artichoke/ferrocarril/pull/93 #win #rust #ruby

permalink

It has been a really productive weekend. Merged 23 #github PRs for ferrocarril #win #rust #git https://github.com/artichoke/ferrocarril/pulls?utf8=%E2%9C%93&q=is%3Apr+created%3A2019-05-24..2019-05-27+is%3Aclosed+

permalink

here's another Clippy bug #rust #fail https://github.com/rust-lang/rust-clippy/issues/4143

permalink

In a related note, I now peg the nightly version in the rust-toolchain file to a specific date archive #ci #rust #win

permalink

My #ci builds of ferrocarril caught a bug in rustyline that made compilation fail on the latest nightly #rust #win #patch https://github.com/kkawakam/rustyline/issues/217

Photo for post 688.
permalink

Excluding generated and vendored sources, ferrocarril is 8700 lines of #rust, #c, and #ruby. This is a lot of code. In very uncharacteristic fashion for a side project, a big chunk is tests #win https://github.com/artichoke/ferrocarril/commit/fe2febc

permalink

You can tell which parts of ferrocarril are new to me based on how many consecutive commits are dedicated to a feature. By this measure, the new (and hard) things were sys crates, #ci, and TryFrom traits #rust #win #fail

permalink

ferrocarril is a new project I've been working on to embed #ruby on Rails in #rust https://github.com/artichoke/ferrocarril

permalink

The keyword "unsafe" appears 372 times in this codebase #rust

permalink

Using cargo:rerun-if-changed and cargo:rerun-if-env-changed to make most sys crate builds a noop. developer productivity #win #rust

permalink

I just used #github to create a reproducer case for a panic in a #rust library #win https://github.com/lopopolo/rust-embed-panic https://github.com/pyros2097/rust-embed/issues/61 #patch

permalink

I generated FFI bindings for mruby with bindgen! I wrote a #c extension library for wrapping mruby macros! #win I wrote (a lot of) unsafe #rust code. Clippy helps a lot to make sure I'm not doing anything stupid. I have caused quite a few #segfault #fail

permalink

I implemented a #rust macro for the first time to implement some traits to convert between mruby values and Vec and Option containers #win

permalink

I've been working on creating an idiomatic, modern set of #rust bindings for mruby, an embedded #ruby interpreter. I am learning a ton and doing lots of code things I've never done before! #win

permalink

I found an ICE (internal compiler error) in clippy in #rust nightly #fail https://github.com/rust-lang/rust/issues/60067

Photo for post 668.
permalink

Deck making for an internal tech talk called "How to Implement the Chromecast Protocol in Rust When You Don't Know Rust" #rust futures and impl trait 😭 #fail

permalink

I have eliminated all explicit casts in punchtop #rust #win https://github.com/lopopolo/punchtop/commit/1e41ca3

permalink

More #rust safety: removed a cast to usize with the new usize::from_be_bytes converter https://github.com/lopopolo/punchtop/commit/2263c80 #win

permalink

The game that I'm working on is punchtop https://github.com/lopopolo/punchtop #win #rust #powerhour

permalink

I made a small #rust crate called stream-util for a game I'm working on. https://github.com/lopopolo/punchtop/tree/master/stream-util allows graceful drains of tokio mpsc channels or canceling a futures Stream. Clippy pedantic and fully documented #win

permalink

I implemented a #rust client for the #chromecast protocol for a game I'm working on. I collected a fairly exhaustive set of protocol documentation: https://github.com/lopopolo/punchtop/tree/master/cast-client

permalink

First #rust #patch accepted https://github.com/asomers/futures-locks/pull/10 closing out 2018 with a bang

permalink

Took 4.5 years but I've finally started to learn #rust: https://hyperbo.la/lifestream/298/. I'm implementing a power hour game that plays to a #chromecast with a #react webview UI.

permalink

thinking of writing a toy in #rust or #golang