nowfound

Dev tools · April 3, 2023

GA

Goru, an experimental, Go-inspired concurrency library for Ruby

Hey folks, wanted to show this off and get feedback. Still early/experimental but there are quite a few concepts I'm excited about here. This project came about while writing a program in Go and loving its approach to concurrency. Being a long-time Rubyist I immediately started to think about what similar concepts might look like in Ruby. I set out with two main design constraints: 1. Lightweight: I didn't want routines to be backed by fibers or threads. Having been involved some in the async project (https://github.com/socketry/async), I had some experience using…

What it does

In the maker’s words, at launch

Hey folks, wanted to show this off and get feedback. Still early/experimental but there are quite a few concepts I'm excited about here. This project came about while writing a program in Go and loving its approach to concurrency. Being a long-time Rubyist I immediately started to think about what similar concepts might look like in Ruby. I set out with two main design constraints: 1. Lightweight: I didn't want routines to be backed by fibers or threads. Having been involved some in the async project (https://github.com/socketry/async), I had some experience using fibers for concurrency but was curious if they could be avoided. 2. Explicitness: Routine behavior must be written to describe exactly how it is to behave. I always felt like concurrent code was hard to fully understand because of the indirection involved. On the spectrum between tedium and magical I wanted to err more on the side of tedium with Goru. Goru routines are just blocks that are called once for every tick of the reactor. It is up to the developer to implement behavior in terms of a state machine, where on each tick the routine takes some action and then updates the state of the routine for the next tick. This fulfills both design constraints: 1. Because routines are just blocks, they weigh in at about ~345 bytes of memory overhead. 2. Routine behavior is explicit because it is written as a state machine inside the block. Couple more features worth noting: * Goru includes channels for buffered reading/writing (similar to channels in Go). * Goru ships with primitives for non-blocking IO to easily build things like http servers. Curious your thoughts!

Does the same job

all alternatives →
  • BR
  • AL
    A LRU cache using go generics2022 · github.com · ▲57
  • OA
  • IW
    I wrote a book about using Lambda with Go2021 · ▲103

    Hi HN! During the last few years, I worked on a few applications built with Go, running on AWS Lambda. As I got to know the platform better, I started to find Go & Lambda to be a really productive combination. The applications were fast, and they ended up being much cheaper to run than what my team & I had built before. It’s probably not the best platform for _every_ application, but I was surprised at how much of our workload worked well on it. As we brought new engineers on to our team and helped them get up to speed with the stack, I found that we were covering a lot of the same topics…

  • GV
    GoLang vs. Python: deep dive into the concurrency2018 · made2591.github.io · ▲10
  • GA
    Gochan – A library of channel architectures for Go, inspired by RustMay 2026 · github.com · ▲5

    Hi All, I felt like I was re-inventing the wheel by bolting similar channel architectures onto different Go structs repeatedly so I decided to extract some common types into into one library so that they would be easier to re-use: - oneshot - spsc - spmc - mpsc - mpmc - broadcast - watch The types are inspired by Rust channels so if you're coming from Rust they should feel familiar. So far I'm really enjoying using them but it'd be great to get some external feedback if you have time! https://github.com/amorey/gochan Andres

More dev tools this month

the category →
  • Dograh592

    The open source VAPI alternative

    Dev tools · 25d ago · dograh.com

  • Meridian530

    Don't let your work go unnoticed. Get promoted!

    Dev tools · 20d ago · meridiona.com

  • x1516

    Lovable for iPhone apps go from idea to App Store

    Dev tools · 11d ago · x1.new

  • Open-source GTM skills for technical founders

    Dev tools · 29d ago · gtmcofounder.com

  • OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.

    Dev tools · 1d ago · opentrailpaper.com

  • Nuphos380

    The AI-Native DevOps Workspace.

    Dev tools · 24d ago · nuphos.ai

Launched alongside, April 2023

the whole month →
  • Guidde AI1,478

    Create video documentation instantly with the magic of AI

    AI · 2023 · guidde.com

  • G4

    Hi HN, Today we’re launching GPT-4 answers on Phind.com, a developer-focused search engine that uses generative AI to browse the web and answer technical questions, complete with code examples and detailed explanations. Unlike vanilla GPT-4, Phind feeds in relevant websites and technical documentation, reducing the model’s hallucination and keeping it up-to-date. To use it, simply enable the “Expert” toggle before doing a search. GPT-4 is making a night-and-day difference in terms of answer quality. For a question like “How can I RLHF a LLaMa model”, Phind in Expert mode delivers a…

    AI · 2023 · phind.com

  • Lago1,013

    Open-source alternative to Stripe Billing and Chargebee

    Dev tools · 2023 · getlago.com

  • Fabric696

    Your new home on the internet

    AI · 2023 · fabric.so

  • Chatscout692

    Shopping assistant powered by ChatGPT for e-commerce brands

    AI · 2023

  • Rask AI688

    Say it in any language, AI based, sounds as good as a human

    AI · 2023 · rask.ai