Talk:Basilisk

From Esolang
Jump to navigation Jump to search

Process of executing a program

Do the users have to fight the snakes without using any equipment to make the programs run normally? --A (talk) 14:30, 14 May 2019 (UTC)

How will Basilisk do?

Source code

execute a.cpp

a.cpp

#include<bits/stdc++.h>
using namespace std;
#ifndef N
	const int N=10001;
#endif
char s1[N], s2[N], x[N], t[N];
int len1, len2;
int main()
{
	scanf("%s%s", s1, s2);
	if(strlen(s1)<strlen(s2))
	{
		strcpy(t, s1);
		strcpy(s1, s2);
		strcpy(s2, t);
	}
	strcpy(x, s1);
	if(strstr(strcat(s1, x), s2)==NULL)
	{
		cout<<"false";
	}
	else
	{
		cout<<"true";
	}
	return 0;
}

Slitherfangs

In the video game wikipedia:Horizon Forbidden West, a slitherfang is a large robotic snake. Its size is not officially given, but I'd estimate it at somewhere between twenty and thirty meters in length, making it larger than any biological snake. As a speedrunner of this game, I've defeated countless slitherfangs in the game's prologue, which features three of them. How many Basilisk programs may I execute per slitherfang defeated? Oh, and I used to play wikipedia:Final Fantasy VII as a teenager… Corbin (talk) 17:04, 15 October 2024 (UTC)

According to the article, 1 execute command per snake. --None1 (Nope.) 12:50, 16 October 2024 (UTC)

That means, if you can defeat 3 that "snake" then you can execute this script:

Main script:

execute hello.pas
execute fibonacci.py
execute checkdisk.bat

hello.pas:

begin
	printLn "Hello, world!";
end
.

fibonacci.py:

def fibonacci(n):
    if n == 1:
        return 1
    elif n == 2:
        return 1
    elif n > 2:
        return fibonacci(n - 1) + fibonacci(n - 2)
    else:
        return None

x = input()
x = int(x)
print(fibonacci(x))

checkdisk.bat:

@echo off
echo 若要检查磁盘,请按Y;否则,请按N。若要修复磁盘,请按F。
echo.
choice /c:ynf /d:y /t:30
if errorlevel 3 goto :fix
if errorlevel 2 goto :skip
chkdsk C:
goto :end
:fix
chkdsk C: /f
goto :end
:skip
goto :end
:end
pause