Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    \$\begingroup\$ “the target can read its command-line arguments, perform pure computations, and produce an 8-bit exit status, but will not be able to allocate memory or do I/O”—I dunno, I think you still meet the four criteria. Integers can be interpreted from commandline arguments; the exit status can be leveraged for simple output; addition isn't hindered; and all you need for a primality test is the ability to do pure computations, a bit of stack space, and a loop. \$\endgroup\$ Commented Oct 21, 2015 at 19:36
  • 1
    \$\begingroup\$ @BlacklightShining I think that this accomplishes such a huge restriction relative to normal behavior that it should be acceptable even though, as you say, you could still write a prime tester, but -DNO_EXIT mode is for people who feel as you do. No meaningful output is possible in that mode. \$\endgroup\$ Commented Oct 21, 2015 at 20:36
  • 1
    \$\begingroup\$ @BlacklightShining I thought about it some more and I rewrote the program basically from scratch. It's rather cleverer now what it does and (I hope) meets even the most stringent reading of the challenge. \$\endgroup\$ Commented Oct 22, 2015 at 21:36
  • 2
    \$\begingroup\$ @Joshua That's clever, and would be difficult to prevent using this approach (since the program is just modifying its own memory) but it's not currently on the list of "allowed output methods." \$\endgroup\$ Commented Jan 24, 2016 at 4:02
  • 7
    \$\begingroup\$ @JesseTG Are you familiar with strace? \$\endgroup\$ Commented Oct 2, 2016 at 13:14