Hacker News new | past | comments | ask | show | jobs | submit login
Codepad.org | a pastebin that executes code for you (codepad.org)
55 points by Luyt on Oct 10, 2009 | hide | past | favorite | 35 comments



See also http://www.scriptlets.org/.

Similar idea, but implemented on top of AppEngine and opensource. Designed to give you persistent URLs to run your code so you can use them as webhooks, etc.


Reminds me of Google's "Lord of the REPLs": http://lotrepls.appspot.com/

and their original interactive shell just for Python: http://shell.appspot.com/

(at least for the dynamic languages)


I want a little flag next to the output that tells me whether the program terminates. Can't be that hard.

SCNR.


They could display a flag if the program HAS terminated, but there's no way to determine is a program will terminate.


Nonsense; the W005H compiler flag will handle this in gcc.


GNU solved the halting problem[1]?

[1]: http://en.wikipedia.org/wiki/Halting_problem


Yes. If you have about two grand, you can get someone to give you the codes too: http://www.markwick.eu/getacoder_alant.htm

Use discount code W005HC0M80x2 to get half off your project.


This sounds interesting. Someone willing to give it a shot and tell us how it went?


I've used it quite a bit to test out both C and PHP. For basic snippets its great.

I think it could be improved by tying in reference code. Perhaps mine the PHP manuals for sample code and put it in to allow editing.


Worked well for a simple ruby sample [1]. I haven't tried anything complicated though.

[1]http://codepad.org/HMPcd6Hk


Creator of the site is AWOL, for the record. Compiler/interpreter versions aren't being updated and his blog has been left for dead for over a year.


From talking to him recently in person, he's just super busy with his startup, which is taking off: http://saucelabs.com/


That's me. Sauce Labs has indeed been keeping me ridiculously busy. But codepad is my favorite side-project, and I don't mean to neglect it. I'll find a free weekend and update interpreter versions once things are less crazy here!


Nice, thanks for supporting OCaml.

Could it autodetect the language using a few heuristics (or Bayesian analysis of existing submissions) instead of having the selection down the left hand side?


That might depend on whether or not he's been caching previous submissions. That and it sounds like a lot of hassle.


Saucelabs actually looks like just what I've been needing.


See? This is the response I wanted. :)

Not downvotes. :(


No need to sensationalize, he's still around: http://news.ycombinator.com/threads?id=sah

Codepad is meant for simple snippets. I don't see anything wrong with the versions that he's currently providing.


The "Hello World Examples" for C was only 17 seconds old when I looked, so it seems there's some activity...


http://codepad.org/MzI2fqg7

  from itertools import *

  primes = (i for i in count(2) if all(imap(lambda x:i%x,xrange(2,i/2))))
My Python code for a generator expression to loop on prime numbers.


you only need to check for divisors up to sqrt(i)

http://codepad.org/VMSqtLbS


Arghh, you are right. I wonder if this will make any difference in my Project Euler problem solutions.


Cool!

I stress test the server with an infinte loop: http://codepad.org/LZNJjLnM

Seem like the obvious stuff was taken care as he said it will.


So yeah, loops kill the server, I want none of that...


Loops don't kill the server -- it runs them until they reach a timeout, and then aborts them.


I wonder what is the reason that Java is not supported.


The JVM is threaded, and threads will require a little bit of (careful!) work for the codepad security sandbox to support. I haven't had time for that project yet.


Perhaps supporting something like Groovy would make for an easier-to-implement compromise?


Java isn't really appropriate for something like this. You could, I suppose, paste the entire main class into the text box and run it that way.

If Java-like syntax is desired (although I can't imagine why it would be), BeanShell would be the way to go.


Great job! just one small thing. For Python, the code editor doesn't allow you to type in the "tab" key.



Sorry, formatting screwed up. The link is http://wiki.python.org/moin/HowToEditPythonCode, it says that using tabs is a bad idea in Python.


Here is a related project: http://codenode.org


Wow this wouldb be very useful for many projects. Any chance of distributing the sources?


Site isn't loading for me anymore. Either it got overloaded or someone figured out how to tie it up.. That was quick. Haha.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: