my breakdown should lead naturally to a ranking scheme such as (untested): let f be as above (counting programs of length n) and g be the desired function that accepts a program and returns its rank, and define helper functions a(x) = sum(i=0,len(x)-1,f(i)) and h(x) = g(x) - a(x), i.e. h maps the programs of length n to [1..f(n)].
take h(e) = 1 where e is empty program; arbitrarily map h(c) for c in '+-<>,.' to [1..6]; h(c+x) = (h(c)-1) * f(len(x)) + h(x) where c is non-[] head and x is tail; h('['+x+']'+y) = 6*f(len(x+']'+y)) + sum(i=0,len(x)-1,f(i)*f(len(x+y)-i) + (h(x)-1) * f(len(y)) + h(y)
SAS started basically as a way to do statistics using PL/I in the 60s. It was written by statisticians, and statisticians tend to be awful programmers.
I have few if any good things to say about SAS, be it the language or the company.
Sorry, I tend to get fired up and ramble a lot when I start talking about SAS. Its market share is dropping, and I'd like to see it go back to hell where it belongs.
@AlexA. Sounds wise. I partly accepted new jobs because I really needed to get out of somewhere. And then the new job did not work. It can turn into an evil cycle.
A special purpose sorting machine takes text comprising of words and numbers, as input and sorts them both in ascending order and prints them in a manner that a word is followed by a number. Words can be in upper or lower case. The machine converts them into lowercase and then sorts and prints th...
Golunar/Unary is a way to encode all valid Brainfuck programs, but it is not an enumeration, since most natural numbers do not correspond to a valid program.
For the purpose of this challenge, assume a doubly infinite tape and no comments, i.e., a Brainfuck program is valid if and only if it con...
@AlexA. After going through the Many Memes of Meta, it seems that the image is in fact Jeff Atwood's work. Sadly, I don't have enough rep on SO to see deleted questions.
Yes, I can see it. I probably miss the context to know why it's so special. Looks similar to the picture that Alex linked earlier, except with a few more answers.
I probably look computer illiterate right now, but is there a good way of creating an image from a whole web page? If it requires scrolling in the browser window?
Most of the answers were probably written as jokes. Not sure about the question. Sometimes you would be amazed (in a bad way) about the level of some questions. In the style of: I'm getting a compiler error saying that a semicolon is missing on line 13 of my code. Why is that? Oh, maybe.... there's a semicolon missing on line 13?
Convert Brainfuck to MarioLANG
code-golf code-generation
MarioLANG is a two-dimensional programming language where the source code resembles a Super Mario Bros. level. Furthermore, its instruction set is very similar to Brainfuck's. This means that MarioLANG is essentially a 2-D Brainfuck where...
Create the shortest possible obfuscated FizzBuzz implementation.
To be considered obfuscated, it should satisfy at least one of the following:
Does not contain any of the words "Fizz", "Buzz", or "FizzBuzz"
Does not contain the numbers 3, 5, or 15.
Use any of the above in a misleading way.
R...
MarioLANG is a two-dimensional programming language where the source code resembles a Super Mario Bros. level. Furthermore, its instruction set is very similar to Brainfuck's. This means that MarioLANG is essentially a 2-D Brainfuck where the instruction pointer moves like Mario. So when I wrote ...
@Sp3000 off the top of your head, can you think of a code golf challenge that mostly follows the "Language, N bytes" format but uses both links on language names and struck-through scores?
@georgeunix yes, the snippet can currently handle that
the problem is it can't handle language names that are links, and I want to fix that... but because the snippet doesn't currently handle it I've been actively editing it out of the answers on many of my own challenges :/
Get home by ONLY turning right
You're finally trying to get a drivers license. About halfway during the lesson, the instructor decides that you've sufficiently mastered telling the gas- and brake pedal apart. It's time to practice the next thing: turning right.
The challenge
Your program is pr...
So here's a new idea for defining true quines: if you define a new language where you replace all syntax-elements and built-ins of the language in question with different characters (like Alphuck for Brainfuck) but keep their functionality, the output of the translated program in the new language must still be the original source code.
(any arbitrary characters like string contents, custom variable names etc should not be replaced, eval should still evaluate original syntax, and stringification should still yield the original syntax)
@PeterTaylor ^
on a different note, I'm waiting for a sufficiently simple challenge to inaugurate Labyrinth :D
@BetaDecay I'd give him a day at least to fix it. The comment isn't even entirely correct. FizzBuzz may appear if 3, 5 and 15 didn't appear or if any of those were used in a misleading way. Of course, he doesn't do any of those things.