'PHP.net recommends avoiding stacking ternary operators. "Is [sic] is recommended that you avoid "stacking" ternary expressions. PHP's behaviour when using more than one ternary operator within a single statement is non-obvious.'
JavaScript (ES6), 5 characters
Thanks to @ETHproductions and @ATaco for helping with this; this was a group project, and although the original idea was mine, many of the details are theirs. See the chat discussion where this JavaScript subset was developed here.
[]+=`
It's fairly well establi...
@Kzqai Good question, but I think you may be slightly underestimating how much traffic is involved in a DDOS, and also how much traffic xkcd.com already has. I wouldn't expect the traffic generated from answers here to be significant compared to either of those. — trichoplax1 min ago
lol I named my command line flags for output f for file read, u for unicode decoding (according to however jelly does it :P), n for trailing newline, k for trim input (because file weirdness), and y for debug just so that normally it would be fun, or funk for my use, or funky to debug :D
Apparantly, the single largest C source file on GitHub is several dozen megabytes large, and has the first hundred thousand or so prime numbers hardcoded into an array.
I originally wrote RProgN in lua, and as a result, it was slow, and constrained to doubles, that and types didn't make much sense. So I rewrote the entire thing in Java, improved the syntax so it didn't waste a lot of space with whitespace, switched to Win1252 to double the amount of single-byte functions I could have, and also moved to arbitrary size floats. Much better now.
@Phoenix My sister is named Maria (Masha) and she has a friend whose shortened name is "Dasha". There's a Russian children's book called "Masha and Dasha" ("Masha i Dasha")
@Phoenix Some more details: I'm aiming for a Haskell-like type system, maybe a bit different in some aspects, but definitely something much more comprehensive than a "basic" type system.
Write 3 programs that do the following task:
Let A, B, C source codes of those three programs;
if A runs BC is produced as output,
if B runs CA is produced,
if C runs AB is produced;
so each program writes a string (cycled for each program) and hides itself from it.
Additional, but essent...
tbh I suspect it might look different if I started it in the bottom left even if I swapped the colours backwards because there are a lot of lines at the bottom
@Jim so, first it generates eller maze
then, starting from the top left, it colours a pixel, pushes the neighbours into a queue, then colours the next pixel in the queue, adding its neighbours too, and so on
a flood fill image
kinda
also colour constancy makes the images look weird as heck
like, some of the parts look like they're shaded red, but if you showed the zoomed in version to someone who didn't see the image, they would not call it red
Smallest number which is divisible by all integers [1 ... n]
Input: A non-negative integer, n.
Output: The smallest integer which is divisible by every integer from 1 to n inclusive. Note that, by convention, the output for n=0 is 1.
Rules and clarifications:
You can write a program or funct...
Note: This is related to a variation of the game Rummikub
Background & Rules
Rummikub is a tile-based game. There are four colors: red, orange, blue and black. For each color there are 13 tiles (labeled from 1 to 13), and there are also 2 Jokers which are color-independent, hence there are 54...
#include <stdio.h>
int main( )
{
int x = 10, y = 3, z;
for(z = 0; z<x; ){
z = z +y;
printf("%d\n", z) ;}
printf("%d\n", z) ;
return 0;
}
and this code :
#include <stdio.h>
int main( )
{
int x = 10, y = 3, z;
for(z = 0; z<x; ){
z = z++ +y;
printf("%d\n", ...
I'm wondering do we have a meta discussion / consensus on feasibility issue? For example, a code is theoretically right. But it needs unreasonable time or memory for some example inputs.
@Cowsquack Didn't think so, I was trying to do an answer for codegolf.stackexchange.com/questions/86075/… because I can't see one in Carrot already but I didn't want to just hardcode the output.
Alec and Bob are playing a game called Card Wars. Both players have one deck containing N cards each. The hierarchy of card values is as follows: ace (marked with the symbol A), king (K), queen (Q), jack (J), ten (T) and from nine to two (9−2).
The game is played in turns. In every turn, each pl...
Probably a simple code-golf challenge. Given 2 positive integers m and n, make a list of n values that are positive integers whose sum is equal to the number m.
Examples
For example
m=6 and n=3 would become 2, 2, 2
m=7 and n=3 would become 2, 2, 3 or 2, 3, 2 or 3, 2, 2
m=7 and n=2 would beco...