Guest User

BGGP 5 entries

a guest
Sep 6th, 2024
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. Background: So last year I came across BGGP, thought it sounded great and decided to put in an entry. I only spent a couple of hours on it, creating a Shell entry and came 4th. Bah. So I decided next year I'd do better.
  2.  
  3. When the 2024 contest was announced I thought I'd give it a proper chance and maybe I'd get 1st place in something. However my 3 entries for Shell, Node and HTML were all quickly leapfrogged by people far smarter than me and I wasn't 1st in any of them. Right, it time to stop being clever, it was time to lean on my greatest strength, it was time to get weird! :D
  4.  
  5. * Text file, 0 bytes? (https://github.com/binarygolf/BGGP/issues/65)
  6. I used Python & Scrapy to fetch the endpoint and discovered I didn't really need a file with any content, just the CLI command. Hmmm - was this allowed, I'm not sure? Someone pointed this out and so I made an *empty* file, which I made use of via 'ls' (to reflect only the filename). There, now there's a file and it's being used LOL. I'm sure this will be disallowed but it was a start of a weird journey.
  7.  
  8. * Shell with args, 0 bytes? (https://github.com/binarygolf/BGGP/issues/75)
  9. As a follow on, I wondered - what if I had an empty file again, but this time *update* it via the CLI command, and use that? But how would that work? I sat starting at the command prompt flashing and realised the answer was right infront of me - the prompt! I decided I'd use a file to update the PS1 prompt value, to grab the endpoint during display and loved how weird this was. It was displaying the endpoint contents everytime it was displaying the prompt, LOL. Again, I'm expecting this to be disallowed and actually smart people claim 1st place, but submitted anyways as it was a fun entry.
  10.  
  11. * SQL, 48 bytes (https://github.com/binarygolf/BGGP/issues/140)
  12. I forgot about the contest for a little while until yesterday (5th Sep) and thought I'd check in on it, discovering the contest ended tomorrow, eek! What if none of my entries ended up 1st? That'd suck. Okay, time for more weirdness. I wondered if I'd try a category no-one had thought of, like err, SQL. After a little searching I found sqlite-http, an executable you could load into SQL and use to fetch endpoints, perfect! After a couple of iterations I got an entry of 48 bytes (yay, not 0 bytes!), hopefully at least this'll be legit and accepted.
  13.  
  14. * GIF, 157 bytes (https://github.com/binarygolf/BGGP/issues/141)
  15. Next I had the strange idea to have a barcode, which when read by a scanner, could display the endpoint contents. However, 2 problems, barcodes don't cover the full ASCII range, so no good for URLs (which have : and / chars), and the endpoint itself downloads, doesn't display. Hmmm. I remembered the Lynx browser was text based and had a hunch that'd display it rather than download. After searching for an online version, I came across (and happened to break) a webpage, which output an error re w3.orgs service named html2txt, which did exactly what I wanted - awesome! I had to settle on a QR code and decided to create a short URL using a shortener to reduce the amount of data it needed to represent. However, when I created it, it was fairly big at 450px square - so much unnecessary empty space in each of those black and white blocks. I wondered, as it's only blocks of black and white sqaures, could shrink this down to a pixel per block? So that's what I did, scaled it down to be a tiny 25 pixel square QR code. :D This was the sort of weird I was after! You needed to zoom in, scan it, it'll redirect you via a shortener to a w3 service which downloads the endpoint and displays. Haha, yes!
  16.  
  17. * HTML, 62 bytes (https://github.com/binarygolf/BGGP/issues/142)
  18. With the shortened URL to hand via my newly discovered html2txt service at w3.org, I knew I could make other use of it. I remembered HTML's meta refresh tag could be used to redirect the browser to another location so it was quick to produce this entry. It worked as expected and I'd hopefully leapfrog other entries back into 1st place, yay!
  19.  
  20. * Shell, with args (again), 0 bytes? (https://github.com/binarygolf/BGGP/issues/143)
  21. I thought I'd have one last try at this - maybe it was valid, maybe not, but it was fun. It's a little similar to my other entry, only this time it makes use of the .bashrc file to set the PS1 rather than use a temporary x.sh, so a more permanent solution that's used for every shell and not just the current one. I liked this one more.
  22.  
  23. So, there we go - a bunch of weird ideas, maybe one or two will be allowed, let's see. ;D
  24.  
  25. (Thanks for putting a great contest BTW, this year's BGGP has been a lot of fun!)
Advertisement
Add Comment
Please, Sign In to add comment