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
Randal L. Schwartz
@RandalSchwartz
Oh, this not Flutter. :)
willladislaw
@willladislaw
tis flutter
Randal L. Schwartz
@RandalSchwartz
ahh, then my build() comment might apply
you should treat build() as if it is being called 60 times per second. It should be fast and idempotent. In practice, there are optimizations.
Rob Halff
@rhalff
@willladislaw is there any specific bloc implementation you are using? Normally the bloc will receive the repository to handle the data and then produces new states which you can handle within your UI code. That way the rendering never has to wait but is only tasked with representing the new state.
willladislaw
@willladislaw
@rhalff I'm using a simple bloc class for streams and sinks
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);