Dynamic Array basics in C++

PeerTube
🚀 Wow, a whole article to tell us that #Go has an assembler and a #garbage collector! 🎩 Apparently, combining them is as thrilling as watching paint dry, but fear not—our hero is here to walk us through the riveting dance of #pointers and write barriers. 📚✨ Who knew #assembly could be this exciting? Oh wait, nobody. 😴
https://mazzo.li/posts/go-asm-pointers.html #Lang #Collection #Programming #HackerNews #ngated
How to store Go pointers from assembly

The standard Go toolchain comes with an assembler out of the box. Said assembler is highly idiosyncratic, using syntax inherited from Plan 9 and choosing its own names for platform-specific instructions and registers. But it's great to have it readily available. More mundanely, Go comes with a garbage collector. This post explains how to make these two components play nice, if we want to manipulate Go pointers from our assembly.

Ah, the joys of #generics in #C. I really love C, but of course it does have some "defects", one of them being the need to use #void #pointers for everything generic, which then leads to such silly bugs no compiler can ever catch ....

https://github.com/Zirias/poser/commit/449110dacb6249a50e8dd6a8976891508bb0c0b6

Server: Fix destructor · Zirias/poser@449110d

Fix a crash on destruction caused by wrong address calculation for the per-thread connection pool.

GitHub

@rl_dane

To react on subject

I never abbreviate functions; I want to read them all so that when I read back the programming code in a month a year or 10 years it still makes sense to me without reading my remarks

#Programming #abbreviations #functions #pointers

C++OnSea 2025 SESSION ANNOUNCEMENT: Smart Pointers, Dumb Mistakes by Khushboo Verma

https://cpponsea.uk/2025/session/smart-pointers-dumb-mistakes

Register now at https://cpponsea.uk/tickets/

#cplusplus #cpp #Pointers #stl

C++ on Sea

C++OnSea 2025 SESSION ANNOUNCEMENT: Smart Pointers, Dumb Mistakes by Khushboo Verma

https://cpponsea.uk/2025/session/smart-pointers-dumb-mistakes

Register now at https://cpponsea.uk/tickets/

#cplusplus #cpp #Pointers #stl

C++ on Sea

I would claim that I'm *very* experienced with #programming in #C. But still, C gets annoyingly weird when it comes to #pointers *to* #arrays.

Does the following code look sober to you? 🤔 (My compiler doesn't complain)

Especially interested in the highlighted line, but also the block above trying to expand the array ...

Context: I started work on a generic/configurable rate-limiter to add to #swad.

Code-Maze author Konstantinos Polychronopoulos writes a good overview of memory pointers in C#, including the caveats, and their limited but still important use cases (mostly having to do with optimizing large array data manipulation and access, and interacting with unmanaged code e.g., C, C++, and others.)

"How to Use Pointers in C#"

https://code-maze.com/csharp-how-to-use-pointers/

#csharp #dotnetcore #memorymanagement #pointers

Stupid Smart Pointers in C

Stupid Smart Pointers in C

🎩🧐 Behold, the riveting #sequel to 'Memory Management'—as if the first wasn't thrilling enough! Brace yourself as our intrepid author attempts to make #C++ sound like it's not just C with a monocle. 🥱🔧 Spoiler: It's still about #pointers, and no one's impressed.
https://educatedguesswork.org/posts/memory-management-2/ #MemoryManagement #Programming #TechHumor #CodingLife #HackerNews #ngated
Understanding Memory Management, Part 2: C++ and RAII