The top answer was correct at the time but is now wrong; you can do it in pure javascript. But the one answer using javascript doesn't work any more, and the other answers are pretty limited or don't use pure javascript.
I made my own solution that works well and lets you control the volume, fre...
Exploding Quines!
code-golfquine
You will be making a program/function of length n that:
Puts the kth char at the center of the space, where k = (n+1)/2. This will be the location of your ground zero.
Puts the rest of the chars randomly arranged around ground zero. The Pythagorean distance ...
Introduction
Some days ago I needed a metronome for something. I had none available so I downloaded an app from the App Store. The app had a size of 71 MB!!!
71 MB for making tic-toc...?!
So code-golf came into my mind and I was wondering if some of you guys could improve this.
Challenge
Gol...
JavaScript, 36 bytes
a=6e4/readline();while(1)print("\7")
Uses the JavaScript shell. Uses the SpiderMonkey shell. It might work on rhino but I'm not sure
Parse an "Efficient" Encoding
Let us define a fictitious encoding "ENCWID", that follows this general form: there are three bits that denote the length of the following character, for each character. This looks something like this:
WWWN..N
^^^^--- the actual character
^^^------- width bits; ...
@CᴏɴᴏʀO'Bʀɪᴇɴ I never did comment on this last night, did I? Well, it occurred to me that your encoding scheme will never be better than Huffman coding. That said, it is an encoding that I don't think we've had a challenge on, so I think it should be fine.
In computer science and information theory, a Huffman code is a particular type of optimal prefix code that is commonly used for lossless data compression. The process of finding and/or using such a code proceeds by means of Huffman coding, an algorithm developed by David A. Huffman while he was a Ph.D. student at MIT, and published in the 1952 paper "A Method for the Construction of Minimum-Redundancy Codes".
The output from Huffman's algorithm can be viewed as a variable-length code table for encoding a source symbol (such as a character in a file). The algorithm derives this table from t...
@FlagAsSpam By the way, we had two "Vitsy"s on the Discord server some time ago and we deleted one but we don't know if that was the right one because a) we forgot to ask and b) you haven't been on in a while... I think
Bash, 53 bytes
Okay, truth time: I'm terrible at golfing bash. Any help would be so very appreciated.
read a;while true;do printf \\a;sleep $((60/$a));done
Have you guys done a cops/robbers sort of thing where the cops post a challenge to output one pattern and the robbers change it to output another pattern by only changing, adding, or removing a maximum of X characters?
osascript, 39 bytes
on run a
repeat
beep
delay 60/a
end
end
There is literally a command called beep? Sweeeet!
Runnable only on Mac OS X due to restricted license, but to run, do:
osascript -e "on run a
repeat
beep
delay 60/a
end
end" bpm
@orlp I wonder, what happens if you run an image comparison that highlights which regions are more / less similar to the original. As in, color each pixel according to its accuracy.
@orlp I was considering trying to compress the greyscale image. greyscale itself has an error of about 2800 or so, but it might be easier to avoid additional errors if there's only one channel to compress.