Talk:Halt and catch fire: Difference between revisions
Content added Content deleted
m (added a verb.) |
|||
Line 26: | Line 26: | ||
::: I could've chosen some other character, but a lone equal sign seemed (to me) a very succinct way to "crash" a REXX interpreter without use some other "special" character. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:37, 15 September 2021 (UTC) |
::: I could've chosen some other character, but a lone equal sign seemed (to me) a very succinct way to "crash" a REXX interpreter without use some other "special" character. -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:37, 15 September 2021 (UTC) |
||
:::: But... isn't that a compilation error, as opposed to a runtime "crash"? I suspect pretty much every programming language on rc (all 800+ of them) would trigger the same. I think the task is implicitly asking for something more akin to "if 2+2!=4 then = " to compile cleanly and not crash, but "if 2+2!=5 then = " to crash, again implicitly at runtime. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 01:28, 16 September 2021 (UTC) |
Revision as of 01:29, 16 September 2021
A bit limited ?
Is this task to be taken literally - halt the CPU - and thus only be applicable to the handful of assembly languages with samples already provided ?
Or does it mean "crash the program" by e.g. dividing by zero or asserting a false condition or raising an unhandled exception or calling exit or...
Whilst reading about the fictitios HCF instruction was entertaining, do we want to encourage people to crash their CPUs ?
--Tigerofdarkness (talk) 21:02, 12 September 2021 (UTC)
- I didn't see that the task was to halt the CPU, but to crash the (computer) program. -- Gerard Schildberger (talk) 21:09, 12 September 2021 (UTC)
- Thanks Gerard. What does your impressively minimal REXX program do ? --Tigerofdarkness (talk) 17:24, 15 September 2021 (UTC)
- It "crashes" the REXX interpreter, the messages can vary from REXX to REXX, but for Regina REXX, the output shown to my terminal (a Windows DOS "boxed" screen) is:
─────────────────────────────────────────────────────────────────────────────09/15/2021 13:21:27 c:\►regina haltfire Error 35 running "c:\haltfire.rex", line 1: Invalid expression Error 35.1: Invalid expression detected at "=" ─────────────────────────────────────────────────────────────────────────────09/15/2021 13:21:29 c:\►
--- where the 1st two lines are a DOS prompt (actually, it is one DOS prompt line that is wrapped into two lines) and --- lines 3 and 4 are the actual (two) error messages from Regina REXX, --- followed by the DOS prompt (again, it looks like two lines, but it is a single long DOS prompt that wraps. --- A different REXX interpreter should/may produce similar error messages(s).
- I could've chosen some other character, but a lone equal sign seemed (to me) a very succinct way to "crash" a REXX interpreter without use some other "special" character. -- Gerard Schildberger (talk) 18:37, 15 September 2021 (UTC)
- But... isn't that a compilation error, as opposed to a runtime "crash"? I suspect pretty much every programming language on rc (all 800+ of them) would trigger the same. I think the task is implicitly asking for something more akin to "if 2+2!=4 then = " to compile cleanly and not crash, but "if 2+2!=5 then = " to crash, again implicitly at runtime. --Pete Lomax (talk) 01:28, 16 September 2021 (UTC)