Reddit Programming
201 subscribers
1.22K photos
126K links
I will send you newest post from subreddit /r/programming
Download Telegram
Can any AST be refactored to a purely prefix or postfix execution?
https://www.reddit.com/r/programming/comments/1fsyihi/can_any_ast_be_refactored_to_a_purely_prefix_or/

<!-- SC_OFF -->So I have been writing a programming language as a hobby. It really isn’t much but in short the idea is that any program can be expressed in either infix, prefix, or in postfix format. While at runtime all code is executed in postfix. I am wondering if there isn’t any code which cannot be refactored to be able to run postfix? I was wondering this because I have been thinking about type and memory safety. Thinking regardless of how a program is compiled if the AST can be refactored to a postfix format then it would be easier to know if something if both defined and in a valid state. Or conversely if made prefix then abstracted away variable scope using combinators the state and validity of data can be validated as a look ahead. Such a check would be monitoring a variable in three formats definition, domain and range. Which the compiler can do at compilation. I’m learning towards postfix checking because then much of the work just revolves around monitoring to state of the stack. Which seems easier than lambda abstraction evaluation. <!-- SC_ON --> submitted by /u/maxjmartin (https://www.reddit.com/user/maxjmartin)
[link] (https://github.com/maxjmartin/Oliver-Code-Examples) [comments] (https://www.reddit.com/r/programming/comments/1fsyihi/can_any_ast_be_refactored_to_a_purely_prefix_or/)
Windows or MacOS
https://www.reddit.com/r/programming/comments/1fszv3l/windows_or_macos/

<!-- SC_OFF -->Which is better for coding?? I mean, I understand there’s more like Linux. But I’m deciding between these two in order to buy a laptop. I really appreciate your opinion. And btw, I’m new to this world so… please, be kind. There’s too much things I don’t know yet <!-- SC_ON --> submitted by /u/Saurobit (https://www.reddit.com/user/Saurobit)
[link] (http://apple.com/) [comments] (https://www.reddit.com/r/programming/comments/1fszv3l/windows_or_macos/)
Stroke Width Transform - A Text Detection Algorithm (written in Python and runs with parallel processing) have a look and give a star if you like it!
https://www.reddit.com/r/programming/comments/1ft8bar/stroke_width_transform_a_text_detection_algorithm/

submitted by /u/Affectionate_Good790 (https://www.reddit.com/user/Affectionate_Good790)
[link] (https://github.com/vrlelif/stroke-width-transform) [comments] (https://www.reddit.com/r/programming/comments/1ft8bar/stroke_width_transform_a_text_detection_algorithm/)