Densely packed decimal (DPD) to decimal code-golf binary conversion
Background
Densely packed decimal (DPD) is a way to efficiently store decimal digits in binary. It stores three decimal digits (000 to 999) in 10 bits, so it is much more efficient than naive BCD (which stores one digit in 4 bi...
Hmm, anyone know off-hand if there's a challenge that simulates a cisco ios ping? I'm thinking have it be a 50% chance of packet loss, animate . or ! to the console for each tick, then output the percentage of success. Something nice and simple
I wonder what the most important skill in code golf is
Obviously ability to solve the problem in the first place, ability to estimate whether an approach is short, fluency, working memory, knowledge of idioms, perseverance are all important
But is there one of those that especially distinguishes top golfers?
Premise:
For those in networking, you've most likely have had send a ping to or from something to make sure everything's properly connected. Cisco, a popular company in networking[citation needed], has a command for it in their IOS that looks like this:
(Image source)
Your challenge is to g...
@lirtosiast It might, but probably not for awhile. There's still enough off-the-cuff questions that can be chucked out without needing to refine it all that much.
I have a question. Related both to this answer, this answer and this meta answer. Both of my answers in MathGolf end with ], which wraps the stack in an array.
Some people say that the wrapping is unnecessary since it only serves to format the output, while others say that since MathGolf's output format don't print the stack as an array, but as a joined string, I should keep the wrapping in array. What should I do? Should I save a byte but have output badly formatted, should I place the ] in the footer? Should I accept the extra byte for those solutions?
The principle that languages are defined by their implementations overrides most others, and as it's currently implemented you can't distinguish 314 from 3, 1, 4
This is a restricted-source, kolmogorov-complexity, code-golf challenge to produce a fixed output with no input.
The output format, however, is flexible - it may be printed to standard out, printed to standard error, returned as a list of characters, returned as a list of bytes, or returned as a...
Task
Write a function or a program to find the number of rotations required by a wheel to travel a given distance, given its radius.
Rules
Input can be 2 positive rational numbers and can be taken in any convenient format.
Both inputs are of same unit.
There must not be any digits 0-9 in you...
Do we have a generalised diagonal challenge? I.e. return the list consisting of elements [0,0,…,0], [1,1,…,1] … [k,k,…,k] of a size kⁿ, n-dimensional array?
It can possibly be made more interesting by not guaranteeing dimension lengths, e.g. [[[1,2],[3,4],[5,6]],[[7,8],[9,10],[11,12]],[[13,14],[15,16],[17,18]]] → [1,10]
@EriktheOutgolfer That's an alternative challenge. :-)
@Adám \\#(\_(?\/\r\*) solves that case, I haven't tried any other cases, but I think the logic holds. When I get my current changes up to TIO I could probably knock off 2-4 bytes.
Here are the annual returns for a hypothetical S&P 500 stock index fund for each calendar year from 1928 to 2017, expressed as a multiplier. So in 1927 you might say "the index went up by 37.88%" which I've represented here by 1.3788.
1.3788, 0.8809, 0.7152, 0.5293, 0.8485, 1.4659, 0.9406, 1.413...
Would it be a good idea to have a community wiki answer on restricted-source challenges to collect the languages that cannot solve the challenge? (e.g. Find an Illegal String could probably use one)
@Adám Hmm. Well, the other idea that came to mind while writing it up was a separate answer for each language--like a regular answer, but proving impossibility instead. I suppose that would be against the rules as well?
@Adám Now there's an idea--a proof-golf challenge for proving something is impossible in your language of choice :-) Not what I was going for though; I just want to somehow establish that the optimal solution in a given language is no solution.
@Adám Here's a question related to mine. The difference is that this one talks about generally impossible challenges, not just im/possible per-language. Couldn't find one about per-language.
@ETHproductions Linus Torvalds released Git four years after he released Linux, so that kind-of makes sense. The date you have is just a week after Git was released.
In digital electronics, a NAND gate (NOT-AND) is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the gate are HIGH (1); if any input is LOW (0), a HIGH (1) output results. A NAND gate is made using transistors and junction diodes. By De Morgan's theorem, a two-input NAND gate's logic may be expressed as AB=A+B, making a NAND gate equivalent to inverters followed by an OR gate.
The NAND gate is significant because any boolean function can be implemented...
I've been fine with the logic part of electrical engineering (what the game is based off of) but the wiring and grounding and all that ... never been good with it.
@EriktheOutgolfer Nothing else is necessary if you have NAND :P
You can even set up an oscillator clock with ⎕FX'c←c' 'c←2|6⊃⎕TS'. Now if you continuously query c you'll see that it switches between 0 and 1 every second.
@Skidsdev yeah, i felt like it needed an intermediate step there, at least by showing how the adders get chained up (not that it's very important or anything, but still)
Many challenges, mainly restricted-source, are impossible in some languages. Find an Illegal String is a good example—many languages without syntax errors, such as brainfuck (deleted answer), can simply be put in an infinite loop before the illegal string is reached within the code. The challenge...
CMC: Let X1, X2, X3, …, Xn be a list of integers given. Output the product Y1 * Y2 * Y3 * … * Yn, where Yk is the lowest natural number whose prime factors are the same as Xk's (that is, without counting multiplicities)
I asked the bank what would happen if I just close the account. They said they'd send a cheque with the remaining balance. I wonder where they'd send it…
That's the same bank that refused to let me cancel my loan because of that missing letter in the address, so I had to keep paying interest even though I had already paid back the entire loan.
How comes I have two Visa cards with the same card number, different expiration dates and different 3 digits on the back? Does that mean that multiple answers to those two things are valid for a single card number?
Bank renewed my card which was same number ,diff exp dates and security code. I think they were both valid during the overlap of ordering it in the mail and getting it