This is particularly hideous. zhitm normally returns the amount of damage the zap does, and since it can't be negative I'm returning a negative value to tell buzz to stick the two monsters together and deal no damage.
I'm too lazy to change the function signature to zhitm
Story behind this: MS gave the NT5 kernel source to some universities some time ago (a decade really). I finally managed to get my hand on a copy. Unfortunately, they only provide help and configs for x86, which is worth nothing. So after over a year or so of debugging, I managed to set up a build environment for a x64 kernel.
What you see above is the first working kernel, built from scratch, which runs WinXP x64 Pro (latest) without any issues. The debugger is tracing the kernel which is where the greeting comes from. Blog post(s) coming at some point.
@El'endiaStarman For a price. First off: I can't share any parts of the source, even the kernel extensions I've written. Second: I can't ever contribute anything to any NT-like FOSS project from now on (ReactOS, Wine etc.) because of the license's IP clause.
Randomly Misspell a Word
code-golf string random
Inspired by this CR question
Spec
The probabilities of misspelling a word are:
1/3 of the time don't change the output
1/3 of the time remove a random character
1/3 of the time duplicate a random character
The chance for removing/duplicatin...
Inspired by this CR question (please don't kill me for browsing CR)
Spec
The probabilities of misspelling a word are:
1/3 of the time don't change the output
1/3 of the time remove a random character
1/3 of the time duplicate a random character
The chance for removing/duplicating a given ch...
@NathanMerrill Well, the idea is that you generate some noise, then you pick some cutoff and make everything above the cutoff land and everything below water.
You could possibly also do the same for territory assignment.
If you tweak the hallways to be minimum length, they would serve as chokepoints though. It's customizable enough for a lot of different things, and the source is available.
In a programming language of your choice, write a full program that, when run, prints a positive integer N and then modifies its own source file such that the next time it is run it will print N+1.
For example, this (ungolfed) Python 3 program satisfies this behavior:
N = 1
print(N)
with open...
Challenge
In this challenge, you will be writing the first program, p1, of an infinite sequence of programs, in which running pn outputs/generates program pn+1. When concatenating the first n >= 2 programs, the sequence should output n.
Example
Let's say the first 4 programs are:
p1 p2 p3 p4
...
So at the start of the game you have 900 lifetime nutrition, with 300 in protein (corpses), 300 in carbs (food/cram rations), and 300 in fruits/vegetables
On a more serious note, remind me to get Spotify premium soon. I need to pay these people if their customer support trolls people who include "halp pls" in their requests.
You will be given a list of radii, you must output the smallest rectangle which they will all fit in.
For example, given the list [5,3,1.5] you would output 157.460.
This is the image:
The width is 15.7460 and the height is 10, so the area is 157.460
Rules:
You get the list via stdin, out...