Talk:Halt and catch fire: Difference between revisions

 
(4 intermediate revisions by 3 users not shown)
Line 9:
::Thanks Gerard. What does your impressively minimal REXX program do ? --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 17:24, 15 September 2021 (UTC)
 
 
<strike>
::: It "crashes" the REXX interpreter, &nbsp; the messages can vary from REXX to REXX, but for Regina REXX, &nbsp; the output shown to my terminal &nbsp; (a Windows DOS "boxed" screen) &nbsp; is:
<pre>
Line 19 ⟶ 21:
c:\►
</pre>
</strike>
&nbsp;
<strike>
--- where the 1st two lines are a DOS prompt &nbsp; (actually, it is one DOS prompt line that is wrapped into two lines) &nbsp; and
--- lines 3 and 4 are the actual (two) error messages from Regina REXX, &nbsp;
Line 26 ⟶ 30:
 
::: 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. &nbsp; &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:37, 15 September 2021 (UTC)
</strike>
 
:::: 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, (and again implicitly) at runtime. Obviously where (the condition and) "=" is language specific. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 01:28, 16 September 2021 (UTC)
Line 35 ⟶ 40:
::::: That sort of thing briefly crossed my mind too, but it would be hardware-specific as opposed to programming-language-specific, and therefore somewhat against the primary purpose of this whole site (albeit the op deals primarily in hardware-specific programming languages). Like most everyone else I just assumed we were looking for an emergency "panic" that could be inserted into any other program, and only triggered when some critical test failed, maybe the task should be changed to explicitly ask for that, eg
::::::"It should be possible to insert [a specified subset of] your submission into another program [written in the same language], presumably to help debug it."
 
:::::This sounds different from the original task. If the code just terminates the program, this is similar to the program termination task. I wonder if the only examples that completly fit the original task would be the 6502 and 68000 assembly ones, since those work by crashing the CPU, not just by a halt instruction or an exit with error code.--[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 17:32, 21 September 2021 (UTC)
 
::::::One difference in my mind is that [[Program_termination]] is a clean (quiet) shutdown, whereas this seems to ask for a (loud) bang. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]])
 
:::::The task also asks for the minimum number of lines rather than minimum number of characters, btw. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 12:27, 16 September 2021 (UTC)
 
== Syntax errors ==
The name of this task is not "Generate syntax error". Task description updated, four (out of 22) entries marked incorrect. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 00:40, 19 September 2021 (UTC)<br>
<strike>PS I am not sure whether the Perl entry is incorrect. I know that, for instance, JavaScript allows <code>dummy();</code> and only complains that it is [still] undefined when it actually tries to execute that line. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]])</strike>
7,794

edits