Jump to content

Photo

The barf-o-matic

beer recommended

4 replies to this topic

#1 ramidavis OFFLINE  

ramidavis

    Star Raider

  • 66 posts

Posted Sat Nov 11, 2017 5:42 PM

How to enjoy this program:

[BARF program attached. Remove the .bin ending, its a tifile from classic99]

1. Grab a beer

2. Open classic99 and paste the following program

3. If you want a endless loop, change line 7 to 7 RESTORE, otherwise the program will (eventually) end.

4. Run it

5. Enjoy your beer

:D

Character data was generated by (ab)using random.org.

Spoiler

Attached Files

  • Attached File  BARF.bin   10.13KB   4 downloads

Edited by ramidavis, Sat Nov 11, 2017 6:27 PM.


#2 digdugnate OFFLINE  

digdugnate

    Dragonstomper

  • 659 posts
  • Location:SW Missouri

Posted Sat Nov 11, 2017 6:05 PM

ha, thats pretty neat.



#3 --- Ω --- OFFLINE  

--- Ω ---

    TI-Runner

  • 10,620 posts

Posted Sat Nov 11, 2017 6:09 PM

I'll have to give this a shot.



#4 ramidavis OFFLINE  

ramidavis

    Star Raider

  • Topic Starter
  • 66 posts

Posted Sat Nov 11, 2017 7:20 PM

If anyone is interested, here is a sort of "behind the scenes" of the creation of this.

First off, using the link in the first post, i told it to generate 16384 random bytes, and copied that all to a text file.

I keep doing this about 6 or 7 times, and random.org informs me i have used my quota for random data generation for the day, so i decide to call it good enough. ;)

Now, i have huge list of random bytes, separated by spaces 16 bytes to a line.

I am running linux and using gedit, so the next step was to get rid of the white-space.

I used gedit's search-and-replace to first replace all 'space' characters with nothing (leave the "replace with" field empty).

Next, i did the same process for the newlines, by replacing the character "\n" with nothing (leaving the "replace with" field empty again).

The result was huge string of data with no newlines, no spaces.

Now i just needed to chop it up into 16 character hunks...

And for that, i had to do some bash-foo 8)  (bash is the linux command line environment for those wondering).

The attached text file contains probably the longest single linux command ever.(in case you want the command without all my data: echo "HUGE AMOUNT OF DATA HERE" | fold -w16 | paste -sd'\n' - > out.txt)

After running that command, out.txt contained exactly what i needed: 16-digit hex codes, 1 per line.

Another search and replace, this time replacing "\n" with "\nDATA ".

Now i had premade data statements, minus line numbers.

I fired up classic 99 in my windows xp virtual machine, issued a NUM 1,1 command and let it take as much as it could from the clipboard. Turns out it ran out of memory around the 458th entry or so, so started over, only copying the first 400.

A RES command, a simple loop added, followed by another RES, and we are all done. :)

Attached Files

  • Attached File  new.txt   256.05KB   8 downloads

Edited by ramidavis, Sat Nov 11, 2017 7:29 PM.


#5 --- Ω --- OFFLINE  

--- Ω ---

    TI-Runner

  • 10,620 posts

Posted Sat Nov 11, 2017 7:29 PM

Interesting... but not what I thought it was gonna be.

I figured it was going to be something to do with 100 bottles of beer on the wall since you named the thread Barf-O-Matic.  :grin:






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users