frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Servactory – Typed service objects with declarative actions for Ruby

https://github.com/servactory/servactory
3•afuno•1h ago
Ruby's flexibility is great until every developer on the team writes service objects differently. After years of working with Rails codebases where each service had its own structure, error handling, and testing conventions, I built Servactory — a framework that standardizes service objects through a typed, declarative DSL.

The core idea is three separate attribute layers: inputs (what comes in), internals (working state), and outputs (what goes out). Each is a distinct declaration with its own namespace and type checking. Combined with declarative make calls that define action order, the data flow through a service is visible at a glance:

  class Payments::Process < ApplicationService::Base
    input :payment, type: Payment
  
    internal :charge_result, type: Servactory::Result
  
    output :payment, type: Payment
  
    make :validate_status!
    make :perform_request!
    make :handle_response!
    make :assign_payment
  
    private
  
    def validate_status!
      return if inputs.payment.pending?
  
      fail!(
        message: "Payment has already been processed",
        meta: { status: inputs.payment.status }
      )
    end
  
    def perform_request!
      internals.charge_result = Gateway::Charge.call(
        amount: inputs.payment.amount,
        token: inputs.payment.token
      )
    end
  
    def handle_response!
      internals.charge_result
               .on_success { handle_success! }
               .on_failure { handle_failure! }
    end
  
    def handle_success!
      inputs.payment.complete!(internals.charge_result.response.id)
    end
  
    def handle_failure!
      inputs.payment.fail!(internals.charge_result.error.message)
      fail_result!(internals.charge_result)
    end
  
    def assign_payment
      outputs.payment = inputs.payment
    end
  end
What I think makes it worth trying:

- Type safety on all three layers — inputs, internals, and outputs are each type-checked independently - Explicit data flow — the separation into three namespaces (inputs., internals., outputs.*) eliminates "where does this value come from?" confusion - Structured failure handling — fail! with metadata, typed failures, fail_result! for error propagation, on_success/on_failure hooks on the result - Action grouping — stage blocks with wrap_in for transactions, only_if conditions, and rollback handlers - Full ecosystem — custom RuboCop cops, OpenTelemetry instrumentation, RSpec matchers, Rails generators

Supports Ruby 3.2+ and Rails 5.1 through 8.1. 110K+ gem downloads, 138 releases, MIT licensed. I've been using it in production for over two years.

Would love to hear feedback, especially from people who've tried other approaches (Interactor, ActiveInteraction, Trailblazer, or plain POROs).

Docs: https://servactory.com

Show HN: OSS Durable Memory for LLMs

1•Mnexium•1m ago•0 comments

Polymaths

https://www.kakeiho.com/polymaths/
1•erhuve•1m ago•0 comments

Linking Smaller Haskell Binaries

https://brandon.si/code/linking-smaller-haskell-binaries/
1•todsacerdoti•3m ago•0 comments

Amazon service was taken down by AI coding bot

https://www.ft.com/content/00c282de-ed14-4acd-a948-bc8d6bdb339d
1•ceejayoz•3m ago•1 comments

The iOS Weekly Brief – Issue #48

https://iosweeklybrief.com/p/the-ios-weekly-brief-issue-48
1•khambir•4m ago•0 comments

Variable interpolatable smooth curves and outlines

https://thottingal.in/blog/2026/02/20/var-interpolatable-smooth-curves/
1•sthottingal•5m ago•0 comments

Gen AI: Time to Focus on Logic Quality and Not Code Quality

https://balanarayan.com/2026/02/20/gen-ai-time-to-focus-on-logic-quality-and-not-code-quality/
1•speckx•5m ago•0 comments

She Wanted a Quiet House in the Berkshires for About $800k

https://www.nytimes.com/interactive/2026/02/19/realestate/berkshire-mountains-massachusetts-homes...
1•whack•6m ago•0 comments

Child's Play: Tech's new generation and the end of thinking

https://harpers.org/archive/2026/03/childs-play-sam-kriss-ai-startup-roy-lee/
1•ramimac•6m ago•0 comments

Show HN: Natural language search across Kalshi and Polymarket

https://www.attena.xyz/
1•helloiamvu•6m ago•0 comments

Ente Locker

https://ente.io/locker/
1•amanverasia•8m ago•0 comments

Power generation increased by up to 70% when wind were combined with tidal/wave

https://www.surrey.ac.uk/news/power-generation-increased-70-cent-when-wind-turbines-were-combined...
1•JeanKage•9m ago•0 comments

Session-graph – A knowledge graph from your AI coding sessions

https://github.com/robertoshimizu/session-graph
1•rshimizubr•9m ago•1 comments

Where Lisp Fails: At Turning People into Fungible Cogs (2009)

https://www.loper-os.org/?p=69
3•tosh•9m ago•1 comments

Show HN: AstrMap – Unix Philosophy for the AI Era (Ditch the RAG)

https://github.com/hubby247/astrmap
1•hubby247•10m ago•0 comments

Show HN: Focusmo – A macOS focus timer that connects to your existing task apps

1•elesinn•12m ago•0 comments

Composer Laurie Spiegel on the difference between algorithmic music and AI

https://www.theverge.com/report/879819/laurie-spiegel-is-celebrating-40-of-music-mouse-with-a-mod...
1•thm•12m ago•0 comments

US GDP growth falls sharply to 1.4% in fourth quarter

https://www.ft.com/content/93dd6f14-47ec-42e7-9506-46e6d6ad69e2
2•alephnerd•14m ago•0 comments

In NY, major crime complaints fell when cops stopped 'proactive policing' (2017)

https://www.latimes.com/science/sciencenow/la-sci-sn-proactive-policing-crime-20170925-story.html
1•robtherobber•15m ago•0 comments

Moving Away from Cloudflare

https://hacdias.com/2026/02/20/cloudflare/
2•speckx•15m ago•0 comments

The World’s Smallest QR Code

https://www.tuwien.at/en/tu-wien/news/news-articles/news/weltrekord-der-kleinste-qr-code-der-welt
1•geox•15m ago•0 comments

Perplexity's Retreat from Ads Signals a Bigger Strategic Shift

https://www.wired.com/story/perplexity-ads-shift-search-google/
1•herbertl•16m ago•0 comments

Newly discovered virus linked to colorectal cancer

https://www.sdu.dk/en/om-sdu/fakulteterne/sundhedsvidenskab/nyheder-2026/nyopdaget-virus-kobles-t...
3•cachecrab•17m ago•0 comments

Show HN: Normal Map Generator Online

https://normalmapgenerator.art/
1•ethanYIAI•17m ago•0 comments

Show HN: OCD – Open-source Kanban dashboard for monitoring AI coding agents

https://github.com/Keeeeeeeks/opencode-dashboard
3•Keeeeeeeks•20m ago•0 comments

Formula 1 races to screen live in U.S. IMAX theaters

https://www.motorsport.com/f1/news/f1-to-screen-live-in-imax-theatres-in-2026-as-apple-tv-unveils...
2•linhns•21m ago•0 comments

Moebius: Modern ANSI and ASCII Art Editor

https://github.com/blocktronics/moebius
1•themaxdavitt•22m ago•0 comments

Show HN: Iban.link – A memorable link for your IBAN

https://iban.link/
1•oliverjanssen•23m ago•0 comments

Developers Discussed Abandon Office.js – Stability, Security, Trust Crisis

https://github.com/OfficeDev/office-js/issues/6513
1•dphov•23m ago•0 comments

Building an Agent SaaS with Cloudflare Containers

https://alec.is/posts/building-an-agent-saas-with-cloudflare-containers/
2•arm32•24m ago•0 comments