This hole is experimental, no solutions will be saved.

QR Encoder

Details

Encode ASCII string to a Version-1 QR code of this ASCII-art format, where all the v and ^ must be filled with "#" and spaces.

    #######  vv^^ #######
    #     #  vv^^ #     #
    # ### # #vv^^ # ### #
    # ### #  vv^^ # ### #
    # ### #  vv^^ # ### #
    #     #  vv^^ #     #
    ####### # # # #######
            #vv^^
    ### #####vv^^##   #
    vv^^vv ^^vv^^vv^^vv^^
    vv^^vv#^^vv^^vv^^vv^^
    vv^^vv ^^vv^^vv^^vv^^
    vv^^vv#^^vv^^vv^^vv^^
            #vv^^vv^^vv^^
    ####### #vv^^vv^^vv^^
    #     # #vv^^vv^^vv^^
    # ### # #vv^^vv^^vv^^
    # ### #  vv^^vv^^vv^^
    # ### # #vv^^vv^^vv^^
    #     # #vv^^vv^^vv^^
    ####### #vv^^vv^^vv^^

The 10 vertical "strips" of ^^ or vv must be written from right to left. The bits in a strip are written in a zig-zag order: ^^ zig-zags upwards, and vv zig-zags downwards. The bit on the right always precedes the one on its left.

      ^^ ..       vv 10
      ^^ 98       vv 32
      ^^ 76       vv 54
      ^^ 54       vv 76
      ^^ 32       vv 98
      ^^ 10       vv ..

The strips are filled with data from a bitstream:

    0100  00010001  01001000  01100101  ...  01101111  0000  11000000  11111111  ...  11101110
    Enc   Length    'H'       'e'                 'o'  End   c0        ff             ee
    (4)   (17)      (17-byte ASCII message)            (0)   (7 error correction bytes)

To encode a bit from the bitstream to a strip, determine the coordinates (x, y) of the current position in the bitmap with the origin (0, 0) at the top-left corner, invert the bit if (x+y)%2 = 0, and write the value to this position ("#" = 1, space = 0).

0 bytes, 0 chars
Restore solution
All
Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
Top-level programs are supported, args holds ARGV. Implicit using directives for console applications are enabled.
Arguments are available via STDIN, each argument is NULL terminated. Taking input after EOF leaves the cell unchanged, the tape is circular with 65536 cells, and cells are 8-bit with wrapping.
Code is compiled with clang with -std=c++2b.
Code is compiled with LDC2.
Arguments are available via STDIN, each argument is NULL terminated. x is a no-op.
Arguments are available via STDIN, each argument is NULL terminated.
arguments holds ARGV, print() to output with a newline, write() to output without a newline.
Code is run under -E, all current features are enabled.
$args to access the arguments.
prolog_flag(argv, Args) to access the arguments.
Arguments are available via STDIN, each argument is seperated with a null byte. The code is run with -E and -z. Output replaces null bytes with newlines.
SELECT arg FROM argv to access the arguments, only the first column of the first result set will be printed, NULL values will be skipped, and the dialect is SQLite.
Arguments are available via args list variable. To terminate script execution, write and quit the current buffer.
ctrl + enter or

Delete Solution

Are you sure you want to delete your solution(s) for QR Encoder?

If you have seperate bytes and chars solutions then both will be deleted.

This is irreversible, please backup any code you care about.

Type I understand and press confirm to continue.