Skip to content

Instantly share code, notes, and snippets.

@adamyi
Created June 20, 2020 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamyi/a76d432a131c9ca24c2a4cd4a8f0f9c1 to your computer and use it in GitHub Desktop.
Save adamyi/a76d432a131c9ca24c2a4cd4a8f0f9c1 to your computer and use it in GitHub Desktop.
A fork of https://github.com/ajyoon/systemf/blob/master/examples/http/server.bf that fixes file descriptor leak. weried flex of brainfuck skill
+++++++++++++++++++++++++++++++++++++++++>+++>>+>++>>+>+>>+><<<<<<<<<<%>>>>>>>>>
>+++++++++++++++++++++++++++++++++++++++++++++++++>+++>>+<<<<<<<<<<<<<[>>>>>>>>>
>>>>>+<<<<<<<<<<<<<<-]>>>>>>>>>>>>>>>+>++++++++++++++++>++>>>+++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>>>>>++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++>+++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++>>>>>>>+>++++++++++++++++<<<<<<<<<<<<
<<<<<<<<<<<<<%+[[-]>>>>>>>>>>>>>>>>>>>>>>>>>>+++++++++++++++++++++++++++++++++++
+++++++++++++++>++>>+><<<<<<<<<<<<<<<<<<<<<<<<<<[->>>>>>>>>>>>>>>>>>>>>>>>>>+<<<
<<<<<<<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>+++++++++<<<<<<<%>>>>[<<<<
<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<+++++++++++++++++++++++++++++++++++++++++++>>>>>>>>>>>>>>>>>>>>>>>++>>+++++++++
+++++++++++<<<<<<<<<<<<<<<<<<<<<<<<<%[-<<<<<<<<<<+>>>>>>>>>>]>>>>[->>>>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>>>>>>>>>[-<<<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>
>>>>>>>]<<<<<<<<<<<<<<<<<<<<<<<<<<<>]<[<]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>[>]<[[-]<[<]<+>>[>]<]<[-<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+<<<++>++>+>[>]>>+>
<<<<[<]>%<<<<<<<<<<<<<<<<<+>+++>>+><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<[->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>++>+>+++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++>>+>+++++++++++++++++++++++++++++++
++++>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++
+++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++
+++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++
++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++>++++++++++++++
++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++
+++++>++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++
+++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++>++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++
+++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++>++++++++++>++++++++++><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<%>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>>>>>><[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[
-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[
-]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<[-]>[-]>[-]>[-]>>[-]>[-]>[-]>[-]>[-]>[-]>[-]>[-]>[-]><<<<<<<<<<<<<<+++++++++++
+++++++++++++++++++++++++++++>++++>>+><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<[->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+>>>
>>>>>>>>[-<<<<<<<<<<+>>>>>>>>>>]<<<<<<<<<<>>+>>>++>->-><<<<<<<<<<<<<<<%[-]>[-]>[
-]>[-]<<<+++>+>>+<<<%>>>[-]>[-]>[-]>[-]<<<+++>+>>+<<<%<<<>>>>>>>>>>>>>>>>>>[>]>>
[-]<<<[[-]<]<<<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[-]<[
-]<[-]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[-]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[-<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<[-]>[-]+++>[-]>[-]+>[-]++>[-]>[-]+>[-]+>[-]>[-]+>[-]>[-]+++>[-
]>[-]+>>>>>>>>>>>>>>>>>>>>[-]>>[-]++++++++++++++++>[-]>[-]>[-]>[-]>[-]>[-]>[-]>[
-]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment