Challenge
Given a string input, output the demolished version of it.
The Process
P
r Pr r
o o o
g g g
r r r rogr r
a -> a -> a -> a -> a -> -> -> -> ->
m m m ...
@HyperNeutrino that is full version of emc and applies to all things, not just photon, but most of the time we talk about rest frame w/ p = 0 so we simplify
I need to get a presentation done, is there anything particularly intresting that happened in the last two weeks or so in technology/science? You'd think it would be easier to come up with a topic but I'm kinda stuck ._.
There is an old, popular riddle:
Find an english word with 8 letters that, taken away one letter, creates a new valid word. Repeat that until there is no letters left.
Example solution:
starting
staring
string
sting
sing
sin
in
I
Write a script that, given a file with words*, outputs one...
Edge Cases are Fun!
Your task: write a program or function that when given an ASCII string or integer input, returns it UNLESS:
Special cases:
Input -> Output
42 -> "Life, the Universe, and Everything"
"Hello" -> "Howdy"
"Life, the Universe, and Everything" -> 42
...more soon
I ran into a small usability problem with the StackExchange link on the left side of the header bar. I liked that I could quickly see responses from various SE sites. But it wasn't immediately obvious how to close it. There was no "X" in the upper-right corner and simply clicking on an open sp...
Frankenstein's Name
code-golfstringrandom
Introduction:
Since it's almost Halloween, I was just thinking of some random Halloween-themed challenges. Eventually I was reading through Frankenstein's wikipedia page, and came across the following text:
The creature
Part of Frankenstein's ...
Find the greatest line
code-golf array-manipulation
You will be given a 2-D array A of integers, and a length N. Your task is to find within the array the straight line (horizontal, vertical or diagonal) of N elements that yields the highest total sum, and return that sum.
Example
N = 3, A =...
Given a string as input, print a new string with each letter pushed to the right by its respective alphabet index.
We all know that A is a slow and Z is a fast letter. This means that Z gets shifted to the right by 25 spaces, A doesn't get shifted at all and B gets shifted by 1 space.
Your prog...
There are known knowns
code-golf kolmogorov-complexity string
Former US Secretary of Defense, Donald Rumsfeld, famously popularized the phrase "known knowns." Here we're going to distill his remarks into a four-line stanza.
Specifically, output this text:
known knowns
known unknowns
unknown k...
@Pavel I reckon its a combination of the language restriction, the "We hate pop-cons" current attitude, and the fact that the task is not even suited for a pop-con style question
I think a lot of the downvotes (mine included) are due to the language restriction. There's literally no point to having that as part of the challenge specification. And the OS restriction. And the fact that the wordlist is poorly specified.
TIO feature-request Add a language guesser. Runs the code in every language in which it doesn't error :P
@NieDzejkob Yeah, I was golfing it, and couldn't realise why it wasn't working
\o/ I'm at the top (second) of the answer-chaining askers, and the bottom of the answer-chaining answerers :PPP
Oooh, new challenge idea. Any thoughts? Answer-chaining doing a task (undecided yet, but something to do with Fibonacci) where your code has to be of length n, where n is the lengths of the previous two answers added together
@AdmBorkBork See, I don;t get that. I think using the definition: "Your code must not work if any subset of characters are removed" should be enough to prevent padding?
Not necessarily. Just put a check in that validates the length of the source code against a magic number. That was one of the methods used a lot in Programming a Pristine World.
@cairdcoinheringaahing A number, usually unexplained, that should be replaced with a CONST or the like with a description. Here, it would be the length of the code.
How about an answer-chaining question where you output sequences, and the program length of the next answer is your sequence a(m) where m is the length of the previous answer's program
The way you choose your next sequence depends on a(m) sure, but m in that challenge uses the A number from OEIS. My version uses the bytecount of the answer before you
For example, I as the author start with Fibonacci and my code is 12 bytes long. So the second answer must be F(12) or 144 bytes long but some other sequence
Although, that does raise the question, can answer-chainings be closed as dupes, given that they all rely on the first answer. For example, if I reposted the OEIS one, but starting with sequence 1, rather than 210, it would be totally different
So you write (in a practical language, probably), the original Kolakoski sequence starting with [1,2]. Here f(144) has to be 1 or 2, which means the third answer must be 1 or 2 bytes long
The challenge is in the back-and-forth of the bytecount
Hunting The Wren
Write a program to produce the words to the folk song Hunting The Wren.
http://www.youtube.com/watch?v=80n4CW0dE1A
"We're hunting the wren." says Robin to Bobbin.
"We're hunting the wren." says Richard to Robin.
"We're hunting the wren." says Jack of the land.
"We're hunting t...
Is there a name for a function that ceils when positive but floors when negative? So ceil(-9.5) = -10 instead of -9. (I know it can be done with sign and abs.)
Q: Do we have a site blog? I don;t think so, but I'm not sure
Also, I love the fact that Jon Skeets last chat message was "I should really go and do some ironing...". It makes it seem as though he's been doing ironing since 2011 :P
Be typically flexible efficiently
code-challenge
Write a short function that returns outputs of different types. If L is the length of your code and T is the number of different types returned, your score is (T−1)/C. The highest score wins.
Obviously your programming language must have a clea...
Just a quick question, how would you learn languages like Jelly or Charcoal? The GitHub documentations are usually a bit vague, atleast for my understanding.