HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Ray tracer in a boot sector(github.com)

210 points·by blizdiddy·vor 2 Jahren·21 comments
github.com
Ray tracer in a boot sector

https://github.com/nanochess/RayTracer

32 comments

itvision·vor 2 Jahren
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·vor 2 Jahren
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
rajnathani·vor 2 Jahren
Another masterpiece from Oscar Toledo. Context about him and the Toledo family: https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
Zeetah·vor 2 Jahren
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!
shdon·vor 2 Jahren
Those first two lines are just column number indicators for easy reference... 01 to 80 - to show that it's 80 columns wide.
mypalmike·vor 2 Jahren
I think you're referring to just the column numbers (01, 02... 80) which aren't part of the program listing (?)
Zeetah·vor 2 Jahren
Thank you both!
callumprentice·vor 2 Jahren
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… :)
tromp·vor 2 Jahren
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
jakeogh·vor 2 Jahren
From the oeis link: https://tromp.github.io/blog/2023/11/24/largest-number
tromp·vor 2 Jahren
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...
zarathustreal·vor 2 Jahren
Honestly why bother with actual bytes? Why not just take Wolfram’s approach of looking through programs encoded as cellular automata?
dahart·vor 2 Jahren
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.
grishka·vor 2 Jahren
Just a reminder that most of the modern cryptography uses keys that are at most 32 bytes.
nhatcher·vor 2 Jahren
> Thanks to Peter Ferrie for helping me to save 23 bytes

That's the spirit!
peignoir·vor 2 Jahren
mov al,0x13 brings back memories :)
sitzkrieg·vor 2 Jahren
mode 13h in tasm while pretending to understand line algos takes me back
FazXTD·vor 2 Jahren
FazXTD·vor 2 Jahren
FazXTD·vor 2 Jahren
FazXTD·vor 2 Jahren
FazXTD·vor 2 Jahren
mysterydip·vor 2 Jahren
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·vor 2 Jahren
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
punk-coder·vor 2 Jahren
I have the authors Programming Atari 2600 Games and really enjoyed it. I started my professional programming career programming in Assembler on an OS/360 mainframe back in the mid 90s and it really helped me starting out at such a low level. It was enjoyable revisiting Assembler while going through his book.
datameta·vor 2 Jahren
Unreal codegolfing!
jacksonhacker·vor 2 Jahren
suchwow99·vor 2 Jahren
YawnNews·vor 2 Jahren
ceeam·vor 2 Jahren
(1)