Kevin (Kun) "Kassimo" Qian kevinkassimo Prev & Next: @google UCLA → Stanford ksm.sh Looks like an IDIOT. Senior at UCLA. @google Summer Software Engineering Intern 2018 and worked on @ampproject. Contributor to Deno @denoland

startedwasmerio/wapm-cli

started time in 5 hours

issue commentdenoland/deno

feature-request: Expose the same API in node.js

@ry Since I believe most of the issues will be about incompatibilities with Node API instead of proposing new functionalities

WillAvudim

comment created time in 6 hours

Pull request review commentdenolib/awesome-deno

add:module

  > A curated list of awesome things related to [Deno](https://github.com/denoland/deno). -- [Docs](#docs)-    - [Official Docs](#official-docs)-    - [External Docs](#external-docs)-- [Modules](#modules)-- [Tools](#tools)-- [Articles](#articles)-- [Presentations](#presentations)-- [Newsletters](#newsletters)-- [Resources in Other Languages](#resources-in-other-languages)-  - [Chinese](#chinese)-  - [Hebrew](#hebrew)-  - [Japanese](#japanese)-  - [Korean](#korean)+-   [Docs](#docs)

Could you keep the original formatting of entries?

runnerSnail

comment created time in 7 hours

pull request commentdenolib/awesome-deno

add:module

Hi, could you explain what has been changed in this PR, thanks

runnerSnail

comment created time in 18 hours

issue openeddenoland/deno

Implement sendFile()

Essentially http://man7.org/linux/man-pages/man2/sendfile.2.html. Windows seems to also have TransmitFile(). Probably could have an interface

async function sendFile(inRid: number, outRid: number, offset: number, count: number): Promise<number>;

I'm not so sure why Node.js removed this feature in the early days. Is there any special reason that this is not included?

created time in 19 hours

issue commentdenoland/deno

fetch() a local file

@Janpot I don't think so.

Also see the comments below from node-fetch maintainer (also a former Node.js TSC member) with respect to a similar issue:


Much thought have gone into this issue, for sure. I'd like to condense the most important reasons I believe URLs of file scheme should not be implemented in node-fetch. I would of course be thankful if @bitinn or @zkat would like to weigh in and offer their opinions here as well.

1. Accessing the local filesystem eases security breaches.

Take @jimmywarting's (admittedly anecdotal and contrived) use case:

I for once use node-fetch as a proxy, user can request any url they want with my api wouldn't want them to get access to the filesystem...

Really, I cannot believe many people are using node-fetch as a proxy (I might be wrong of course, but IMO there are many much better ways to create a proxy in Node.js). But I find it easy to imagine people who are using a URL from an untrusted source (the network for example) and just plug it into fetch(). In many cases, that practice is fine. It would not be fine if file:///etc/passwd is accessed.

@stevenvachon proposed using an option to allow file URL scheme. That may solve this issue, but see my response below.

2. There is no recognized standards for interpretation of file-scheme URLs.

As outlined in https://github.com/sindresorhus/got/issues/227 filed by @stevenvachon, WHATWG's Fetch Standard offers no discussion of how file URL schemes should be interpreted on different platforms. In fact, in the PR adding documentation for Node.js fs module file URL support, I explicitly recommended documenting how URLs are interpreted on different platforms, precisely because of the competing interpretations.

Now that file URL scheme is supported officially in Node.js, I foresee a de-facto standard being established at least in the Node.js community. But then in less than a month when Node.js 8.0.0 is released, users can use fs.readFile(new URL(fileURL), (err, buf) => { if (err) ... } ) (or any promisified variant), which I consider to be an improvement over fetch(fileURL, { allowFileScheme: true }).then(res => res.buffer()).then(buf => { ... }).catch(err => { ... });.

3. There is no precedent for support of file-scheme URLs in Node.js community.

None of the most popular URL-to-response libraries I can think of in under a minute do not support file-scheme URLs:

  • request with 24M monthly downloads (https://github.com/request/request/issues/2229)
  • got with 5M monthly downloads (https://github.com/sindresorhus/got/issues/227)
  • superagent with 3M monthly downloads
  • then-request with 0.3M monthly downloads

4. Browser fetch() does not support file-scheme URLs.

There are a lot of people who use node-fetch as a server-side polyfill to allow for isomorphic requests. It would be a surprising behavior if node-fetch has the capability to access the file system browsers' fetch() cannot. However, neither Chrome nor Firefox supports fetch() with file-scheme URLs. GitHub's fetch polyfill refuses to do so, also: https://github.com/github/fetch/pull/92#issuecomment-140665932


@matthewadams

NB: I'm @matthewadams, not @matthew-andrews. Sorry for the noise, @matthew-andrews

Oops, apologies. Shouldn't have depended on the autocompletion.

I'm confused by your response. Please see swagger-api/swagger-js#1044 for justification.

What I meant to express is that Swagger should be aware of node-fetch's limitations, and decide if it wants to allow file URLs. I do not see any indication of such a decision made in the linked issue by the maintainers of Swagger, and if I were to design the Swagger API, I would allow both HTTP(S) URLs and a plain file path instead of resorting to file-scheme URLs.

Do you have a pointer for Node.js v8 supporting file:// URLs in fs?

Code was added in https://github.com/nodejs/node/pull/10739. Docs were added in https://github.com/nodejs/node/pull/12670.


@stevenvachon

I don't see why it can't be supported behind an option to enable it.

Adding an option that defaults to true would not change issue 1 above.

If it defaults to false, issues 1 and 4 would indeed be resolved. However I would prefer not to add to the list of non-spec options we have unless absolutely necessary. With the exception of size, the options we have all aim to reimplement browser defaults that users on Node.js may or may not want.

the spec is already broken here: https://github.com/bitinn/node-fetch/blob/master/LIMITS.md

This issue is not an issue of spec-compliance. Even if it is, as the steward of node-fetch, I would exercise my best decision when it comes to following the spec, which according to the reasons I outlined above leads me to the side of "against."


@Klortho

URL stands for Uniform Resource Locator, after all. Tim Berners Lee would be rolling over in his grave. (If he were dead, that is.)

Yes, URL indeed stands for that. But it should come as no surprise that certain applications only support certain URL schemes. And speaking of Tim Berners-Lee, I would like to add a shameless plug to a particular tweet of mine. :smile:

Originally posted by @TimothyGu in https://github.com/bitinn/node-fetch/issues/75#issuecomment-299755555

phil294

comment created time in a day

issue commentdenoland/deno

feature-request: Expose the same API in node.js

I agree that we might want to dedicate another repo instead of deno_std for the node-compat modules, since we are likely to need two different kind of issue trackers

WillAvudim

comment created time in a day

push eventkevinkassimo/ksm.sh

snyk-bot

commit sha 246ff94357a8773f63237c04551c2f7d3a8b5701

fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/npm:braces:20180219

view details

push time in 2 days

create barnchkevinkassimo/ksm.sh

branch : snyk-fix-bhlo6s

created branch time in 2 days

issue commentdenoland/deno_std

BigInt's

@hayd V8 Deno using already comes with BigInt

nivida

comment created time in 2 days

push eventkevinkassimo/deno

Ryan Dahl

commit sha 9831a440ca0f2186c4a1afe981a31dabf6084099

Disable arm test again getting this failure on travis: https://travis-ci.com/denoland/deno/jobs/186518015 $ $CARGO_TARGET_DIR/aarch64-unknown-linux-gnu/release/deno tests/002_hello.ts qemu: Unsupported syscall: 278 qemu: Unsupported syscall: 278 Compiling file:///home/travis/build/denoland/deno/tests/002_hello.ts

view details

Ryan Dahl

commit sha 223a2adbb46cb33e75ffe861ecaff6ff7e6d555e

v0.3.4

view details

Ryan Dahl

commit sha 94405bb61722142e8c4d90bb5f31038fc9aa5f72

Fix clippy errors and upgrade Rust to 1.33.0 in CI (#1945)

view details

Simon Menke

commit sha 93793dc45504fcc7927354c7e4f39d6de406e9d4

core: Allow terminating an Isolate from another thread (#1982)

view details

andy finch

commit sha 1499d57490f2d928e57b21c992e559fc403cad42

Remove dead code (#1983)

view details

Ryan Dahl

commit sha 12753e492f924e32be2a74d94720213f1d5c6b66

Website updates (#1984)

view details

迷渡

commit sha efe9c18b459dbec71b213e8dc87e2e1b02477139

remove `console` constructor (#1985)

view details

Bartek Iwańczuk

commit sha 129eae0265e3bd93c26c272d253ae9cbc6b88991

Handle overflown shared queue (#1992) Fixes #1988

view details

Bernard Lin

commit sha 3cc90d9bcf4be58bf88b433ae410f42fa4ad69c7

Add benchmark for max latency (#1975)

view details

Bartek Iwańczuk

commit sha 5ae78eb1de378f04d0b9d54842bcb898053467d6

Update ts_library_builder (#1920)

view details

Ryan Dahl

commit sha d8714281b40f457420608c7e766fe787609c7afb

Resolve callback moved from Behavior to mod_instantiate() (#1999) This simplifies the Behavior trait and makes it more explicit where the resolve callback is being made. Also s/StartupScript/Script

view details

迷渡

commit sha ed2977d3c0e9ab3295a3bb47b844b2953d608197

Check `Event` constructor params (#1997)

view details

Kitson Kelly

commit sha c43cfedeba5d6ac96e1b1febed8549e750606e3f

namespace reorg: libdeno and DenoCore to Deno.core (#1998)

view details

0xflotus

commit sha d78b4112c65b77dbf1839f06c0776a7e4691fb25

fixed typo (#2001)

view details

Kevin (Kun) "Kassimo" Qian

commit sha 5c4189a3b8aa80e05088a4b01ecd5eccdd1540fb

Do not close file on invalid seek mode (#2004)

view details

ztplz

commit sha 989e86c8de70b75dcb89abf119879b55a80eb008

Fix some typos (#2005)

view details

迷渡

commit sha 8c770c5a90d4c0c48256f17371a5de6604270031

remove `isTrusted`'s setter (#2006)

view details

Ryan Dahl

commit sha d0b6152f11800b0baac1ae68d2eef7bfcea13cb5

Fix error when JS is executed with --recompile (#2007) test case from @afinch7

view details

Bartek Iwańczuk

commit sha 597ee38ef28d040cbf4d629cf3d2bd3e89a70a11

Rewrite readFile and writeFile (#2000) Using open/read/write

view details

ztplz

commit sha 8ac36d8db421864604a835c50a68411b3f69d62a

Fix typo (#2010)

view details

push time in 2 days

startedmmstick/parallel

started time in 3 days

push eventkevinkassimo/denoland.org

Kevin (Kun) "Kassimo" Qian

commit sha f5be3c383ab9c93bbba369f6b185e3a3d089ec6b

Bump version

view details

push time in 3 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha add5d7b8b23a923de86a394a33f41d54ce748f8e

Conditional signal name value mapping

view details

push time in 3 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 758ac6a392c95d34cfb9fb984b730faa7b00207d

Conditional signal name value mapping

view details

push time in 3 days

Pull request review commentdenoland/deno

Add Deno.kill(pid, signo) and process.kill(signo) (Unix only)

 export function run(opt: RunOptions): Process {    return new Process(res); }++export enum Signal {+  SIGHUP = 1,+  SIGINT,+  SIGQUIT,

Currently resorting to

export const Signal = platform.os === "mac" ? MacOSSignal : LinuxSignal;

Using string names also not quite ideal unless we build a similar mapping on the Rust side, since from_str in nix crate assumes mostly linux signal name mappings

kevinkassimo

comment created time in 3 days

Pull request review commentdenoland/deno

Add Deno.kill(pid, signo) and process.kill(signo) (Unix only)

 export function run(opt: RunOptions): Process {    return new Process(res); }++export enum Signal {+  SIGHUP = 1,+  SIGINT,+  SIGQUIT,

Actually I've just realized that certain signal numbers are platform dependent (like 10 is SIGBUS on macOS but SIGUSR1 on Linux). I might also need to check the current platform to decide which set of signals to export.

kevinkassimo

comment created time in 3 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 6a63aba03e0fea6b13aaeecc216d3fc86b07bbdd

Windows

view details

push time in 3 days

push eventkevinkassimo/deno

Ryan Dahl

commit sha f77b112797ffd686958928818a1b6acfdda197fe

Remove dead code js/compiler_test.ts (#2160)

view details

Tomislav Fabeta

commit sha 6cded14bdf313762956d4d5361cfe8115628b535

Issue/2170 (#2175) * Consistency using requiredArguments method Replaced tuple length check in Headers class with requiredArguments method. * Consistency using requiredArguments method Replaced tuple length check in UrlSearchParams class with requiredArguments method. * fmt

view details

Ryan Dahl

commit sha 9dfebbc9496138efbeedc431068f41662c780f3e

Fix eslint warnings (#2151) Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>

view details

Kevin (Kun) Kassimo Qian

commit sha cf4a9e88a087d28a838d90339502653c643927b1

Add Deno.kill(pid, signo) and process.kill(signo)

view details

Kevin (Kun) Kassimo Qian

commit sha 966120399ff9e526ded281f787cbc5754fc494f3

Format

view details

push time in 3 days

PR opened denoland/deno

Add Deno.kill(pid, signo) and process.kill(signo)

Also add a test to verify if process gets killed on close is working fine. If it works, then we might want to close #1494

+197 -3

0 comment

11 changed files

pr created time in 3 days

create barnchkevinkassimo/deno

branch : process/kill

created branch time in 3 days

issue commentdenoland/deno

Function to kill a running process

Hmm I have just tested, it seems that the example @hayd provides is working now with latest release...

hayd

comment created time in 3 days

issue commentdenoland/deno

Function to kill a running process

Sorry... Working on this (seems easy enough to fix)

hayd

comment created time in 3 days

pull request commentdenoland/deno

Make Deno/Deno.core not deletable/writable

@cybor0 The major purposes of this PR is to avoid user messing up with the message passing mechanism of deno. We should probably also freeze these values, but it could be a separate PR and would be great if you want to work on this.

kevinkassimo

comment created time in 4 days

push eventdenolib/awesome-deno

Kevin (Kun) "Kassimo" Qian

commit sha 46b74bccc94b1034be5fc0279a65cfb1b3d68a12

Add `expect` module (#49)

view details

push time in 4 days

PR merged denolib/awesome-deno

Add `expect` module

cc @allain

+1 -0

0 comment

1 changed file

kevinkassimo

pr closed time in 4 days

PR opened denolib/awesome-deno

Add `cac` module

cc @egoist

+1 -0

0 comment

1 changed file

pr created time in 5 days

create barnchdenolib/awesome-deno

branch : kevinkassimo-patch-3

created branch time in 5 days

PR opened denolib/awesome-deno

Add `expect` module

cc @allain

+1 -0

0 comment

1 changed file

pr created time in 5 days

create barnchdenolib/awesome-deno

branch : kevinkassimo-patch-2

created branch time in 5 days

PR opened denolib/awesome-deno

Add JSFest talk
+2 -0

0 comment

1 changed file

pr created time in 5 days

create barnchdenolib/awesome-deno

branch : kevinkassimo-patch-1

created branch time in 5 days

issue commentdenoland/deno

Deno hangs in repl osx

@cllty I happened to also have a macOS machine that has 12 cpus but still cannot reproduce... Could you provide the debug message generated under deno -D?

cllty

comment created time in 5 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 346b22207564088cf1e6d37c5d048e9c593887e8

Move core freeze to os.start()

view details

push time in 5 days

Pull request review commentdenoland/deno

Make Deno/Deno.core not deletable/writable

 import * as deno from "./deno"; import libDts from "gen/cli/lib/lib.deno_runtime.d.ts!string";  export default function denoMain(name?: string): void {+  // Deno.core could ONLY be safely frozen here (not in globals.ts)+  // since shared_queue.js will modify core properties.+  Object.freeze(window.Deno.core);

Actually denoMain() is still called in user-created workers:

https://github.com/denoland/deno/blob/0796a8f2f75005df95ef6115a4bdf6dd66e58dc3/cli/ops.rs#L1878-L1881

but yeah putting it in os.start() sound better since we also call core.setAsyncHandler(handleAsyncMsgFromRust); for core-related initialization.

kevinkassimo

comment created time in 5 days

PR opened denoland/deno

Make Deno/Deno.core not deletable/writable

before:

> Deno = 1
1
panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`', ../../core/isolate.rs:468:7
Abort trap: 6

> delete window.Deno
true
panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`', ../../core/isolate.rs:468:7
Abort trap: 6

> Deno.core.send = 1
1
panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`', ../../core/isolate.rs:468:7
Abort trap: 6

> delete Deno.core.send
true
panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`', ../../core/isolate.rs:468:7
Abort trap: 6

after:

> Deno = 1
1
> delete window.Deno
false
> Deno.core.send = 1
1
> delete Deno.core.send
false
> Deno
{ args, noColor, pid, env, exit, isTTY, execPath, chdir, cwd, File, open, openSync, stdin, stdout, stderr, read, readSync, write, writeSync, seek, seekSync, close, copy, toAsyncIterator, SeekMode, Buffer, readAll, readAllSync, mkdirSync, mkdir, makeTempDirSync, makeTempDir, chmodSync, chmod, removeSync, remove, renameSync, rename, readFileSync, readFile, readDirSync, readDir, copyFileSync, copyFile, readlinkSync, readlink, statSync, lstatSync, stat, lstat, linkSync, link, symlinkSync, symlink, writeFileSync, writeFile, ErrorKind, DenoError, permissions, revokePermission, truncateSync, truncate, connect, dial, listen, metrics, resources, run, Process, inspect, build, platform, version, core, Console, stringifyArgs, DomIterableMixin }
> Deno.core.send
[Function]
>
+67 -2

0 comment

4 changed files

pr created time in 5 days

create barnchkevinkassimo/deno

branch : namespace/immutable

created branch time in 5 days

issue commentdenoland/deno

Different behavior deno vs deno eval

This is due to we have an async function wrapper around the code when doing deno eval (to allow awaits):

https://github.com/denoland/deno/blob/0796a8f2f75005df95ef6115a4bdf6dd66e58dc3/cli/main.rs#L163-L183

I don't think we should fix this. Using non-strict mode in such ways should be discouraged.

The window.Deno assignment problem could be addressed though.

cybor0

comment created time in 5 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 88cae15dc1594e91167d4766b9f6219f0928ecbf

Use unreachable macro

view details

push time in 6 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 2dd48d936c800b2d5764b4d2b063ed4819c8e7df

Readability

view details

push time in 6 days

Pull request review commentdenoland/deno

[REFERENCE FIX] Fix redirects under async load

 impl ModuleInfo {   } } +/// A symbolic module entity.+pub enum SymbolicModule {+  /// This module is an alias to another module.+  /// This is useful such that multiple names could point to+  /// the same underlying module (particularly due to redirects).+  Alias(String),+  /// This module associates with a V8 module by id.+  Mod(deno_mod),+}

Yeah I agree. I currently also cannot think of a corner case that might break this implementation yet...

As to using a cli only mapping, this actually requires some extra machinery: we will also need resolve() to access Loader members, making it no longer a static method (as a load()-only tweak would immediately break on cases like "../a.ts" relative to "https://example.com" (which redirects to "https://github.com/some_repo/index.ts", as "https://github.com/a.ts" makes sense but not "http://a.ts")).

kevinkassimo

comment created time in 6 days

Pull request review commentdenoland/deno

[REFERENCE FIX] Fix redirects under async load

 impl ModuleInfo {   } } +/// A symbolic module entity.+pub enum SymbolicModule {+  /// This module is an alias to another module.+  /// This is useful such that multiple names could point to+  /// the same underlying module (particularly due to redirects).+  Alias(String),+  /// This module associates with a V8 module by id.+  Mod(deno_mod),+}

There is indeed an option to change not a single line in core/module.rs: add some tracking mechanism in cli/worker.rs and modify impl load() to apply a mapping of paths before & after redirect and supply the corresponding code. In that case the fact that source code is served from a different url is transparent to the core... Although I'm not so sure about the cost of implementing this (and we will need to take care of some really weird corner cases)

kevinkassimo

comment created time in 6 days

Pull request review commentdenoland/deno

[DO NOT MERGE] Fix redirects under async load

 impl ModuleInfo {   } } +/// A symbolic module entity.+pub enum SymbolicModule {+  /// This module is an alias to another module.+  /// This is useful such that multiple names could point to+  /// the same underlying module (particularly due to redirects).+  Alias(String),+  /// This module associates with a V8 module by id.+  Mod(deno_mod),+}

Depends on how likely users of the crate would need this feature...

If we were to move the aliasing functionality to cli we might need to make Modules more of a trait so that in cli we can provide our own implementation has provides the feature, as at this moment RecursiveLoad relies directly on the Modules living on the Loader.

I do not really have a full clear understanding on the core crate so my judgment might be wrong (also kind of reluctant to change the code structure too heavily without coordinations).

Anyways, I've just push my code with a test added, and if this does not seem to be the best way to address the issue, it could still serve as a reference about how to potentially fix the problem

kevinkassimo

comment created time in 6 days

push eventkevinkassimo/deno

Bert Belder

commit sha 2719631038918577c66db2558bbba457c8f4cfd9

core/http_bench: support -D flag to enable logging

view details

Bert Belder

commit sha dd595220abed9e4f9dd88e14110eb67f4f5e77be

core: run isolate tests within a task This change is made in preparation for using FuturesUnordered to track futures that are spawned by the isolate. FuturesUnordered sets up notififications for every future that it finds to be not ready when polled, which causes a crash if attempted outside of a task context.

view details

Bert Belder

commit sha 7807afa97274d3b0645d70475fecb37f5dc8ba14

core: make Isolate use FuturesUnordered to track ops Additionally, instead of polling ops in a loop until none of them are ready, the isolate will now yield to the task system after delivering the first batch of completed ops to the javascript side. Although this makes performance a bit worse (about 15% fewer requests/second on the 'deno_core_http_bench' benchmark), we feel that the advantages are worth it: * It resolves the extremely high worst-case latency that we were seeing on deno_core_http_bench, in particular when using the multi-threaded Tokio runtime, which would sometimes exceed a full second. * Before this patch, the implementation of Isolate::poll() had to loop through all sub-futures and poll each one of them, which doesn't scale well as the number of futures managed by the isolate goes up. This could lead to poor performance when e.g. a server is servicing thousands of connected clients.

view details

Ryan Dahl

commit sha 79a974229ad533bc8880a5ce067b4310002c9572

Move deno_core_http_bench into examples dir (#2127)

view details

Bert Belder

commit sha 90c2b10f47ab123f0ea7d71f3eeb3ee9172f7000

Add cli dependency on tokio-rustls

view details

Bert Belder

commit sha 8477daa8b970ae8ef042a5242aee705003b63fc1

Fix clippy warnings

view details

Ryan Dahl

commit sha f20b05af24a5e1308e240f2c9af0fa75eefb131f

benchmarks: fix max_memory and clean up (#2137)

view details

Ryan Dahl

commit sha 1a69df4a051b9407ab341a82d65d4355f77ad16b

Fix flaky tests (#2139)

view details

Ryan Dahl

commit sha f03280ead1bec16b2c0c33fb980e2db7f58a5933

benchmarks: improve syscall and thread count (#2140)

view details

Kevin (Kun) Kassimo Qian

commit sha 1abbc0e499ffa65bb3f46ffba810181e60aea8d4

[DO NOT MERGE] Fix redirects under async load

view details

Kevin (Kun) Kassimo Qian

commit sha 0ae93dbcb656e0cdf154b149c76d2a9d5cec2f59

Improvements and test

view details

push time in 6 days

Pull request review commentdenoland/deno

[DO NOT MERGE] Fix redirects under async load

 impl ModuleInfo {   } } +/// A symbolic module entity.+pub enum SymbolicModule {+  /// This module is an alias to another module.+  /// This is useful such that multiple names could point to+  /// the same underlying module (particularly due to redirects).+  Alias(String),+  /// This module associates with a V8 module by id.+  Mod(deno_mod),+}

(Looks like no body is taking on this... In that case I'll continue working on it such that it does not break deno info in the next week's demo)

Basically multiple names can point to the exactly same compiled module due to redirection headers. Keeping this information as an enum also allows better later inspection. This feature would also be necessary in case we later want to introduce import-maps -- essentially adding more aliasing functionalities

kevinkassimo

comment created time in 6 days

startedbtford/write-good

started time in 7 days

pull request commentdenoland/deno

Use FuturesUnordered to track ops, fix latency issues

Benchmarks impacted by this patch:

Screen Shot 2019-04-16 at 3 35 29 PM Screen Shot 2019-04-16 at 3 35 38 PM

piscisaureus

comment created time in 8 days

PR opened denoland/deno

[DO NOT MERGE] Fix redirects under async load

This PR is a quick patch for redirection problems with async load. (using the aliasing logic I added in a previous fix that got deleted in the async load PR)

No intention to get this merged. Hope someone else can take this change and continue working on it.

+99 -18

0 comment

2 changed files

pr created time in 8 days

create barnchkevinkassimo/deno

branch : module/async_load_redirect_demo

created branch time in 8 days

pull request commentdenoland/deno

Implement async module loading in CLI

@ry #2021 broken after this patch:

$ ./target/release/deno --reload info https://unpkg.com/@google/model-viewer@0.1.2/lib/model-viewer.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/model-viewer.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/animation.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/ar.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/controls.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/environment.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/loading.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/magic-leap.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/features/staging.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/model-viewer-base.js?module
Downloading https://unpkg.com/three@^0.101.0?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/ModelScene.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/SmoothControls.js?module
Downloading https://unpkg.com/lit-element@^2.0.0?module
Downloading https://unpkg.com/lit-element@^2.0.0/lib/updating-element?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/constants.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/template.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/Renderer.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/utils.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/Model.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/StaticShadow.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/ARRenderer.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/TextureUtils.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/WebGLUtils.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/assets/controls-svg.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/assets/view-in-ar-material-svg.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/third_party/three/EquirectangularToCubeGenerator.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/third_party/three/PMREMCubeUVPacker.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/third_party/three/PMREMGenerator.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/third_party/three/RGBELoader.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/EnvironmentMapGenerator.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/Reticle.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/CachingGLTFLoader.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/third_party/three/GLTFLoader.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/three-components/ModelUtils.js?module
Downloading https://unpkg.com/@google/model-viewer@0.1.2/lib/third_party/three/Sky.js?module
Downloading https://unpkg.com/lit-html@^1.0.0?module
Downloading https://unpkg.com/lit-html@^1.0.0/lib/shady-render.js?module
Downloading https://unpkg.com/lib/updating-element.js?module
Downloading https://unpkg.com/lib/decorators.js?module
Downloading https://unpkg.com/lit-html@^1.0.0/lit-html.js?module
Downloading https://unpkg.com/lib/css-tag.js?module
Import 'https://unpkg.com/lib@4.0.2/updating-element.js?module' failed: 404 Not Found
Import 'https://unpkg.com/lib@4.0.2/updating-element.js?module' failed: 404 Not Found
ry

comment created time in 8 days

issue commentdenoland/deno

Deno hangs in Ubuntu

@pietvanzoen Saw something similar to this in the Gitter chatroom days ago. Try search Trying to run deno in a microvm (using alpine with glibc) in the Gitter history, the follow-up comments might be helpful.

pietvanzoen

comment created time in 9 days

push eventkerckhoff/kerckhoff-ui

Kevin (Kun) Kassimo Qian

commit sha d06ea96e6a70eab3408b522420f7a73937ad30ff

Timeline but just UI with no logic SAD

view details

push time in 9 days

create barnchkerckhoff/kerckhoff-ui

branch : kevin/timeline

created branch time in 9 days

issue closedkevinkassimo/denoland.org

Logo outdated

logo is out of date :trollface:

closed time in 9 days

zekth

issue commentkevinkassimo/denoland.org

Logo outdated

Resolved

zekth

comment created time in 9 days

push eventkevinkassimo/denoland.org

Kevin (Kun) Kassimo Qian

commit sha efcfd0424ed83e6350114e638ecaf75ae00bf27a

Bump

view details

push time in 9 days

startedgin-gonic/gin

started time in 11 days

pull request commentdenoland/deno

fix CLI arg for v8 flags

@bartlomieju Great, thank you

bartlomieju

comment created time in 11 days

Pull request review commentdenoland/deno

Add Deno.core.setGCObserver() for callbacks invoked on GC

 void ErrorToJSON(const v8::FunctionCallbackInfo<v8::Value>& args) {   args.GetReturnValue().Set(v8_str(json_string.c_str())); } +class GCObserver {

Seems requires manual setup of a custom EmbedderHeapTracer implementation, and closer to kInternalFields.

Before experimenting with this I actually want to set if the observed is actually GC-ed after a proper use of callback instead of being resurrected. (Though I'm having trouble now with native syntaxes in snapshots to use the %DebugTrackRetainingPath builtin)

kevinkassimo

comment created time in 11 days

Pull request review commentdenoland/deno

Add Deno.core.setGCObserver() for callbacks invoked on GC

 declare interface DenoCore {   evalContext(code: string): [any, EvalErrorInfo | null];    errorToJSON: (e: Error) => string;++  // eslint-disable-next-line @typescript-eslint/no-explicit-any+  setGCObserver: <T>(o: T, callback: (o: T) => void) => T;

@hayd There is no guarantee about when this will be invoked. It is possible that we can force a GC on program exit, for sanity (just like how fds are closed on program exit).

That being said, this is way better than simply leaving program hang forever due to a resource not closed while losing all reference to it. Also I do remember v8 now has some very interesting GC policies.

Node also uses weak callbacks for cleaning up resources e.g. for the vm module

kevinkassimo

comment created time in 11 days

issue openeddenoland/deno

--v8-flags not passing flags to v8

e.g. previously by specifying --expose-gc, a gc function would be exposed. However, under the new flag parser, seems none of the v8 flags are working...

$ deno --v8-flags=--expose-gc
> gc()
<unknown>:1:0
gc()
^
Uncaught ReferenceError: gc is not defined
    at <unknown>:1:1
    at evaluate (js/repl.ts:87:34)
    at replLoop (js/repl.ts:145:13)
>

cc @bartlomieju

created time in 11 days

startedWebAssembly/WASI

started time in 11 days

pull request commentdenoland/deno

Add deno eval command

Just for disambiguation, I believe something like deno run main.ts could also be introduced: for deno <subcommand> <script-name>, if <subcommand> does not match any existing subcommands, treat <subcommand> as <script-name>.

E.g.

  • deno run main.ts: Runs script of name main.ts
  • deno main.ts: Equivalent to deno run main.ts
  • deno eval "console.log('Hi');": evaluate code console.log('Hi');
  • deno run eval: Runs script of name ./eval
  • deno run run: Runs script of name ./run

(Since we have *.headers.json (previously *.mime) files, it is totally valid to have a file namedevalwithout.tsextension but still treated as a TypeScript file due tocontent-type`)

bartlomieju

comment created time in 12 days

pull request commentdenoland/deno

Add Deno.core.setGCObserver() for callbacks invoked on GC

@hayd From my experiment, only by going out of function scope is garbage collector guaranteed to dispose the unreferenced object.

Also from v8 header:

kFinalizer will pass a void* parameter back, but is invoked before the object is actually collected, so it can be resurrected. In the last case, it is not possible to request a second pass callback.

Basically if user really decides to do the "silly" stuff in the callback, the object would not get GC-ed, and the observer would no longer have any effect on this object anymore: we have called Reset on the persistent handles in this structure in the initial weak callback attempt, so this weak callback would no longer be affiliated with the object.

I agree setGCObserver sounds too funny. Probably something like addDropListener? onDrop sounds okay too.

kevinkassimo

comment created time in 12 days

pull request commentdenoland/deno

Add Deno.core.setGCObserver() for callbacks invoked on GC

@ry Er this is just a custom wrapper using WeakCallback... Not very familiar with Node's codebase but I would believe it to be similar to ObjectWrap, but instead of just calling C++ cleanup code on WeakCallback we also try invoke attached JS function. The v8::WeakCallbackType::kFinalizer ensures that the callback would be invoked before object got GC-ed instead of after, which makes calling JS code feasible here...

kevinkassimo

comment created time in 12 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 395471cd56790896abe4e6a2e19a9c32d617057b

Make lsan happy

view details

push time in 12 days

push eventkevinkassimo/deno

Kevin (Kun) Kassimo Qian

commit sha 2fe56f9fd7d6932fd0731f9fbe3ae8d9543e5016

Make lsan happy

view details

push time in 12 days

PR opened denoland/deno

Add Deno.core.setGCObserver() for callbacks invoked on GC

Sample use case (as shown in libdeno tests):

  // Simulating a connection goes out of scope
  // for auto closing.
  let isClosed = false;
  let ID = 12345;
  const fakeClose = id => {
    if (id === ID) {
      isClosed = true;
    }
  };
  class FakeConn {
    constructor(rid) {
      this.rid = rid;
    }
    close() {
      Deno.core.print("Closing fake connection\n");
      fakeClose(this.rid);
    }
  }
  // IIFE. Simply using scope might not work.
  (() => {
    const conn = new FakeConn(12345);
    Deno.core.setGCObserver(conn, c => {
      Deno.core.print("Destroy callback invoked 3\n");
      c.close();
    });
  })();
  // Guarantee GC.
  gc();
  assert(isClosed);
+139 -1

0 comment

6 changed files

pr created time in 12 days

create barnchkevinkassimo/deno

branch : core/gc_observer

created branch time in 12 days

push eventkevinkassimo/ksm.sh

snyk-bot

commit sha 9ac5b5749431f5ced920827c26ff296c43936e91

fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-JQUERY-174006

view details

push time in 13 days

create barnchkevinkassimo/ksm.sh

branch : snyk-fix-4txfcm

created branch time in 13 days

startedcoreutils/coreutils

started time in 14 days

issue openeddenoland/deno

--v8-options not working

--v8-options currently does not do anything.

$ deno --v8-options
>

cc @bartlomieju

created time in 14 days

Pull request review commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+const { run } = Deno;++import { test } from "../testing/mod.ts";+import { assert, assertEquals } from "../testing/asserts.ts";+import { BufReader } from "../io/bufio.ts";+import { TextProtoReader } from "../textproto/mod.ts";++let server;+async function startServer(): Promise<void> {+  server = run({+    args: ["deno", "--A", "http/racing_server.ts"],

Brief experiment reveals 2 problems at this moment with this:

  1. We cannot simply expose the listener and allow users to directly call close on it. Since we do not automatically close connections etc. when the last JS reference is dropped, we have to do some cleanup work.
  2. There are too many panics on the Rust backend that essentially would always trigger panic here and crash the process if we call listener.close() while there is a pending accept.

On the other hand, this feels like a separate issue than the one attempted to be addressed here. Probably we could make it another PR? (after fixes for Rust panics land in deno)

kevinkassimo

comment created time in 14 days

startedjhuangtw-dev/xg2xg

started time in 15 days

startedgoogle/codesearch

started time in 15 days

Pull request review commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+const { run } = Deno;++import { test } from "../testing/mod.ts";+import { assert, assertEquals } from "../testing/asserts.ts";+import { BufReader } from "../io/bufio.ts";+import { TextProtoReader } from "../textproto/mod.ts";++let server;+async function startServer(): Promise<void> {+  server = run({+    args: ["deno", "--A", "http/racing_server.ts"],

Since server returned by serve() is an async iterator of ServerRequests and does not have the rid field. (I could still add it to each request or to the async iterator itself but feels like a hack...)

kevinkassimo

comment created time in 15 days

Pull request review commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+import { serve, ServerRequest } from "./server.ts";++const addr = Deno.args[1] || "127.0.0.1:4501";+const server = serve(addr);++const body = new TextEncoder().encode("Hello 1\n");+const body2 = new TextEncoder().encode("World 2\n");

Added anyways

kevinkassimo

comment created time in 15 days

push eventkevinkassimo/deno_std

Kevin (Kun) Kassimo Qian

commit sha d222b46bfe8e7d376dc42fe6603be2fc6a9c0102

Add huge body test

view details

push time in 15 days

Pull request review commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+const { run } = Deno;++import { test } from "../testing/mod.ts";+import { assert, assertEquals } from "../testing/asserts.ts";+import { BufReader } from "../io/bufio.ts";+import { TextProtoReader } from "../textproto/mod.ts";++let server;+async function startServer(): Promise<void> {+  server = run({+    args: ["deno", "--A", "http/racing_server.ts"],

About using the same process, we do not have the ability to close the HTTP server so the test would not terminate...

kevinkassimo

comment created time in 15 days

push eventkevinkassimo/deno_std

Kevin (Kun) Kassimo Qian

commit sha ce00cde16defcf33c3a9f267ff19ac9a8823d872

Use Deno.dial

view details

push time in 15 days

Pull request review commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+const { run } = Deno;++import { test } from "../testing/mod.ts";+import { assert, assertEquals } from "../testing/asserts.ts";+import { BufReader } from "../io/bufio.ts";+import { TextProtoReader } from "../textproto/mod.ts";++let server;+async function startServer(): Promise<void> {+  server = run({+    args: ["deno", "--A", "http/racing_server.ts"],

Totally forgot about Deno.dial 😂 Updating.

kevinkassimo

comment created time in 15 days

Pull request review commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+import { serve, ServerRequest } from "./server.ts";++const addr = Deno.args[1] || "127.0.0.1:4501";+const server = serve(addr);++const body = new TextEncoder().encode("Hello 1\n");+const body2 = new TextEncoder().encode("World 2\n");

Hmm this would be testing interleaving problem. My test included here would demonstrate reordering problem, which is a subset of the problem we have about pipelining. Should I still add this test?

kevinkassimo

comment created time in 15 days

MemberEvent

pull request commentdenoland/deno_std

Enforce HTTP/1.1 pipeline response order

@zekth Guess I have to blindly try here (I don't have a windows machine)

kevinkassimo

comment created time in 15 days

push eventkevinkassimo/deno_std

Kevin (Kun) Kassimo Qian

commit sha 3f62bdaf84ba4cd4815b8080b64f68f2ba986c7c

Enforce HTTP/1.1 pipeline response order

view details

push time in 15 days

push eventkevinkassimo/deno_std

Kevin (Kun) Kassimo Qian

commit sha 8f3d2bb8deb204c92b2460be8dbd89789b4bb387

Enforce HTTP/1.1 pipeline response order

view details

push time in 15 days

PR opened denoland/deno_std

Enforce HTTP/1.1 pipeline response order
  • Using a Map to track pipelined requests and resolve only when the previous request is responded.
  • Added test (racing_server_test.ts). This test have been confirmed to fail before this patch.

Slight performance impact:

Before:

Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   382.03us  216.38us   6.15ms   94.04%
    Req/Sec    13.63k     1.64k   15.48k    86.14%
  274043 requests in 10.10s, 13.07MB read
Requests/sec:  27133.13
Transfer/sec:      1.29MB

After:

Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   388.00us  176.04us   2.82ms   93.29%
    Req/Sec    13.18k   832.27    14.60k    67.33%
  264768 requests in 10.10s, 12.63MB read
Requests/sec:  26214.26
Transfer/sec:      1.25MB
+191 -6

0 comment

5 changed files

pr created time in 15 days

create barnchkevinkassimo/deno_std

branch : http/pipeline

created branch time in 15 days

issue commentdenoland/deno

Feature Request: Deno.utimes() api

Probably also allow changing just one of the 2 timestamps? (similar to what utimensat does)

axetroy

comment created time in 15 days

startedMicrosoft/frontend-bootcamp

started time in 16 days

create barnchkerckhoff/kerckhoff-ui

branch : kevin/deferred

created branch time in 16 days

issue openeddenoland/deno

formatError would emit confusing error message if source of error holds global builder in REPL

e.g.

> new Worker
Uncaught Error: assert
    at assert (js/util.ts:28:11)
    at createBuilder (js/flatbuffers.ts:24:3)
    at formatError (js/format_error.ts:8:19)
    at evaluate (js/repl.ts:95:30)
    at replLoop (js/repl.ts:145:13)

This failing assert is due to gb.inUse, which means that an error occurred while on the TS side with the global builder still held, that formatError for error formatting in REPL would not be able to use this builder (not yet released. This builder is only released upon actually completing a sendInternal.)

created time in 16 days

startedCraneStation/wasmtime

started time in 16 days

startedjedisct1/wasa

started time in 16 days

startedWebAssemblyOS/wasmos

started time in 16 days

issue openeddenoland/deno

Discussion: using BigInt for certain fs related values

Seeking to polish file system calls to comply better with POSIX spec recently. One thing I noticed is that many values could theoretically exceed Number.MAX_SAFE_INTEGER.

However, we have mostly treated them still as if they are all with values smaller than 2**31-1 (similarly in formats of flatbuffers). There are actually cases where we might get/use value larger than this (e.g. seeking on a file of a few Gigs)

Therefore I'm thinking whether a refactoring that uses BigInt for these values. (We also need to change our flatbuffers table declaration accordingly).

created time in 16 days

Pull request review commentdenoland/deno_std

feat: add remove/removeSync for fs modules

+// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.+// It should have its own interface in case there will be new option field in the future+/* eslint-disable-next-line @typescript-eslint/no-empty-interface */+export interface RemoveOptions extends Deno.RemoveOption {}++/* Removes the named file or directory. alias for `Deno.remove` */+export async function remove(+  path: string,+  options: RemoveOptions = {}+): Promise<void> {+  await Deno.remove(path, options);

I'm mostly okay with the aliasing idea, but still preferring an explicit recursive option...

axetroy

comment created time in 16 days

more