Elektrine
Log in Register
Paige Chat Timeline Gallery Friends Email Drive DNS Private DNS Domains VPN Kairo Nerve
Remote

Lesley Lai

@lesley@mastodon.gamedev.place
mastodon 4.7.3
  • Open on mastodon.gamedev.place

Computer Graphics & Programming Languages person.

I twoot about languages like C, C++, Rust, JS/TS, and OCaml.

I organize @graphicsmeetup@mastodon.gamedev.place

he/him

687 Followers
660 Following
35 Posts
Joined October 31, 2022
Website:
https://lesleylai.info
Notes:
https://notes.lesleylai.info/
Codeberg:
https://codeberg.org/Lesley
Forgejo Instance:
https://git.lesleylai.info/
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 1w ago
Replying to
@0xabad1dea@infosec.exchange It's funny because the Chinese word, 烙餅, is definitely not Pizza. I don't know how to translate it (or whether there's even a proper English translation), but I think "pie" is closer
2
2
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 2w ago
Replying to
@jaredwhite@indieweb.social Dropbox will be a hard one for me. I've used this service for 10+ years and depend on it too much. Even after setting up Syncthing last year, I still haven't migrated most of my stuff. But what happened now is a strong motivation for me to finish this transition
1
4
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago

Since I reduced my usage of em-dash (it'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't this cool?)))

What? It's hard to read? If you can read Lisp (I am sure, you, my target audience, can), this is a piece of cake

14
1
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 7mo ago
Replying to
@0xabad1dea@infosec.exchange I have a feeling that this writing relies on LLM way too much
12
3
1
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago

Added Mastodon comments functionality to my blog (the function is already there for the "microblog" 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

lesleylai.info
8
0
1
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 5mo ago
Replying to
@eniko@mastodon.gamedev.place I went to a fever clinic in China once. Half of the patients didn't wear mask *when they are having a fever*
5
4
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 5mo ago
Replying to
@0xabad1dea For me, it's often because I spend so long in English-speaking environments. English phrases sometimes come to me before Mandarin ones, and I often struggle to find a Mandarin equivalent. There's a joke that immersion in English too much won't makes you fluent at it, but will make you forget your native language 😅. It used to happen to me a lot, but since I have a Chinese partner, who speak Mandarin with me at home every day, I've gotten much better.
6
2
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 5mo ago

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@mastodon.gamedev.place.

Also, it'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.

Dice, (De)Convolution and Generating Functions
The blog at the bottom of the sea

Dice, (De)Convolution and Generating Functions

I stumbled across a very cool YouTube video today that talks about how to look for alternate ways of labeling sides of two dice to give you the same random number distribution as if you added two s…

6
0
2
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago

TIL about #Rust 's Option::transpose. Pretty cool stuff:

// this will give you Result, E>
optional.map(|v| something_that_can_fail(v)).transpose()

#RustLang

mastodon.gamedev.place

Gamedev Mastodon

4
0
1
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago

I don'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's not really worthwhile? It feels more like a fashion when the convinience is debatable?

#pldev

https://terts.dev/blog/no-semicolons-needed/

terts.dev

No Semicolons Needed | Terts Diepraam

4
7
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@tilton Yeah. I feel the same. Yesterday, I described this as DDOS on my brain. Few people talk about actual work anymore (Maybe because many are not doing any actual work? It definitely feels like many boosters become "using nailgun to build more nailguns". It's kind of like how crypto bros changed their whole identity to revolve around crypto, but this is incredibly common now)
3
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 7mo ago
Replying to on infosec.exchange
@0xabad1dea@infosec.exchange Agree with other stuff. Federation was a "must" for me, but you make me think whether we actually need it if clients can just manage credentials for multiple servers. The friction can still be a bit high to create one account for each server, but maybe OAuth can help
4
1
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 7mo ago
Replying to
@demofox@mastodon.gamedev.place Cool stuff! I used to use SDL to draw to screen from CPU, but this feels much easier for someone to start. DX12 means it won't be easy to use on Linux, though
4
2
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 31mo ago

Yet another person asked me "aren't your programmer's job to be replaced by AI soon?"

This friend's job is to predict the stock market.

37
1
13
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago

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't matter for a lot of use cases (like the example the author showed).

https://mropert.github.io/2026/03/20/unity_cpp_coroutines/

mropert.github.io

Looking at Unity finally made me understand the point of C++ coroutines · Mathieu Ropert

I had seen many talks about coroutines but it never really clicked where I could use them outisde of async IO. Until I looked at how Unity uses them in C#.

2
0
1
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 5mo ago
Replying to
@bitinn@mastodon.gamedev.place Many universities also don't teach software engineering right. I've seen university graduates whose only coding experience was in their first-year intro courses, and then they forget how to code altogether when they graduate. At least where I am, it's a lot of meaningless drills that are neither interesting from a theoretical point of view nor from a practical point of view.
1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@db For specific project, it's still unavoidable to be locked into certain technologies. Like I am doing a web personal project recently, and my language of choice (Rust), web framework (Axum), and database (postgres) are probably impossible to replace without rewriting everything. I am try to not emotionally attached to any technologies, though. This includes programming languages (something a younger me needed to learn)
1
1
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@andnull It just takes the idea of "small utility classes can be good sometimes" into "ultra small, atomic utility classes for everything". I wonder about an alternative timeliness where the web started as tailwind madness and then someone discovered CSS
1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@eclecticpassions Thanks! I have been hosting many services on a VPS, but this is the first time running anything on a device I own. I also didn't research AdGuard vs. pi hole (and just picked whichever). Maybe that's something I can revisit later
1
2
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@sschoener@mastodon.gamedev.place C++ modules (and OCaml) supports optional "module interfaces", which seems to be the best for both worlds. It's interesting that not many other languages have this. Though from my understanding, the C++ module interface is designed more for build-time reasons rather than for interface/implementation segregation
1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@ryan@social.eqrion.net I use System76 and can recommend, though the shipment cost is non-trivial if you're not in the US
1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago

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't support debuggers, and STL index-out-of-bounds errors don't give me any information about where they occur. At the end, I am pretty much stuck in debugging hell with std::cout

1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
It's disgusting how many tracking requests it blocks. I knew the situation is bad, but I didn't know that microsoft sends telemetry every 20 seconds, for example
1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@mkarp I also have ublock origin installed on all of my devices and I rarely see ads, but I think this will help for apps, smart TV, and my GF's devices
1
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@miclgael@hachyderm.io Followed. Here is my profile https://codeberg.org/Lesley I didn't have the motivation to move everything over, and currently, I am in a "once I touch a personal project, I will migrate it" mode
Codeberg.org

Lesley Lai

Codeberg is a non-profit community-led organization that aims to help free and open source projects prosper by giving them a safe and friendly home.

1
4
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 7mo ago
Replying to
@mjk@hachyderm.io I've read that people rely on computed goto or, more recently, Clang's tail call annotations for interpreter loop too
1
2
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 16mo ago
Replying to
@dvandal@infosec.exchange @davidgerard@circumstances.run I am fortunately enough not to have met someone like that yet, but I've met people who asked me to read their LLM session output because they don't understand what's going on, but insisted that ChatGPT can "help"
4
1
1
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 8mo ago
Replying to
@0xabad1dea That's a piece I learned in middle school. BTW, it is very common for Chinese society to promote "苦难教育" (intentionally making a kid suffer, in the hope for them to be more resilient to hardship). Nowadays, more and more people criticize it, though
1
1
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 7mo ago
Replying to
@0xabad1dea@infosec.exchange "Someone knowingly lies to cover up LLM usage" is something I've seen often at university. TBH, slops from an irresponsible human's own brain or from an irresponsible human using a machine don't make much difference to me, especially since the line becomes kind of blurry with all the tech companies pushing LLM usage to their product to a degree that many people don't know whether they are using LLMs or not.
0
4
1
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 32mo ago
Replying to
@m@lgbtqia.space My RSS inbox will have hundreds of entries if I use it weekly, so I can't imagine workflows that use RSS but don't check it daily
0
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@albertcardona I think in my university (in Australia), it's around 90%. It's ridiculous that with 10x more income, they are doing rounds of budget cuts on faculties and stuffs (with absurd results such as not allowing TAs to answer questions on Edstem (online Q&A forums)).
0
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 9mo ago
Replying to
@nothings@mastodon.gamedev.place @nicebyte@mastodon.gamedev.place centroids/extents are also useful when computing BVH, though they can be precomputed in a single pass before processing.
0
3
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 33mo ago
Replying to
@scubbo@fosstodon.org Also "SJW." I am glad that this term seems to be used less now (or maybe I only perceive it this way since I deleted my Twitter account)
0
0
0
0
Open post
Lesley Lai @lesley@mastodon.gamedev.place
· 6mo ago
Replying to
@rnd Chinese is the same as Japanese. Loading: 载入中 Downloading: 下载中 Saving: 保存中
0
0
0
0
Back
313k7r1n3
Elektrine

Tor hidden service

elekhj7afj4qnrr4yd3bkzslsyo5jgfxw3orgjkhlcxifueodybyiiad.onion

I2P eepsite

j6b6cyk6gjmepjih7jjadxgxvvf3lzzujljuu2v4biemzpg3naya.b32.i2p

Platform

  • Email
  • Chat
  • Timeline
  • VPN
  • DNS

Company

  • About
  • Contact
  • FAQ
  • Lite (no JS)

Legal

  • Terms of Service
  • Privacy Policy
  • Transparency Report
  • Report Abuse
  • Warrant Canary
  • VPN Policy

Support

  • support@elektrine.com
  • Report Security Issue
Mail client setup IMAP mail.elektrine.com:993 POP3 mail.elektrine.com:995 SMTP mail.elektrine.com:465
© 2026 Elektrine. All rights reserved. Server: 11:38:09 UTC