Live data from Hacker News

Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

repl.it

61–70 of 81 posts

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#61
post #26

Earlier quoted context omitted.

Scala is great and we would love to have it. But the core philosophy behind repl.it is that everything has to be client-side. We're not very experienced with the JVM languages, but we are planning to experiment in loading them inside a Java Applet. Not sure how doable is this, would appreciate some feedback.

ClojureScript?

ClojureScript is compiled to JS using Clojure which needs the JVM to run.

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#62
post #31
post #29

Earlier quoted context omitted.

Same comment as the GP. I felt like you're breaking a convention by not having the logo go back to the chooser page, and by not returning to the chooser on refresh/revisit.

Website conventions? We think of repl.it as a webapp, not a website. Once you load a language the app remembers your language and loads it for you on next page load, and if you want to change your language you click the language selector button (which I agree is not that clear at the moment).

Then it should also load the last program you were working on -- and, if possible, the output from the interpreter as well.

Cool app!

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#64

I wonder whether Haskell is on their todo list. GHC's LLVM backend [1] might be helpful. [1] http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler...

Haskell won't run in a repl, will it? GHCi and Hugs demand that functions be specified in a script file and not at the prompt.

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.

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#65
post #62
post #31

Earlier quoted context omitted.

Website conventions? We think of repl.it as a webapp, not a website. Once you load a language the app remembers your language and loads it for you on next page load, and if you want to change your language you click the language selector button (which I agree is not that clear at the moment).

Then it should also load the last program you were working on -- and, if possible, the output from the interpreter as well. Cool app!

Currently you can save a replayable session and get a unique link, but this is public. We do have plans to remember history locally (either just as command history or a full-blown session) in the future. The initial relevant issue is at https://github.com/replit/repl.it/issues/15.

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#66
post #51
post #47

Oops: > import subprocess Traceback (most recent call last): File " ", line 1, in File "/lib/python2.7/subprocess.py", line 429, in 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.…

Thanks for trying it out. * 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 si…

I will note that when copying the text out of the interpreter, the prompt (>) doesn't copy (I assume that you may be using a CSS :after or :before decorator, though I didn't look). Sometimes even the newline itself didn't copy. For that post I had to cleanup all of the text so that it would display properly. This may be an issue you want to look at if you want to support people copy/pasting stuff that they are working on out of the console (or you may just want to add a button that generates a Github gist or pastebin entry and displays a link to it).

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#67
post #66
post #51

Earlier quoted context omitted.

Thanks for trying it out. * 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 si…

I will note that when copying the text out of the interpreter, the prompt (>) doesn't copy (I assume that you may be using a CSS :after or :before decorator, though I didn't look). Sometimes even the newline itself didn't copy. For that post I had to cleanup all of the text so that it would display properly. This may be an issue you want to look at if you want to support people copy/pasting stuff that they are workin…

The prompt label is an image, hence it's not copyable. We experimented a bit with various copy-friendly approaches, but couldn't find anything that was cross-browser and did not damage the look/layout we were going for. To share a session, click the save button on the top right - it'll generate a shareable link with the editor content and the whole REPL session in replayable form.

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#68
post #43
post #42

Earlier quoted context omitted.

You might be hitting the fact that QBasic actually requires keywords to be in capitals. The original IDE did the conversion for you, but repl.it doesn't. We should really be more lenient about those. For now, check the existing examples and use your trusty caps lock.

The actual QuickBASIC compiler allowed any case for keywords. The lack of line numbers was a bit confusing too - my first inclination when seeing a BASIC prompt is to type 10 PRINT "hello" 20 GOTO 10 Aside from that, it seems to work as expected (at least in the quick tests I tried).

Numeric labels also don't work:

  10: PRINT "hello"
  GOTO 10
This works though:

  label: PRINT "hello"
  GOTO label

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#69
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.

:)

Re: Try Python, Ruby, Lua, Scheme, QBasic, Forth ...

#70

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. :)

"Beautiful"?!
Post reply on HN