6 ms·
A brainfuck compiler written in PHP
- followchrisp 12y agoI once wrote some PHP. It's the worst language. I can't believe anybody would write a respectable compiler, for a respectable language, in this junk.
- bank_to_google 12y agoAnd yet, all over the Internet, real websites, real business, is getting built using PHP. Whilst people write fractal of a bad blog post, the smart folks are quietly delivering.
- followchrisp 12y agoQuietly delivering bad code in an outdated language.
- bank_to_google 12y agoIt is possible to write good, or bad code, in any language. If you think the choice of language will define the level of your code, then you still have a lot to learn.
- assertchris 12y agoTrolololol
- the_solution 12y agoThen why don't you code your websites in brilliant elegant brainfuck? The statement "It is possible to write good, or bad code, in any language" (1) might be true, but it misses the point. Consider "With or without cancer you are going to die" which universally true for all humans (as far as we know). But it also misses the point if applied to the question of whether you want to have cancer or not. Particularly, your statement (1) is irrelevant to the question if it is a good idea to use PHP to make any kind of software that is functional, maintainable, reliable, secure, scalable etc. And anyone who has actually programmed in PHP knows, that just for example, it is VERY difficult to make a secure PHP program. Just because there are a thousand non-obvious ways to shoot yourself in the foot which are directly caused by weird quirks of the language. It might be possible to get this right, but if it is, it is a lot more difficult than in a language with e.g. sane rules for type conversions. If you think all programming languages are equal, then you still have a lot to learn.
- fotcorn 12y agoFor reference: http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/
- Ambrosia 12y agoI hear this fairly often from php developers, but isn't a large part of it just wordpress/mediawiki/other installations?
- forgotpasswd3x 12y agoCome one man, don't take everything so seriously.
- the_solution 12y agoThe implied "it is used by a lot of people so it must be good" is a non sequitur. Also, all these "real websites" also have very real problems that come from using PHP.
- TazeTSchnitzel 12y agoAll these "real websites" which use other languages also have very real problems from using other languages.
- the_solution 12y agoSuch as? Also, this is completely besides the point.
- sponno 12y agoNext thing you know they will be compiling PHP with PHP.
- alexbilbie 12y agohttps://github.com/ircmaxell/PHPPHP https://github.com/ircmaxell/PHPPHP
- sponno 12y agoHeehee
- juriansluiman 12y agoThere is PHP parser written in PHP [0], a PHP VM implementation (running PHP code with PHP) [1] and a AOT compiler for PHP which is written in PHP, for a subset of the PHP language [2]. So yeah, it is already happening. [0] https://github.com/nikic/PHP-Parser https://github.com/nikic/PHP-Parser [1] https://github.com/ircmaxell/PHPPHP https://github.com/ircmaxell/PHPPHP [2] https://github.com/google/recki-ct https://github.com/google/recki-ct
- old_sound 12y agoAlso https://github.com/google/recki-ct https://github.com/google/recki-ct
- danpalmer 12y agoWhy would you put a joke language that people use to troll other developers, and Brainfuck together into the same project?
- kyriakos 12y agoIf for every PHP-bashing comment on HN, people would rather write one more line of open source code, the world would have been a better place.
- TazeTSchnitzel 12y agoOr spent time trying to improve PHP.
- the_solution 12y agoWhat would be the point of this? Any significant improvements would make it a different language.
- TazeTSchnitzel 12y agoI can't agree. It's not fundamentally broken.
- namesakes 12y agoNext up, PHP compiler written in brainfuck