Files
ioccc/2014/vik
Landon Curt Noll f29b37e49a improve HTML menus, add social.html, prep for IOCCC28 winners
Prepare for the winners of **IOCCC28**.

> However these are not the 2024 droids you are looking for.  :-)

The HTML menu (both JavaScript and non-JavaScript) has been updated.

The `Status -> Rules and guidelines' have been replaced with two
separate menus `Status -> IOCCC rules` and `Status -> IOCCC guidelines`.

Added a new top level `social.html` page: built from a new `social.md`.

Sorted rules for building specific web pages in the top level `Makefile`.
Added `make social` to make the `social.html` page from `social.md`.

The `bin/gen-top-html.sh` now is able to process a argument of **social**
to process the new top level `social.html` page.

Changed `bin/gen-top-html.sh` VERSION from "2.0.0 2025-03-13"
to "2.0.1 2025-07-25".

Below `About -> Home page` a new `About -> IOCCC social media` menu item
as added.

Because the menu change touched every HTML file, we changed the general
copyright date range for HTML files from "1984-2024" to "1984-2025"
due to the extensive changes made for **IOCCC28**.

Those markdown files that were modified in 2025 had their copyright date
range also changed from "1984-2024" to "1984-2025".

Rebuilt tarballs and sitemap due to the extensive HTML rebuilding.

Ran `make update` to perform the above.
2025-07-26 13:06:29 -07:00
..
2023-10-15 08:35:14 -07:00
2020-12-30 16:57:03 -08:00
2023-07-06 21:49:38 -07:00
2024-10-15 06:51:04 -07:00

To build:

    make

There is an alternate version that will theoretically work with Windows compilers (if anything in Windows works :-) ). See the Alternate code section below.

Bugs and (Mis)features:

The current status of this entry is:

STATUS: known bug - please help us fix

For more detailed information see 2014/vik in bugs.html.

To use:

    echo foo | ./prog > audio_file.raw

    echo foo | ./prog | mplayer -demuxer rawaudio -

Try:

    ./try.sh

Alternate code:

The alternate code, prog.alt.c, is based on the author's instructions on how to get it to work with Windows.

Alternate build:

    make alt

Alternate use:

Use prog.alt as you would prog above as well as below.

Judges' remarks:

This program sets a new tone for obfuscation. But do you understand what it says about obfuscation? Perhaps:

    ./prog < prog.c > prog.raw

might speak to your coding style? If not, then perhaps:

    ./prog < README.md | mplayer -demuxer rawaudio -

might help? :-)

Author's remarks:

Remarks

This program converts ASCII text to Morse audio file and vice versa. As far as I can tell, there are at least six chocolate references in this program.

This program can convert text to Morse to a raw 44.1kHz stereo audio file. Via streaming to mplayer(1), you can listen to the Morse audio.

Don't forget the last '-' as it makes mplayer(1) read from stdin.

Convert audio file with Morse signals to text

    ./prog e < audio_file.raw

or alternatively pass a .wav file as input.

The preferred input format 44.1kHz stereo, but it does a decent job on mono input and different frequencies as well.

Portability

The program is portable to most platforms. The only system dependency is that the program relies on writing binary data to stdout.

Microsoft compilers add a carriage return to newlines, and to compile the program with this platform, the following line can be added to main() before any code in order for the program to run correctly:

    _setmode(_fileno(stdout), 0x8000);

NOTE: see the Alternate code for this.

Known Issues

The program uses a quite simple algorithm for detecting tone on and off events in the Morse signal. Hence the program does not work well with noisy input signals. I have tested it with several samples of man made Morse recordings as well as computer generated ones.

Generally, any recording from ham radio transmissions does not decode due to noise and echoes. Other man made recordings may decode, but some characters can be incorrect due to too big variation in length of tones and pauses. However I found some man made recordings on that decode reasonable well.

If a recording doesn't decode, you could try to pre-process the input with a narrow bandpass filter on the frequency of the transmission.