Better HN
topnewbestaskshowjobs
Log inSign up

vineek

7 karma · joined Dec 6, 2018 (7y ago) · 5 submissions

Submissions

comment 2y ago · link · parent

Very nice. In similar fashion, a few years back I set out to create Wuhoo.

Wuhoo loosely stands for W indows U sing H eaders O nly. It is an attempt to create a single-header library (in the spirit of STB) for graphics related window management, compatible with both C and C++.

It works on Windows, Linux and Mac.

https://github.com/ViNeek/wuhoo

comment 4y ago · link · parent

Very nice article. Literate programming might have some interesting features in this direction. The not so obvious thing is how it can scale.

A very good example of literate programming can be found in the fantastic book Physically Based Rendering [1]. It also has a preface discussing it [2].

The authors write a full physically-based rendering system in a declarative fashion. This approach has also led to a nicely adapted web-based version of the book [3].

Although we have successful examples like TeX and HTML, it would be very interesting to see this approach explored further by a more modern language or programming methodology.

[1] https://pbrt.org/

[2] https://www.pbr-book.org/3ed-2018/Introduction/Literate_Prog...

[3] https://www.pbr-book.org/3ed-2018/contents

comment 5y ago · link · parent

The ability to occasionally opt-out is both a feature and a necessity because certain systems are inherently unstable and offer varying guarantees. I’m arguing for an opt-in feature in C++. Of course there is no panacea.

comment 5y ago · link · parent

I completely agree with the points from this article. It is fundamentally infeasible to make all C and C++ code safe. The main reason, PAST code. There are countless lines of unsafe code already written. However, there is nothing magical about Rust's facilities (e.g. borrow checker) that make them inapplicable to FUTURE C and C++ code. I believe this is the only way forward for C and C++. They need to offer mechanisms that guarantee that any code written today can be provably memory and thread safe. That of course requires yet another tool in the myriad of tools that exist for C and C++.

comment 5y ago · link · parent

To get a quick feel for ray tracing, I would also suggest https://rayground.com/. It has a lot of ray tracing projects, ranging from basic samples to complicated scenes. They can all be run in your browser.