News for hackers. Stuff that matters.
Re:Ray Tracing in One Weekend by manas96 on Thursday January 02, 2025 @05:43AM (#42573365)
Wohoo, my name is in the contributors list! This helped me get in a computer graphics grad course at a top(?) school and certainly helped in further job applications.

If anyone else is interested in a graduate degree in this field, I recommend doing something similar - I simply made a few reasonable PRs to fix some issues that I found when following along the books.

Re:Ray Tracing in One Weekend by soegaard on Thursday January 02, 2025 @05:45AM (#42573373)
It's a fun tutorial to try out new languages.

Here is the result of following the tutorial using Rhombus.

https://github.com/soegaard/miniray

Re:Ray Tracing in One Weekend by pjmlp on Thursday January 02, 2025 @07:04AM (#42573711)
Yes, I used as experiment for C++20 modules, C# SIMD instructions and Rust.
Re:Ray Tracing in One Weekend by Y_Y on Friday January 03, 2025 @03:31AM (#42583741)
I strongly approve of this. Code snippets are nice, but with new languages⁰ it's rare to have an example of a self-contained but and complete application to get a holistic view. I think a raytracer (or its equivalent) should be a standard example.

0: Or is Rhombus a dialect? Or alternative writing system for an existing language? Or just an elaborate system of shrubs?

Re:Ray Tracing in One Weekend by kookamamie on Thursday January 02, 2025 @05:57AM (#42573435)
> Program files will include rtweekend.h first, so all other header files (where the bulk of our code will reside) can implicitly assume that rtweekend.h has already been included.

Not a great practice. Header files shouldn't assume anything from previous inclusions of other headers.

Sure, this works as a weekend hack, but it would be nice if book (article) would promote good conventions.

Re:Ray Tracing in One Weekend by veltas on Thursday January 02, 2025 @07:06AM (#42573721)
This is a normal practice for applications, and allows you to pre-compile that header for performance. I don't think it's a bad enough practice to warrant complaining, but it's good for people to know the advantages or disadvantages.
Re:Ray Tracing in One Weekend by kookamamie on Thursday January 02, 2025 @08:35AM (#42574267)
See this: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines...

Technically, headers are just copy-paste, obviously. However, there's value to keeping them as standalone as possible.

Re:Ray Tracing in One Weekend by on_the_train on Thursday January 02, 2025 @08:52AM (#42574384)
Headers should still be self contained, although precompiled headers are used. Those things are mostly orthogonal
Re:Ray Tracing in One Weekend by airstrike on Thursday January 02, 2025 @07:28AM (#42573844)
Previously:

• Show HN: Ray Tracing in One Weekend v4.0.0 (July 2024) https://news.ycombinator.com/item?id=41082425 - 69 points, 5 comments

• Raytracing in One Weekend (2016) https://news.ycombinator.com/item?id=25244301 - 316 points, 80 comments

Re:Ray Tracing in One Weekend by danielpettersso on Thursday January 02, 2025 @07:40AM (#42573918)
I can also recommend this book when looking for something fun to implement while learning a new language. There is also the follow ups to this taking things a bit further:

https://raytracing.github.io/books/RayTracingTheNextWeek.htm... https://raytracing.github.io/books/RayTracingTheRestOfYourLi...

I did this ray tracing library in Rust inspired by these books: https://github.com/DanielPettersson/solstrale-rust

And also a small UI using the lib: https://github.com/DanielPettersson/solstrale-desktop-rust

Kind of not maintained anymore.. But fun way learning Rust..

Re:Ray Tracing in One Weekend by tuyguntn on Thursday January 02, 2025 @09:12AM (#42574554)
Is there any similar content for ML/Deep learning?
Re:Ray Tracing in One Weekend by strangecasts on Thursday January 02, 2025 @03:42PM (#42578634)
Andrej Karpathy's guide to Micrograd - https://www.youtube.com/watch?v=VMj-3S1tku0 - is probably the closest equivalent, in that it covers the basic ideas of backpropagation and autodiff frameworks like PyTorch, and ends with an implementation of a very basic framework (https://github.com/karpathy/micrograd) you can train small neural networks in
Re:Ray Tracing in One Weekend by pdpi on Thursday January 02, 2025 @09:17AM (#42574596)
One thing that's not directly related to ray-tracing proper, so makes no sense in this book series, but is still a pretty natural (and fun!) next step (or detour) is embedding e.g. a Lua interpreter so you can use that as a scene description language separate from the rendering engine proper.
Re:Ray Tracing in One Weekend by alanjay on Tuesday January 07, 2025 @04:16PM (#42627593)
If you'd like to see it unfold, step by step, there's a javascript version at

https://github.com/MarquisdeGeek/six_hour_raytracer

Plus, it comes with a live demo on

https://marquisdegeek.github.io/six_hour_raytracer/