According to this page, the best strategy to guess English hangman words is to calculate the odds of each letter in a word list that met our conditions. But, as I'm really lazy, I don't really want to compute every word in the dictionary by myself. But, as I know that you are always here to help ...
There's at least one language where anything between quotes is printed straight to STDOUT - except for your snippet it would also exit with an error to STDERR
As for the primality criteria... I'm kinda having trouble telling if this one passes. It's based on BF, for one thing
@MartinBüttner Why does your challenge require either a Wikipedia or Esolangs article about the language? That disqualifies both Ostrich and Snowman ;(
@MartinBüttner what is that? From what I've found it's some language that nobody's ever been able to actually run, which means it violates the rules for what a "language" is
Without trailing spaces it is 2,865. I'll update my answer. I think my tabs got turned into spaces so the byte count when copy and pasting from my answer is off.
This is my program currently to calculate sum of following series:
Here it is in c++:
#include <iostream>
using namespace std;
int main() {
int fac = 1, x, p = 1;
float sum = 0;
cout << "\nENTER x: ";
cin >> x;
p = x;
for(int i = 2; i <= 4; i++) {
fac *= i;
...
lazy asker with an off topic problem proceeding to attempt to boss people around by saying we shouldn't downvote his question and later to migrate his question
I'm also disappointed that the text of neither the github nor esolangs pages seem to have ??? programs embedded into them. Missed opportunity right there.
@PeterTaylor Yes, but it would make more sense. Or it could just be "your language must have a wikipedia article, an esolangs article, or have been used on PPCG before."
Here is a piece of C++ code that seems very peculiar. For some strange reason, sorting the data miraculously makes the code almost six times faster.
#include <algorithm>
#include <ctime>
#include <iostream>
int main()
{
// Generate data
const unsigned arraySize = 32768;
int data[arr...
It's 2015 already, folks, go home.
So, now that it's 2014, it's time for a code question involving the number 2014.
Your task is to make a program that prints the number 2014, without using any of the characters 0123456789 in your code, and independently of any external variables such as th...
Note: This question was severely edited since I first posted it here. The rules were moved to here, read them before posting any answer to understand the purpose of this. This was the first question created in the code-trolling category.
Imagine a lazy user on Stack Overflow asks this question:
...
I was considering creating an answer where it looks like it prints "Hello, World!" in JS (but it doesn't), prints "Gotcha!" in BF, and the H in Hello would print "Hello, World!" in HQ9+
Then I noticed that HQ9+ is specifically called out in the rules.
This is the second idea I abandoned. I wrote a program in another language, just to find out that it cannot take input, so it doesn't count as a programming language...
My previous answer was criticised for not drawing a line in a sand, so following some discussion on chat I propose a line.
Executive Summary
A purported programming language should be accepted as such if and only if it is capable of addition of natural numbers and primality testing of natural n...
@MartinBüttner OK, thanks. What about different versions of the same language? For example, would the FORTRAN crack be valid without specifying 77? Could I write something that works only in Ruby 1.9?
hm, Dennis's looks a lot like the Gravity example on esolangs, but I can't find an interpreter, and it's still quite different, so I'd be surprised if it's actually Gravity...
But since the time pressure is off, I'll take the time to add in the feature I was originally planning for Minsky Register Machines (III): a macro system.
In this challenge, you are to draw the chessboard below, and allow for moves to be made.
1. Drawing
Each white square has 5x9 spaces.
Each black square has 5x9 colons.
The board is surrounded by a border of colons.
The pieces are 5 characters wide and sit on the bottom row of the square in t...
You work for military as a coder and are responsible for writing a software to control missiles. Your task is to write a program or function that will output a code sequence (any length ASCII string) to launch a missile. The program should be based on a loop taking the code sequence from memory a...
@PeterTaylor System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Twisting Words
Given a string and a positive integer. You must twist the string, back and forth.
Example Input / Output
Input
Programming Puzzles & Code Golf
4
Output
Prog
mmar
ing
zzuP
les
oC &
de G
flo
Input
The input can be taken in through STDIN, or function argument. The input w...
Sorry, my question was ambiguous. What I meant was: why does it matter that the interpreter won't run in Mono? I don't think the question requires the interpreters to be platform-independent.
@PeterTaylor Thank you for the feedback in the sandbox. Do you have any preference for the different options then? With your judgement on difficulty I'd probably go for distance from the root?
You can download virtual images for various Windows versions directly from Microsoft. Officially they're for testing your website in IE, but it's certainly possible to install / upgrade .Net.
@Dennis Ah, that would be a problem, yes.
You don't know anyone with a good connection who can download a 4GB file for you?
@PeterTaylor you know, if I ask for the length of the shortest sequence, then people still have all the options available for returning the shortest sequence (and appending a length call), but it might open up new approaches where the entire sequence doesn't need to be stored.
Print a String by Flipping Bits
code-golf
This challenge is loosely inspired by the unimplemented esolang Pada.
Consider an array of 8 bits, all initialised to zero. We'll introduce a very minimalistic instruction set to print arbitrary strings. There are two instructions, both of which take a...
Challenge:
Your challenge (should you choose to accept it) is to compress and decompress the 5MB "Complete Works of William Shakespeare" as found here:
http://www.gutenberg.org/cache/epub/100/pg100.txt
(MD5: a810f89e9f8e213aebd06b9f8c5157d8)
Rules:
You must take input via STDIN and output vi...
@Dennis I guess it doesn't work in Windows Batch. I'm glad someone else mentioned that because I had forgotten that my Windows VM takes about 30 minutes to boot up.
@AlexA. It isn't. I asked a friend and both quotes and dot are displayed. Given that everybody gets only one guess per answer, I don't think you should have deleted your comment.