Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Code-golf is a competition to solve a particular problem in the fewest bytes of source code.
4
votes
Diagonal Alphabet
Gforth, 45 Bytes
: X CR 26 0 DO i SPACES i 97 + EMIT CR LOOP ;
Explanation
Gforth doesn't allow interpretation of loops, so I had to define a new word X.
: X \ Define new word X
…
1
vote
Integer logarithms
Gforth, 31 Bytes
SWAP S>F FLOG S>F FLOG F/ F>S .
Usage
242 3 SWAP S>F FLOG S>F FLOG F/ F>S . 4 OK
Try it online!
Explanation
Unfortunately FORTH uses a dedicated floating-point-stack. For that …
2
votes
Scrabble scorer
Gforth, 109 Bytes
: V s" 1332142418513113:11114484:" ; : C 0 NAME 0 DO DUP C@ 65 - V DROP + C@ 48 - ROT + SWAP 1+ LOOP DROP . ;
Input must be uppercase:
C PPCG 11 OK
Readable
\ String used as tab …