comperendinous
• Member for 7 years, 6 months
• Last seen more than 7 years ago

Haskell, 64 68 This works out the base directly by inverting the triangular number formula, t = (b^2+b)/2, and calculating b = (sqrt(8*t+1) - 1) / 2. f n=init.tail$show(b,div(b^2+b)2)where b=floor$(...

Haskell, 117 Having to work with Haskell's functional paradigm means that everything has to be assigned to a variable or commented out with line -- or block {- -} comments; having nonsense functions ...

Straight Shooter He's a trained part of the cavalry and talks in many languages but, being blinkered, Straight Shooter can only see the one enemy in front of him. Being a horse, he doesn't understand ...

Prison Rules, Haskell Cavewoman think caveman and other caveman should talk, share stick. But, hey ho, if must fight, fight prison rules. Find boss and attack. ViceLeader Alpha Caveman now; that who ...

Parsing the raw bytestream: Haskell (319 = 332 - 13) Without any imports at all, this program crops P1 PBM images. g _[]=[] g z x=(\(a,b)->a:g z b).splitAt z$x q=map f=filter main=do c<-... View answer 3 votes Perl, 161 164 bytes Not quite as short as squeamish ossifrage's answer, but I wanted to share the CamelCaseCompression, which no one else has used and allows the removal of many spaces and quotation ... View answer 2 votes Darwin Survival of the fittest means the least healthy must die. Rationale Looking at the batch of results from Tuesday (12th), there seem to be three distinct groupings: survivors; the effectively ... View answer 2 votes Twenty-Fourth and a Halfth Century This Python entry ducks and dodges until only passive players or a single aggressive player remains, then starts shooting. It hopes a passing martian takes care of ... View answer 1 votes Perl, 276 287 (289 300 - 13) Regex to the Rescue! Who needs dedicated image functions when you have regular expressions? (And 1-bit images to crop.) local$/;open I,"in.pbm";$_=<I>;s/(... View answer 1 votes Python 3: 175 import math def t(b,s):l=len(s)-1;n=12*math.log2(b*l/(l-s.index("X"))/16.35);m=round(n);return"%s%s%+d"%(("C C# D D# E F F# G G# A A# B".split()*99)[m],m//12,round(100*(n-m))) Ungolfed:... View answer 1 votes Hippolyta This Amazon Warrior Shooter, like her namesake, is destined to be slain. Since we now have an S0, an S1, and an S2 bot, for completeness, here's an S3 bot to see if the position of the ... View answer 1 votes Clojure, 320 (333 - 13 for filenames) Deciding to sidestep types, this P1 (ASCII) PBM cropper is written in Clojure. With function names like interpose, read-string, and clojure.string/replace, it's ... View answer 1 votes Haskell: 119 = 111 + 8 Since there's no restriction on the key, I'm going agile and not getting any more complex until someone has a shorter answer: e t=(unwords.map((\(a,b)->filter(not.(elem['... View answer 1 votes Haskell, 79 83 characters I still think mutable state could triumph if this is reopened, but recursion holds its own for now. Edit: Following proud haskeller's suggestions shaves off another 4 ... View answer 0 votes Perl, 43 56 print substr'Mine was not Red 5!',4*$i++,4; I accept that I can't win this one. My original attempt explains why: @a=('This',' code',' is',' too',' long.');print$a[$i++];