Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 07 18:54
    @timsneath banned @hpoit_gitlab
  • Aug 07 18:54
    @timsneath banned @hpoit
  • Jan 31 22:29

    dart-bot on master

    Add pkg/analysis_server/pubspec… (compare)

  • Jan 31 22:12

    dart-bot on master

    First stab at tests for "Spread… (compare)

  • Jan 31 22:10
    jackokring opened #35830
  • Jan 31 21:14

    dart-bot on master

    [vm, gc] Use work stealing for … (compare)

  • Jan 31 21:05

    dart-bot on master

    [vm] Simplify VirtualMemory::Tr… (compare)

  • Jan 31 20:15
    renatoathaydes opened #35829
  • Jan 31 20:13

    dart-bot on master

    [vm] Maintain view-ness of byte… (compare)

  • Jan 31 19:59

    dart-bot on master

    Add the capability in analysis … (compare)

  • Jan 31 19:35
    jmesserly closed #33685
  • Jan 31 19:19
    srawlins opened #35828
  • Jan 31 18:35

    dart-bot on master

    Add a "summary-deps-output" opt… (compare)

  • Jan 31 18:33

    dart-bot on master

    Extract EnumListParameter value… (compare)

  • Jan 31 18:09

    dart-bot on master

    Fix override_on_non_overriding_… (compare)

  • Jan 31 17:46
    stereotype441 labeled #35827
  • Jan 31 17:46
    stereotype441 labeled #35827
  • Jan 31 17:46
    stereotype441 labeled #35827
  • Jan 31 17:46
    stereotype441 opened #35827
  • Jan 31 17:23
    srawlins edited #35826
Green Appers, Inc.
@GreenAppers
Hm. So now I want to get dart:io WebSocket running over dartssh SSH tunnel.
Seems like it would be possible to use WebSocket.fromUpgradedSocket().
But that would mean I implement dart Socket interface myself, and that I prepare the socket in correct state. Neither of which is a trivial task. It's not clear if I could use dart http to prepare the socket state (e.g. do HTTP get).
Green Appers, Inc.
@GreenAppers
So if anyone has any advice on either side, please let me know.
Ping
@ping996
does the dynamic type parameters in a function will slow the execution when it compiled to AOT mode?
bpilot
@bpilot
@ping996 Seems like a good thing to A/B test.
Ping
@ping996
thanks
bpilot
@bpilot
Sorry I don't have an answer. I'd be interested to hear what the result is though.
Renato Athaydes
@renatoathaydes
Can't Dart compile to code runnable with node.js?
bpilot
@bpilot
@renatoathaydes Hmm, I have it working
Renato Athaydes
@renatoathaydes
What do you do to run the js spilled out by the compilers?
bpilot
@bpilot
I think I had to write some stub code.
Are you using dart2js?
Renato Athaydes
@renatoathaydes
Tried both dart2js and dartdevc
dartdevc generates something like:
define(['dart_sdk'], function(dart_sdk) {
bpilot
@bpilot

This is what I did to get dart2js code to run in Node.js:
I made a JS file which exports these globals:
global.self = global;
self.module = module;
global.window = global;
global.Blob = function () { };
global.Event = function () { };
global.ImageData = function () { };
global.Node = function () { };
global.Window = function () { };

Then I do below that:
require("./mydartjsfile.js");

Renato Athaydes
@renatoathaydes
This is all??
bpilot
@bpilot
I've also got dartdevc running in Node.js before, but it is a but more involved.
Renato Athaydes
@renatoathaydes
I just need any of them to work... it's just to test.
bpilot
@bpilot
I think so. That's from some code I made to run dart2js output in Node
Renato Athaydes
@renatoathaydes
Wow, it worked :D thanks
bpilot
@bpilot
To get dartdevc working in Node, I hard to write a bunch code to recursively load & execute each ddc.js file. Took my like half a day to get it right. :-D
Renato Athaydes
@renatoathaydes
You should publish a builder for this.
bpilot
@bpilot
But dart2js is pretty basic. You just need to declare some globals it's expecting to see in a browser than Node.js lacks. There might be a way to tell Dart2JS to output Node.js-friendly code though.
Renato Athaydes
@renatoathaydes
so people could do pub run build_runner build and it would spit out a nodejs runnable module.
bpilot
@bpilot
Hmm.
Renato Athaydes
@renatoathaydes
or something like webdev build
so you would do dart2node build :)
bpilot
@bpilot
I'm actually hoping they just add the option to dart2js. I don't know why I can't find it because the test runner already supports Node.js.
What is your motivation for using Dart with node.js?
Renato Athaydes
@renatoathaydes
testing GH Actions
they need to be runnable in node
I'm quite surprised Dart compilers don't transpile to node directly.
bpilot
@bpilot
Ah okay. The reason for me was I have a legacy Node.js application which I'm slowly migrating to Dart, so I need the code to be able to execute inside & interop with JS code.
I am too, especially since the test runner does.
Renato Athaydes
@renatoathaydes
exactly
pub run test -p node works
Renato Athaydes
@renatoathaydes
There's already a package for node interop: https://pub.dev/packages/node_interop
and the builder I was saying we should have: https://pub.dev/packages/build_node_compilers
bpilot
@bpilot
Brilliant find!
imerkle
@imerkle
If I want to send list of ints I can do like asTypedList
But I can't figure how to send list of struct in ffi
imerkle
@imerkle
final ptr = allocate<Uint8>(count: size); final externalTypedData = ptr.asTypedList(size);
I want to implement asTypedList for <T>
Flavian Alexandru
@alexflav23
If a version of webdev is added to dev_dependencies in pubspec.yaml does that forces it to be used and auto-downloaded on every machine? Just been through a catastrophic 2.6.0 update and it’s not making a lot of sense that webdev, build_runner and build_compiler are closely knit together without them being versioned tied as well.
I’m not sure if inside the migthy google this is always remotely built via forge/blaze and therefore this kind of coupled setup is largely irrelevant, it’s certainly looking to behave that way
But it’s certainly a bit of a pain point for all plebs that are confined to forever build locally at dev time :)
Nate Bosch
@natebosch

We agree that the version coupling between webdev and build_runner is a problem - we had hoped that by not expressing it as a pub dependency it would give us leeway for a better UX but that hasn't worked out in practice. We don't have any short term plans here but finding a better way to handle versioning is something that we are interested in improving.

I'm a bit confused about what you mean about it being auto-downloaded on every machine. It is true that if we put more stuff into dev_dependencies that everyone who works on the project and does a pub get would download those packages. It doesn't impact anyone who depends on those packages though, so they don't put a download burden on further downstream stuff.

I'm trying to understand your main concern - is it related to having to download all these packages on each host you work on? Or on a continuous integration environment?

Flavian Alexandru
@alexflav23
Yeah basically