@phase Yes that's ready. The vote count really doesn't matter as long as the challenge is clearly stated. Maybe just specify if both programs and functions are allowed.
@mınxomaτ: Basically like the benchmarks in benchmarksgame.alioth.debian.org but the benchmark's goal is to calculate a single value (not an array of numbers)
Like.. calculating the determinant of a very large matrix
Yeah, but what about the implementation? On what width should it operate? Single? Double? Extended? Or arbitrary precision? (I.e. native code, managed or interpreted?).
The real question is what you're trying to benchmark. The CPU? The language? ...
Trump needs your help to stop the Starman!
A man from the stars has come to Earth! Luckily the president of the United States, Donald Trump, has an infinity-sided die. Using this die, he can conjure up a number which you, the mayor of Podunk, must use to determine who should be sent to stop the ...
Trump needs your help to stop the Starman!
A man from the stars has come to Earth! Luckily the president of the United States, Donald Trump, has an infinity-sided die. Using this die, he can conjure up a number which you, the mayor of Podunk, must use to determine who should be sent to stop the ...
@grovesNL I did a paper on a pretty secure Hash algorithm designed on top of a strictly floating point PRNG. The PRNG algorithm would probably be a pretty good bench when you initialize it with a large number of rounds since it performs FPU calcs exclusively. You'd have to port the code over to JS though.
@grovesNL The problem with JS is that it matters hugely if you restrict the source to asm.js (which is immensely faster). Here's a popular asm.js benchmark: kripken.github.io/Massive . And here's a more general FPU bench that can be run in JS: fourmilab.ch/fbench/fbench.html
@mınxomaτ: Sounds cool. I'm mostly looking for an implementation of a benchmark in JavaScript so I can try to beat it. I want to try pushing the calculations to the GPU using WebGL but I have no idea if it's even feasible (it would add quite a lot of overhead). That's why I'm looking for long-running calculations
@NewMainPosts Y'know, come to think of it, since Trump has an infinity-sided die, the chance that Pippi will be sent is almost exactly 100%... :P (Assuming a uniform distribution.)
@grovesNL Well GPGPU doesn't make it magically faster. If the algorithm is deterministic, it brings no speed improvement at all. GPGPU (just like Inline Assembly) should only be used very rarely and when it is absolutely needed.
@mınxomaτ: My thought is that I would expect some deterministic algorithms written in GLSL (pushed to the GPU) to act faster than JavaScript in the CPU
@grovesNL You can't run deterministic algos on GPUs, because they rely on previous results (hence deterministic). You would only utilize one GPU shader core :)
@grovesNL So? You still can't pull results from other running cores, because they're all running at the same time. This is an algorithm design problem, not an implementation one.
@grovesNL By the way, an easy way to play with GPGPU (shameless plug) is my library MiniCL. (New version comes out in a few hours, I'd suggest to wait ;-) )
@mınxomaτ: So to clarify, a Monte Carlo/genetic evolution/artificial neural network could theoretically perform much better than native JavaScript, right?
@mınxomaτ: I mean if we were running a simulator in JavaScript that was non-deterministic, we could potentially benefit from pushing the calculations to WebGL. So for evolution, each species could evolve in separate threads
@mınxomaτ: Interesting. I also thought of abusing CSS3 3D Transforms if the WebGL method requires too much overhead (currently I believe I would have to pass bitmap data back)
Skimmed the Wikipedia article and it seems like Javascript had effectively no competitors. It's basically that everyone thought using it was gimmicky and amateurish. It didn't become extremely popular until the advent of AJAX.
Now, this was weird, but I found a use for it: store the length of the array in index 0. Blitz has no dynamic arrays and no len function, so that's how I got around that problem.
Would someone mind taking a look at the thing I just posted in the Sandbox? I've never posted a c-a-r challenge before, and I'd like to hear what people think.
Find the nested source codes
A cops and robbers challenge where the cops write between 2 and 8 programs that produce output in the same language and interweave the programs together. WLOG, let's discuss this action being performed on two programs. By interweaving, I mean adding the characters of...
The characters do not have to be interweaved according to any particular pattern, just so long as removing the characters from either program produces the second program.
Yes, but that is also not recommended. The idea is to write it like 1212211211112122222121121121121112121222222111 or some other random-looking arrangement.
By the way! @Mego, I thought about the problem last night and I realized that you can take the log of each number to turn it into a sum problem. I think that, with further work, you could turn it into the knapsack problem. And/or turn it into a graph problem.
Also, you can fairly easily compute all groupings that share prime factors and then work from there.
(I'm assuming their prime factorizations are already known.)
Anonymous
@El'endiaStarman I think it would be easier to reduce it to subset-sum than knapsack
String Shuffle
Given a list of strings, output a single string formed by taking a character from each string at each position, sorting them by ASCII ordinal, and appending them in order to the output string. In other words, for n input strings, the first n characters of the output will be the fi...
The popular webcomic Homestuck makes use of a programming language called ~ATH to destroy universes. While this code golf challenge is not to write a program to annihilate our existence, we will be destroying some more tame (albeit less interesting) entities: variables.
~ATH (pronounced "til dea...