It's alright, flawr. I've found that math, like most things, is a thing you have to practice a lot to get decent at. Like piano or dancing or code golfing.
And not everyone makes time to practice math and mathematical thinking. I think people should, but I don't think it should shoved down people's throats like it is in classrooms (it's not mathematics at all, in my opinion)
@flawr You get the same reaction to piano, dancing, code golfing, gaming, plumbing, 120-hour weeks for lawyers, double shifts for doctors, politics (being in government all the time? You must be crazy) and any sort of teaching
To not be considered crazy do nothing and comply with everyone, but then that is also crazy. At some point, you'll just have to not give a s*** and be "crazy".
Every day, every minute, ... every microsecond, many decisions are made by your computer. In high-level languages, these typically take the form of statements like if, while and for, but at the most basic level there exist machine language instructions called branch/jump instructions. Modern proc...
@AlexA. Somewhat relatedly, I am thinking about how to set up a server for king-of-the-hillandfastest-code where people can set up their own challenges and competing entries are pulled from SE answers. I plan to close the excessive memory security hole for the Minkolang online interpreter today, which will be a piece of the sandbox framework.
Another benefit is that pulling this off would mean that I developed a very rare skill: letting random people run code on my server safely (relatively).
@AlexA. I asked about that a few days ago, and someone found a question on SO (?) where the answer is essentially that they run code from within a process/program that heavily restricts system calls and the like, which is itself inside a sandbox of some sort.
@mınxomaτ I acknowledge that. I'd like to say, however, that I think one difference is that I'm not trying to do this all at once. I'm building up pieces through other challenges.
Also, any kind of sandbox would be impose all kinds of weird edge case restrictions on fastest-code. Best thing is to have someone apply for an account and give them restricted SSH access to run the things they need, then wipe.
@El'endiaStarman Well, if you'd like to share server resources with challenge authors of fastest code, just give them a temporary account on the server (aka login) so they can use SSH or X2Go to run all the entries. Then wipe the account. This can be automated in a few bytes of bash.
Detour, 11 bytes
<T>R+.
;\$<
This is non-competing: I just pushed the required version of the language about 10 minutes ago.
Detour works like befunge, fish etc. except for one crucial difference: where those languages redirect the instruction pointer, detour redirects data.
Input is pushed ...
@AlexA. How would it not? Every system call has to pass the sandbox or gets executed in a sandbox environment, which does not represent a real system. If I where to participate in any fc challenges, I'd demand a test for all entries on one, real, machine. Every layer of emulation (no matter how deep) affects the speed.
If one submission uses CPU feature X and the other not, but Y instead, and X and Y are implemented/optimized differently in the emulator layer, they are not comparable.
Let's say I beat another entry by using a GPGPU component that is common on real hardware, but almost absent or just CPU-emulated in a Sandbox/Virtual Machine. Then my entry would be astronomically faster on an everyday machine, but would loose in the sandbox due to poor implementation of this feature. This is just one example, there are hundreds just like this.
@mınxomaτ but this relatively rare. Maybe an appeal process? If the answerer tests both answers on his machine and finds his winning he can appeal and get the asker to test on his real machine
The biggest problem right now with fastest code challenges is basically that no one wants to go to all that effort of running the entries for every single challenge they do.
My aim is to make a place where the computer takes care of that part.
Including having multiple options for choice of language.
With highest number challenges if it's hard enough you can just let people post the highest they were able to achieve. For some problems, where the amount of time between numbers is high enough that just "as much time as you're prepared to let your computer run" is sufficient to distinguish between programs
Then the author doesn't need to run anything.
There's still the issue of trusting
Sometimes even that doesn't matter if the high number is linked to some output that proves the work was done
@El'endiaStarman Another simple Problem I just thought of: Compiler differences. Say C# for example. Running a C# program using Mono will always be slower due to a longer time spent in the less optimized JIT (plus missing C#6.0 support). The .NET Framework (4.6.1) JITter "RyuJIT" on Windows will crush that additional startup time. Again, only relevant in the ms-realm, but those are the edge cases you have to think about.
@mınxomaτ So fastest-code is for micro-optimizations only and fastest-algorithm is for writing code using a better algorithm? I don't think that's right.
Continuously output the Distance from the Earth to the Sun
This will be a code golf challenge. code-golf
Introduction
Simplified, the orbit of the Earth around the Sun is an ellipsis. So the actual distance between both is constantly changing. This distance can be calculated for any given ...
@mınxomaτ Now that you've brought that up, I like the former a lot more than the latter. A good algorithm in Python might lose to a bad algorithm in C, which seems slightly unfair.