We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Talk:F,u,c,k.
Jump to navigation
Jump to search
Java Interpater
hello I just made a java interprater for this language:
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class EsolangInterpreter {
public static void main(String[] args) {
int accumulator = 0;
String code = input();
List<Integer> toAsciiList = Arrays.asList(255, 127, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 ,25, 26, 27, 28, 29, 30, 31, 128, 129, 130, 131, 132, 133, 134, 135, 136, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159);
for (int i = 0; i < code.length(); i++) {
char Instruction = code.charAt(i);
switch (Instruction) {
case 'f' -> {
if (accumulator == 0){
System.out.println("Hello, world!");
} else {
System.out.println("FUCK!");
}
}
case 'u' -> {
accumulator += 1;
}
case 'c' -> {
accumulator -= 1;
}
case 'k' -> {
if (toAsciiList.contains(accumulator)) {
System.out.println((char) accumulator);
} else {
System.out.println(accumulator);
}
}
default -> {
}
}
}
}
public static String input(){
try (Scanner input = new Scanner(System.in);){
return input.nextLine();
}
}
}