5 ms·
My initial attempt at trying to order pizza from within Vim
- ThrowawayTestr 4y agoDominoes has an API if you actually want to order a pizza through vim and not just open a browser.
- Group_B 4y agoIs there a reason why it’s public?
- fbrchps 4y agoBecause they likely use the same API for their website/app/Alexa/etc. platforms, since so long as the same calls need to be made, it makes sense to reuse the work you've already done. So long as they have reasonable rate limits & security in place, it makes sense to allow anyone to use it to order pizzas from whatever platform they want, because it's still money in their pockets -- not to mention free press from articles like "how to order pizza from vim"
- bastawhiz 4y agoIs there a good reason not to make it public?
- Group_B 4y agoSecurity reasons. Maybe it’s easier to secure an API than I think.
- dubcanada 4y agoNothing against the work, but I thought this was actually ordering pizza from vim not opening up a URL in a browser.
- lern_too_spel 4y agoThat's a job for emacs. Open a pull request to use https://github.com/segv/sudo-make-me-a-pizza https://github.com/segv/sudo-make-me-a-pizza instead. Similarly, https://stackoverflow.com/a/52586157 https://stackoverflow.com/a/52586157.
- DonHopkins 4y agoNot only will Emacs help you order pizzas, but it will also help you do bong hits to stimulate your appetite. Try doing that in vim! Original UniPress Emacs MockLisp: https://www.donhopkins.com/home/archive/emacs/bh.ml https://www.donhopkins.com/home/archive/emacs/bh.ml Ported to Gnu Emacs Lisp: https://www.donhopkins.com/home/archive/emacs/bh.el https://www.donhopkins.com/home/archive/emacs/bh.el Arbitrarily shaped user defined bong and big stash of hash: https://www.donhopkins.com/home/archive/emacs/bh.txt https://www.donhopkins.com/home/archive/emacs/bh.txt
- diceduckmonk 4y agoModern QR codes aren’t that magical anymore when you realize they’re just of bits encoding a boring string, namely a URL.
- mlac 4y agoFun story for ordering food: https://www.mit.edu/afs.new/sipb/user/marthag/postscript/burritos https://www.mit.edu/afs.new/sipb/user/marthag/postscript/bur...
- DonHopkins 4y agoA couple years before you could order burritos with Adobe's Fax enabled PostScript printers, I made PizzaTool use Sun's NeWS based "NeWSPrint" PostScript=>FAX gateway to order pizza from Tony and Alba's, and Sun Microsystems shipped PizzaTool with Solaris Unix SVR4. PizzaTool would actually fax a picture of the pizza with all its toppings, and let you preview it in color on the screen! As long as you're FAXing PostScript, why just use text, why not draw it on the screen in an interactive round spinning window too? (Try doing that in Display PostScript or Vim!) The Story of Sun Microsystems PizzaTool How I accidentally ordered my first pizza over the internet. https://donhopkins.medium.com/the-story-of-sun-microsystems-pizzatool-2a7992b4c797 https://donhopkins.medium.com/the-story-of-sun-microsystems-... FAXed order with PostScript pizza visualization: https://miro.medium.com/max/720/1*EvKv1m2UbxuPJ1Mg9oGUqQ.png https://miro.medium.com/max/720/1*EvKv1m2UbxuPJ1Mg9oGUqQ.png NeWS PostScript Source Code: https://www.donhopkins.com/home/archive/NeWS/pizzatool.txt https://www.donhopkins.com/home/archive/NeWS/pizzatool.txt Manual Entry: https://www.donhopkins.com/home/archive/NeWS/pizzatool.6.txt https://www.donhopkins.com/home/archive/NeWS/pizzatool.6.txt % Fork a process to sprinkle a topping on the pizza in the background. % /StartSprinkle { % topping => - { % fork: gsave /PaintSetup self send /ClipCrust self send { % send to topping: clear /paint self send } exch send Sprinklers currentprocess undef grestore } fork Sprinklers exch dup put pop } def % Kill all the processes sprinkling toppings. % /StopSprinklers { % - => - [Sprinklers {pop} forall] {killprocess} forall Sprinklers cleanoutdict } def % Start spinning the pizza, to cook it. % /StartSpin { % - => - /StopSpin self send /SpinProcess { % fork: clear /PaintSetup self send /ClipCrust self send initmatrix { % loop: SpinPause { pause } repeat /Spin self send } loop SpinProcess currentprocess eq { % if: /SpinProcess unpromote } if } fork promote } def % Stop spinning the pizza, before eating it. % /StopSpin { % - => - SpinProcess null ne { % if: SpinProcess killprocess /SpinProcess unpromote } if } def % Spin the pizza around a bit. % /Spin { % - => - gsave /size self send % w h 2 div exch 2 div exch % w/2 h/2 2 copy translate SpinAngle random add rotate neg exch neg exch translate % self imagecanvas grestore } def
- dontbenebby 4y agoThis looks super cool, and I appreciate you sharing -- I'm a big fan of vi(m), mostly because it's installed on lots of systems and doesn't require pulling down a config file from the 'net when you're on a new box or whatever. (No offense to "emacs people" but some of us like to keep it offline.) However, I hope you told the shop you're going to be doing this OP. I got pretty depressed due to COVID, so I ordered a lot more take out that I used to. One of my... contacts... informed me many of what I'll call "meal aggregators" take up to 25% of the cost of an order. They also implied these services allow folks to put in so many orders, in parallel, that they overwhelm a place. Apparently once you are signed up for some of them, it's next to impossible to opt out. So while I'll definitely bookmark this, I hope folks also consider using a telephone to order food -- it can be interesting seeing who can fall back to 90s era social norms and who goes completely insane if you try to talk to them like they're not a computer.
- RamblingCTO 4y agoThat doesn't apply to Dominos etc. I think but more to Delivery Hero, Uber Eats, Doordash etc.
- dontbenebby 4y agoThe place you mentioned isn't an aggregator, but I'd be curious if they have less per transaction costs if you just call the store, ask for a pizza, and give them cash. I've seen places that seem to value it, and a couple that seemed weirdly hostile to the entire idea someone might not want to be a literal slave to the Saudis or whoever keeps propping up services like Uber that are unprofitable and often flout local regulations. (I think)
- wcedmisten 4y agoThere's also an Oblivion mod that lets you order pizza in game: https://www.rockpapershotgun.com/this-mod-allows-you-to-order-real-pizza-from-within-oblivion https://www.rockpapershotgun.com/this-mod-allows-you-to-orde...
- 2kwatts 4y agoI think it'd be cool to order pizza from the commandline, but this makes my workflow a lot more efficient! Well done!
- rakoo 4y agoThis is a job for woob (https://woob.tech https://woob.tech). Make a capability to "order something", and schedule a cron job to deliver pizza every Friday.