4-Person Standoff
tags: king-of-the-hill
Description
You've somehow landed yourself into a four-way standoff. You have a gun loaded with 10 bullets, and a grenade hidden in your coat. The objective is simple: stay alive, or at least have the least deformed corpse if everyone dies.
Each playe...
I just got "spam/offensive" flags on my icon here. And I thought I had fucked up somewhere. But when I clicked and read, I realized I didn't write that. Then I realized the significance of the flag being in blue, meaning a mod-tools review kind of thing. I didn't know I could do that in chat!
I've got to say, I think helper classes are a huge plus for more complex koth challenges
and rather speak for a single language approach
of course even better would be writing some boilerplate code to handle reading the input and formatting the output and some helper classes for entries in several languages
Implement nl code-golf
Your task is to implement a program similar to the nl program from the GNU core utilities.
Standard loopholes are banned.
You may not use any built-in or external function, program or utility for numbering the lines of a file or string, such as nl itself or the = command...
does anyone here have an account on HN? I posted the tweetable maths challenge there, in hopes that we might inspire some more people from around the webz to submit amazing answers... so if you wouldn't mind giving it an upvote... news.ycombinator.com/item?id=8130969 ;)
if someone has a reddit account, I'm sure there's a subreddit that would love to see this, too
I also pondered simulating the entire web as an ecosystem and comparing searches to pages (and pages to each other) using Bray–Curtis dissimilarity to make a search engine
if I can ever be bothered to look into creating my own programming languages I really wanna try make one where spaces are valid identifier names and parameters can go inside a function identifier (smalltalk style)
then you could have define a function like Is [Rectangle] a square? and if Jimmy is the potential square you're dealing with, you'd just call it like Is Jimmy a square?. Resolving ambiguities will be fun...
I guess it would be awesome enough if you could call it like Is [Jimmy] a square?
@MartinBüttner It would be interesting if the thing could detect that a Foo ___ blah yadda function existed and that a bar variable existed and intelligently decide which one actually makes sense. That would be fun to program. :D
Let's have a vote for all languages (such as PL/I) that tried to do away with reserved words.
Where else could you legally write such amusing expressions as:
IF IF THEN THEN = ELSE ELSE ELSE = THEN
(IF, THEN, ELSE are variable names)
or
IF IF THEN THEN ELSE ELSE
(IF is a variable, THEN a...
Langton's ant is a two-dimensional Turing machine with a very simple set of rules but complicated emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells. The universality of Langton's ant was proven in 2000. The idea has been generalized in several different ways, such as turmites which add more colors and more states.
== Rules ==
Squares on a plane are colored variously either black or white. We arbitrarily identify one square as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The ant moves...
@Trimsty well yes... but could there be multiple variables falling around... because that would immediately give you race conditions but also a way to parallelise things
I think I might need a moderator to decipher whether or not my bot is the same as another bot, the outcome is the same but I am thinking that the method of getting there is comically different.
How does one plot Venn diagrams with Mathematica? I've searched quite a bit and I've found one source at MathWorld which provides the source code for doing them.
But I don't understand this code, can someone help me?
Edward Scissorhands
No one had made a Scissor spam bot, so I did.
puts 'S'
Run as
ruby EdwardScissorhands.rb
Daenerys Targaryen
No one had made a Lizards spam bot either, so I did that too. Rains fire down on her enemies.
puts 'L'
Run as
ruby Khaleesi.rb
Dice Throw Bot, C#
Truly Random
using System;
using Microsoft.CSharp;
using Microsoft.Win32.SafeHandles;
using System.Collections.Generic;
using System.Linq;
public static void Main (string[] args)
{
var computerPlay = GetRandomOption(gameGestures);
IList<Gesture> gameGestures = GetGes...
if the first one is 6 there is a high possibility that one called immediately following it will also call 6, this wouldn't be the case if I were using a larger range like say 100 or 1000
What does it mean for a question to be protected?
Protected questions have the additional restriction that new users are not permitted to answer the question. Unlike locked questions, they can still be edited, commented on, and voted on. You can even vote to close them.
Why are some questions...
Using a horrible memory cheap method I've created a 3566 by 1345 solution for the 4-way multiplexer. I don't think this is good enough; only took 3 minutes to solve though ;)
@Doorknob Just notifying you; the OP of the short story question has replied to your comment but they misspelled your name, so you probably won't get an inbox notification.