[HN Gopher] Ray tracer in a boot sector
       ___________________________________________________________________
        
       Ray tracer in a boot sector
        
       Author : blizdiddy
       Score  : 202 points
       Date   : 2024-04-12 17:33 UTC (2 days ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | callumprentice wrote:
       | My first thought at seeing something pretty in so few bytes was:
       | "perhaps you could just run through every value in each of those
       | 484 bytes and find other gems in there too" then I did the math -
       | or tried to... :)
        
         | grishka wrote:
         | Just a reminder that most of the modern cryptography uses keys
         | that are at most 32 bytes.
        
         | dahart wrote:
         | Check out the BBC micro version in 432 chars (443 bytes).
         | https://bbcmic.ro/?t=9ctpk ... That cuts your problem down by a
         | factor of ~5.5e98. ;) Or even a lot more if you limit to
         | readable ascii. I'd be curious if you did that how many of the
         | tries would result in a valid runnable program.
        
         | tromp wrote:
         | You don't need to go anywhere near 400 bytes to find
         | inscrutable programs, if your programming language is concise
         | enough. Even 8 bytes, or 64 bits to be precise, offers plenty
         | unchartered territory for finding new gems in lambda calculus
         | [1], one such recent discovery being a 49 bit program whose
         | output exceeds Graham's number.
         | 
         | [1] https://oeis.org/A333479
        
           | zarathustreal wrote:
           | Honestly why bother with actual bytes? Why not just take
           | Wolfram's approach of looking through programs encoded as
           | cellular automata?
        
           | jakeogh wrote:
           | From the oeis link:
           | https://tromp.github.io/blog/2023/11/24/largest-number
        
             | tromp wrote:
             | Acutally, I only learned about the 49 bit program after
             | writing that blog entry. It is described in https://github.
             | com/tromp/AIT/blob/master/fast_growing_and_co...
        
       | peignoir wrote:
       | mov al,0x13 brings back memories :)
        
         | sitzkrieg wrote:
         | mode 13h in tasm while pretending to understand line algos
         | takes me back
        
       | mysterydip wrote:
       | I love these little projects, and the efficiency of the resulting
       | code. I wish I was skilled enough to turn it into a game or
       | something, though.
        
         | AlexeyBrin wrote:
         | The author has two books about writing small games that can run
         | in the boot sector. First book also has a quick course in 8086
         | Assembly:
         | 
         |  _Programming Boot Sector Games_
         | 
         |  _More Boot Sector Games_
        
       | Zeetah wrote:
       | Unbelievable!
       | 
       | I'd be very grateful for an explanation for how the first three
       | lines in the Atari basic version that have only numbers and no
       | alphabet work?
       | 
       | I just can't remember what Atari basic does, how that data is
       | presented to be read into the array...
       | 
       | Thanks!
        
         | mypalmike wrote:
         | I think you're referring to just the column numbers (01, 02...
         | 80) which aren't part of the program listing (?)
        
           | Zeetah wrote:
           | Thank you both!
        
         | shdon wrote:
         | Those first two lines are just column number indicators for
         | easy reference... 01 to 80 - to show that it's 80 columns wide.
        
       | datameta wrote:
       | Unreal codegolfing!
        
       | itvision wrote:
       | If you like it, you definitely want to visit these two websites:
       | 
       | https://www.shadertoy.com/
       | 
       | https://www.pouet.net/
       | 
       | The last demo party was this one:
       | https://www.pouet.net/party.php?which=1550&when=2024
       | 
       | And this is 64K: https://www.pouet.net/prod.php?which=96589
       | 
       | Something out of this world.
        
         | userbinator wrote:
         | And this is 128 bytes:
         | https://www.pouet.net/prod.php?which=63518
         | 
         | It appeared on HN too:
         | https://news.ycombinator.com/item?id=7940212
        
       | nhatcher wrote:
       | > Thanks to Peter Ferrie for helping me to save 23 bytes
       | 
       | That's the spirit!
        
       | rajnathani wrote:
       | Another masterpiece from Oscar Toledo. Context about him and the
       | Toledo family:
       | https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
        
       ___________________________________________________________________
       (page generated 2024-04-14 23:02 UTC)