Skip to content
HomeVideos
AllLongsCategoriesPlaylists
BooksBlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    Modeling Data Concurrency w/ Asynchronous I/O in Zig - RedisConf 2020

    Redis

    3 HN recommenders · recommended in 3 months, 2020–2021

    YouTube

    49:20 · 11K views · Jun 18, 2020

    Zig creator Andrew Kelley's RedisConf 2020 talk on modeling data flow with asynchronous I/O in Zig. It explains how Zig's async/await avoids function coloring, and Loris Cro demonstrates OkRedis, a zero-allocation Redis client.

    HN recommends it as the clearest explanation of how Zig achieves colorless async/await.

    Software Engineering & LanguagesC, C++, Rust, Go & systems languagesProgramming language design
    1. 42:20
      Writing a Wayland Compositor in Zig - Isaac FreundZig SHOWTIME26K views • 6 years ago
    2. 48:46
      Rust's Journey to Async/AwaitInfoQ90K views • 6 years ago
    3. 32:24
      RustLatam 2019 - Without Boats: Zero-Cost Async IORust Programming Language55K views • 7 years ago
    4. 54:14
      Zig: A programming language designed for robustness, optimality, and clarity –  Andrew KelleyRecurse Center75K views • 8 years ago
    5. 1:00:23
      [#36] Zig Roadmap 2024 - Andrew KelleyZig SHOWTIME66K views • 2 years ago
    6. 51:27
      Google I/O 2012 - Go Concurrency PatternsGoogle for Developers894K views • 14 years ago
    7. 59:48
      The Road to Zig 1.0 - Andrew KelleyChariotSolutions168K views • 7 years ago
    8. 2:34:01
      Crust of Rust: async/awaitJon Gjengset246K views • 5 years ago
    9. 46:40
      Andrew Kelley: A Practical Guide to Applying Data Oriented Design (DoD)ChimiChanga416K views • 2 years ago
    10. 3:03:54
      The Why, What, and How of Pinning in RustJon Gjengset87K views • 7 years ago
    11. 52:54
      Rust at speed — building a fast concurrent databaseJon Gjengset225K views • 7 years ago
    12. 1:02:50
      The Language of the System - Rich HickeyClojureTV174K views • 13 years ago
    13. 1:10:05
      Are We There Yet - Rich HickeyZhang Jian24K views • 7 years ago
    14. 43:20
      Zig Roadmap 2023 - Andrew KelleyZig SHOWTIME77K views • 4 years ago
    15. 2:32:39
      Clojure Concurrency - Rich HickeyClojureTV73K views • 13 years ago
    16. 2:12:42
      Build Your Own AsyncDavid Beazley60K views • 7 years ago
    17. 36:18
      "Data Driven UIs, Incrementally" by Yaron MinskyStrange Loop Conference20K views • 8 years ago
    18. 1:14:52
      Effective Programs - 10 Years of Clojure - Rich HickeyClojureTV176K views • 9 years ago
    19. 1:13:53
      Raymond Hettinger, Keynote on Concurrency, PyBay 2017SF Python161K views • 9 years ago
    20. 58:08
      Parallelism, Concurrency, and Asynchrony in Perl 6 / Jonathan Worthingtonyapcasia6K views • 11 years ago

    4 comments from Hacker News

    1. @kbdApr 2021· in “Red and blue functions are a good thing”

      I really can't agree with this premise after seeing how Zig implements color-less async/await: [LINK] I highly recommend watching Andrew Kelley's video (linked in that article) on this topic: this video

      Strongly recommendsView on HN
    2. @jorangreefFeb 2021· in “Comparison of Rust async and Linux thread context switch time and memory use”

      I recently wrote an IO abstraction over io_uring using Zig's async/await. Here's how you would do a write()/fsync()/read() with this ( [LINK] ): const offset: u64 = 0; const bytes_written = try io.write(fd, buffer_write[0..], offset); try io.fsync(fd); const bytes_read = try io.read(fd, buffer_read[0..], offset); Other sync functions can use this asynchronous IO completion code in a synchronous style (as this snippet shows) and still get all the zero-syscall and asynchronous performance of io_uring. What this is actually doing under the hood is filling SQEs into io_uring's submission queue ring buffer and then later reading completion events off io_uring's completion queue ring buffer, so it's fully asynchronous in the I/O sense but this hasn't spilled out and leaked over into the control flow. The control flow is as it should be, nice and simple and synchronous. Beyond this, Zig still allows you to explicitly indicate concurrency with the `async` keyword, for example if you wanted to run multiple async code paths concurrently. But the crucial part is that Zig's async/await does not force function coloring on you to do all of this: this video Pretty incredible on Zig's part to be able to pull this off. Huge kudos to Andrew Kelley. Also, thanks to Jens Axboe and io_uring, what you saw above was first-class single-threaded or thread-per-core, there's no threadpool doing that for you, it's pure ring buffer communication to the kernel and back, no context switches, no expensive coor

      RecommendsView on HN
    3. @bvrmnMay 2020· in “What Color Is Your Function? (2015)”

      There is an interesting approach in Zig to explicitly kick call frames to achieve colorless asyncness. this video

      RecommendsView on HN
    4. @pronMay 2020· in “State of Loom”

      > Code that's meant to be pinned (and may behave incorrectly if not pinned) looks no different from any other code. Same goes for async/await. The decision to keep you running on the same native thread is up to the scheduler. > Java isn't positioned as a high-level, high-abstraction language and that's not, IME, the user community it has. I beg to differ. It aims to be a good compromise between productivity, observability and performance. Every choice, from JIT to GC, is about improving performance for the common case while helping productivity, not improving performance by adding fine-grained control. There are a few cases where this is not possible. Primitives is one of them, and, indeed, 25 years later, we're "expanding" primitives rather than find some automatic way for optimal memory layout. > It's always been advertised as a safer alternative to C++ - rather like Rust. I think you're mistaken, and in any event, this is certainly not our position. Java is designed for a good blend of productivity, observability and performance, and unless the circumstances are unusual, it opts for improving common-case performance with high abstractions rather than worst-case performance with low abstractions like C++/Rust. Roughly speaking, the stance on performance is how do we get to 95% with the least amount of programmer effort. Anyway, regardless of what I said above, the constraints on the design of usermode threads other than philosophy are also very different for Java than for C

      CitesView on HN