Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Halt-and-catch-fire/00-META.yaml
Normal file
4
Task/Halt-and-catch-fire/00-META.yaml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
category:
|
||||
- Simple
|
||||
from: http://rosettacode.org/wiki/Halt_and_catch_fire
|
||||
14
Task/Halt-and-catch-fire/00-TASK.txt
Normal file
14
Task/Halt-and-catch-fire/00-TASK.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
;Task
|
||||
|
||||
Create a program that crashes as soon as possible, with as few lines of code as possible. Be smart and don't damage your computer, ok?
|
||||
|
||||
The code should be syntactically valid. It should be possible to insert [a subset of] your submission into another program, presumably to help debug it, or perhaps for use when an internal corruption has been detected and it would be dangerous and irresponsible to continue.
|
||||
|
||||
;References
|
||||
* [[wp:Halt_and_Catch_Fire_(computing)|Wikipedia: Halt and Catch Fire]]
|
||||
|
||||
|
||||
;Related Tasks
|
||||
* [[Program termination]]
|
||||
<br><br>
|
||||
|
||||
1
Task/Halt-and-catch-fire/11l/halt-and-catch-fire.11l
Normal file
1
Task/Halt-and-catch-fire/11l/halt-and-catch-fire.11l
Normal file
|
|
@ -0,0 +1 @@
|
|||
assert(0B)
|
||||
|
|
@ -0,0 +1 @@
|
|||
db $02
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
forever:
|
||||
jmp forever
|
||||
|
|
@ -0,0 +1 @@
|
|||
jmp * ;many assemblers allow * or $ to represent the address of this line of code.
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
di
|
||||
hlt
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
cli
|
||||
hlt
|
||||
|
|
@ -0,0 +1 @@
|
|||
( print( ( 1 OVER 0 ) ) )
|
||||
1
Task/Halt-and-catch-fire/ALGOL-W/halt-and-catch-fire.alg
Normal file
1
Task/Halt-and-catch-fire/ALGOL-W/halt-and-catch-fire.alg
Normal file
|
|
@ -0,0 +1 @@
|
|||
assert false.
|
||||
11
Task/Halt-and-catch-fire/AWK/halt-and-catch-fire.awk
Normal file
11
Task/Halt-and-catch-fire/AWK/halt-and-catch-fire.awk
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# syntax: GAWK -f HALT_AND_CATCH_FIRE.AWK
|
||||
#
|
||||
# This won't halt the CPU but the program will crash immediately on startup
|
||||
# with "error: division by zero attempted".
|
||||
BEGIN { 1/0 }
|
||||
#
|
||||
# This will heat up the CPU, don't think it will catch on fire.
|
||||
BEGIN { while(1) {} }
|
||||
#
|
||||
# Under TAWK 5.0 using AWKW will immediately abort.
|
||||
BEGIN { abort(1) }
|
||||
4
Task/Halt-and-catch-fire/Ada/halt-and-catch-fire.ada
Normal file
4
Task/Halt-and-catch-fire/Ada/halt-and-catch-fire.ada
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
procedure Halt_And_Catch_Fire is
|
||||
begin
|
||||
raise Program_Error with "Halt and catch fire";
|
||||
end Halt_And_Catch_Fire;
|
||||
|
|
@ -0,0 +1 @@
|
|||
HCF$ = CHR$ (184) + "P" + CHR$ (254): CALL PEEK ( PEEK (131) + PEEK (132) * 256 + 1) + PEEK ( PEEK (131) + PEEK (132) * 256 + 2) * 256
|
||||
|
|
@ -0,0 +1 @@
|
|||
0/0
|
||||
2
Task/Halt-and-catch-fire/BQN/halt-and-catch-fire.bqn
Normal file
2
Task/Halt-and-catch-fire/BQN/halt-and-catch-fire.bqn
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
! "Insert value that is not 1"
|
||||
"Error Message" ! "Value that is not 1, again"
|
||||
5
Task/Halt-and-catch-fire/C++/halt-and-catch-fire.cpp
Normal file
5
Task/Halt-and-catch-fire/C++/halt-and-catch-fire.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#include <stdexcept>
|
||||
int main()
|
||||
{
|
||||
throw std::runtime_error("boom");
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
int a=0,b=1/a;
|
||||
|
|
@ -0,0 +1 @@
|
|||
int a=1/0;
|
||||
|
|
@ -0,0 +1 @@
|
|||
throw new System.Exception();
|
||||
1
Task/Halt-and-catch-fire/C/halt-and-catch-fire.c
Normal file
1
Task/Halt-and-catch-fire/C/halt-and-catch-fire.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
int main(){int a=0, b=0, c=a/b;}
|
||||
|
|
@ -0,0 +1 @@
|
|||
STP
|
||||
|
|
@ -0,0 +1 @@
|
|||
raise "fire"
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
procedure HaltAndCatchFire;
|
||||
begin
|
||||
raise Exception.Create('Burning to the ground');
|
||||
end;
|
||||
1
Task/Halt-and-catch-fire/F-Sharp/halt-and-catch-fire.fs
Normal file
1
Task/Halt-and-catch-fire/F-Sharp/halt-and-catch-fire.fs
Normal file
|
|
@ -0,0 +1 @@
|
|||
0/0
|
||||
|
|
@ -0,0 +1 @@
|
|||
.
|
||||
|
|
@ -0,0 +1 @@
|
|||
0
|
||||
|
|
@ -0,0 +1 @@
|
|||
+
|
||||
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
|
|
@ -0,0 +1 @@
|
|||
USE: kernel IN: a : b ( -- ) die ; MAIN: b
|
||||
|
|
@ -0,0 +1 @@
|
|||
Func S=S. S;
|
||||
|
|
@ -0,0 +1 @@
|
|||
while 1 do !' od;
|
||||
3
Task/Halt-and-catch-fire/Fortran/halt-and-catch-fire.f
Normal file
3
Task/Halt-and-catch-fire/Fortran/halt-and-catch-fire.f
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
PROGRAM A
|
||||
CALL ABORT
|
||||
END
|
||||
|
|
@ -0,0 +1 @@
|
|||
poke 0,0
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#define A() B()
|
||||
#define B() A()
|
||||
A()
|
||||
2
Task/Halt-and-catch-fire/GDScript/halt-and-catch-fire.gd
Normal file
2
Task/Halt-and-catch-fire/GDScript/halt-and-catch-fire.gd
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
extends Node
|
||||
func _init():$a.a()
|
||||
|
|
@ -0,0 +1 @@
|
|||
0 gosub 0
|
||||
1
Task/Halt-and-catch-fire/Go/halt-and-catch-fire-1.go
Normal file
1
Task/Halt-and-catch-fire/Go/halt-and-catch-fire-1.go
Normal file
|
|
@ -0,0 +1 @@
|
|||
package main; import "fmt"; func main(){a, b := 0, 0; fmt.Println(a/b)}
|
||||
1
Task/Halt-and-catch-fire/Go/halt-and-catch-fire-2.go
Normal file
1
Task/Halt-and-catch-fire/Go/halt-and-catch-fire-2.go
Normal file
|
|
@ -0,0 +1 @@
|
|||
package main; func main(){panic(0)}
|
||||
1
Task/Halt-and-catch-fire/Hare/halt-and-catch-fire.hare
Normal file
1
Task/Halt-and-catch-fire/Hare/halt-and-catch-fire.hare
Normal file
|
|
@ -0,0 +1 @@
|
|||
export fn main() void = abort();
|
||||
1
Task/Halt-and-catch-fire/Haskell/halt-and-catch-fire.hs
Normal file
1
Task/Halt-and-catch-fire/Haskell/halt-and-catch-fire.hs
Normal file
|
|
@ -0,0 +1 @@
|
|||
main = error "Instant crash"
|
||||
1
Task/Halt-and-catch-fire/J/halt-and-catch-fire-1.j
Normal file
1
Task/Halt-and-catch-fire/J/halt-and-catch-fire-1.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
(1e6$a.) memw (mema 1),0 1e6
|
||||
1
Task/Halt-and-catch-fire/J/halt-and-catch-fire-2.j
Normal file
1
Task/Halt-and-catch-fire/J/halt-and-catch-fire-2.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
exit 0
|
||||
1
Task/Halt-and-catch-fire/Jq/halt-and-catch-fire-1.jq
Normal file
1
Task/Halt-and-catch-fire/Jq/halt-and-catch-fire-1.jq
Normal file
|
|
@ -0,0 +1 @@
|
|||
"whoops" | error
|
||||
1
Task/Halt-and-catch-fire/Jq/halt-and-catch-fire-2.jq
Normal file
1
Task/Halt-and-catch-fire/Jq/halt-and-catch-fire-2.jq
Normal file
|
|
@ -0,0 +1 @@
|
|||
0 | error("whoops")
|
||||
|
|
@ -0,0 +1 @@
|
|||
@assert false "Halt and catch fire."
|
||||
|
|
@ -0,0 +1 @@
|
|||
unsafe_load(convert(Ptr{Int}, C_NULL))
|
||||
|
|
@ -0,0 +1 @@
|
|||
Let
|
||||
1
Task/Halt-and-catch-fire/Lua/halt-and-catch-fire-1.lua
Normal file
1
Task/Halt-and-catch-fire/Lua/halt-and-catch-fire-1.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
error(1)
|
||||
1
Task/Halt-and-catch-fire/Lua/halt-and-catch-fire-2.lua
Normal file
1
Task/Halt-and-catch-fire/Lua/halt-and-catch-fire-2.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
assert(false)
|
||||
|
|
@ -0,0 +1 @@
|
|||
Abort[]
|
||||
1
Task/Halt-and-catch-fire/Nim/halt-and-catch-fire-1.nim
Normal file
1
Task/Halt-and-catch-fire/Nim/halt-and-catch-fire-1.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
assert false
|
||||
1
Task/Halt-and-catch-fire/Nim/halt-and-catch-fire-2.nim
Normal file
1
Task/Halt-and-catch-fire/Nim/halt-and-catch-fire-2.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
echo 1 div 0
|
||||
1
Task/Halt-and-catch-fire/Nim/halt-and-catch-fire-3.nim
Normal file
1
Task/Halt-and-catch-fire/Nim/halt-and-catch-fire-3.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
assert 1==0
|
||||
1
Task/Halt-and-catch-fire/PL-M/halt-and-catch-fire.plm
Normal file
1
Task/Halt-and-catch-fire/PL-M/halt-and-catch-fire.plm
Normal file
|
|
@ -0,0 +1 @@
|
|||
100H: GOTO 0; EOF
|
||||
1
Task/Halt-and-catch-fire/Pascal/halt-and-catch-fire.pas
Normal file
1
Task/Halt-and-catch-fire/Pascal/halt-and-catch-fire.pas
Normal file
|
|
@ -0,0 +1 @@
|
|||
begin pByte($0)^ := 0 end.
|
||||
1
Task/Halt-and-catch-fire/Perl/halt-and-catch-fire.pl
Normal file
1
Task/Halt-and-catch-fire/Perl/halt-and-catch-fire.pl
Normal file
|
|
@ -0,0 +1 @@
|
|||
&a
|
||||
3
Task/Halt-and-catch-fire/Phix/halt-and-catch-fire-1.phix
Normal file
3
Task/Halt-and-catch-fire/Phix/halt-and-catch-fire-1.phix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
(phixonline)-->
|
||||
<span style="color: #0000FF;">?</span><span style="color: #000000;">9</span><span style="color: #0000FF;">/</span><span style="color: #000000;">0</span>
|
||||
<!--
|
||||
23
Task/Halt-and-catch-fire/Phix/halt-and-catch-fire-2.phix
Normal file
23
Task/Halt-and-catch-fire/Phix/halt-and-catch-fire-2.phix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
(phixonline)-->
|
||||
<span style="color: #008080;">try</span>
|
||||
#ilASM{
|
||||
[PE32]
|
||||
push 1 -- uExitCode
|
||||
call "kernel32","ExitProcess"
|
||||
[PE64]
|
||||
sub rsp,8*5
|
||||
mov rcx,1 -- uExitCode
|
||||
call "kernel32","ExitProcess"
|
||||
[ELF32]
|
||||
xor ebx, ebx
|
||||
mov eax, 1 -- SYSCALL_EXIT
|
||||
int 0x80
|
||||
[ELF64]
|
||||
mov rax,231 -- sys_exit_group(rdi=int error_code)
|
||||
xor rdi,rdi
|
||||
syscall
|
||||
}
|
||||
<span style="color: #008080;">catch</span> <span style="color: #000000;">e</span>
|
||||
<span style="color: #0000FF;">?</span><span style="color: #000000;">e</span>
|
||||
<span style="color: #008080;">end</span> <span style="color: #008080;">try</span>
|
||||
<!--
|
||||
1
Task/Halt-and-catch-fire/Python/halt-and-catch-fire.py
Normal file
1
Task/Halt-and-catch-fire/Python/halt-and-catch-fire.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
0/0
|
||||
1
Task/Halt-and-catch-fire/REXX/halt-and-catch-fire-1.rexx
Normal file
1
Task/Halt-and-catch-fire/REXX/halt-and-catch-fire-1.rexx
Normal file
|
|
@ -0,0 +1 @@
|
|||
_=1;_+=
|
||||
1
Task/Halt-and-catch-fire/REXX/halt-and-catch-fire-2.rexx
Normal file
1
Task/Halt-and-catch-fire/REXX/halt-and-catch-fire-2.rexx
Normal file
|
|
@ -0,0 +1 @@
|
|||
_+=1
|
||||
1
Task/Halt-and-catch-fire/REXX/halt-and-catch-fire-3.rexx
Normal file
1
Task/Halt-and-catch-fire/REXX/halt-and-catch-fire-3.rexx
Normal file
|
|
@ -0,0 +1 @@
|
|||
+
|
||||
1
Task/Halt-and-catch-fire/Raku/halt-and-catch-fire-1.raku
Normal file
1
Task/Halt-and-catch-fire/Raku/halt-and-catch-fire-1.raku
Normal file
|
|
@ -0,0 +1 @@
|
|||
++8
|
||||
1
Task/Halt-and-catch-fire/Raku/halt-and-catch-fire-2.raku
Normal file
1
Task/Halt-and-catch-fire/Raku/halt-and-catch-fire-2.raku
Normal file
|
|
@ -0,0 +1 @@
|
|||
die
|
||||
9
Task/Halt-and-catch-fire/Raku/halt-and-catch-fire-3.raku
Normal file
9
Task/Halt-and-catch-fire/Raku/halt-and-catch-fire-3.raku
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use Test;
|
||||
|
||||
dies-ok { ++8 };
|
||||
dies-ok { die };
|
||||
dies-ok { … };
|
||||
|
||||
eval-dies-ok '++8';
|
||||
eval-dies-ok 'die';
|
||||
eval-dies-ok '…' ;
|
||||
5
Task/Halt-and-catch-fire/Ring/halt-and-catch-fire.ring
Normal file
5
Task/Halt-and-catch-fire/Ring/halt-and-catch-fire.ring
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
try
|
||||
see 5/0
|
||||
catch
|
||||
see "Catch!" + nl + cCatchError
|
||||
done
|
||||
1
Task/Halt-and-catch-fire/Ruby/halt-and-catch-fire.rb
Normal file
1
Task/Halt-and-catch-fire/Ruby/halt-and-catch-fire.rb
Normal file
|
|
@ -0,0 +1 @@
|
|||
raise
|
||||
1
Task/Halt-and-catch-fire/Rust/halt-and-catch-fire.rust
Normal file
1
Task/Halt-and-catch-fire/Rust/halt-and-catch-fire.rust
Normal file
|
|
@ -0,0 +1 @@
|
|||
fn main(){panic!("");}
|
||||
1
Task/Halt-and-catch-fire/Swift/halt-and-catch-fire.swift
Normal file
1
Task/Halt-and-catch-fire/Swift/halt-and-catch-fire.swift
Normal file
|
|
@ -0,0 +1 @@
|
|||
fatalError("You've met with a terrible fate, haven't you?")
|
||||
|
|
@ -0,0 +1 @@
|
|||
0 gosub 0
|
||||
1
Task/Halt-and-catch-fire/V-(Vlang)/halt-and-catch-fire.v
Normal file
1
Task/Halt-and-catch-fire/V-(Vlang)/halt-and-catch-fire.v
Normal file
|
|
@ -0,0 +1 @@
|
|||
fn main() { panic(0) }
|
||||
1
Task/Halt-and-catch-fire/Wren/halt-and-catch-fire.wren
Normal file
1
Task/Halt-and-catch-fire/Wren/halt-and-catch-fire.wren
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fiber.abort("")
|
||||
1
Task/Halt-and-catch-fire/XBS/halt-and-catch-fire.xbs
Normal file
1
Task/Halt-and-catch-fire/XBS/halt-and-catch-fire.xbs
Normal file
|
|
@ -0,0 +1 @@
|
|||
error("Crashed");
|
||||
1
Task/Halt-and-catch-fire/XPL0/halt-and-catch-fire.xpl0
Normal file
1
Task/Halt-and-catch-fire/XPL0/halt-and-catch-fire.xpl0
Normal file
|
|
@ -0,0 +1 @@
|
|||
proc Recurse; Recurse; Recurse
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
di
|
||||
halt
|
||||
Loading…
Add table
Add a link
Reference in a new issue