Skip to content

Instantly share code, notes, and snippets.

010 GR
020 POKE 49234,0
030 COLOR= 15
040 FOR I = 0 TO 39
050 VLIN 0,47 AT I
060 NEXT
100 COLOR= 5
110 S = 21
120 W = S
130 H = 27
10 GR : POKE 49234,0
20 X = 20 : Y = 20
30 C = INT(RND(1) * 16)
40 COLOR = C : PLOT X,Y
50 IF RND(1) >= .9 THEN C = INT(RND(1) * 16)
60 X = X + INT(RND(1) * 3) - 1
70 Y = Y + INT(RND(1) * 3) - 1
80 IF X > 39 THEN X=0
90 IF X < 0 THEN X=39
100 IF Y > 47 THEN Y=0
/* Proof that there are no floating point errors when multiplying a double by zero.
* You're welcome, Downgoat
*/
int main(void)
{
double f;
for (f = 0; f < 10000; f += 0.000001)
if (f * 0)
printf("ERROR IN %f\n",f);
0PR#3
7sp=int(30+(30*sin(x*3.14159/180))):PRINTspc(sp);"Hello World":x=x+15:goto7
/* 3344 bytes, not including the unnecessary newlines nor this comment. Newlines exist only for prettiness. */
#include<array>
#include<cmath>
#include<vector>
#include<string>
#include<fstream>
#include<algorithm>
#include<functional>
#define L for
#define A auto
A
. .
. B .
. . . .
. . C . .
When travelling North, the IP will jump from C to B to A.
When travelling South, the IP will jump from A to B to C.
@aaronryank
aaronryank / forked-functions.md
Last active July 19, 2017 20:35
prototype for Forked function syntax

Functions (but probably not)

Functions are declared like so:

>>>>>function name>>>>>

with the code trailing off to the right. Functions are exited with five less-than signs.

Functions must be declared inline with code. Any code not inside a function (`>>>>>f>>>>>-----<<<<

@aaronryank
aaronryank / whats-my-name.bash
Last active August 1, 2017 23:51
What's my name on PPCG?
#!/bin/bash
wget https://codegolf.stackexchange.com/users/$1 2>y
sed -nr 's/.*>User (.*) -.*/\1/p' $1
rm $1 y
@aaronryank
aaronryank / something.ss
Created September 5, 2017 20:15
simplestack program
ZYXWVUTSRQPONMLKJIHGFEDCBA"^(-(@32-);%-^)
ZYXWVUTSRQPONMLKJIHGFEDCBA push ASCII codes for the backwards alphabet
" turn stack into string
^ push string length
( open do-while loop (do ... while top of stack truthy)
- decrement string length
( do while top of stack truthy
@32 print a space
- decrement string length
) end do-while loop
@aaronryank
aaronryank / prime.ss
Created September 6, 2017 01:28
almost a primality tester
$:
(
-1
?{
[:]:,1,
_%;
}
)