Hacker News new | past | comments | ask | show | jobs | submit | deagle50's comments login

the macOS drought continues

It is really crazy how limited debugger options are on macOS. Is it simply the case that there are not that many people writing code in systems languages on macOS outside of XCode?

I used to be such a person, but after years of feeling as though Apple found people like me irritating and wished we would all stop bothering them, I finally took the hint.

Linux may not be so pretty, but it's far more comfortable.


Linux is great, my issue is laptop hardware.

What problems do you encounter? Which sorts of laptops do you prefer?

My "all Thinkpad, all the time" strategy has generally served me well (though I was disappointed by the most recent one, a T14, which would never sleep properly).


poor displays, trackpads, cooling, performance, and battery life.

MacBookAir + aarch64 linux vm -- best of all the worlds. Linux for the 5% of things I need linux for, amazing battery life and hardware for the remaining 95% of things my laptop does.

Apple continuously makes the life of third party debuggers difficult, to the point where doing so today on a “stock” system requires malware-like techniques to get around their mitigations.

Kind of. I am a systems engineer and want to work on an open OS I can debug with my syseng skills...

It's because macOS has security measures.

So they want to show the government's markup but not their own?


Zig comes with a mountain of friction and ceremony, imo. It does a lot of things well, but for game dev I'd take Jai or Odin every time.


I don't get the point, what does this have to do with defer?


The author of the post claims that defer eliminates the need for RAII.

Well, goto also eliminates the "need" but language features are about making life easier, and life is much easier with RAII compared to having only defer.


I got that, but the I don't see what the example of move semantics has to do with RAII or defer.


It makes things easier. Usually the move constructor (or move assignment operator) will cause the moved-from object to stop being responsible for releasing a resource, moving the responsibility to the moved-to object. Simplest example: move- construct unique-ptr X from unique-ptr Y. When X is destroyed it will free the memory, when Y is destroyed it will do nothing.

So you can allocate resource in one function, then move the object across function boundaries, module boundaries, into another object etc. and in the end the resource will be released exactly once when the final object is destroyed. No need to remember in each of these places along the path to release the resource explicitly if there's an error (through defer or otherwise).


I agree that it makes some things easier (at the expense of managing constructors/destructors), I'm disputing the blanket assertion that it's superior to manual management, in the context of Jai (and Odin). You're also introducing a reference count, but that's besides the point.

In Jai/Odin, every scope has default global and temp allocators, there's nothing stopping you from transferring ownership and/or passing pointers down the callstack. Then you either free in the last scope where the pointer lives or you pick a natural lifetime near the top of the callstack, defer clear temp there, and forget about it.


You may also want to pass a resource through something like a channel, promise/future pair or similar. So it's not just down/up the callstack, sometimes it's "sideways". In those cases RAII is a life savior. Otherwise you have to explicitly remember about covering all possibilities: - what if resource never enters the channel - what if it enters the channel but never gets retrieved on the other side - what if the channel gets closed - what if other side tries to retrieve but cancels

Or you leak the resource.


> You're also introducing a reference count, but that's besides the point.

How so? RAII absolutely doesn't imply reference counting.


Faster than LuaJIT's interpreter, not the compiled code.


The language looks great but I can't get over the "type first" declaration syntax.


Not a C fan then ;)


because the constituencies have been largely reversed.


that's a constant assignment, completely different. And you're not going to see it 100s of times in a project.


It would not go unnoticed and would pretty much guarantee invasion.


They can ask for Israel's assistance, they managed to (relatively) covertly develop nuclear weapons without a major power getting in their way.

Granted, the US president who was pushing the most for inspections of Israel's Dimona nuclear facility was JFK, who ended up no longer being a problem for them (how very convenient).


Sweden built a bomb in secret. Invasion planning would not go unnoticed either.


I think US can try to covertly move some hundreds of nuclear missiles in Taiwan and succeed until China notices.


Yes in theory and that's Taiwan's best bet. But the US would never go along with that because guarding Taiwan's democracy is not the main objective even as it is the main talking point. The main objective is US interests, which are not served by nuclear proliferation or by losing Taiwan as either a bargaining chip to extract concessions, or a chess piece in a proxy war to weaken China, the main rival to US global dominance. Taiwan's value as a bargaining chip or as an acceptable battleground to both sides for a controlled conflict, is unfortunately greater than it's value as a democracy


And hiding the mouse cursor so you can actually see what you're editing.


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

Search: