Pager 2Page 2 | Kobako Series | Aotokitsuruya is learning Skip to main content

Kobako Series

AotokitsuruyaAotokitsuruya

Kobako: Why Native Filesystem Support

Kobako recently moved to v0.28.0, which reworked the design that used to depend heavily on MessagePack. It’s the first major revision since COSCUP wrapped up in August.

Still, as we head into next year’s (2027) AI applications, what capability is the Ruby ecosystem still missing? I think the answer comes back once again to the “Virtual Filesystem” I talked about with friends at RubyKaigi in Japan this April, so Kobako is about to support it as well.

AotokitsuruyaAotokitsuruya

Kobako: Letting Blocks Pass Through the Sandbox

The Kobako: Handle Mechanism isn’t anything special for projects that support a scripting language, but blocks are a capability unique to Ruby, and it would be a shame if we couldn’t make good use of them inside a sandbox.

But can we really write something like this?

1sandbox.bind("Seq::Map", ->(items, &blk) { items.map(&blk) })
2sandbox.eval("Seq::Map.call([1, 2, 3]) { |x| x * 2 }").value
3
4# => [2, 4, 6]

Surprisingly, a block inside the sandbox can receive calls from the outside.