from Hacker News

RubyGateway: Embed Ruby in Swift

by futurecat on 8/13/24, 3:56 PM with 7 comments

  • by sparker72678 on 8/15/24, 2:27 PM

    This is probably not what anyone who reads this title is expecting it to be.

    On the other hand, there's a project on iOS, "Rubyist", that embeds mRuby and lets you actually write, parse, and execute ruby code within your app. It even has some hooks for calling into some iOS APIs (Widget APIs, most notably). It's a fun idea, but might be a dead project. https://rubyist.app

    I wish there was a canonical Xcode project getting mRuby imported into an iOS/Mac app, so anyone could use it as a starting point for their ideas. I dunno, maybe one is out there and I just haven't found it?

  • by Alifatisk on 8/14/24, 9:11 AM

    Are there any limitations in this?

    Also, the project spelled "access" wrong here:

    // Acess an attribute print("Name is \(student.get("name"))")

    I don't know if it's worth making a PR for such a tiny thing.

  • by ksnsnsj on 8/15/24, 10:41 PM

    Does this need ruby on the host? I'm asking because it's really difficult to have a portable ruby binary, only traveling ruby comes to mind