Hacker Newsnew | past | comments | ask | show | jobs | submit | mholub's commentslogin

it's more nuanced:

you're still releasing resources - so you might not become faster overall but you can compute more in the same time later if necessity arises (althougth that might be somewhat premature but can be good for library code - so it becomes more applicable in different environments)

and there are some rare but tricky scenarios like:

hardware is mobile phone: app seem to be bottlenecked on arithmetics according to the profiler, so it feels obvious to start optimization there

in reality what happens - hardware has limit on power, so it can't give full power to CPU, GPU and memory all at the same time

since app uses too much memory - it has to redirect power there, also memory emits heat, so CPU becomes throttled

By optimizing memory, everything runs colder -> CPU gets more power, can run sustained higher frequencies - app becomes faster


And if the app becoming faster doesn't mean anything because the app is waiting for user input the whole time, it was a lot of work for naught.

Perhaps restated: If the optimization cannot be felt (ie, impact on the product experience), it is not an optimization worth pursuing.


> And if the app becoming faster doesn't mean anything because the app is waiting for user input the whole time, it was a lot of work for naught.

Oh, that might still be good for battery life (or power consumption in general).


This one is more dangerous, as there may be backend resources in use that could be optimized, which could drop costs drastically. This may not change anything for your users, but is definitely worth exploring when it comes to getting the most out of your investment.


nothing really prevents you from defining global allocator in Zig

and having explicit allocator in standard library is actually a good thing, cause it's quite a common case in game development to use arena allocators which are being freed once per frame - so you don't really need to reinvent your data structures in Zig

I do have some concerns about Zig because it also introduces some friction for correctness sake like requiring to always use all variables, explicit casts everywhere - I want some compiler toggle to disable all of that and focus on problem but unfortunately it's not there

I am playing with Zig now and haven't really formed my opinion about game development specifically but I like it a lot so far


To be fair though that sort of friction only affects things in the small. They can be annoying but you'll never have to refactor outside the scope of the friction itself.

In practice, it's only really a problem if you're doing codegen.


Zig is flexible. If you don't like global allocators or explicitly passing allocators, you can store pointer to the allocator in your object and it will be passed implicitly.


What’s the nature of your work so you are not allowed to install software?


I'm not allowed to install arbitrary software, only those that are provided by IT. It is just company policy and I cannot change that.


this is very computationally expensive to do such operation (to understand that teeth is completely occluded by something else like mouth)

this is called occlusion culling and usually it brings a lot of problems on its own (it's CPU intensive and you need to apply it smartly only where it helps)

and even if this occlusion culling would be cheap, the way how it is usually done requires precomputing a lot of data - so occluders are static geometry

since character head is skinned mesh - so dynamically changes every frame based on joints positions - that will be another level of complexity

game engines are not really helpful here


We recently started to use Dear ImGUI in our custom game engine. Before we used Unity which has its own immediate mode gui solution. And I have hard time to switch. I don't know if I don't understand how Dear ImGui work yet in comparison to Unity's one but it feels so limited.

So main difference is that Unity is multipass (it calls your gui drawing code multiple times per frame) and because of it it supports horizontal layout, vertical layout, custom layout modifiers, styles and it is easy to use

in Dear ImGUI I am struggling to write stuff like:

layout 3 controls horizontally, allocate fixed size for first and last one and use all left space for middle one

or

layout next N controls vertically of unknown height and use this background color for them, then layout another set of controls and use different background style for them

I am not the person who was actively working on integration it into our engine, so maybe it's the problem of not having documentation on our wrapper...or me not understanding very basics of it


Talk to occornut! He even posts here. Surely you gonna get some reasonable reply, or at least something. Also consider supporting him! Raise an issue on github, or look for similar before hand. I'm also torn when comes to dear imgui, but keep reading updates on it, and trying it at least few times a month with small things.


honestly, im pretty sure imgui can't help you here, i.e. you have to calculate all the necessary sizes/positions yourself and tell imgui where everything should be


so if you already had experience with Rust/etc, why did you decide to choose OCaml?

Also why not to choose F#/Mono (and now .NET core) for example?


I wouldn't say I had experience with Rust, tbh (1 day in 2010 doesn't count!)

I don't remember considering F#, so probably just never occurred to me.


what kind of limitations in a few words?



well..Houdini is scriptable in python too :)


You just need to find activity interesting for you

I used to do sedentary lifestyle most of my life until I found rock climbing 2 years ago

I go rock climbing to a gym 2-3 times a week now. I go there because I WANT not because I have to. This did tremendous job to my health and overall fitness. And this is sustainable in the long term because I don't have problems with motivation.

So my advice — find your sport, any physical activity you are interested in. If it becomes boring, don't hesitate to change it.

You don't need to be a sportsman and become good at something, you just need consistency to move your body , so care about your motivation. Good body will come naturally after some time.


I'm also mad for climbing and yes 2-3 times a weeks does wonders for overall feeling, fitness and strength. It's also a very complete exercise unlike many other sports. But the claim here is doing that at the end of your day still isn't sufficient in dealing with sitting for hours in row. Which I anecdotelly can relate to: I feel way better overall when not spending hours a day sitting. And when I go climbing after a 'standard' working day involving multiple consecutive hours of sitting I'll top at about 4 routes in a certain grade. However when I'm taking a week off to do some light construction works in my house and I go climbing after such a day, when I've been sitting for max 1 hour or so, and even if I already did a considerable amount of physical labour, I'll do 8 routes in that same grade. At first I thought it was a coincidence (like the routes in that grade just being easier or me just accidentally being better for some reason or...) but it happened time and time again in the last couple of years. I'm not 100% sure the not sitting is really the cause, but it is striking.


We actually had Github banned in Russia once or twice for short periods of time (like hours or days). Because of some repository contained joke text about how to commit suicide.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: