amasad: After a 5 minute play my first impressions are 'awesome!'. Some feedback:
I selected QBasic then changed my mind but couldn't immediately figure out how to get back to the list of the languages. Clicking the logo of a website usually takes you back to the 'home page', which in this case I consider to be the list of languages. You have buttons at the top right, with the lambda taking me back to the language chooser. Maybe button labels, even tooltips would help. But I would definitely make the logo the 'home' button. Even refreshing the page didn't take me back.
Anyway, a minor complaint. A super-cool effort. I will now go play with it some more.
> import subprocess
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/python2.7/subprocess.py", line 429, in <module>
import select
ImportError: No module named select
Also:
> os.name
=> 'posix'
> os.uname()
=> ('Emscripten', 'emscripten', '1.0', '#1', 'x86-JS')
> os.environ
=> {'LANG': 'en_US.UTF-8', 'PYTHONHOME': '/:/', 'PWD': '/',
'USER': 'root', 'HOME': '/', 'PATH': '/', '_': './this.program'}
> os.getcwd()
=> '/sandbox'
> os.chdir('/')
> os.getcwd()
=> '/'
> os.popen2('ls -l')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/lib/python2.7/os.py", line 667, in popen2
import subprocess
File "/lib/python2.7/subprocess.py", line 429, in <module>
import select
ImportError: No module named select
> os.popen('ls -l')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 24] Too many open files
* I liked the 'x86-JS' as the architecture.
* I know about os.listdir() but I wanted the permissions.
* I automatically did a ^W to delete a word and closed the tab. I don't feel like opening it again or I would probably have more.
* I realize that since this is a CPython -> JS converter that the REPL is running in my browser and no on a server (AFAIK) so it's not like this attempting to hack someone's server, but I found it interesting to probe the environment.
* The ^W is fixable, but I'm not sure how I personally feel about hijacking fundamental browser shortcuts. We'll look into it though.
* Regarding the environment, in general, multi-threading and multi-processing (and anything that depends on them) are not supported, since Emscripten translates the code to JS rather than emulating a machine.
* The Emscripten virtual filesystem has a simple single-user permission model and the libc functions for accessing/modifying the permissions are supported. So technically you could get the permissions through os.access. Not as convenient as ls, of course, but doable.
Doesn't work too well with my Swedish keyboard layout. If I want to use "[" or "]" I'd normally use Alt Gr+8 or Alt Gr+9, that doesn't work. This makes it almost impossible to code.
Thanks for the report. We're handling input as raw keystrokes for flexibility, so the more advanced features are sometimes not supported. I've opened an issue for it (https://github.com/replit/jq-console/issues/19) in the appropriate repository. Feel free to watch that for updates.
Love it. This site is hella-fast and responsive compared to the other "Try [x]" web apps I've used before. Love the addition of LOLCODE.
Personally, it took me a second to figure out the lambda and eg buttons, but I didn't find it frustrating or difficult. Pretty smart if you ask me.
Wonderful,
Nice to see QBasic there. These days its easier to write for modern High Level languages, as they are easily installed and available everywhere. But the classic and beautiful languages are hard to find and even talked about.
Good and nostalgic memories of Programming with the Basic.
I'm unsure about the Scheme that is included. It claims to be R6RS which requires support for exact numerical operations including big integers and rationals. Currently it seems to use only double precision floating point instead of exact integer values!
It's fun by itself, but what I believe could make it really useful would be to include interactive tutorials for each language. That's what I was expecting when I clicked the link.
We have put lots of time and effort into getting all of these languages to run smoothly in the browser, we thought we would showcase this project before continuing on with our plans (more languages, tutorials, etc..).
This is awesome! I see this replacing my normal pastebin/ideone workflows ...
One comment: in python, technically tabs are equivalent to 8 spaces, but in your REPL it is equivalent to 4 spaces. Is that a modification to the version of python you are using, or did you make a decision to match 4 spaces (BTW: I really like this, but it breaks some older code)
Great site. A trivial gripe: you should get rid of the text shadow on the "Select a Language" title. Grey CSS text shadows on grey backgrounds tend to look blurry, and this is no exception. Or, better yet, make it a white 1px shadow with no blur: http://goo.gl/BU0Hu
This problem happens with Python/Lua/Ruby because they're compiled from their original lower-level implementations using Emscripten. Which means everything have to work synchronously and there is no way to stop execution in order to get the user's input, unless we transform the code into CPS, which will probably make it much slower.
I'm getting a 330 ERR_CONTENT_DECODING_FAILED when I try to load up the site. If no one else is getting this then chances are it's my company's firewall interfering. If its rule set detects either "fun" and/or "potentially useful" the site is immediately banned.
same error here as well, also behind a corporate firewall, it's usually fairly well behaved but if it doesn't understand something it's sometimes prone to petulance.
I've spoken a little about the reason we couldn't use GHC among other things, at https://github.com/replit/repl.it/issues/43. In short, we need an interpreter rather than a compiler or a JIT, and we need the interpreter itself to run in the browser.
The webpage at http://repl.it/ might be temporarily down or it may have moved permanently to a new web address.
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
Everything happens on client-side the server is just for saving sessions and file serving. So technically its not written in node.js. Node is only a dependency for the development tools we use (coffee-script, mini-server for development). However the server running repl.it is written in Node, its nothing fancy but it makes us run cheap and it will be open-sourced soon.
Really hard to say. We started experimenting with the idea back in March, but didn't start putting fulltime nights into it until August. I'd say a little over a thousand man-hours over the span of 6 months, but I may be well off the mark.
Wow, really nice. I was looking for a tool to try out some code when working away from my workstation. This fits the bill, its fast and agreable to use. Thanks!
[+] [-] forbes|14 years ago|reply
I selected QBasic then changed my mind but couldn't immediately figure out how to get back to the list of the languages. Clicking the logo of a website usually takes you back to the 'home page', which in this case I consider to be the list of languages. You have buttons at the top right, with the lambda taking me back to the language chooser. Maybe button labels, even tooltips would help. But I would definitely make the logo the 'home' button. Even refreshing the page didn't take me back.
Anyway, a minor complaint. A super-cool effort. I will now go play with it some more.
[+] [-] amasad|14 years ago|reply
[+] [-] amasad|14 years ago|reply
[+] [-] DanielRibeiro|14 years ago|reply
[1] http://ideone.com/
[+] [-] pyre|14 years ago|reply
* I know about os.listdir() but I wanted the permissions.
* I automatically did a ^W to delete a word and closed the tab. I don't feel like opening it again or I would probably have more.
* I realize that since this is a CPython -> JS converter that the REPL is running in my browser and no on a server (AFAIK) so it's not like this attempting to hack someone's server, but I found it interesting to probe the environment.
[+] [-] max99x|14 years ago|reply
* The ^W is fixable, but I'm not sure how I personally feel about hijacking fundamental browser shortcuts. We'll look into it though.
* Regarding the environment, in general, multi-threading and multi-processing (and anything that depends on them) are not supported, since Emscripten translates the code to JS rather than emulating a machine.
* The Emscripten virtual filesystem has a simple single-user permission model and the libc functions for accessing/modifying the permissions are supported. So technically you could get the permissions through os.access. Not as convenient as ls, of course, but doable.
[+] [-] arvinjoar|14 years ago|reply
[+] [-] max99x|14 years ago|reply
[+] [-] cbailey|14 years ago|reply
[+] [-] acpmasquerade|14 years ago|reply
Good and nostalgic memories of Programming with the Basic.
:)
[+] [-] LearnYouALisp|14 years ago|reply
[+] [-] wbhart|14 years ago|reply
[+] [-] amasad|14 years ago|reply
[+] [-] rhizome31|14 years ago|reply
[+] [-] amasad|14 years ago|reply
[+] [-] dgottlieb|14 years ago|reply
Importing urllib hangs zlib imports, but the compress and compressobj methods fail
> import zlib
> zlib.compress("askldas")
Internal error: ReferenceError: _deflateInit_ is not defined
[+] [-] veyron|14 years ago|reply
One comment: in python, technically tabs are equivalent to 8 spaces, but in your REPL it is equivalent to 4 spaces. Is that a modification to the version of python you are using, or did you make a decision to match 4 spaces (BTW: I really like this, but it breaks some older code)
[+] [-] marekmroz|14 years ago|reply
Style Guide: http://www.python.org/dev/peps/pep-0008/ Indentation Myths: http://www.secnetix.de/olli/Python/block_indentation.hawk
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] Bartlet|14 years ago|reply
[+] [-] Acorn|14 years ago|reply
Also, at the moment something like this doesn't work at all (Python):
[+] [-] amasad|14 years ago|reply
[+] [-] epenn|14 years ago|reply
[+] [-] missing_cipher|14 years ago|reply
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
[+] [-] hullo|14 years ago|reply
[+] [-] jstepien|14 years ago|reply
[1] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler...
[+] [-] max99x|14 years ago|reply
[+] [-] WildUtah|14 years ago|reply
Without functions, you really don't have very much of the Haskell language available. It's a partial repl with a fraction of the language at best.
[+] [-] agentgt|14 years ago|reply
[+] [-] Legend|14 years ago|reply
The webpage at http://repl.it/ might be temporarily down or it may have moved permanently to a new web address. Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
:(
[+] [-] unknown|14 years ago|reply
[deleted]
[+] [-] paufernandez|14 years ago|reply
I will have a lot of fun either with the app itself or the source code. Thanks!
[+] [-] amasad|14 years ago|reply
[+] [-] esk|14 years ago|reply
If you're still following this thread, amasad and max99x, I have a simple question: how many hours did you two put into this?
[+] [-] max99x|14 years ago|reply
[+] [-] apl|14 years ago|reply
EDIT: I take that back. Lua runs, Python and Ruby do not.
[+] [-] amasad|14 years ago|reply
[+] [-] doc_larry|14 years ago|reply