stevediaconou,
@stevediaconou@ruby.social avatar

Working on an experiment this afternoon: what if Ruby had its types inline in the source.

I know this was decided against for reasons including parsing issues and philosophical ones, hence RBS in separate files, but I want to see how it feels to code Ruby with types inline.

The prototype uses ruby-next as a transpiler, irbs to extract RBS sigs, thor for cli, and steep to check types.

image/png
image/png
image/png

ZiggyTheHamster,
@ZiggyTheHamster@ruby.social avatar

@stevediaconou you should try this with type syntax instead. It would be neat to see what a Crystal/Ruby polyglot script looks like to maintain

camertron,
@camertron@ruby.social avatar

@stevediaconou so cool! I've been hacking away on something very similar for the last few years: https://github.com/camertron/myrb

stevediaconou,
@stevediaconou@ruby.social avatar

deleted_by_author

  • Loading...
  • camertron,
    @camertron@ruby.social avatar

    @stevediaconou apologies! I just marked the repo as public. Can't remember why I made a private one 🤔

    camertron,
    @camertron@ruby.social avatar

    @stevediaconou is your code online somewhere?

    stevediaconou,
    @stevediaconou@ruby.social avatar

    deleted_by_author

    camertron,
    @camertron@ruby.social avatar

    @stevediaconou thanks for sharing!!

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines