Lesley Lai
lesley@mastodon.gamedev.place
<p>Computer Graphics & Programming Languages person.</p><p>I twoot about languages like C, C++, Rust, JS/TS, and OCaml.</p><p>I organize <span class="h-card" translate="no"><a href="https://mastodon.gamedev.place/@graphicsmeetup" class="u-url mention">@<span>graphicsmeetup</span></a></span></p><p>he/him</p>
Posts
-
Post #1463409
What a good treat when you are learning something (generating functions in my case) and find a blog post written by someone you know: https://blog.demofox.org/2025/01/05/dice-deconvolution-and-generating-functions/. Thank you, @demofox. Also, it&#39;s a good observation that generating functions are like the z transform (and also Fourier/Laplace in continuous space). All of those solve problems by transforming into a different space, solving the problem there, and then transforming back.
-
Post #1122655
Yet another person asked me &quot;aren&#39;t your programmer&#39;s job to be replaced by AI soon?&quot; This friend&#39;s job is to predict the stock market.
-
Post #1039197
Since I reduced my usage of em-dash (it&#39;s pretty hard to type any way), my new best friend is parentheses. (Parentheses are really cool since you can use it to express non-linear flow, and you can also nest it (like this (isn&#39;t this cool?))) What? It&#39;s hard to read? If you can read Lisp (I am sure, you, my target audience, can), this is a piece of cake
-
Post #1039196
TIL about #Rust &#39;s Option::transpose. Pretty cool stuff: // this will give you Result&lt;Option&lt;T&gt;, E&gt; optional.map(|v| something_that_can_fail(v)).transpose() #RustLang
-
Post #905108
Added Mastodon comments functionality to my blog (the function is already there for the &quot;microblog&quot; section, and I just added it to regular posts). Now, if I link a Mastodon post in a blog entry, all the replies from Mastodon will appear on the page. Test page: https://lesleylai.info/en/fifty_shades_of_oop #indieweb #personalwebsite
-
Post #730098
I don&#39;t know. The complexity of this issue (both implementations and the mental overhead of programmers) just to save a few keystrokes makes me feel it&#39;s not really worthwhile? It feels more like a fashion when the convinience is debatable? #pldev https://terts.dev/blog/no-semicolons-needed/
-
Post #730097
Just set up AdGuard Home on a new Raspberry Pi for the first time. As someone who have never used Raspberry Pi before, this whole process of assembling the case, installing OS, and installing the software took less than 2 hours (I&#39;d expect this would take like a whole weekend). Pleasantly suprised
-
Post #730096
I hope generators get more love in the C++ circle. Unfortunately, I think a C++ coroutine-based generator has a non-trivial overhead compared to a hand-written iterator or state machine. It probably doesn&#39;t matter for a lot of use cases (like the example the author showed). https://mropert.github.io/2026/03/20/unity_cpp_coroutines/
-
Post #730094
Trying to apply for jobs, and one job sent me this LeetCode-style coding challenge that I failed miserably. I am not that kind of person performing well under high pressure. Choosing C++ was also a mistake. Their platform doesn&#39;t support debuggers, and STL index-out-of-bounds errors don&#39;t give me any information about where they occur. At the end, I am pretty much stuck in debugging hell with std::cout