Skip to main content
added 80 characters in body
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26

Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case. A trailing newline is treated the same as J, which doesn't affect the output.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3) up by one to skip the letter J, and then the decoded character is printed.

Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case. A trailing is treated the same as J, which doesn't affect the output.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3) up by one to skip J, and then the decoded character is printed.

Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case. A trailing newline is treated the same as J, which doesn't affect the output.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to skip the letter J, and then the decoded character is printed.

added 80 characters in body
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26

This expects inputworks with or without anya trailing whitespacenewline in the input.

Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case. A trailing is treated the same as J, which doesn't affect the output.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3) (the letter I) up by one to skip J, and then the decoded character is printed.

This expects input without any trailing whitespace.

Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3) (the letter I) up by one, and then the decoded character is printed.

This works with or without a trailing newline in the input.

Each character is processed mod 32 (with control flow such that the code implementing the mod operation only occurs once in the program). This enables case insensitivity, as well as collapsing the space character and EOF into a single case. A trailing is treated the same as J, which doesn't affect the output.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3) up by one to skip J, and then the decoded character is printed.

deleted 21 characters in body
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26

Brainfuck, 293283 bytes

,[[<[>-[>>>-<<<----[----[>+<------[>-<------[<[-]>>>>[-]->>[-]<<<<<-]]]]]>[>>>>+
<<<<-]>>+<[>[>+<-]>>[>+<-]<<<-]<,<<[>>>+<<<-]>]>+[<+>[-<<]>[[-]+++++[<++++++>-]<
+<]>>>]<]>>[-]>+>>+[[-]>[<+>-[<+>-[<+>-[<+>[-]]]]]<<<]>->[>+<-[[>+<-]>>+>]>>]>>+>]>[+>-- 
--
 [->>]<[>>]<+++++>]+[>]]]+[-<+]>>+++++++++++++[>+++++<-]>.,]
,
[
  [
    <
    [
      >-
      [
        not a
        >>>-<<<
        ----
        [
          not e
          ----
          [
            not i
            >+<
            ------
            [
              not o
              >-<
              ------
              [
                consonant
                <[-]>
                >>>[-]->>[-]<<<<<-
              ]
            ]
          ]
        ]
      ]
      >[>>>>+<<<<-]> >+<
      [
        prev was vowel
        >[>+<-]>>[>+<-]<<<-
      ]
      <,<<[>>>+<<<-]
      >
    ]
    >+
    [
      <+>[-<<]
      >[[-]+++++[<++++++>-]<+<]
      >>>
    ]
    <
  ]
  >>[-]>+>>+
  [
    [-]
    >[<+>-[<+>-[<+>-[<+>[-]]]]]<
    <<
  ]
  >->
  [
    >+<-
    [
      [>+<-]
      >>+>
    ]
    >>---->
    [->>]
    <[>>]  +>----[->]
    <+++++>]
  ]
  +[-<+]
  >>+++++++++++++[>+++++<-]
  >.,
]

Try it online.Try it online.

When a space or EOF is reached, some juggling is done to deal with letterreduce counts greater than 4 and to shift table entries greater than (1,3) (the letter I) up by one, and then the decoded character is printed.

Brainfuck, 293 bytes

,[[<[>-[>>>-<<<----[----[>+<------[>-<------[<[-]>>>>[-]->>[-]<<<<<-]]]]]>[>>>>+
<<<<-]>>+<[>[>+<-]>>[>+<-]<<<-]<,<<[>>>+<<<-]>]>+[<+>[-<<]>[[-]+++++[<++++++>-]<
+<]>>>]<]>>[-]>+>>+[[-]>[<+>-[<+>-[<+>-[<+>[-]]]]]<<<]>->[>+<-[[>+<-]>>+>]>>----
 [->>]<[>>]<+++++>]+[-<+]>>+++++++++++++[>+++++<-]>.,]
,
[
  [
    <
    [
      >-
      [
        not a
        >>>-<<<
        ----
        [
          not e
          ----
          [
            not i
            >+<
            ------
            [
              not o
              >-<
              ------
              [
                consonant
                <[-]>
                >>>[-]->>[-]<<<<<-
              ]
            ]
          ]
        ]
      ]
      >[>>>>+<<<<-]> >+<
      [
        prev was vowel
        >[>+<-]>>[>+<-]<<<-
      ]
      <,<<[>>>+<<<-]
      >
    ]
    >+
    [
      <+>[-<<]
      >[[-]+++++[<++++++>-]<+<]
      >>>
    ]
    <
  ]
  >>[-]>+>>+
  [
    [-]
    >[<+>-[<+>-[<+>-[<+>[-]]]]]<
    <<
  ]
  >->
  [
    >+<-
    [
      [>+<-]
      >>+>
    ]
    >>----[->>]
    <[>>]
    <+++++>
  ]
  +[-<+]
  >>+++++++++++++[>+++++<-]
  >.,
]

Try it online.

When a space or EOF is reached, some juggling is done to deal with letter counts greater than 4 and to shift table entries greater than (1,3) (the letter I) up by one, and then the decoded character is printed.

Brainfuck, 283 bytes

,[[<[>-[>>>-<<<----[----[>+<------[>-<------[<[-]>>>>[-]->>[-]<<<<<-]]]]]>[>>>>+
<<<<-]>>+<[>[>+<-]>>[>+<-]<<<-]<,<<[>>>+<<<-]>]>+[<+>[-<<]>[[-]+++++[<++++++>-]<
+<]>>>]<]>>[-]>+>>+[[-]>[<+>-[<+>-[<+>-[<+>[-]]]]]<<<]>->[>+<-[[>+<-]>>+>]>[+>-- 
--[->]]]+[-<+]>>+++++++++++++[>+++++<-]>.,]
,
[
  [
    <
    [
      >-
      [
        not a
        >>>-<<<
        ----
        [
          not e
          ----
          [
            not i
            >+<
            ------
            [
              not o
              >-<
              ------
              [
                consonant
                <[-]>
                >>>[-]->>[-]<<<<<-
              ]
            ]
          ]
        ]
      ]
      >[>>>>+<<<<-]> >+<
      [
        prev was vowel
        >[>+<-]>>[>+<-]<<<-
      ]
      <,<<[>>>+<<<-]
      >
    ]
    >+
    [
      <+>[-<<]
      >[[-]+++++[<++++++>-]<+<]
      >>>
    ]
    <
  ]
  >>[-]>+>>+
  [
    [-]
    >[<+>-[<+>-[<+>-[<+>[-]]]]]<
    <<
  ]
  >->
  [
    >+<-
    [
      [>+<-]
      >>+>
    ]
    >
    [
      +>----[->]
    ]
  ]
  +[-<+]
  >>+++++++++++++[>+++++<-]
  >.,
]

Try it online.

When a space or EOF is reached, some juggling is done to reduce counts greater than 4 and to shift table entries greater than (1,3) (the letter I) up by one, and then the decoded character is printed.

deleted 22 characters in body
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26
Loading
deleted 22 characters in body
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26
Loading
edited body
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26
Loading
Source Link
Mitch Schwartz
  • 5.9k
  • 1
  • 27
  • 26
Loading