GithubHelp home page GithubHelp logo

jasoncharnes / run.rb Goto Github PK

View Code? Open in Web Editor NEW
598.0 598.0 31.0 8.86 MB

Run Ruby in the browser using WebAssembly

Home Page: https://runrb.io

License: MIT License

JavaScript 98.56% HTML 0.67% CSS 0.51% Dockerfile 0.18% Makefile 0.07%

run.rb's People

Contributors

chocolateboy avatar dependabot[bot] avatar jasoncharnes avatar willglynn avatar zcdunn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

run.rb's Issues

Some problems on mobile

iOS 12.1.2, latest stable version

Entering text causes the page to scroll up

Whenever I enter code into the main textarea, the browser window ends up looking like this:

image

It seems to scroll up to the top when entering text, I'm not really sure why, but it makes entering any code really annoying.

iOS double and single quotes

iOS by default uses 'fancy quotes', like so: “ ”. Normally you'd want the ASCII quotes: " " (the same is true of single quotes, where iOS uses a 'fancy' version by default).

You can apparently toggle this in settings, but it'd be nice if the editor auto-converted them to ASCII quotes, or at least warned you that you were entering the wrong kind of quotation marks.

You can of course work around this with a long press, and one of the options it gives you is ASCII quotation marks, but that's not ideal.

image

Uncaught RangeError: Maximum call stack size exceeded

Running the default Hello World app or other valid code never completes on Linux Chrome Version 62.0.3202.94 (Official Build) (64-bit)

JS Console Output:

index.js:4027 Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
s @ index.js:4027
d90cade9c5ff2360f713.worker.js:1 Uncaught RangeError: Maximum call stack size exceeded
Ruby.worker.js:44 Uncaught RangeError: Maximum call stack size exceeded
d90cade9c5ff2360f713.worker.js:1 Uncaught RangeError: Maximum call stack size exceeded
Ruby.worker.js:44 Uncaught RangeError: Maximum call stack size exceeded

If you need any other details please advise

Using Ripper with run.rb

Hey, love the project. I was just wondering if it would ever be possible to call off to Ruby's ripper module with run.rb ?

I was looking into integrating run.rb with the prettier plugin for Ruby - which requires access to the Ruby runtime and Ripper. I just want to rule out whether it's possible to use this project for that or not as it would allow Ruby code to be formatted directly in the browser without ever making external calls to a web server.

Some extra context here:

prettier/plugin-ruby#138

Any insights would be appreciated! 🏆

Installation

Hello world!

Could someone explain to me how can I install it in my laptop? I have debian and I dont know how intergrate it.

Command + L is hijacked

I wanted to copy/paste the domain to share it and this happened when I hit Command + L:

image

Might be good to use a different keyboard shortcut for a feature as arguably trivial as jumping to a specific line. Maybe that's a function of the editor you're using but it's definitely odd. Or maybe turn this feature off unless it's really needed?

Console Improvements

Hello, found out about this project today and I absolutely love it! Hoping I could suggest the ff. improvements to make the environment more user-friendly:

  • Adjustable console height:
    • could have a limit, say 80% of the screen height.
    • content should follow console on resize (eg. upon height increase, previous lines should appear)
  • Vertical scroll for the console
  • Fix error messages
    • eg:
    puts "Hello, run.rb!
    
    # produces the error:
    # playground.rb:1: unterminated string meets end of file
    # �[m�[1mputs "Hello, run.rb!�[1;4m�[;1m�[m
    

Palemoon?

Is this working on palemoon? I tried it right now, clicked the play button thingy, waited for about 2 minutes but nothing really happened. So I am not sure what the issue may be. Perhaps some additional page or status where support in different browsers may be shown?

native gems via webassembly

Hey! Amazing project and it got me thinking about how to build playgrounds for Ruby projects online without a server side Ruby process.

#9 mentions that we can use Emscripten's filesystem API to ship the standard library and other gems that we need. But what if some gem has C extensions, how would we compile that to webassembly and load them via Ruby?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.