22 ms·
A Brainfuck interpreter written in PostScript
- segmondy 3y agoNow, do the inverse and implement postscript in BF
- jraph 3y agoThis is what I've seen others qualify as "quite cursed".
- arethuza 3y agoPostScript is actually a pretty nice programming language, once you get used to it. Edit: I used it for a few years within NeWS & HyperNeWS.
- tambourine_man 3y agoI think that's what they call Stockholm syndrome
- WCSTombs 3y agoPostScript is a pretty good programming language for what it's meant to do, which is put vector graphics in a box. It was the first language I wrote a lot of code in just for fun and not for school or work, specifically to draw a bunch of fractals. It's particularly well suited for that type of graphics whose structure is mathematically determined by a simple algorithm.
- arethuza 3y agoI think that's a bit harsh - this was a complex system written in Common Lisp that had a front end in NeWS with some C plumbing linking the two together. PostScript and Lisp are actually pretty similar when the former is used in an interactive graphical environment (i.e. not on a printer!).
- tambourine_man 3y agoI said it in jest, sorry. I wrote a bit of PostScript because I absolutely had to and it was painful, even though I was thrilled to eventually push through. But I'm very particular about syntax, so the reverse polish notation was enough to upset me. Needless to say, I appreciate Lisp for its power and conceptual simplicity but would never choose to use it.
- arethuza 3y agoOut of interest, which programming language do you prefer?
- tambourine_man 3y agoOh, the most boring ones. Anything with a C-like syntax is off to a good start. I like pragmatic languages, with minimum boilerplate. If I had to list: C, JavaScript, Python and PHP, in no particular order. And I like Bash too, even if it’s less a language and more just a thin veneer of control flows, loops and variables for controlling other executables, it’s still quite useful.
- mananaysiempre 3y agoI mean, it’s a perfectly serviceable postfix Lisp. Postfix Lisps are nice! Other things in the page layout language are less nice (e.g. the nonexistent i18n), but the programming parts are quite pleasant, I think.
- leonheld 3y agoI hate it in the best way possible.
- cjaybo 3y agoSome people just love pain it seems
- dxtrous 3y agoWould it work on a printer?
- colanderman 3y agoLooks like it. I wrote one years ago that does [1] (a BF compiler actually) and this looks similar. (Some other fun PS ditties at that link.) [1] https://chris.pacejo.net/stuff/postscript/index https://chris.pacejo.net/stuff/postscript/index
- local_crmdgeon 3y ago… are you telling me there’s 2 BF PS compilers?
- colanderman 3y agoOnly one to my knowledge; the OP is an interpreter.
- nevir 3y agoThe description is glorious: --- A Brainfuck interpreter written in PostScript This program aims at being accurate, readable and minimal.
- lynx23 3y agoThe most awesome random submission I ever received was a BrainFuck compiler written in BrainFuck, by hand. Short story: I wrote a bf compiler in Emacs Lisp many many years ago. As a small testcase, I included a BrainFuck compiler in BrainFuck, which was written by a guy who wrote a C-alike to BrainFuck compiler so that he could implement his BF compiler in BF. That was a strange piece of code, about 6 pages of plain BF. A few years later, suddenly, I have this mail in my INBOX: A norwegian guy sent me a BF compiler in BF, written by hand. He was unsatisfied by the existing BF compiler, as it was generated. His implementation was about 6 lines of BF code. And it was a magnitude faster. Hats off to that guy!
- lakpan 3y agoHow do you implement a compiler in 6 lines of code, let alone 6 lines of BF code?
- bryancoxwell 3y agoWhat is wrong with you people
- coldacid 3y ago"Some men just want to watch the world burn."
- toast0 3y agoJust a helpful resume tip. If you work on something in Brainfuck, put it on your resume as BF. And don't mention the name of your multi-threaded BF environment.
- flipthefrog 3y agoWonder what to use for MongoDb. "Mongo" is a nasty slur for a person with Downs syndrome in Norwegian
- hanniabu 3y agoI was told mongoloid was the politically correct term to use instead of retarded lol Personally I always thought it sounded more demeaning, kinda sounds like some less developed homosapian ancestor, almost like calling someone a neanderthal
- Twisol 3y agoI don't think that term has been appropriate for a long time... Wikipedia seems to indicate similarly. https://en.m.wikipedia.org/wiki/Mongolian_idiocy https://en.m.wikipedia.org/wiki/Mongolian_idiocy I saw someone on Rocket League use that term as an insult. When I said it was a slur, they said it just meant "stupid", heh. No, buddy... there's a lot more to it than that.
- IshKebab 3y agoThere was a lot more to it than that. Insults tend to gradually lose their meaning until they just become synonyms for "stupid". E.g. "idiot", "dumb", "gay".
- geoelectric 3y agoI’m hoping the official term of art is either a clusterfuck or a fuckfest?
- 3y ago
- planede 3y agoPostscript is actually surprisingly approachable. It's quite easy to implement logo-like "turtle graphics" and draw fractals in it.
- downrightmike 3y ago37 years ago: "Why wouldn't you want some random file to be able to execute random code on any and every machine that its on?"
- kevindamm 3y ago----[---->+<]>++.+[--->++<]>-.+.------------.--[->++++<]>-.[->+++<]>.+++++++..[++>---<]>--.+[->+++<]>+.+++++++++++.-.---------.--[--->+<]>.-..---[->+++<]>.+++[->++++<]>+.+++++++++++.------------.--[--->+<]>--.[->+++<]>+.-[->+++<]>.+[->+++<]>+.+.---.[--->+<]>-.++[->+++<]>++.-[--->+<]>--.+[->+++<]>++.+++++++++.++++++++.[------>+<]>.+++++++++.---.-.-.--------.+++++++++.++++++.[---->+<]>+++.[->+++<]>+.+++++++++++++.----------.-[--->+<]>-.---[->++++<]>+.-------.-----.+++++++++++.[---->+<]>+++.---[->++++<]>.+++[->+++<]>.[--->+<]>----.+.[---->+<]>+++.-[--->++<]>--.-------.--[--->+<]>---.----.---------.[--->+<]>----..+[++>---<]>.++[--->++<]>..>-[--->+<]>--.[--->+<]>-.----.-------.+++++++++.----------.+++++.-----.[->+++<]>.------------.-[--->++<]>-.+++++.----------.+..-.-[--->+<]>..
- mmphosis 3y agohttps://imgur.com/bQ1JlIQ.png https://imgur.com/bQ1JlIQ.png
- deleted 3y ago[deleted]
- krylon 3y agoThis has got to be peak <something>. I don't know what exactly, but it's something. Self-inflicted torment and/or eccentric fountain of joy. Probably both. I cannot, for the life of me, see myself investing the time needed into something so futile. But I love that there are people out there who do this kind of thing out of pure joy.
- paulddraper 3y agoClose. Peak <something> would be a PostScript interpreter written in Brainf***.
- mxsjoberg 3y agooh no
- beefburger 3y agoI'm the author of bfps. I don't have too much time either. But I do enjoy this kind of brainb^Hteaser while commuting in the train :)
- andsoitis 3y agoI love this idea. Instead of doomscrolling news or giving your time to the attention economy in other ways, this is like solving interesting puzzles.
- qwertox 3y agoThese are the people which will be fighting for us in 20 years, from within some hidden cyberbunkers in the city sewerages.
- 1024core 3y agoAmen! I read the title and recoiled in horror, and yet I am fascinated by the project.
- ben_w 3y agoAt one point I was considering writing, in Postscript, a Brainfuck compiler whose compilation target is a Magic the Gathering based Turing machine. I did not accomplish this.
- nomoreusernames 3y ago[dead]
- Log_out_ 3y agoThe inventor of brain fuck also gave us the Sauerbraten engine with its octree geometry storage as maps.
- LanternLight83 3y agoI had no idea, that's awesome; used to love Red Eclipse 2, and my father once roped my siblings and I into playing Urban Terror, both of which we owe to Cube
- qwertox 3y agoOut of curiosity I landed at http://sauerbraten.org http://sauerbraten.org and was not disappointed by the trailer.
- fouc 3y agoCode looks good! Postscript is a pretty sweet alternative to forth.
- dhosek 3y agoBack in the olden days, it was not uncommon to print bitmap graphics files from compressed graphics source (e.g., gif, jpg, tif¹) by sending code to decompress the compressed graphics data alongside a base64-encoding of the data. ⸻ 1. These were the only compressed graphics format options available back then.