Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. I Built Non-Autoregressive Decision Models with RL a Year Ago(convaiinnovations.com ↗)
    155comments
  2. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    515comments
  3. A graphical desktop for the ZX Spectrum(github.com/mindbox77 ↗)
    76comments
  4. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    192comments
  5. Tin: full-text search for Postgres(planetscale.com ↗)
    51comments
  6. “The Secret Life of Circuits” is here(coredump.cx ↗)
    57comments
  7. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    568comments
  8. Supabase (YC S20) Is Hiring for OrioleDB(supabase.link ↗)
    discuss
  9. Black Holes or Black Hole Stars? Astronomers Spar over 'Little Red Dots'(quantamagazine.org ↗)
    19comments
  10. New evidence for hidden chambers beyond Tutankhamun's tomb(nature.com ↗)
    10comments
  11. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    139comments
  12. San Francisco Onion Futures Company(onionfutures.com ↗)
    123comments
  13. Almost Never Use AI to Write Anything Substantive(erichgrunewald.substack.com ↗)
    16comments
  14. What Zig felt like, coming from Rust(besok.github.io ↗)
    129comments
  15. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    201comments
  16. Cloudflare Quick Tunnels(cloudflare.com ↗)
    301comments
  17. How to Write with an LLM(sockpuppet.org ↗)
    364comments
  18. Adventures in Microcontroller Circuit Debugging(bigmessowires.com ↗)
    1comments
  19. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    27comments
  20. Asking Authors About Their Own Papers(medium.com/tmlrorg ↗)
    46comments
  21. Saving another 100TB of RAM(cloudflare.com ↗)
    93comments
  22. Communication by means of modulated Johnson noise(pnas.org ↗)
    20comments
  23. SDCC – Small Device C Compiler(sourceforge.net ↗)
    25comments
  24. People who know the most often sound the least certain(vrash.substack.com ↗)
    discuss
  25. Science Is Open Software(jepedersen.dk ↗)
    51comments
  26. Ray Ozzie and the Optimism of Being Early(reproof.app ↗)
    16comments
  27. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    49comments
  28. OpenJev(openjev.com ↗)
    283comments
  29. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    128comments
  30. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    11comments

Runtime Compiled C++ Dear ImGui and DirectX11 Tutorial

83 pointsby 6y agoenkisoftware.com
12 comments
6y agoHN ↗

This looks really nice.

I still remember when I worked in game development back in 2004 or so, that I made extensive use of Visual Studio's "Edit and continue build" feature at work, and how it really helped with the feedback loop. It was a little buggy but worked very well considering it was only a "debug" feature.

A few years later I worked on an even bigger game with an even bigger loading time, and "Edit and continue build" no longer worked at all due to the platform architecture of the game. It really, really hurt my productivity (and motivation). I wish this project all success, it could help many people!

(Does Unity have something like this yet? I remember last time I worked with it I loved being able to change the properties of objects at runtime, but still missed being able to change the actual code...)

6y agoHN ↗

The last time I used Unity (about 1~2 years ago), hot reloading was basically useless and I tried to avoid it as much as possible (some people actually disable to disable this feature to avoid any "accidental" runtime recompilation.) It messes with serialization too much that it only works with very, very simple cases.

6y agoHN ↗

In my experience, it only reliable works for singleton objects which have changes in their method bodies. Any change in the memory layout creates random null reference exceptions on each frame update.

6y agoHN ↗

It also depends on how you've designed your MonoBehaviours. If you have anything dependent on resources retrieved in your Awake event, those references will not be restored and the Awake event will not re-occur. So you either have to check and reacquire the references in your Update event (which is costly), or design everything around serialized fields that are set in the editor, with no objects acquired during Awake (which is intractable for anything but the most basic projects).

Unity is designed to get the basic demo feature of whatever you're doing done as quickly as possible. But building a production-scale product is actually harder than just writing from scratch, as there are a lot of stupid design decisions in Unity that get in the way.

6y agoHN ↗

It's not always reliable however, if you add/remove variables in your UCLASSES or USTRUCTS, or the values in your UENUM, it can fail or have unpredictable results, or at least it did as recently as 4.18/4.19.

Otherwise if you're just adding/removing code from classes it works extremely well and saves a lot of time restarting the editor.

6y agoHN ↗

For me, the most memorable chapter in the excellent book Coders at Work was the Dan Ingalls one, in which he made the case for interactive development.

6y agoHN ↗

Does this have any applications other than hot reloading?

6y agoHN ↗

The purpose of Runtime Compiled C++ is robust 'hot reloading'.

6y agoHN ↗

I suppose I'm the only person who wondered if "DirectX11" meant that MS had finally ported their flagship game APIs to the venerable Unix graphics system.