@wizzwizz4 how have you done that? I can't seem to make a=5; console.log(a+"") log something not 5 (unless you mean to make a.toString() not 5 in which case it's easy but I wouldn't call that a bad thing)
@wizzwizz4 I wouldn't say that toString being modifiable is bad as sometimes there could be legitimate reasons to add functions to the Number prototype and IMO it doesn't make sense to arbitrarily block toString from being modifiable
Knightmare in 1024 bytes of JavaScript
king-of-the-hill javascript grid board-game
Board
The board is a 16x16 grid of squares. It does not wrap, so the outer edges are an impassable boundary.
Pieces
Each piece is like a Chess knight, and will be referred to as a knight. It moves to a squar...
@wizzwizz4 That's just to explain chess knight moves. If it's confusing I may have to add a full board image too, once I've settled on which numbers to use
@wizzwizz4 yeah y'see, there's the problem. If people use it then they'll want new features. plus JS was first written in 10 days so it had to be improved a lot
@ASCII-only I want a board big enough to prevent brute forcing, but small enough to force stepping on the same square multiple times. A huge board would require a huge number of turns to avoid the knights simply skipping from zero cost square to zero cost square
@Dennis Ah, yes, I remember having that problem when using SE as a demo site.
Had to use boring ol' example.com instead.
CMG: Guess the language!
Post an extract from documentation, and the rest of us will have to work out which language it applies to.
No exact text searching allowed.
Example:
> Friendship is not transitive (a friend of your friend is not your friend) > Friendship is not inherited (your friend's children are not your friends)
> Use of the O command is subject to two restrictions. First, if an O command is stored in a Q-register as part of a command string which is to be executed by an M command, the tag referenced by the O command must reside in the same Q-register.
> EY Same as the Y command, but its action is always permitted regardless of the value of the Yank Protection bit in the ED flag. Remember that Yank DESTROYS the current buffer; there's no way to get it back!
> For each character c of the line (including the trailing linefeed), the code point of c is XORed with the accumulator divided by 2, and the Unicode character that corresponds to the resulting code point is appended to the source code. Then, the difference between the code point of c and the integer 32 is added to the accumulator, and the next character of the line (if any) is processed.
Presburger arithmetic is the first-order theory of the natural numbers with addition, named in honor of Mojżesz Presburger, who introduced it in 1929. The signature of Presburger arithmetic contains only the addition operation and equality, omitting the multiplication operation entirely. The axioms include a schema of induction.
Presburger arithmetic is much weaker than Peano arithmetic, which includes both addition and multiplication operations. Unlike Peano arithmetic, Presburger arithmetic is a decidable theory. This means it is possible to algorithmically determine, for any sentence in the...
> Glivický and Kala recently produced a model of Presburger arithmetic where the Fermat Last Theorem fails, and there are infinitely many counterexamples.
@feersum now I might be wrong (I'm just on the top of P.3)
it seems that they augmented the language to 0 1 + · e ≤
where e is an exponential function not satisfying induction
and then they claimed to have constructed a model where every identity about the natural number holds, and that the function e satisfies elementary identities about exponentiation
and that it has a submodel satisfying presburger arithmetic
The general strategy is still refuting a statement about natural numbers like "For all x,y blah blah blah..." with "ha ha, you forgot to say all natural x,y!"
Golf the linux kernel
kolmogorov-complexity compression
This file [to do: make the file and provide a link] contains all the code in the Linux kernel, concatenated together into a single file. Your task is to output all the code in this file.
The code in the file has been stripped of all comme...