Skip to content

Instantly share code, notes, and snippets.

Jeremiah Senkpiel Fishrock123

Block or report user

Report or block Fishrock123

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Fishrock123
Fishrock123 / iterators-break-recursion-loop.js
Created Aug 29, 2019
iterators-break-recursion-loop.js
View iterators-break-recursion-loop.js
function* f() {
try {
yield 1
yield 2
yield 3
} finally {
yield* f()
}
}
@Fishrock123
Fishrock123 / interator-break-finally-recursion.js
Created Aug 28, 2019
interator-break-finally-recursion.js
View interator-break-finally-recursion.js
function* f() {
try {
yield 1
yield 2
yield 3
} finally {
yield* f()
}
}
@Fishrock123
Fishrock123 / iterator-break-yield-not-done.js
Created Aug 28, 2019
iterator-break-yield-not-done.js
View iterator-break-yield-not-done.js
function* f() {
try {
yield 1
yield 2
yield 3
} finally {
yield 4
yield 5
}
}
@Fishrock123
Fishrock123 / async-iterator-break-yield.js
Created Aug 28, 2019
async-iterator-break-yield.js
View async-iterator-break-yield.js
async function* f() {
try {
yield Promise.resolve(1)
yield Promise.resolve(2)
yield Promise.resolve(3)
} finally {
console.log('inside finally')
// yield Promise.resolve(4)
console.log('about to reject from finally')
yield new Promise((res, rej) => {
@Fishrock123
Fishrock123 / iterator-break-yield.js
Created Aug 28, 2019
breaking an iteratable with yields in finally
View iterator-break-yield.js
function* f() {
try {
yield 1
yield 2
yield 3
} finally {
yield 4
yield 5
}
}
@Fishrock123
Fishrock123 / patch.profile
Created Sep 17, 2018
Node.js --prof of https://github.com/nodejs/node/pull/22842 @ 3fdbbb02caf5b6038e56f687aaf4089c1db096a6 for benchmark/timers/timers-timeout-pooled.js n=10000000
View patch.profile
Statistical profiling result from isolate-2-patch-v8.log, (6806 ticks, 37 unaccounted, 0 excluded).
[Shared libraries]:
ticks total nonlib name
10 0.1% /usr/lib/system/libsystem_pthread.dylib
3 0.0% /usr/lib/libc++abi.dylib
1 0.0% /usr/lib/system/libsystem_platform.dylib
[JavaScript]:
ticks total nonlib name
@Fishrock123
Fishrock123 / master.profile
Created Sep 17, 2018
Node.js --prof of master @ ab5f789e3f3f726702b86bc7b9661895780d4d12 for benchmark/timers/timers-timeout-pooled.js n=10000000
View master.profile
Statistical profiling result from isolate-1-master-v8.log, (5687 ticks, 37 unaccounted, 0 excluded).
[Shared libraries]:
ticks total nonlib name
8 0.1% /usr/lib/system/libsystem_pthread.dylib
5 0.1% /usr/lib/system/libsystem_malloc.dylib
3 0.1% /usr/lib/libc++abi.dylib
[JavaScript]:
ticks total nonlib name
@Fishrock123
Fishrock123 / readme.md
Last active May 7, 2018
unswallowable thenable
View readme.md

an unswallowable thenable

i presently make no claims that this is actually a good idea

WARNING: may not work correctly with async functions

@Fishrock123
Fishrock123 / interval.dprof.json
Created Sep 18, 2016
intervals and async_hooks
View interval.dprof.json
{
"total": 693297661,
"version": "0.15.1",
"root": {
"name": "root",
"uid": 1,
"init": 0,
"destroy": 6419742,
"before": [
0
View err.log
src/inventory.rs:30:9: 48:10 error: type mismatch resolving `<core::slice::IterMut<'_, inventory::Slot<T>> as core::iter::Iterator>::Item == inventory::Slot<_>`:
expected &-ptr,
found enum `inventory::Slot` [E0271]
src/inventory.rs:30 for slot in self.slots.iter_mut() {
src/inventory.rs:31 if let Slot::Some(other, stackSize) = slot {
src/inventory.rs:32 if itemType != other.itemType() { continue; }
src/inventory.rs:33
src/inventory.rs:34 let remainder = other.maxStackSize() - stackSize;
src/inventory.rs:35 if remainder >= sum {
...
You can’t perform that action at this time.