Three men who were lost in the forest were captured by cannibals. The cannibal king told the prisoners that they could live if they pass a trial.
The first step of the trial was to go to the forest and get ten pieces of the same kind of fruit. With that, the three men went their separate ways to gather fruits.
The first one came back and said to the king, "I brought ten apples."
The king then explained the trial to him. "You have to shove the fruits up your butt without any expression on your face or you'll be eaten."
Background
Actually (the successor to Seriously) is a stack-based imperative golfing language I created in November of 2015. Like many other golfing languages, it has one-byte commands that perform different functions based on the contents of the stack. One of its specialties is mathematics - it...
Convert all star numbers to binary: [].slice.apply(document.querySelectorAll(".times")).forEach(function(e){e.innerHTML = parseInt(e.innerHTML, 10).toString(2)});
Upvoted @dmckee's comment but just have to add that "-funroll-loops" always sounds like the name of a cool roller-coaster at a theme park to me :-) — VickyJan 10 '13 at 17:24
@CᴏɴᴏʀO'Bʀɪᴇɴ If it's not a standard library, then pip install readline. If you don't have pip, then look up how to install that (probably easy_install pip or something like that).
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>easy_install
'easy_install' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>python3 -m p
ip
'python3' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>"C:\Python34
\python3" -m pip install readline
Downloading/unpacking readline
Running setup.py (path:C:\Users\CONORO~1\AppData\Local\Temp\pip_build_Conor O'
Brien\readline\setup.py) egg_info for package readline
error: this module is not meant to work on Windows
Complete output from command python setup.py egg_info:
error: this module is not meant to work on Windows
----------------------------------------
Cleaning up...
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>seriously
Requested Python version (3) is not installed
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>
@El'endiaStarman I've only ever used it for three things: (1) getting familiar enough with the language so I can say I know another lang, (2) running calvin's picture programs, and (3) trying to run seriously
@El'endiaStarman it'd be so convenient to automatically have a list of arguments passed to your programs, including a dictionary of arguments passed like -option=value
@NathanMerrill I already parse a few arguments for Pytek. Stuff like -t for printing the AST and -c or --code for passing in code as an argument as opposed to a filename.
Oh, @NathanMerrill -- speaking of $_ here's a couple more PowerShell fun automatic variables -- $^ is the first token of the previous command, while $$ is the last token of the previous command.
"MKV is more flexible - it is designed to accept virtually any video and audio compression CODECs, supports embedded subtitles in numerous formats, allows attached metadata such as chapter information, etc.
MP4 is limited only to MPEG4 audio and video. In practice, this mean that you can use H264 video, and AAC audio only. DTS and AC3 audio CODECs are not officially supported, neither are MP3, etc."
@TimmyD I am not sure that makes sense.. mp4 is also a container which supports MPEG-2 Part 2, MPEG-4 ASP, H.264/MPEG-4 AVC, H.263, VC-1, Dirac, others
.mp4 is from the MPEG task force, which is technically open in that it's an ISO/IEC standard, but there's a lot of patent cruft that's associated with it. Matroska is both "free as in speech" and "free as in beer"
What is the most efficient algorithm to check whether all number up to N will end in $x=1$ under iterating $f (x)=x/2$ if x is even and $f (x)=(3x+1)/2$ if x is odd.
Hint all one needs so show that for all x
Parse a 1D language
Given a string containing only 0's 1's, 2's and brackets, output the grammer tree of the string.
A 2 requires 2 arguments - one to the left and one to the right
A 1 requires a single argument - to either the left or right
A 0 doesn't require any arguments and is the base c...
When discussing performance with colleagues, teaching, sending a bug report or searching for guidance on mailing lists and here on SO, a reproducible example is often asked and always helpful.
What are your tips for creating an excellent example? How do you paste data structures from r in a tex...
@trichoplax But if I do the "non-zero probability for every board" doesn't that seem to imply a brute-force algorithm is really the only way? Kinda seems like it.
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>node golfnum
16
4╙
sending to TIO for response
TIO result: 16
Result is same as input!
C:\Users\Conor O'Brien\Documents\Programming\PPCG\actually metagolf>
@TimmyD In between the two extreme cases, you could ask for a minimum size of the range of outputs. For example, there must be at least 10 different possible outputs. Or there must be at least m*n different possible outputs.
That's probably the best approach. Something like "Your code must be non-deterministic, in that it must produce a different board for a given input each run. However, not all possible boards for that input must necessarily be possible -- only at least two boards must have non-zero probability. This does mean your code is allowed to only produce two distinct boards for a given input, and just randomly choose between them for output."
I have a list, l and a function f. f is not strictly increasing or decreasing. How can I find the item in the list whose f(item) is the smallest? For example, let's say the list is:
l = [1, 2, 3, 4]
and list(f(x)for x in l) is:
[2, 9, 0, 3]
f(3) is smaller than f of any of the other ones, s...
Mmm, I suppose I could get rid of the ;exit portion there ... it shouldn't output any additional values, it'll just keep executing. Also, will only work for values of N smaller than 50,000 since that's the limit of dynamic ranges ... 39 bytes param($n)1..$n|%{if(($j+=$_)-eq$n){$_}}