shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

245
active users

#pointers

0 posts0 participants0 posts today
andie :oh_no_bubble:<p>TIL: C array subscript operators are handled in such a way that `letters[i]` is equivalent to `*(letters + i)` and because addition is commutative, that expression is identical to `*(i + letters)`, which means that `i[letters]` is the same as `letters[i]`.</p><p>```<br><a href="https://tech.lgbt/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> &lt;stdio.h&gt;<br><a href="https://tech.lgbt/tags/include" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>include</span></a> &lt;stddef.h&gt;</p><p>int main() {<br> char letters[3] = "abc";<br> size_t i = 2;<br> printf("letters: %p\n", (void *)&amp;letters);<br> printf("i[letters] (%p): %c\n", (void*)&amp;(i[letters]), i[letters]);<br> printf("letters[i] (%p): %c\n", (void*)&amp;(letters[i]), letters[i]);<br> return 0;<br>}<br>```</p><p>Which outputs:<br>```<br>letters: 0x7ffc68ec7bb9<br>i[letters] (0x7ffc68ec7bbb): c<br>letters[i] (0x7ffc68ec7bbb): c<br>```</p><p>Mind blown... :neofox_floof_explode: <br><a href="https://tech.lgbt/tags/til" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>til</span></a> <a href="https://tech.lgbt/tags/clang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>clang</span></a> <a href="https://tech.lgbt/tags/pointers" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pointers</span></a> <a href="https://tech.lgbt/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a></p>
Paul Houle<p>👇 Falsehoods programmers believe about null pointers</p><p><a href="https://purplesyringa.moe/blog/falsehoods-programmers-believe-about-null-pointers/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">purplesyringa.moe/blog/falseho</span><span class="invisible">ods-programmers-believe-about-null-pointers/</span></a></p><p><a href="https://mastodon.social/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a> <a href="https://mastodon.social/tags/software" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>software</span></a> <a href="https://mastodon.social/tags/pointers" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pointers</span></a> <a href="https://mastodon.social/tags/zero" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>zero</span></a> <a href="https://mastodon.social/tags/null" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>null</span></a> <a href="https://mastodon.social/tags/errors" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>errors</span></a> <a href="https://mastodon.social/tags/billiondollarmistake" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>billiondollarmistake</span></a></p>
Steve's Place<p>I'm unraveling an Unreal Engine editor crash bug.</p><p>When the crash happened, the editor got confused internally between 2 characters. One has a set of pointers that the other does not.</p><p>When the game starts, and it's time to head to work, a vendor instead sprints to (0,0,0), and the log says one of those pointers is missing. It is not. It is missing in the other character because they are of 2 different base classes, and it doesn't have those pointers. That character with the "missing" pointer was once spawned in the game, but not as a vendor. What they have in common is the same skeletal meshes and animation blueprints.</p><p>Somewhere, somehow, it thinks both skeletal meshes use the vendor base class. Uh... no.</p><p>I saw the confusion when I was deleting the location markers. It showed both characters were using the location marker that it can't find when the game is running. Uh... no again.</p><p>About to delete the character it's confused about. Not the vendor. Yet. I may delete both of them and start over. If this breaks it all, well, thank goodness for backups.</p><p><a href="https://mastodon.stevesworld.co/tags/GameDev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>GameDev</span></a> <a href="https://mastodon.stevesworld.co/tags/UE5" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>UE5</span></a> <a href="https://mastodon.stevesworld.co/tags/RPG" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RPG</span></a> <a href="https://mastodon.stevesworld.co/tags/pointers" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pointers</span></a></p>
Noxy 🐾🏳️‍🌈<p>no matter how many docs I read, no matter how many stackoverflow/reddit/whatever posts I read, no matter how many videos I watch to try to understand the concept,</p><p>i just cannot fucking grasp the usage of pointers in golang.</p><p>i 100% understand what they are (memory addresses) and the benefits of using them (use address where data is instead of copying or passing around all the actual data). but none of that knowledge helps me develop a "muscle memory" for the ways * and &amp; are used when reviewing pull requests or existing code.</p><p>I have no prior experience with pointers in any other language, so comparisons to C aren't helpful.</p><p>anyone else ever struggle really fucking hard with pointers in golang, no matter how much you "academically" understand what they are? any resources or exercises that might help it "click" for me?</p><p><a href="https://packmates.org/tags/pointers" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>pointers</span></a> <a href="https://packmates.org/tags/golang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>golang</span></a> <a href="https://packmates.org/tags/programming" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>programming</span></a></p>