@cairdcoinheringaahing the worst thing is ehen your trying to sleep and think of something and you eant to get up and get back fo coding but can’t because you need to speep
@user I've pulled an all nighter before because as I was falling asleep, I thought of a way to remove a byte on my Enigma machine (like 6 months after posting it), and had to spend the next 5 hours twisting Jelly chains to save 3 bytes
alright this has been entertaining but I'm going to request that we go back to typing at least somewhat properly to make things are actually legible and reasonably understandable
Also, if you're using 2D languages, you have a high chance of being outgolfed by Jo King (even if it's your own language) (and some small chance by me :P)
@lyxal i don't know what this whole "apioformic" thing is about but it might entertain you to know that the Asia-Pacific Informatics Olympiad is a real competition with the acronym of APIO
Implement Fix2 code-golf functional-programming lambda-calculus
Background
The fixed-point combinator \$\textsf{fix}\$ is a higher-order function that computes the fixed point of the given function.
$$\textsf{fix}\ f = f\ (\textsf{fix}\ f)$$
In terms of programming, it is used to implement recurs...
Array with first n numbers
code-golf decision-problem array-manipulation
Input a non-empty array with \$n\$ elements. Test if the input array contains every numbers in \$1\cdots n\$.
Before I type more details (I thought the task itself is clear enough until here), consider these sandbox questio...
Given a positive number \$n\$ you have to find \$\bf another\$(not same as n) positive number \$m\$(if there exist one, does it always exist??) such that if we insert same digits in both n and m the resulting fractional value is same
$$m/n = m_{transformed}/n_{transformed}$$
$$or$$
$$m*n_{transfo...
We star sensible things such as " It's spam. Flag it as spam. Custom flags don't go away when the post is deleted as spam." instead of silly things such as "Sleep is for cowards with sensible body clocks"
@Wezl + is commutative, concatenation isn't. Still uses + for strings because of Java (you can use ++ instead as Strings can be converted to Seqs, but there's a tiny bit of overhead from the implicit conversion and extra call to ++)
yes, but more specifically they take the left and right of a pair of values, respectively, and a dyadic function is just a monadic function that takes a pair
remember - ⁺ doesn't group the atom and its duplicate, it literally just copy-pastes the same thing into the source code :P
@Adám learning which built-ins are where just takes practice and time in Jelly, lol. and unlike in APL it's not always obvious which built-in fits which purpose, and there isn't a good mnemonic for most of them
5
like after you showed me what flip, flip the other way, and transpose looked like, i still remember them a few weeks later even without ever using APL since then :P
@hyper-neutrino No, postfix order in Jelly expands from the outmost quick in (e.g. +"€ is each, then zip). However ⁺ directly duplicates the link in the chain as its run (it's a hyper, not a quick) so it doesn't work that way
@cairdcoinheringaahing right, but evaluation order is still LTR, as in you first convert + to a vectorize, and then apply each to it
likewise, ;⁺⁺ first duplicates ;, then duplicates the second ; again (since unlike quicks it doesn't pop some links and push one link, it actually pops one and pushes two, or whatever the equivalent implementation is)
@hyper-neutrino Personally, I prefer the description that it acts from the middle out. The best way to see it is in Jelly's plus-minus example, where +,_ just makes sense, that the , goes in the middle
@cairdcoinheringaahing yeah, that's fair. i gave the more technical explanation pretty much directly from what the tutorial said, but i like that intuitive explanation
@cairdcoinheringaahing ah right that one. the one i can never remember how to search for, so I just scroll through the quicks page because it's not as long
Given that Dennis wants Jelly to be as backwards-compatible as possible, I should probably make a version of the fork that just has the additions in case it ever gets pulled