yosh

@yoshuawuyts

Software researcher. he/they

Berlin, UTC+2
Vrijeme pridruživanja: svibanj 2009.

Tweetovi

Blokirali ste korisnika/cu @yoshuawuyts

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @yoshuawuyts

  1. Prikvačeni tweet
    23. pro 2019.

    New post: Streams Concurrency In this post we talk about concurrency, apply it to streams, and explore future directions. Illustrated by .

    A graph representing the fan-out / fan-in pattern. Elegant black spheres on a white background, tied together by thin lines.
    Prikaži ovu nit
    Poništi
  2. prije 2 minute

    Oh wow, wasm-bindgen-test is able to run futures directly from their test: This is really nice!

    Poništi
  3. prije 7 sati

    Rust's traits are pretty great in comparison. Bit more boilerplate usually, but that seems solvable.

    Prikaži ovu nit
    Poništi
  4. prije 7 sati

    Another notable mention goes to well-known prototype names such as toString and toJSON that dictate how a value is stringified/serialized respectively. Also the details of how prototype chains can be configured through Object.assign are something special.

    Prikaži ovu nit
    Poništi
  5. prije 7 sati

    Showed the 6 or so ways to do inheritance in JavaScript w/o traits, and his look of disbelief was priceless. For reference: prototypes, class extends, util inherits (multi inheritance), object initializers ({read} in streams), Symbols (e.g. iterators), methods (then).

    Prikaži ovu nit
    Poništi
  6. prije 11 sati

    Gathering feedback always makes me very happy. Got some really good pointers on this post already.

    Prikaži ovu nit
    Poništi
  7. prije 11 sati

    Had to force myself to write today. The downside: the result isn't very good. The upside: I can now play editor to my own work and start the process of gathering feedback, reorganizing, and redrafting.

    Prikaži ovu nit
    Poništi
  8. proslijedio/la je Tweet
    prije 23 sata

    We're slowly but surely making progress towards no_std support for async-std! We just merged 's patch set introducing a new "alloc" feature flag. Coming to you in async-std 1.6.0.

    Poništi
  9. proslijedio/la je Tweet
    4. velj

    WebSocketStreamなんてあるんだ / “WebSocketStream Design doc - Google ドキュメント”

    Poništi
  10. 3. velj

    Also in case you're wondering what goes into a browser framework; here's a talk I gave in 2017 about how to build one: What I'm doing now is mostly a Rust port of the same design. Though it takes more than 30 mins b/c I have to build things from scratch.

    Prikaži ovu nit
    Poništi
  11. 3. velj

    BUT that's about it at least for now. I owe it to a lot of people to publish another batch of work first this week, so uhhh. First things first.

    Prikaži ovu nit
    Poništi
  12. 3. velj

    Okay, think I have like 40% of a framework done now. The other 40 is probably just going to be Dodrio (), broadcaster, and some glue to tie it together. Also heck, I can probably toss in logging and fetch for good measure lol. Built that already anyway.

    Prikaži ovu nit
    Poništi
  13. 3. velj

    I never ended up finishing my 2018 post on the browser's history API, but oh wow is it coming in useful today. The History API: it's a stack.

    Poništi
  14. 3. velj

    Choo choo y'all.

    Prikaži ovu nit
    Poništi
  15. 3. velj

    So if I had to guess, a first version of a browser framework in WASM would be about a week's work? Think I know how to do it now.

    Prikaži ovu nit
    Poništi
  16. proslijedio/la je Tweet
    3. velj

    Just watched talk on rio/sled/io_uring at Fosdem, and it's great. I learned something on the rust side, but I'd recommend it even if you're just curious about what io_uring is and can help you with. Video in the link below.

    Poništi
  17. 3. velj

    Oh cool, my PR that enables Clap to generate man pages has been merged after filing it a year ago. Exciting!

    Poništi
  18. proslijedio/la je Tweet
    3. velj

    async-std v1.5.0 has been released! ⬩ stream::pending ⬩ impl Clone for TcpStream ⬩ impl Clone for DirEntry ⬩ improved TCP performance ⬩ improved block_on performance Changelog:

    Poništi
  19. proslijedio/la je Tweet
    3. velj

    Changelog #10: A bunch of perf and stability improvements, especially around `cargo check` and chalk integration!

    Poništi
  20. 3. velj

    The end-user API is really nice as well. Rust on the left, JS on the right:

        use document_ready::ready;    

    ready().await;
    // => DOM is ready
        var ready = require('document-ready')    

    ready(function () {
      // => DOM is ready
    })
    Prikaži ovu nit
    Poništi
  21. 3. velj

    Wrote a quick refresh of the document-ready crate. Using `gloo-event` + `std::future` has made the implementation really easy! Code adapted from 's JS module; if you squint a bit, the code looks very similar!

    use futures_channel::oneshot::channel;
use gloo_events::EventListener;
use std::time::Duration;

/// Wait for the DOM to be loaded.
pub async fn ready() {
    let document = web_sys::window()
        .expect("Window not found")
        .document()
        .unwrap();

    match document.ready_state().as_str() {
        "complete" | "interactive" => {
            futures_timer::Delay::new(Duration::from_secs(0)).await;
    'use strict'

module.exports = ready

function ready (callback) {
  if (typeof document === 'undefined') {
    throw new Error('document-ready only runs in the browser')
  }
  var state = document.readyState
  if (state === 'complete' || state === 'interactive') {
    return setTimeout(callback, 0)
  }

  document.addEventListener('DOMContentLoaded', function onLoad () {
    callback()
  })
}
    Prikaži ovu nit
    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·