SjoerdPennings
  • Member for 6 years, 4 months
  • Last seen this week
xkcd 2385 KoTH (Final Exam)
19 votes

FunnyNumber { name: "FunnyNumber", run() { return 69 } } Somebody has to do it.

View answer
Print 0 to 100 without 1-9 characters
8 votes

Factor, 46 23 bytes -23 bytes thanks to Bubbler 0xa sq [0,b] [ . ] each Try it online! I've never written anything in Factor before, but it's a surprisingly fun language.

View answer
Draw an ASCII chess board!
4 votes

Vyxal J, 26 24 31 28 25 bytes -2 bytes thanks to the j flag. +7 bytes, added code to swap Q and K to make it valid. -3 bytes thanks to Aaron Miller! -3 bytes thanks to Kevin Cruijssen «æ≠⁺tO«\p8*\.8*:...

View answer
Generate a 5-pointed star
4 votes

TurtleGolf, 70 24 22 bytes Note: This is non-competing, as this language was made after this challenge was posted (though specifically for this challenge). 0; aa*^aa*4b*+>1+:5=?; Explaination: ...

View answer
Stack Exchange Vote Simulator
4 votes

Python 2, 177 159 72 bytes Still kinda new to this code golf thing. def v(s): c=0 for i in s:c=((0,1)[c<1],(0,-1)[c>-1])[i=="^"] return c EDIT: Fixed the incorrect behavior. EDIT 2: ...

View answer
Truth Tables: Your great-grandfather's computer
4 votes

Python - 288 characters (+10 penalty cause I couldn't get unicode to work :c) No bonuses. This is my very first codegolf answer. def f(i): i=i.split(" ") print i[0],i[2], for f in i[0:3]:...

View answer
Print a Tabula Recta!
3 votes

BQN, 16 14 13 bytes (SBCS) -2 bytes thanks to ovs -1 byte thanks to Razetime My first ever BQN program and also my first ever program in an array language. Outputs as a table of strings. (⍋⌽⌜⋈)'A'+↕26 ...

View answer
"DDoouubbllee ssppeeaakk!!"
3 votes

BRASCA, 6 bytes As of writing, there's no online interpreter yet. EDIT: There is now. ,[:oo] Try it online! Explanation <implicit input> - Push STDIN to the stack , - ...

View answer
Output programming language name
2 votes

BQN, 17 bytes With this magic trick, I will turn apples into bacon! 1⊸+⌾(¯1⊸⊏)1+"APL" Try it! Explanation 1⊸+⌾(¯1⊸⊏)1+"APL" "APL" - Take each letter of &...

View answer
Output your Score!
2 votes

Vyxal ṡ, 7 6 bytes -1 bytes thanks to Bubbler kṄt`¨ƈ Explanation kṄ - Push "4096" t - Get the final item (6) `¨ƈ - Push "bytes" <...

View answer
Print a 10 by 10 grid of asterisks
2 votes

Vyxal j, 8 7 5 bytes -1 byte cause map lambdas are awesome. -2 bytes thanks to the j flag My first attempt at Vyxal. \*₁*² Explanation \* - Push "*" ₁* - Repeat 100 times ...

View answer
Scream very loudly
2 votes

Alice, 4 3 bytes It's a pretty simple Cardinal mode answer. -1 bytes thanks to Martin Ender 'AO Try it online! Explanation 'A - Push "A" O - Output as character - The IP wraps around ...

View answer
Simple cat program
2 votes

Alice, 8 4 bytes -4 bytes thanks to Martin Ender It's my first time trying out Alice, and it's a pretty fun language to use so far. Unlike Sp3000's answer, this one doesnt error out on EOF, at the ...

View answer
Lolololololololololololol
2 votes

BRASCA, 14 12 11 bytes -1 bytes from RezNesX `loL`o[:mo] Try it online! Explanation `loL` - Push 'Lol' to the stack o - Output the 'L' [:mo] - Output the next character of ...

View answer
Triangular code, triangular output
2 votes

BRASCA, 1 byte Yep, it's another one of these. Pick any one of these: 0123456789oOnNlLeEdDhHK+-*^s}r&|_ABmM?!ST<>=Y Explanation TL;DR: Most instructions work because an empty stack consists ...

View answer
Time bomb (KoTH)
2 votes

Coinflipper Starts by initialising x to half of N, then flips N coins. If heads, decrement x (unless already zero). If tails, increment x (unless already equal to N). { name: "Coinflipper",...

View answer
xkcd 2385 KoTH (Final Exam)
2 votes

Elevens { name: "Elevens", run() { return (Math.floor(Math.random() * (10 - 1) ) + 1) * 11; } } Randomly returns 11, 22, 33, 44, 55, 66, 77, 88 or 99.

View answer
I double the source, you double the output!
2 votes

BRASCA, 2 bytes Original: C} Doubled: C}C} Try it! Try it!Try it! Explanation Original: C - Sets implicit output to number mode } - Increment top of stack (stack is infinite zeroes by ...

View answer
Output the sign
2 votes

BRASCA, 8 bytes ,'/-1$%n Try it online! Explanation , - Reverse the stack to take the first character from input '/- - Subtract it by 47 1$% - 1 % that value n ...

View answer
As Easy as One-Two-Three
2 votes

BRASCA, 15 bytes Ci,:::SSL{+,SS= Try it online! Explanation Ci - Set implicit output to output numbers, and turn "0-9" into 0-9 , - Reverse stack :::SSL{+ ...

View answer
I reverse the source code, you reverse the input!
2 votes

BRASCA (brasca-online), 5 bytes The broken loops crash the Python-based interpreter, but it works on brasca-online. ,[o], ,]o[, Try it! | !ti yrT Explanation , - Reverses stack ...

View answer
The Letter A without A
2 votes

BRASCA, 1 byte Uppercase: D Lowercase: h TRY IT | try it Explanation There's isnt really that much to explain. D pushes 65 to the stack, h pushes 97 to the stack, and implicit output does the rest.

View answer
10 PRINT CHR$(205.5+RND(1)); : GOTO 10 in PHP (or anything else, for that matter)
2 votes

BRASCA, 13 12 bytes 1[`/\`1?#$o] Try it online! Explanation 1[ ] - While 1: `/\` - Push \ and / 1? - Push rand(0,1) #$ - If truthy, swap the top two items,...

View answer
Print 0 to 100 without 1-9 characters
2 votes

BRASCA, 9 bytes Hr,n[lon] Try it online! Explanation Hr - Push range(0,100) , - Reverse stack n - Print the 0 [ ] - While not zero: lon - Print a newline ...

View answer
Print a string in as few distinct characters as possible
2 votes

BRASCA, 2 characters Try it online! E}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}E}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}E}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}...

View answer
Goodbye Cruel World!
2 votes

BRASCA, 33 29 28 27 bytes -4 bytes -2 bytes thanks to Command Master `!dlroW leurC eybdooG`[o]~o Try it online! Explanation `!dlroW leurC eybdooG` - Push "Goodbye Cruel World!",...

View answer
"Hello, World!"
2 votes

BRASCA, 14 bytes Another simple Hello, World program. `Hello, World! Explanation ` - Push everything from here to the next backtick (or EOF) to the stack Hello, World! - The ...

View answer
Is it a leap year?
1 votes

Vyxal, 13 10 bytes -3 bytes Thanks to Kevin Cruijssen 25Ḋ[16|4]Ḋ Outputs 1 for truthy, 0 for falsy Try it Online! Explanation 25Ḋ - is it divisible by 25? [16 Ḋ - if so: check if ...

View answer
Implement Minceraft
1 votes

BQN, 47 40 bytes SBCS -7 bytes thanks to DLosc "Min"∾"raft"∾˜⌽⍟(0=•rand.Range 10⋆4)"ec" Try it! Explanation "Min"∾"raft"∾˜⌽⍟(0=•rand.Range 10⋆4)"...

View answer
Find all the Anagrams, and the Subanagrams too!
1 votes

Vyxal, 9 bytes ǎƛṖ;fU'⁰≠ Explanation <implicit input> ǎ - Get substrings ƛṖ; - Map over substrings: Get permutations f - Flatten it U ...

View answer