profile
viewpoint

starteddenoland/deno

started time in 30 minutes

starteddenoland/deno_std

started time in 2 hours

fork maxaqq/deno

A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio

https://deno.land/

fork in 3 hours

starteddenoland/deno

started time in 3 hours

starteddenoland/deno

started time in 4 hours

starteddenoland/deno

started time in 7 hours

pull request commentdenoland/registry

Directory listing

The tests should work if you upload a GitHub token into Travis as the GH_TOKEN environment variable.

j-f1

comment created time in 9 hours

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha 199f3e13d58caebc612205f08e89721cc758120a

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 9 hours

push eventdenoland/deno

Ryan Dahl

commit sha 2235dd795d3cc6c24ff1bdd1bbdcd110b4b0bdfc

Revert json ops (#2814) * Revert "port more ops to JSON (#2809)" This reverts commit 137f33733d365026903d40e7cde6e34ac6c36dcf. * Revert "port ops to JSON: compiler, errors, fetch, files (#2804)" This reverts commit 79f82cf10ed1dbf91346994250d7311a4d74377a. * Revert "Port rest of os ops to JSON (#2802)" This reverts commit 5b2baa5c990fbeae747e952c5dcd7a5369e950b1.

view details

push time in 9 hours

PR merged denoland/deno

Revert json ops

We're experiencing odd benchmarks and errors as a result of the recent ops moving to JSON. They're odd because node and hyper benchmarks are being negatively effected along with deno.

It's disconcerting that the errors below did not cause the tests to fail.

Errors are seen during the benchmarks:

Compile file:///home/travis/build/denoland/deno/tools/deno_tcp.ts
Listening on 127.0.0.1:4544
Listening on 127.0.0.1:4545
error: Uncaught RangeError: start offset of Int32Array should be a multiple of 4
► js/dispatch_minimal.ts:44:17
    at asyncMsgFromRust (js/dispatch_minimal.ts:44:17)
    at asyncMsgFromRust$3 (js/dispatch.ts:57:7)
    at handleAsyncMsgFromRust (shared_queue.js:171:9)
Compile file:///home/travis/build/denoland/deno/js/deps/https/deno.land/std/http/http_bench.ts
http://127.0.0.1:4546/
Listening on http://127.0.0.1:4548
Compile file:///home/travis/build/denoland/deno/tools/deno_http_proxy.ts
Proxy listening on http://127.0.0.1:4547/
error: Uncaught RangeError: start offset of Int32Array should be a multiple of 4
► js/dispatch_minimal.ts:44:17
    at asyncMsgFromRust (js/dispatch_minimal.ts:44:17)
    at asyncMsgFromRust$3 (js/dispatch.ts:57:7)
    at handleAsyncMsgFromRust (shared_queue.js:171:9)
Listening on http://127.0.0.1:4550
Compile file:///home/travis/build/denoland/deno/tools/deno_tcp_proxy.ts
Proxy listening on http://127.0.0.1:4549/
single-thread
http_bench.js start
listening http://127.0.0.1:4544/ rid = 3
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)

cc @bartlomieju

+1978 -1055

0 comment

45 changed files

ry

pr closed time in 9 hours

PR opened denoland/deno

Revert json ops

We're experiencing odd benchmarks and errors as a result of the recent ops moving to JSON. They're odd because node and hyper benchmarks are being negatively effected along with deno.

Errors are seen during the benchmarks:

Compile file:///home/travis/build/denoland/deno/tools/deno_tcp.ts
Listening on 127.0.0.1:4544
Listening on 127.0.0.1:4545
error: Uncaught RangeError: start offset of Int32Array should be a multiple of 4
► js/dispatch_minimal.ts:44:17
    at asyncMsgFromRust (js/dispatch_minimal.ts:44:17)
    at asyncMsgFromRust$3 (js/dispatch.ts:57:7)
    at handleAsyncMsgFromRust (shared_queue.js:171:9)
Compile file:///home/travis/build/denoland/deno/js/deps/https/deno.land/std/http/http_bench.ts
http://127.0.0.1:4546/
Listening on http://127.0.0.1:4548
Compile file:///home/travis/build/denoland/deno/tools/deno_http_proxy.ts
Proxy listening on http://127.0.0.1:4547/
error: Uncaught RangeError: start offset of Int32Array should be a multiple of 4
► js/dispatch_minimal.ts:44:17
    at asyncMsgFromRust (js/dispatch_minimal.ts:44:17)
    at asyncMsgFromRust$3 (js/dispatch.ts:57:7)
    at handleAsyncMsgFromRust (shared_queue.js:171:9)
Listening on http://127.0.0.1:4550
Compile file:///home/travis/build/denoland/deno/tools/deno_tcp_proxy.ts
Proxy listening on http://127.0.0.1:4549/
single-thread
http_bench.js start
listening http://127.0.0.1:4544/ rid = 3
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
unexpected err Connection reset by peer (os error 104)
+1978 -1055

0 comment

45 changed files

pr created time in 10 hours

starteddenoland/deno

started time in 11 hours

push eventdenoland/deno_std

Ryan Dahl

commit sha 28e77389ff409814c9da81d767458b36534f095a

Move colors to fmt (#571)

view details

push time in 12 hours

PR merged denoland/deno_std

Move colors to fmt
+22 -41

0 comment

12 changed files

ry

pr closed time in 12 hours

PR closed denoland/deno

Json ops metrics

ref #2801

depends on #2799

+376 -317

5 comments

19 changed files

romainPrignon

pr closed time in 13 hours

pull request commentdenoland/deno

Json ops metrics

you're right, thanks I'll close this one

romainPrignon

comment created time in 13 hours

pull request commentdenoland/deno

Json ops metrics

@romainPrignon I think @bartlomieju went ahead and done this in #2809.

romainPrignon

comment created time in 13 hours

pull request commentdenoland/deno

Json ops metrics

yes ! I'll do it soon

romainPrignon

comment created time in 13 hours

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha fc4d19fa7643e57fa2aa5ed1dec779f744efd733

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 13 hours

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha 7e9638646bbc80da722fefaf85911467da90eb9e

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 14 hours

push eventdenoland/deno

Trivikram Kamat

commit sha bdc0a13261deaa3748f51d9948b4e7b92864c324

doc: add CONTRIBUTING.md (#2813) Similar to React's CONTRIBUTING.md https://github.com/facebook/react/blob/master/CONTRIBUTING.md

view details

push time in 14 hours

PR merged denoland/deno

doc: add CONTRIBUTING.md

Similar to React's CONTRIBUTING.md https://github.com/facebook/react/blob/master/CONTRIBUTING.md

+5 -0

1 comment

1 changed file

trivikr

pr closed time in 14 hours

pull request commentdenoland/deno

port ops to JSON (fs)

@ry rebased on top of master. I'm gonna skip fine-trim of msg.fbs for now, once op_read and op_write use minimal dispatch for sync ops whole file can be deleted

bartlomieju

comment created time in 14 hours

push eventdenoland/deno

Bartek Iwańczuk

commit sha 137f33733d365026903d40e7cde6e34ac6c36dcf

port more ops to JSON (#2809)

view details

push time in 14 hours

PR merged denoland/deno

port ops to JSON (list insde)
  • [x] metrics.rs
  • [x] net.ts
  • [x] performance.rs
  • [x] permissions.rs
  • [x] process.rs
  • [x] random.rs
  • [x] repl.rs
  • [x] resources.rs
  • [x] timers.rs
  • [x] workers.rs
+648 -1155

3 comments

26 changed files

bartlomieju

pr closed time in 14 hours

pull request commentdenoland/deno

doc: add CONTRIBUTING.md

Ref https://github.com/denoland/deno/commits/master/.github/CONTRIBUTING.md I guess it was purposefully moved to the manual, but a link here wouldn't hurt.

trivikr

comment created time in 15 hours

starteddenoland/deno

started time in 15 hours

PR opened denoland/deno

doc: add CONTRIBUTING.md

Similar to React's CONTRIBUTING.md https://github.com/facebook/react/blob/master/CONTRIBUTING.md

+5 -0

0 comment

1 changed file

pr created time in 15 hours

fork trivikr/deno

A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio

https://deno.land/

fork in 15 hours

Pull request review commentdenoland/deno

port ops to JSON (list insde)

 // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.-use super::dispatch_flatbuffers::serialize_response;-use super::utils::blocking;-use super::utils::ok_buf;-use super::utils::CliOpResult;-use crate::msg;+use super::dispatch_json::{blocking_json, Deserialize, JsonOp, Value}; use crate::repl; use crate::resources; use crate::state::ThreadSafeState; use deno::*;-use flatbuffers::FlatBufferBuilder;++#[derive(Deserialize)]+#[serde(rename_all = "camelCase")]+struct ReplStartArgs {+  history_file: String,+}  pub fn op_repl_start(   state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_start().unwrap();-  let cmd_id = base.cmd_id();-  let history_file = String::from(inner.history_file().unwrap());+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplStartArgs = serde_json::from_value(args)?; -  debug!("op_repl_start {}", history_file);-  let history_path = repl::history_path(&state.dir, &history_file);+  debug!("op_repl_start {}", args.history_file);+  let history_path = repl::history_path(&state.dir, &args.history_file);   let repl = repl::Repl::new(history_path);   let resource = resources::add_repl(repl); -  let builder = &mut FlatBufferBuilder::new();-  let inner = msg::ReplStartRes::create(-    builder,-    &msg::ReplStartResArgs { rid: resource.rid },-  );-  ok_buf(serialize_response(-    cmd_id,-    builder,-    msg::BaseArgs {-      inner: Some(inner.as_union_value()),-      inner_type: msg::Any::ReplStartRes,-      ..Default::default()-    },-  ))+  Ok(JsonOp::Sync(json!(resource.rid)))+}++#[derive(Deserialize)]+struct ReplReadlineArgs {+  rid: i32,+  prompt: String, }  pub fn op_repl_readline(   _state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_readline().unwrap();-  let cmd_id = base.cmd_id();-  let rid = inner.rid();-  let prompt = inner.prompt().unwrap().to_owned();+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplReadlineArgs = serde_json::from_value(args)?;+  let rid = args.rid;+  let prompt = args.prompt;   debug!("op_repl_readline {} {}", rid, prompt); -  blocking(base.sync(), move || {-    let repl = resources::get_repl(rid)?;+  // TODO(bartlomieju): this is a sync operation, why is it async in repl.ts?

Done

bartlomieju

comment created time in 16 hours

Pull request review commentdenoland/deno

port ops to JSON (list insde)

 // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.-use super::dispatch_flatbuffers::serialize_response;-use super::utils::blocking;-use super::utils::ok_buf;-use super::utils::CliOpResult;-use crate::msg;+use super::dispatch_json::{blocking_json, Deserialize, JsonOp, Value}; use crate::repl; use crate::resources; use crate::state::ThreadSafeState; use deno::*;-use flatbuffers::FlatBufferBuilder;++#[derive(Deserialize)]+#[serde(rename_all = "camelCase")]+struct ReplStartArgs {+  history_file: String,+}  pub fn op_repl_start(   state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_start().unwrap();-  let cmd_id = base.cmd_id();-  let history_file = String::from(inner.history_file().unwrap());+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplStartArgs = serde_json::from_value(args)?; -  debug!("op_repl_start {}", history_file);-  let history_path = repl::history_path(&state.dir, &history_file);+  debug!("op_repl_start {}", args.history_file);+  let history_path = repl::history_path(&state.dir, &args.history_file);   let repl = repl::Repl::new(history_path);   let resource = resources::add_repl(repl); -  let builder = &mut FlatBufferBuilder::new();-  let inner = msg::ReplStartRes::create(-    builder,-    &msg::ReplStartResArgs { rid: resource.rid },-  );-  ok_buf(serialize_response(-    cmd_id,-    builder,-    msg::BaseArgs {-      inner: Some(inner.as_union_value()),-      inner_type: msg::Any::ReplStartRes,-      ..Default::default()-    },-  ))+  Ok(JsonOp::Sync(json!(resource.rid)))+}++#[derive(Deserialize)]+struct ReplReadlineArgs {+  rid: i32,+  prompt: String, }  pub fn op_repl_readline(   _state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_readline().unwrap();-  let cmd_id = base.cmd_id();-  let rid = inner.rid();-  let prompt = inner.prompt().unwrap().to_owned();+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplReadlineArgs = serde_json::from_value(args)?;+  let rid = args.rid;+  let prompt = args.prompt;   debug!("op_repl_readline {} {}", rid, prompt); -  blocking(base.sync(), move || {-    let repl = resources::get_repl(rid)?;+  // TODO(bartlomieju): this is a sync operation, why is it async in repl.ts?

Yes please

bartlomieju

comment created time in 16 hours

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha 33c74f358238be37cc6c3d9865640fdb5dc33d87

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 16 hours

Pull request review commentdenoland/deno

port ops to JSON (list insde)

 // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.-use super::dispatch_flatbuffers::serialize_response;-use super::utils::blocking;-use super::utils::ok_buf;-use super::utils::CliOpResult;-use crate::msg;+use super::dispatch_json::{blocking_json, Deserialize, JsonOp, Value}; use crate::repl; use crate::resources; use crate::state::ThreadSafeState; use deno::*;-use flatbuffers::FlatBufferBuilder;++#[derive(Deserialize)]+#[serde(rename_all = "camelCase")]+struct ReplStartArgs {+  history_file: String,+}  pub fn op_repl_start(   state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_start().unwrap();-  let cmd_id = base.cmd_id();-  let history_file = String::from(inner.history_file().unwrap());+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplStartArgs = serde_json::from_value(args)?; -  debug!("op_repl_start {}", history_file);-  let history_path = repl::history_path(&state.dir, &history_file);+  debug!("op_repl_start {}", args.history_file);+  let history_path = repl::history_path(&state.dir, &args.history_file);   let repl = repl::Repl::new(history_path);   let resource = resources::add_repl(repl); -  let builder = &mut FlatBufferBuilder::new();-  let inner = msg::ReplStartRes::create(-    builder,-    &msg::ReplStartResArgs { rid: resource.rid },-  );-  ok_buf(serialize_response(-    cmd_id,-    builder,-    msg::BaseArgs {-      inner: Some(inner.as_union_value()),-      inner_type: msg::Any::ReplStartRes,-      ..Default::default()-    },-  ))+  Ok(JsonOp::Sync(json!(resource.rid)))+}++#[derive(Deserialize)]+struct ReplReadlineArgs {+  rid: i32,+  prompt: String, }  pub fn op_repl_readline(   _state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_readline().unwrap();-  let cmd_id = base.cmd_id();-  let rid = inner.rid();-  let prompt = inner.prompt().unwrap().to_owned();+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplReadlineArgs = serde_json::from_value(args)?;+  let rid = args.rid;+  let prompt = args.prompt;   debug!("op_repl_readline {} {}", rid, prompt); -  blocking(base.sync(), move || {-    let repl = resources::get_repl(rid)?;+  // TODO(bartlomieju): this is a sync operation, why is it async in repl.ts?

Fair enough, should I rephrase the comment?

bartlomieju

comment created time in 16 hours

Pull request review commentdenoland/deno

port ops to JSON (list insde)

 // Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.-use super::dispatch_flatbuffers::serialize_response;-use super::utils::blocking;-use super::utils::ok_buf;-use super::utils::CliOpResult;-use crate::msg;+use super::dispatch_json::{blocking_json, Deserialize, JsonOp, Value}; use crate::repl; use crate::resources; use crate::state::ThreadSafeState; use deno::*;-use flatbuffers::FlatBufferBuilder;++#[derive(Deserialize)]+#[serde(rename_all = "camelCase")]+struct ReplStartArgs {+  history_file: String,+}  pub fn op_repl_start(   state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_start().unwrap();-  let cmd_id = base.cmd_id();-  let history_file = String::from(inner.history_file().unwrap());+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplStartArgs = serde_json::from_value(args)?; -  debug!("op_repl_start {}", history_file);-  let history_path = repl::history_path(&state.dir, &history_file);+  debug!("op_repl_start {}", args.history_file);+  let history_path = repl::history_path(&state.dir, &args.history_file);   let repl = repl::Repl::new(history_path);   let resource = resources::add_repl(repl); -  let builder = &mut FlatBufferBuilder::new();-  let inner = msg::ReplStartRes::create(-    builder,-    &msg::ReplStartResArgs { rid: resource.rid },-  );-  ok_buf(serialize_response(-    cmd_id,-    builder,-    msg::BaseArgs {-      inner: Some(inner.as_union_value()),-      inner_type: msg::Any::ReplStartRes,-      ..Default::default()-    },-  ))+  Ok(JsonOp::Sync(json!(resource.rid)))+}++#[derive(Deserialize)]+struct ReplReadlineArgs {+  rid: i32,+  prompt: String, }  pub fn op_repl_readline(   _state: &ThreadSafeState,-  base: &msg::Base<'_>,-  data: Option<PinnedBuf>,-) -> CliOpResult {-  assert!(data.is_none());-  let inner = base.inner_as_repl_readline().unwrap();-  let cmd_id = base.cmd_id();-  let rid = inner.rid();-  let prompt = inner.prompt().unwrap().to_owned();+  args: Value,+  _zero_copy: Option<PinnedBuf>,+) -> Result<JsonOp, ErrBox> {+  let args: ReplReadlineArgs = serde_json::from_value(args)?;+  let rid = args.rid;+  let prompt = args.prompt;   debug!("op_repl_readline {} {}", rid, prompt); -  blocking(base.sync(), move || {-    let repl = resources::get_repl(rid)?;+  // TODO(bartlomieju): this is a sync operation, why is it async in repl.ts?

readline could potentially be async...

bartlomieju

comment created time in 16 hours

pull request commentdenoland/deno

port ops to JSON (list insde)

Merged master and ported metrics.rs as well

bartlomieju

comment created time in 16 hours

push eventdenoland/deno

Bartek Iwańczuk

commit sha 79f82cf10ed1dbf91346994250d7311a4d74377a

port ops to JSON: compiler, errors, fetch, files (#2804)

view details

push time in 17 hours

PR merged denoland/deno

port ops to JSON (compiler, errors, fetch, files)

Based on #2802

  • [x] compiler.rs
  • [x] errors.rs
  • [x] fetch.rs
  • [x] files.rs (sans, op_write and op_read)
+322 -639

4 comments

20 changed files

bartlomieju

pr closed time in 17 hours

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha 4eff60bb998b6c605c7585d1b90d9b4cdf196a29

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 17 hours

pull request commentdenoland/deno

port ops to JSON (list insde)

Waiting for #2804

bartlomieju

comment created time in 17 hours

push eventdenoland/deno

Ryan Dahl

commit sha 5b2baa5c990fbeae747e952c5dcd7a5369e950b1

Port rest of os ops to JSON (#2802)

view details

push time in 17 hours

PR merged denoland/deno

Porting ops to json #2
+85 -184

0 comment

7 changed files

ry

pr closed time in 17 hours

PR opened denoland/deno

port ops to JSON (fs)

Based on #2809 (so blocked by it)

+913 -1419

0 comment

33 changed files

pr created time in 18 hours

starteddenoland/deno

started time in 21 hours

starteddenoland/deno

started time in a day

starteddenoland/deno_install

started time in a day

issue commentdenoland/deno

Convert all Flatbuffer ops to JSON

I think I'm gonna go ahead and port remaining ops from fs.rs

ry

comment created time in a day

starteddenoland/deno

started time in a day

pull request commentdenoland/deno

Json ops metrics

@romainPrignon I suggest to start afresh from master - it should be easier than rebasing

romainPrignon

comment created time in a day

starteddenoland/deno

started time in a day

issue commentdenoland/deno

Convert all Flatbuffer ops to JSON

@ry I believe io.rs shouldn't be ported - it already uses minimal dispatch

ry

comment created time in a day

starteddenoland/deno

started time in a day

starteddenoland/deno

started time in a day

pull request commentdenoland/deno

New core example

Performance is lower than http_bench right now, but I think it's because all the connections are being accepted by one worker(same as http_bench).

afinch7

comment created time in a day

issue closeddenoland/deno

How can I make a http client to send request now?

The http std module looks only provide server side function. Is deno support send request now? 🙄

closed time in 2 days

andares

issue commentdenoland/deno

How can I make a http client to send request now?

I got it, thanks very much 😄

andares

comment created time in 2 days

PR opened denoland/deno

New core example

depends on #2785

+2927 -665

0 comment

31 changed files

pr created time in 2 days

issue commentdenoland/deno

How can I make a http client to send request now?

Deno supports Fetch API

andares

comment created time in 2 days

issue openeddenoland/deno

How can I make a http client to send request now?

The http std module looks only provide server side function. Is deno support send request now? 🙄

created time in 2 days

pull request commentdenoland/deno

port ops to JSON (net, random, repl, resources)

@ry ready for review as well 😅 This PR should be landed after #2804 to adjust op ids properly

bartlomieju

comment created time in 2 days

Pull request review commentdenoland/deno

port ops to JSON (compiler, errors, fetch, files)

 export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void {     case OP_READ:       minimal.asyncMsgFromRust(opId, ui8);       break;+    case OP_EXIT:+    case OP_IS_TTY:+    case OP_ENV:+    case OP_EXEC_PATH:     case OP_UTIME:+    case OP_APPLY_SOURCE_MAP:+    case OP_FORMAT_ERROR:+    case OP_CACHE:+    case OP_FETCH_SOURCE_FILE:+    case OP_OPEN:+    case OP_CLOSE:+    case OP_SEEK:+    case OP_FETCH:

Ah, makes sense! Will update

bartlomieju

comment created time in 2 days

Pull request review commentdenoland/deno

port ops to JSON (compiler, errors, fetch, files)

 export class Response implements domTypes.Response {   } } -function msgHttpRequest(-  builder: flatbuffers.Builder,+interface FetchResponse {+  bodyRid: number;+  status: number;+  headers: Array<[string, string]>;+}++async function sendFetchReq(   url: string,-  method: null | string,-  headers: null | domTypes.Headers-): flatbuffers.Offset {-  const methodOffset = !method ? 0 : builder.createString(method);-  let fieldsOffset: flatbuffers.Offset = 0;-  const urlOffset = builder.createString(url);+  method: string | null,+  headers: domTypes.Headers | null,+  body: ArrayBufferView | undefined+): Promise<FetchResponse> {+  const serializedHeaders = [];

Maybe s/serializedHeaders/headerArray/ ?

maybe you can do

let headerArray = Array.from(headers.entries());
bartlomieju

comment created time in 2 days

Pull request review commentdenoland/deno

port ops to JSON (compiler, errors, fetch, files)

 export function asyncMsgFromRust(opId: number, ui8: Uint8Array): void {     case OP_READ:       minimal.asyncMsgFromRust(opId, ui8);       break;+    case OP_EXIT:+    case OP_IS_TTY:+    case OP_ENV:+    case OP_EXEC_PATH:     case OP_UTIME:+    case OP_APPLY_SOURCE_MAP:+    case OP_FORMAT_ERROR:+    case OP_CACHE:+    case OP_FETCH_SOURCE_FILE:+    case OP_OPEN:+    case OP_CLOSE:+    case OP_SEEK:+    case OP_FETCH:

Only put async ops in this list - that will induce an error through the default case below if we unexpectedly get an async response for a sync op.

bartlomieju

comment created time in 2 days

pull request commentdenoland/deno_std

JSDOM port

I'm having trouble running the tests with the big bundle file...

MarkTiedemann

comment created time in 2 days

starteddenoland/deno

started time in 2 days

starteddenoland/deno

started time in 2 days

starteddenoland/deno

started time in 2 days

pull request commentdenoland/deno_std

sprintf implementation / golang fmt.

I like the idea and have thought about it previously, I'm not sure what the implementation would look like. Currenlty, positional params are indicated with:

%[<index>]s

where <index> refers to the index'th paramter. Sematics of the sprintf function already implies that there are a number of different parameters. To reference keys, it becomes necessary to indicate both the parameter passed to sprintf as well as the key or index of the value withing the parameter, i.e:

 %[<index>][<key>]s

or

%[<index>.<key>]s

Alternatively, the <key> based value selection could imply only passing a single parameter.

OR there could be a different formatting function for this entirely.

I'd be super happy to hear your thoughts of what the interface / format string syntax for this could look like, because I can't really think of anything reasonable myself.

What I would like to avoid is changing the semantics of printf entirely, the function should be able to perform "normal" formatting tasks in the way someone acquainted with posix would expect.

a2800276

comment created time in 2 days

starteddenoland/deno

started time in 2 days

pull request commentdenoland/deno

port ops to JSON (compiler, errors, fetch, files)

@ry I rebased this PR on latest master, but it should be landed after #2802 because op ids are incremented from last id used in that PR

bartlomieju

comment created time in 2 days

PR opened denoland/deno

port ops to JSON (net, random, repl, resources)
  • [x] net.ts
  • [ ] random.rs
  • [x] repl.rs
  • [ ] resources.rs
+149 -277

0 comment

8 changed files

pr created time in 2 days

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha d36d93cd38e83962233e9f146985e9572528a74b

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 2 days

push eventdenoland/deno

Ryan Dahl

commit sha bc467b265fbe06ace24f5d9536bd8eb36ae4a601

introduce JSON serialization for ops (#2799) Converts env(), exit(), execPath(), utime() and utimeSync() to use JSON instead of flatbuffers.

view details

push time in 2 days

PR merged denoland/deno

Start porting flatbuffer ops to JSON

ref #2121

depends on #2796

next pr contains some examples of ops that have been ported https://github.com/denoland/deno/pull/2802

+355 -241

0 comment

16 changed files

ry

pr closed time in 2 days

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha 95d688e0dc5951750806d2ac96901966e839b925

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 2 days

PR merged denoland/deno

build: enable 'derive' feature of 'serde' crate

For #2799

+13 -1

0 comment

3 changed files

piscisaureus

pr closed time in 2 days

push eventdenoland/deno

Bert Belder

commit sha 47c216317f8eb5bf277663a732a79f6b07ba79ef

build: enable 'derive' feature of 'serde' crate

view details

push time in 2 days

starteddenoland/deno

started time in 2 days

starteddenoland/deno

started time in 2 days

Pull request review commentdenoland/deno

Start porting flatbuffer ops to JSON

 export function utimeSync(   atime: number | Date,   mtime: number | Date ): void {-  sendSync(...req(filename, atime, mtime));+  sendSync(OP_UTIME, {+    filename,+    atime: toSecondsFromEpoch(atime),

I've added a TODO for this.

ry

comment created time in 2 days

issue commentdenoland/deno

Convert all Flatbuffer ops to JSON

@s-panferov actually the opposite - we found flatbuffers too slow and we don’t yet know the speed of this JSON serialization. We have some ops which are very hot: Deno.read and Deno.write. These we converted to a custom serialization and got some perf increases.

The other ops are not measured in our benchmarks - so we don’t particularly care how fast they are. More important is the ease of implementing and maintaining them. The flatbuffer API is unfortunately very verbose. It also complicated our build at a time when we’re trying to move from gn/ninja to cargo based. So the JSON serialization will help simplify things and not effect the benchmarks.

ry

comment created time in 2 days

issue commentdenoland/deno

Convert all Flatbuffer ops to JSON

Hello @ry, may I ask why do you want to convert everything to JSON? Did you find it faster that flatbuffers?

ry

comment created time in 2 days

Pull request review commentdenoland/deno

Start porting flatbuffer ops to JSON

 export function utimeSync(   atime: number | Date,   mtime: number | Date ): void {-  sendSync(...req(filename, atime, mtime));+  sendSync(OP_UTIME, {+    filename,+    atime: toSecondsFromEpoch(atime),

I also think it’s odd that this op takes seconds instead of something more precise but in this PR I’m only trying to change the serialization, not modify the logical messages or behavior of the ops. So I would prefer to do this later.

ry

comment created time in 2 days

Pull request review commentdenoland/deno

Start porting flatbuffer ops to JSON

 regex = "1.2.1" remove_dir_all = "0.5.2" ring = "~0.14.6" rustyline = "5.0.2"-serde = "1.0.99"+serde = { version = "1.0.99", features = ["derive"] }

#2808

ry

comment created time in 2 days

PR opened denoland/deno

Reviewers
build: enable 'derive' feature of 'serde' crate

For #2799

+13 -1

0 comment

3 changed files

pr created time in 2 days

Pull request review commentdenoland/deno

Start porting flatbuffer ops to JSON

 regex = "1.2.1" remove_dir_all = "0.5.2" ring = "~0.14.6" rustyline = "5.0.2"-serde = "1.0.99"+serde = { version = "1.0.99", features = ["derive"] }

Preferrably do this as a separate PR, so we can keep the cargo an gn builds in sync.

ry

comment created time in 2 days

Pull request review commentdenoland/deno

Start porting flatbuffer ops to JSON

 export function utimeSync(   atime: number | Date,   mtime: number | Date ): void {-  sendSync(...req(filename, atime, mtime));+  sendSync(OP_UTIME, {+    filename,+    atime: toSecondsFromEpoch(atime),

I realize this might not be a regression, but to avoid a future addition of a nanosecond-precision API, maybe split this in a [seconds, nanoseconds] tuple.

ry

comment created time in 2 days

release denoland/deno

v0.16.0

released time in 2 days

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha 207ca66173d5b902e48834be7fedf11b79ddfd3d

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 2 days

push eventdenoland/deno

Deployment Bot (from Travis CI)

commit sha bf4d1f6580ae37f983aaa2b881e6df4e1bcff579

Deploy denoland/deno to github.com/denoland/deno.git:gh-pages

view details

push time in 2 days

created tagdenoland/deno

tagv0.16.0

A secure JavaScript/TypeScript runtime built with V8, Rust, and Tokio

created time in 2 days

push eventdenoland/deno

Ryan Dahl

commit sha 0809b06a3938868f364f1343b0de4d5d9686495d

v0.16.0

view details

push time in 2 days

PR merged denoland/deno

v0.16.0

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+32 -6

0 comment

4 changed files

ry

pr closed time in 2 days

issue closeddenoland/deno

Default install directory for 'deno install'

deno install -h:

...
OPTIONS:
    ...
    -d, --dir <dir>                Installation directory (defaults to $HOME/.deno/bin)
...

Wouldn't it be more intuitive for it to default to $DENO_DIR/bin if it exists?

If someone leaves everything to its default, the installation directory of deno and the installation directory of executables created with deno install will coincide at $HOME/.deno/bin.

In my case, however, I installed deno to /opt/deno and DENO_DIR is set there. Now if I deno install something without -d, it will still be put into $HOME/.deno. It is obviously confusing for this location to exist in my situation. It would be more consistent with the default-only case if the installation directory for deno install defaulted to $DENO_DIR/bin, since DENO_DIR should be known at this time.

closed time in 2 days

nayeemrmn

issue commentdenoland/deno

Default install directory for 'deno install'

The original proposal doesn't make sense anymore. The closest thing would be $DENO_INSTALL/bin but that variable shouldn't be acknowledged here. $HOME/.deno will work in most cases and doesn't seem that bad to me anymore. Closing.

For anyone interested, the problem persists that the default install directory isn't one that is definitely in the PATH.

I think this kind of thing is exactly what $XDG_BIN_HOME is for, given by dirs::executable_dir(): https://github.com/denoland/deno_third_party/blob/ddb37d7734154c3c07e7c14deaf6523a635e52d8/rust_crates/registry/src/github.com-1ecc6299db9ec823/dirs-2.0.2/src/lib.rs#L116-L127 but as you can see there are no equivalents for macOS and Windows :(. Oh well.

@bartlomieju Perhaps dirs::executable_dir() should be in the fallback chain anyway.

nayeemrmn

comment created time in 2 days

push eventdenoland/deno_third_party

Bert Belder

commit sha ad1117a3448408d7c008b680c770c6ea26f07820

Upgrade rust crates

view details

push time in 2 days

PR merged denoland/deno

Upgrade rust crates

<!-- Before submitting a PR read https://deno.land/manual.html#contributing -->

+425 -843

0 comment

7 changed files

piscisaureus

pr closed time in 2 days

push eventdenoland/deno

Bert Belder

commit sha 31aa7c1a5d8a27c720b6255dc3eceda3707b1826

build: support rust crates that generate sources in their build script

view details

Bert Belder

commit sha e0c1ed96e22dc9a94cb5457c8b3eb2f2cd1af831

build: remove per-crate 'treat_warnings_as_errors' gn flag

view details

Bert Belder

commit sha 7a902fed04e23c2be6133024f7ad8fdebb641c60

build: add 'cap_lints' flag for rust crates Using a specialized flag rather than the generic 'args' option makes build_extra/rust/BUILD.gn shorter and more readable.

view details

Bert Belder

commit sha 7f9c6decc8982dc9dec762d6f2cc77c6bdd3f817

third_party: upgrade rust crates

view details

push time in 2 days

Pull request review commentdenoland/deno

Upgrade rust crates

 env["GN_OUT_DIR"] = os.path.abspath(".") assert os.path.isdir(env["GN_OUT_DIR"]) +# Some crates (e.g. 'typenum') generate source files and place them in the+# directory indicated by the 'OUT_DIR' environment variable, which is normally+# set by Cargo. We pre-generate these files and store them in the source repo.+# Therefore, set 'OUT_DIR' so these crates can find their generated sources.

Build.rs gets executed when I run gnargo

Ah ok - got it.

piscisaureus

comment created time in 2 days

issue commentdenoland/deno

Convert all Flatbuffer ops to JSON

I should convert following files tomorrow:

* net.ts
* performance.rs
* permissions.rs
* process.rs
* random.rs
* repl.rs
* resources.rs
* timers.rs
* utils.rs
* workers.rs
ry

comment created time in 2 days

more