profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/ry/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

denoland/deno 75257

A secure JavaScript and TypeScript runtime

ry/deno 406

ry/deno_typescript 31

To generate snapshots of TypeScript files during build.rs

ry/awesome-deno 17

🎉A curated list of awesome things related to Deno

ry/eecs151 12

http://inst.eecs.berkeley.edu/~eecs151/fa19/

ry/go 10

The Go programming language

ry/parcel 10

📦🚀 Blazing fast, zero configuration web application bundler

issue openeddenoland/doc_website

The `text-blue-500` is not applied to reference-style links

JSDoc in question:

/**
 * [BLAKE2b] hash algorithm implemented in WebAssembly.
 *
 * ```js
 * const message = new TextEncoder().encode("hello")
 * new Blake2b(32)
 *   .update(message)
 *   .digest();
 * // Uint8Array(32) [ 50, 77, 207, ... ]
 * ```
 *
 * [BLAKE2b]: https://www.blake2.net/blake2.pdf
 */

Renders in doc.deno.land without the text-blue-500 class: image

Rendered HTML:

<p><a href="https://www.blake2.net/blake2.pdf">BLAKE2b</a> hash algorithm implemented in WebAssembly.</p>

created time in an hour

issue commentdenoland/deno_lint

Tracking issue for switching to `assert_lint_err!` macro

Should I issue separate PRs for each rule I've refactored or just single PR?

I think either way is fine!

magurotuna

comment created time in 3 hours

Pull request review commentdenoland/deno_lint

(WIP) Switching to assert_lint_err! macro #431

 mod tests {   use super::*;   use crate::test_util::*; -  #[test]-  fn magurotuna() {-    assert_lint_err::<TripleSlashReference>(-      r#"/// <reference path="foo" />"#,-      0,-    );-  }-

Ooops I forgot to remove this test which was just for debugging. Thanks :D

kamchy

comment created time in 3 hours

Pull request review commentdenoland/deno_lint

(WIP) Switching to assert_lint_err! macro #431

 mod tests {    #[test]   fn no_const_assign_invalid() {-    assert_lint_err::<NoConstAssign>("const x = 0; x = 1;", 13);-    assert_lint_err::<NoConstAssign>("const {a: x} = {a: 0}; x = 1;", 23);-    assert_lint_err::<NoConstAssign>("const x = 0; ({x} = {x: 1});", 15);-    assert_lint_err::<NoConstAssign>("const x = 0; ({a: x = 1} = {});", 14);-    assert_lint_err::<NoConstAssign>("const x = 0; x += 1;", 13);-    assert_lint_err::<NoConstAssign>("const x = 0; ++x;", 13);-    assert_lint_err::<NoConstAssign>(-      "const x = 0; function foo() { x = x + 1; }",-      30,-    );-    assert_lint_err::<NoConstAssign>(-      "const x = 0; function foo(a) { x = a; }",-      31,-    );-    assert_lint_err::<NoConstAssign>("for (const i = 0; i < 10; ++i) {}", 26);-    assert_lint_err::<NoConstAssign>(-      "const x = 0; while (true) { x = x + 1; }",-      28,-    );+    assert_lint_err! {+      NoConstAssign,+      r#"const x = 0; x = 1;"#: [+      {+        col:  13,
        col: 13,

Very small nit: extra whitespace here (same for the other test cases)

kamchy

comment created time in 3 hours

push eventdenoland/deno_std

Vincent LE GOFF

commit sha 69183a05261b58870870b48e4191660b49212039

perf(encoding/toml): delete useless replace (#900)

view details

push time in 3 hours

PR merged denoland/deno_std

encoding/TOML: delete useless replace

Deleting double use of string.replace speeding up the parsing.

+15 -10

2 comments

3 changed files

zekth

pr closed time in 3 hours

pull request commentdenoland/deno_std

encoding/TOML: delete useless replace

Tried the benchmark like the below, parsing of a toml which contains 1000-line multiline string literal.

import { parse } from "./encoding/toml.ts";

const toml = "data = '''" + [...Array(1000)].map(() => 'foo').join('\n') + "'''"

const timeStarted = Date.now();
for (const _ of Array(1000)) {
  parse(toml);
}
const timeEnded = Date.now();

console.log(`elapsed time: ${timeEnded - timeStarted}ms`);

520~530ms in main branch, 470~480ms in this branch consistently. I confirmed this is actually an improvement of parsing of large string literals.

zekth

comment created time in 3 hours

issue commentRTimothyEdwards/magic

Recommended way to add Rust/C driver

Sorry for the slow response. Magic already has code that builds it as an extension of Tcl and another code set that embeds a scheme interpreter (and presumably for Rust you would want do disable both of those). Both of those change the entire command binding from magic's control to an interpreter's control, and then all of magic's commands get reimplemented in the interpreter. Check the difference between TxDispatch and _tcl_dispatch. TxDispatch is definitely a good target for that. For Tcl/Tk, I have a simple routine that registers every command in magic to a single Tcl routine that calls _tcl_dispatch (see tcltk/tclmagic.c), which in turn calls TxTclDispatch() which is a replacement for the original TxDispatch(). by replacing TxDispatch() with TxTclDispatch(), I'm cutting txGetInteractiveCommand() out of that loop.

I did all this a very long time ago, so the details are definitely a bit fuzzy.

igor-krawczuk

comment created time in 3 hours

issue openeddenoland/deno_website2

525 error

Hi! Website https://deno.land loads very slowly, and then gives the error 525. Снимок экрана от 2021-05-07 09-43-18

but if I use a VPN and go to the site from Hong Kong - everything works well!

created time in 3 hours

issue openeddenoland/deno

std lib stable realease date ?

is there deadline for stable realase std library for deno ? I think the most missing thing in deno ecosys at this moment

created time in 3 hours

issue commentRTimothyEdwards/magic

Website still says that the version 8.2

Yes, I know. . . it's just rather low on my priority list. I guess when somebody bugs me about it, it gets bumped up on the list, so now that you've pointed it out I'm going to have to go do something about it. . .

yurivict

comment created time in 3 hours

pull request commentdenoland/deno_std

feat(node/assert): Add rejects and doesNotReject

@wperron @kt3k Thanks for the review!

uki00a

comment created time in 3 hours

issue commentdenoland/deno

Deno.exit() call in microtask cancels uncaught error

If I run this in the browser, it seems like the handler runs before the error. Don't know if it's just a quirk in the console output of Dev Tools.

Promise.resolve().then(() => {
  console.log(3);
});
console.log(1);
throw new Error('abc');
console.log(2);

// 1
// 3
// Uncaught Error: abc
kt3k

comment created time in 4 hours

push eventdenoland/deno_std

Liam Murphy

commit sha 0611d246786a5a4175eafcab7f92431bc5ecb2a7

fix(node/stream): make `Stream` the default export (#901)

view details

push time in 4 hours

PR merged denoland/deno_std

fix(node/stream): Make `Stream` the default export

In Node, require("stream") returns Stream itself with all the other kinds of streams as properties. This maps to the default export for ESM, so I've changed the default export of stream.ts to be Stream and added all the other streams as properties.

+43 -14

0 comment

3 changed files

Liamolucko

pr closed time in 4 hours

Pull request review commentdenoland/deno_std

fix(node/stream): Make `Stream` the default export

 Deno.test("Readable can be piped through Transform", async () => {   await flushExecution;   await readableExecution; });++Deno.test("The default export is Stream", () => {+  assertStrictEquals(streamDefault, Stream);+});

👍

Liamolucko

comment created time in 4 hours

push eventdenoland/deno_std

Yuki Tanaka

commit sha cbd520963a59ebda3647511ccbc30a796ec141b2

feat(node/assert): add rejects and doesNotReject (#894)

view details

push time in 4 hours

PR merged denoland/deno_std

feat(node/assert): Add rejects and doesNotReject

Closes #872.

Changes

  • Added assert.rejects and assert.doesNotReject
  • Fixed util.inspect to enclose strings in single quotes instead of double quotes
  • Introduced validateThrownError internal function to remove duplication between assert.throws and assert.rejects
  • Introduced gotUnwantedException internal function to remove duplication between assert.doesNotThrow and assert.doesNotReject
  • Enabled test-assert-async.js
  • Fixed ERR_INVALID_ARG_TYPE to properly construct error messages
+754 -179

0 comment

8 changed files

uki00a

pr closed time in 4 hours

issue closeddenoland/deno_std

std/node: assert.rejects is missing

assert.rejects is used in some native node tests.

closed time in 4 hours

uki00a

Pull request review commentdenoland/deno_std

feat(node/assert): Add rejects and doesNotReject

 export class NodeURIError extends NodeErrorAbstraction implements URIError { }  export class ERR_INVALID_ARG_TYPE extends NodeTypeError {-  constructor(a1: string, a2: string | string[], a3: unknown) {+  constructor(name: string, expected: string | string[], actual: unknown) {

This fix is helpful for other node compat implementations! Thanks!

uki00a

comment created time in 4 hours

issue commentdenoland/deno

(std): Unified readme structures

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

timreichen

comment created time in 4 hours

Pull request review commentdenoland/deno_std

feat(node/assert): Add rejects and doesNotReject

 function strict(actual: unknown, message?: string | Error): asserts actual {   assert(actual, message); } +function rejects(+  // deno-lint-ignore no-explicit-any+  asyncFn: Promise<any> | (() => Promise<any>),+  error?: RegExp | Function | Error,+): Promise<void>;++function rejects(+  // deno-lint-ignore no-explicit-any+  asyncFn: Promise<any> | (() => Promise<any>),+  message?: string,+): Promise<void>;++// Intentionally avoid using async/await because test-assert-async.js requires it+function rejects(+  // deno-lint-ignore no-explicit-any+  asyncFn: Promise<any> | (() => Promise<any>),+  error?: RegExp | Function | Error | string,+  message?: string,+): Promise<void> {+  let promise: Promise<void>;+  if (typeof asyncFn === "function") {+    try {+      promise = asyncFn();+    } catch (err) {+      // If `asyncFn` throws an error synchronously, this function returns a rejected promise.+      return Promise.reject(err);+    }++    if (!isValidThenable(promise)) {+      return Promise.reject(+        new ERR_INVALID_RETURN_VALUE(+          "instance of Promise",+          "promiseFn",+          promise,+        ),+      );+    }+  } else if (!isValidThenable(asyncFn)) {+    return Promise.reject(+      new ERR_INVALID_ARG_TYPE("promiseFn", ["function", "Promise"], asyncFn),+    );+  } else {+    promise = asyncFn;+  }++  function onFulfilled(): Promise<void> {+    let message = "Missing expected rejection";+    if (typeof error === "string") {+      message += `: ${error}`;+    } else if (typeof error === "function" && error.prototype !== undefined) {+      message += ` (${error.name}).`;+    } else {+      message += ".";+    }+    return Promise.reject(createAssertionError({+      message,+      operator: "rejects",+      generatedMessage: true,+    }));+  }++  // deno-lint-ignore camelcase+  function rejects_onRejected(e: Error): void { // TODO(uki00a): In order to `test-assert-async.js` pass, intentionally adds `rejects_` as a prefix.

👀 👍

uki00a

comment created time in 4 hours

pull request commentdenoland/deno

feat: align plugin api with Extension

Deno.core.opSync and Deno.core.opAsync should probably be moved out of core to the normal Deno namespace

eliassjogreen

comment created time in 4 hours

started0x4447/0x4447_product_s3_email

started time in 5 hours

issue openedRTimothyEdwards/magic

Website still says that the version 8.2

http://opencircuitdesign.com/magic/

created time in 5 hours

PR opened denoland/deno_lint

(WIP) Switching to assert_lint_err! macro #431

Refactored rules (#431)

  • extracted rule name into CODE constant
  • introduced enum value that displays proper message/hint
  • used assert_lint_err! macro in one-line tests
+312 -105

0 comment

7 changed files

pr created time in 6 hours

issue commentdenoland/deno_lint

Tracking issue for switching to `assert_lint_err!` macro

Thanks for the example. Should I issue separate PRs for each rule I've refactored or just single PR?

magurotuna

comment created time in 6 hours

issue commentdenoland/deno_lint

Tracking issue for switching to `assert_lint_err!` macro

@kamchy thanks! There's not much difference between the rules left - this task is mostly about switching rules from using assert_lint_err::<> and assert_lint_err_n::<> to using assert_lint_err! macro. I think starting with eqeqeq might be good first try. As an example here's how to use assert_lint_err! macro in for_direction rule

magurotuna

comment created time in 6 hours

push eventbetrusted-io/betrusted-soc

bunnie

commit sha fd9fe5c0ae420bd103a4940acc7313dc45a938ca

absorb the i2s fix

view details

push time in 6 hours

issue commentdenoland/deno_lint

Tracking issue for switching to `assert_lint_err!` macro

There are not many rules to refactor left, perhaps I could help here?

magurotuna

comment created time in 7 hours