Smallest Diversifying Exponent
code-golf math
A pandigital number is one which contains every digit from 0 to 9 at least once. 1234567890, 1902837465000000, and 9023289761326634265 are all pandigital.
A diverse pair of numbers is a pair of numbers \$(a, b)\$ such that \$a^b\$ is pandigital. \$...
Write a complete program that reads all the integers from a file called ‘file.txt’ and stores
them in an array (number of elements is not known). Your program should then remove
the duplicated numbers, find and print the sum of all the even numbers in the array as
well as the sum of all the odd n...
A pandigital number is one which contains every digit from 0 to 9 at least once. 1234567890, 1902837465000000, and 9023289761326634265 are all pandigital.
A diverse pair of numbers is a pair of numbers \$(a, b)\$ such that \$a^b\$ is pandigital. \$b\$ is called the diversifying exponent.
Challe...
Apparently my password manager has set my password to ************ after using it on a website which replaces all typed characters with * instead of using input[type=password]
@ASCII-only how would VSL memoization detect is arg set is same. Using binary equality or ==(lhs:rhs:)? Also should it then therefore have a heap store?
Is it a D?
Given an image, check if it's a letter D.
Here D is defined as:
Let pixels labeled \$(x,y)\$ where larger \$x\$ mean at right and larger \$y\$ mean more up. If there exist \$x_0, x_1, f_0, f_1, f_2, f_3\$ such that:
\$ (f \rightarrow (x\rightarrow f(x+1)-f(x)))^n (f_i) (x) >0\$ fo...
also, I think Easy is a really interesting language (although the way it was initially marketed was really obnoxious so many people ended up disliking it as a result)
@dzaima oh right that'd mean that it wouldn't output trailing chars if i changed the background to something other than space, and special-casing that feels wrong
I have a TODO-list in MathGolf, where I just add new features that I'm not going to work on right now, a bunch of times I've said "oh right, that thing was a neat idea that I totally forgot about"
@dzaima One thing that really helped me with development is adding user tests. Basically every answer that I can find in MathGolf I save as a test with expected input and output. Then before pushing to master, I just run all the tests, check that all operators behave as expected, and that I don't break any answer posted by another user on PPCG. No more worries about breaking anything existing
@dzaima Oh that's smart. Since I do compilation to an intermediary file anyway, I can just have two characters mapping to the same byte. Thanks!
@ASCII-only I guess as your language gets more popular, you can't add every script ever made in your language. I think it's difficult to test new features, mainly because there are a lot of implicit handling and combinations of operators that might behave wonky
@ASCII-only Depending on if a string/int/float/list is on the stack, each operator which consumes one item from the stack can have more than 4 outcomes (more for lists of lists/strings/ints etc), and operators that consume 2-3 things from the stack are even worse. So even if you have a test for an operator, you might not have covered every possible case.
@LeakyNun From my understanding, orthodox Judaism is a way of life in addition to being a religion. So if you are more secularized, you aren't labeled as orthodox. Though according to his PPCG description, @Adám is the right person to ask about this. I should clarify that I'm not Jewish
@LeakyNun Sure, just like Catholicism, there are multiple branches of Judaism (at least to my knowledge). Some of my family is Jewish, but they're not strictly orthodox.
The more complicated canvas modifying commands currently sometimes use hacks, like turning the canvas info a rectangle
Anyway, I should probably implement vectorization properly first, then start on fixing that, then possibly some more fancy stuff (more fancy being relative of course)
@flawr my first language and "father-tongue" is Danish. Yiddish was the last language I learned. My mother-tongue in the literal sense is modern hebrew. I mostly communicate in English though due to work
Jewish religious movements, sometimes called "denominations" or "branches", include different groups which have developed among Jews from ancient times. Today, the main division is between the Orthodox, Conservative, Reconstructionist, and Reform movements, with several smaller movements alongside them. This denominational structure is mainly present in the United States, while in Israel, the fault lines are between the Orthodox and the non-religious.
The movements differ in their views on various issues. These issues include the level of observance, the methodology for interpreting and understanding...
@J.Sallé actually, orthodox Judaism isn't split in mutually exclusive factions. The groups are purely cultural, and regard each other as equally valid.
@LeakyNun yes, I'd definitely call my wife a native Yiddish speaker in that her Yiddish is far superior to her second language, and she grew up speaking and reading only yiddish. My kids are truly bilingual as they claim to be equally comfortable in english.
@primo For Conway's constant in Bash, I found the last byte-save entirely by accident, and could not have guessed that it would work. What a coincidence!
There once was a flawr in the room, who said that he likes a haiku. One said it depends, on how one's tongue bends, so what, now, does that say of you?
There once was a man called Doc Seuss, whose rhyming and timing were loose. But we love the green eggs, and ham from pig-legs, so much that his books reproduced :D
A tutor who tooted a flute, Once tried to tutor two Tudors to toot. Said the two to the tutor, "Is it tougher to toot, or to tutor two Tudors to toot?"
@ASCII-only My unit tests for MathGolf is basically just a bunch of scripts that are run with expected inputs and outputs, and a check to see which characters are used in the scripts. To get code coverage in there would require major modifications.
@maxb Oh I'm sure at least the ungolfed version of the answer is perfectly readable to anybody who knows basic JS or other similar languages, I just go into a lot of possibly unnecessary detail
@Skidsdev I have gotten so lazy with explanations in MathGolf ever since I implemented automatic explanation generating... I should probably be more like you with my explanations
@flawr that's a little more unique to programming oriented communities, it refers to common regex search/replace syntax, commonly associated with Vim's find/replace function or the sed commandline tool
There was a young man from Japan, Whose limericks all rambled and ran When told it was so, He replied "Oh, I know!" But it's because I try to fit as many syllables into the last line as ever I possibly can.