Skip to content

Instantly share code, notes, and snippets.

Avatar

Dave Herman dherman

View GitHub Profile
View a-few-changes.md

Directory layout

.
├── bin
│   ├── node
│   ├── npm ~> ../exe/launchscript
│   ├── npx ~> ../exe/launchscript
│   └── yarn
├── config.toml
@dherman
dherman / alts.md
Last active Oct 4, 2018
alternative syntaxes for notion project-vs-user toolchain commands
View alts.md

Symmetric

Use

  • notion use node 8
  • notion use ember-cli 3.4
  • notion use yarn 1.10
  • notion install heroku 7
  • notion install node 10
  • notion install npm default
View into_js.rs
pub trait IntoJs<'a, V: Value> {
fn into_js<C: Context<'a>>(self, cx: &mut C) -> Handle<'a, V>;
}
impl<'a, V: Value> IntoJs<'a, V> for Handle<'a, V> {
fn into_js<C: Context<'a>>(self, _: &mut C) -> Handle<'a, V> {
self
}
}
@dherman
dherman / flatness.txt
Last active Jul 9, 2018
Different candidate decompositions for the Neon library's modules
View flatness.txt
neon
Context, CallContext, FunctionContext, MethodContext, ComputeContext, ExecuteContext, ModuleContext, TaskContext
CallKind
VmGuard
VmResult, JsResult, JsResultExt, Throw
Borrow, BorrowMut, Ref, RefMut, LoanError
JsArray, JsArrayBuffer, JsBoolean, JsBuffer, JsError, JsFunction, JsNull, JsNumber, JsObject, JsString, JsUndefined, JsValue
Value
BinaryData
StringOverflow, StringResult
@dherman
dherman / windows-strategy.md
Last active Jun 26, 2018
Notion strategy for Windows
View windows-strategy.md

Goal: Per-User Installation Model

  • install Notion executables in user path
  • install Notion files in user profile
  • install Notion registry settings in HKCU

Goal: Per-Console Env Mutation

  • Notion command is a pair of .cmd and .ps1 wrapper scripts
  • cmd.exe sees the .cmd script
@dherman
dherman / v8_trace.md
Last active Jun 16, 2018
SOLVED: I missed a conditional
View v8_trace.md

Why doesn't this throw an exception?

SOLVED: It checks the length and returns without throwing in NEW_STRING

  } else if (length > i::String::kMaxLength) {                             \
    result = MaybeLocal<String>();                                         \

ASSERTION: DCHECK((isolate)-&gt;has_pending_exception())

View cargo-debug.log
dherman-mn1:cargo-edit dherman$ RUST_LOG=cargo=trace cargo install cargo-edit --git https://github.com/dherman/cargo-edit
Updating git repository `https://github.com/dherman/cargo-edit`
TRACE 2018-06-07T15:22:15Z: cargo::sources::git::source: updating git source `GitRemote { url: "https://github.com/dherman/cargo-edit" }`
DEBUG 2018-06-07T15:22:15Z: cargo::sources::git::utils: skipping gc as there's only 2 pack files
DEBUG 2018-06-07T15:22:15Z: cargo::sources::git::utils: doing a fetch for https://github.com/dherman/cargo-edit
DEBUG 2018-06-07T15:22:15Z: cargo::sources::git::utils: initiating fetch of refs/heads/*:refs/heads/* from https://github.com/dherman/cargo-edit
INFO 2018-06-07T15:22:15Z: cargo::sources::git::utils: update submodules for: "/Users/dherman/.cargo/git/checkouts/cargo-edit-d8e23e4da1869f61/0684637/"
TRACE 2018-06-07T15:22:15Z: cargo::ops::cargo_read_manifest: looking for root package: /Users/dherman/.cargo/git/checkouts/cargo-edit-d8e23e4da1869f61/0684637, source_id=https://github.com