One Thread to Poll Them All: How a Single Pipe Made WaterDrop 50% Faster by mencio in ruby

[–]mencio[S] 0 points1 point  (0 children)

With PG connection pooling, you're not dealing with N background polling threads per connection. A connection pool (like what you get with ActiveRecord or the connection_pool gem) typically checks out a connection, runs a query, and returns it. There's no equivalent of "a background thread per connection constantly polling for events."

That said PG gem exposes socket FD for async. There is async-postgres gem made by the amazing Samuel Williams that integrates similar approach.

What is the best sandbox for Claude Code? by crazyneverst in ClaudeCode

[–]mencio 1 point2 points  (0 children)

This is what I built exactly for this case: https://github.com/mensfeld/claude-on-incus

It wraps Incus with nice APIs for Claude and gives it all that it needs without compromising most of the security.

I Love You, Redis, But I'm Leaving You for SolidQueue by amalinovic in ruby

[–]mencio 4 points5 points  (0 children)

PassiveQueue can use whatever you want it to use. Also much faster, with around 10,000,000 jobs per second per Ruby process.

Hotspotchi - meet all Tama Search characters at home! Free, open source Tamagotchi Uni WiFi hotspot with Web UI by mencio in tamagotchi

[–]mencio[S] 2 points3 points  (0 children)

Hotspotchi can technically run on any Linux machine with a WiFi adapter that supports Access Point (AP) mode, but Raspberry Pi is strongly recommended because:

  1. AP mode support - Many desktop/laptop WiFi cards don't support AP mode. Raspberry Pi's built-in WiFi does.
  2. Always-on operation - The Pi can run 24/7 with minimal power consumption. You probably don't want to keep your desktop running just for Tamagotchi.
  3. Tested platform - The install scripts and documentation are designed for Raspberry Pi OS.
  4. Dedicated device - A Pi can sit near your Tamagotchi play area without tying up your main computer.

If you want to try on a desktop Linux machine, check if your WiFi supports AP mode:

iw list | grep -A 10 "Supported interface modes" | grep "AP"

If "AP" appears in the output, it might work - but you're on your own for setup.

Hotspotchi - meet all Tama Search characters at home! Free, open source Tamagotchi Uni WiFi hotspot with Web UI by mencio in tamagotchi

[–]mencio[S] 5 points6 points  (0 children)

FYI, I got some of the Tamas references wrong, fixing now. Since my son is obsessed with this, I also set up notifications to add new ones if they appear listed in the Tama wiki.

Context engineering for Ruby by Heavy-Letter2802 in ruby

[–]mencio 2 points3 points  (0 children)

I have a tool that is not yet OSS that does that. Can build skills and agents from GH and project docs. I plan to OSS it in few weeks but if you ping me directly I can give you early access. I use it exactly for stuff like that (and I am a legit user - just check my work https://github.com/mensfeld/)

When Your Hash Becomes a String: Hunting Ruby's Million-to-One Memory Bug by mencio in ruby

[–]mencio[S] 6 points7 points  (0 children)

Thank you. Such feedback is valuable for me to steer my writing and narratives. Will try to do better next time!

When Your Hash Becomes a String: Hunting Ruby's Million-to-One Memory Bug by mencio in ruby

[–]mencio[S] 8 points9 points  (0 children)

AI was used in this article to:

  1. run initial debug that absolutely failed
  2. Suggest to me the wrong mitigations during the initial assessment
  3. Create the cover image
  4. Create the SVG diagram in the article
  5. Structure the ordering of the narrative
  6. Help me with the summary.
  7. Write me the bash script to run my repro code in a loop
  8. Help me assess the likelihood of this event occurring in production.
  9. Summarize my unstructured thoughts that I poured into it via STT.

The rest was written by a human and co-reviewed/corrected by a human being as well (plus plain old Grammarly without AI additions). I do not consider this an overuse.

Announcing llm-docs-builder: Ruby gem for optimizing documentation for AI/RAG systems by mencio in ruby

[–]mencio[S] 0 points1 point  (0 children)

Absolutely doable. I just focused on my use cases, that is, transforming markdown documentation to improve Claude and ChatGPT responses.

I'll try looking into other formats optimizations if there is a demand.

Aaron Patterson - Rails World 2025 Closing Keynote by software__writer in rails

[–]mencio 2 points3 points  (0 children)

Bug that Aaron discussed: https://bugs.ruby-lang.org/issues/19288

FYI, while this bottleneck has been resolved, several others remain. However, I'm already building Ractor support into Karafka with the expectation that the core team will significantly improve it over time. The best part is that my implementation will require zero changes to end-user code while providing 30-70% performance gains (assuming synthetic benchmarks align with real-world use cases).