Skip to content

Instantly share code, notes, and snippets.

@lasermtv07
Last active November 13, 2023 18:37
Show Gist options
  • Save lasermtv07/7c82ca76d54248136f8c12ea4b07ddd2 to your computer and use it in GitHub Desktop.
Save lasermtv07/7c82ca76d54248136f8c12ea4b07ddd2 to your computer and use it in GitHub Desktop.
String uwufier in brainfuck

String uwufier in brainfuck

did I genuenly spent a day on this?

Description

Uwufier makes your text look more like.. uwu.. idk. It essentially replaces all instances of the characters l,r,L and R with the letter w - hence it is a simple search and replace program

Usage

Just put the text into standart input lol. The output is displayed in standard output.

Note

This program often prints a null terminator, which is normally invisible, however some interpreters, notably tio.run print nonprintable characters with that unicode missing square. Hence, I recommend you use the El Brainfuck interpreter or the minond.xyz


Copyright © 2023 lasermtv07 <[email protected]> This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

>>>>,[[-<+>>>>+>>>>+>>>>+>>+<<<<<<<<<<<<<]<<<<++++++++++[>+++++++<-]>++++++>>[<<
->>-]<<[>>>>>]<+++++++++[>+++++++++<-]>++++++>[>>]<.[[-]>>>>>[-]>[-]>>>>[-]>>>>[
-]>>[-]<<<<<<<<<<<<<<<<]<<[-]>[<<<++++++++++[>++++++++<-]>++>>[<<->>-]<<[>>>>>]<
+++++++++[>+++++++++<-]>++++++>[>>]<.[<<<<[-]>>>>[-]>>>>>>[-]>>>>[-]>>[-]<<<<<<<
<<<<<<<<<]<<[-]>[<<<<[-]++++++++++[>++++++++++<-]>++++++++>>>[<<<->>>-]<<[>>>>>]
+++++++++++[>+++++++++++<-]>--<<[>>>>>>]>>.[>>>>>[-]>>[-]<<<<<<<[-]<<<<<[-]<<<<[
-]]<[<<<[-]++++++++++[>+++++++++++<-]>++++>>[<<->>-]<<[>>>>>>>]<<<.<<[>>>>>>>]>>
[-]<<<[-]<[-]<<<[-]<<[-]<<<[-]<<<<[-]<]]]>>>>,]
| |
O~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~O
| The brainfuck uwufier |
| (c) lasermtv07 2023 |
| released under the WTFPL license |
O~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~O
>>>>,
[
[ ~copy input for 4 checks
-<+> >>>+ >>>>+
>>>>+ >>+ <<<<<<<<<<<<<
]
<<<<++++++++++[>+++++++<-]>++++++ ~saves 76 (L) to appropriate cell
>>[<<->>-]<<[>>>>>]< ~check by itself (if specific cell =0 match)
~note: checks are done in such way that a constant (eg 76) and input are decremented
and then remainder is checked on the constant
+++++++++[>+++++++++<-]>++++++ ~saves 87 (W) to cell
>[>>]<. ~print W
[ ~reset array
[-]>>>>>[-]>[-]>>>>[-]>>>>[-]>>[-]
<<<<<<<<<<<<<<<<
]
<<[-]> ~start check for R
[
<<<++++++++++[>++++++++<-]>++ ~saves 82 (R) to appropriate cell
>>[<<->>-]<<[>>>>>] ~check by itself (if specific cell =0 match)
<+++++++++[>+++++++++<-]>++++++ ~saves 87 (W) to cell
>[>>]<. ~print W
[ ~reset array
<<<<[-]>>>>[-]>>>>>>[-]>>>>[-]>>[-]
<<<<<<<<<<<<<<<<
]
<<[-]>
[
<<<<[-]++++++++++[>++++++++++<-]>++++++++ ~saves 108 (l) to appropriate cell
>>>[<<<->>>-]<<[>>>>>] ~check by itself (if specific cell =0 match)
+++++++++++[>+++++++++++<-]>-- ~saves 119 (w)
<<[>>>>>>]>>. ~print w
[ ~reset array
>>>>>[-]>>[-]<<<<<<<[-]
<<<<<[-]<<<<[-]
]
<
[
<<<[-]++++++++++[>+++++++++++<-]>++++ ~saves 114 (r)
>>[<<->>-]<<[>>>>>>>]<<<. ~check and print
<<[>>>>>>>] ~helper to reset array
>>[-]<<<[-]<[-]<<<[-]<<[-]<<<[-]<<<<[-]< ~reset array
]
]
]
>>>>,
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment