filmov
tv
Making a WebAssembly interpreter in Ruby, part 10: floating-point bitwise & comparison instructions

Показать описание
00:00:00 — Waiting to start
00:00:32 — Hello
00:02:49 — Retro
00:15:02 — Compute `ceil`/`truncate`/`round` only once
00:21:41 — Push all float arithmetic operations inside a single #with_float block
00:30:56 — Combine `floor`/`ceil`/`trunc`/`nearest` implementations
00:35:02 — Separate `min`/`max` NaN handling as a preprocessing step
00:43:22 — Separate `min`/`max` zero handling as a preprocessing step
00:45:34 — Use #sign to pick the minimum/maximum zero
00:48:15 — Combine `min`/`max` implementations
00:52:11 — Introduce Sign class to concretely represent plus/minus signs
01:19:05 — Move FloatSign refinement to Sign::Conversion
01:22:31 — Reuse `negated` local variable in Float#parse
01:30:20 — Store `sign`, not `negated`, on Wasminna::Float instances
01:42:19 — Use `exponent` local variable throughout Format#pack and #unpack
01:44:09 — Extract `SIGN_BIT` hash in Format
01:46:58 — Support conversion from Rational to Sign
01:49:50 — Make float-to-sign conversion work the same as rational-to-sign and name-to-sign
01:59:52 — Automatically coerce Sign to Integer
02:22:53 — Implement Sign#!@ to allow a sign to be flipped
02:50:57 — Combine `eq`/`ne`/`lt`/`le`/`gt`/`ge` implementations
03:01:33 — Add f64 tests — which all already pass! — to test script
03:07:04 — Print dots instead of expected/actual values when assertions pass
03:13:14 — Make the dots green
03:18:43 — Print a blank line after each suite of tests
03:21:21 — Report tidy errors, warnings and assertion failures in interpreter
03:27:05 — Add colour to errors, warnings and assertion failures in interpreter
03:32:20 — Print yellow dots for skipped assertions
03:33:41 — Pretty-print commands in interpreter error messages
03:36:35 — Add colour to pending test success/failure messages
03:40:05 — Turn off -x in test script and print our own information instead
03:43:22 — Return an Enumerator from SExpressionParser#parse_expressions
03:52:48 — Return an Enumerator from SExpressionParser#parse
03:56:26 — Don’t round quotients whose remainder is zero
04:39:25 — Lift error reporting around top level of #interpret
04:47:19 — Add support for unnamed function parameters
04:52:20 — Wrapping up
04:55:11 — Bye