These are my self-amusing posts written in Gemini text/gemini format. Rendered to HTML. You can find the same content on my Gemini capsule gemini://gemini.clehaxze.tw[what is gemini://?]. In fact I recommend viewing through a Gemini browser (like this one) for the best experience. An Atom feed is also avaliable.

Latest Posts

2022-06-30: FBInfer reduced our product crash by 50%

Just want to share how powerful this tool is. Infer[1], or FBInfer (since it's written by Facebook), is a static analyzer that can detect cross-function logic errors and potential data race in C, C++ and Objective-C. Which is just amazing. The company I work for runs on a C++ heavy product. Unfor...

2022-06-28: Coverage testing with CMake and GCov

This took me 3 days of on and off work to figure out. So I decide to write it down in case I need it again. And I want this to be more widely known. CMake is the most popular build system (generator) for C++. While test coverage is an important tool to find where bugs can hide. Testing usually tr...

2022-06-23: Understanding explicit OpenCL memory migration between devices

Lately someone emailed me asking how OpenCL memory migration works. To be specific, when and how to use the `clEnqueueMigrateMemObjects` API when using more then one device. Yeah, the description of it in Khronos's documentation[1] is very unhelpful. Nor is this API used often. I also spent quite...

2022-06-17: Upgrading WiFi bandwidth, hardware codec for VR Expreience

I'm a heavy VRChat player. My setup wasn't really good for VR per se. I had a relatively weak PC and limited LAN bandwidth. The upgrade is a bit costly, but I'm happy with the money spent. Also some unexpected issues caused my the upgrade. My setup is weird. Most people have their PC and playsp...

2022-06-14: RE: RE: The useful part of cryprocurrency

I feel I ought to explain my position. I think I understand and respect idiomdrottning's view. I just feel misinterpreted. And I'll try my best not to strawman him. If I do, by all means, it's my fault. My fault. I should have make it clear in my post. I mean "secure" by cryptographically secure...

2022-06-13: The useful part of cryptocurrency

Amid the current crypto price drop. I want to write about what cryptocurrency is actually useful for. And what I believe Crypto should be used for. Non of those NFT and ICO bulls*it. Or you can think this as my DD for investing in crypto. Or confirming my confirmation bias if you read WSB. At the...

2022-06-11: Unexpected complexity writing an async Spartan protocol server

Spartan[1] is a cool smol internet protocol. It's even simpler than Gemini. There's no TLS, no need for URL parsing and even less status codes! I just wrote my own Spartan client and server - Spartoi[2] in an afternoon, for fun. What I'm not expecting is some parts of it being (slightly) more comp...

2022-06-06: The stupid socket file descriptor leak in Dremini

TLGS'[1] crawler has had a crashing issue from the very beginning. The crawler tries to open too many sockets at the same time with the error message "sockets::createNonblockingOrDie: too many open sockets". The crawl dispatcher already limited how many concurrent craws can happen at any time. Fir...

2022-05-28: I can't stand developer interviews with algorithms (Or, why I'm learning APL)

I've been contacted by several HR people who are looking for a software engineer. It's good. I'm always looking for new challenges. What I can't stand is a large portion of the company decides that they should test the candidate's algorithm skill. Sorry, what? You just said you want to hire a seni...

2022-05-15: PSA: Potential libstdc++ hang in std::filesystem::symlink_status

Something I caught while running TLGS's crawler. Due to how drogon works. It needs to always successfully open a new socket on TCP connection. Otherwise the entire process is killed. But Gemini does not support multiple requests on the same connection. So it's easy to endup with a lot of open sock...

2022-05-13: Sane YouTube FPS on FireFox on OpenBSD

One thing I really want to be able to do is to load YouTube and put it in background as my work music. On OpenBSD the playback performance is a meh. Espically on Chromium. Opening a 720p 60FPS YouTube video yeilds ~10% frame drop in YouTube stats. Beyond that, the actual rendering rate feels more ...

2022-05-12: First time installing OpenBSD and stuff I did

I have been wanting to use OpenBSD for a while after hearing everyone prazing it's superior security. Until then, my only exposure to OpenBSD was installing it on a VM and maintaining Drogon on it. Needless to say, VM performance sucks. Not even Linux can do video playback on a VM without graphics...

2022-05-03: Two cents on the mistery of double slashes in URLs

I never expected my initial post about gemini crawlers would trun into a long conversation between crawler developers and server developers. Just saw Sean Conner's post[1] through cosmos about double slashes in URLs. This is just my 2 cents on the matter. RFC3986 section 3.3[2] contains the ABN...

2022-04-30: Securing web applications beyond just containers

This website, `clehaxze.tw` (or `gemini.clehaxze.tw` for Gemini) run on basically the same architecture as any modern web applications. A backend that that serves some files, talks to some database, read some files and render templates. It's my passion to make what I made absolutely secure. A back...

2022-04-22: RE: My common Gemini crawler pitfalls

I opened Cosmos today and saw a reply to my previous post about gemini crawler pitfalls[1]. In it (I assume) he complains a crawler sending requests to `gemini://gemini.conman.org/boston/2008/04/30/2008/04/30.1` which is non-existent. Yeah... that's my crawler. I shall fix it. Upon investigatio...

2022-04-20: My 3 weeks with the SlimeVR open source full-body tracker

SilmeVR is an IMU-only open source full body tracker (open firmware + software) for VR. For the non-initiated, normal VR only tracks your head and hands. While full body tracking in addition tracks waist, chest, ankles, and etc.. With FBT you can sit in VR and see your avatar also sitting down, wi...

2022-04-15: My half of year on Gemini

If you are browsing from HTTP. You really should get youself a Gemini Browser and browse this on Gemini. I recommend Lagrange. Or feel free to keep using HTTP. I've been on Gemini for more than half a year now. I genuinely feel the geminispace is a great place to be. And to publish my thoughts....

2022-04-11: Common Gemini crawler pitfalls

Just like the common web, crawlers on Gemini can run into similar pitfalls. Though the impact is much lower. The gemtext format is much smaller than HTML. And since Gemini does not support reusing the TCP connection. It takes much longer to mass-crawl a single capsule. Likely I can catch some issu...

2022-04-02: landlock-unveil - experimental unveil(2) for Linux

OpenBSD's unveil(2) is a great tool to protect the system in case a program gets compromised. Linux has (almost) nothing like it. You can do something close with seccomp and BPF. But it's waaaay out of the scope for any ordinary developer. Linux 5.13 introduces landlock, which provides more or le...

2022-03-31: Markdown is not context free (or, writing parsers vs perser combinators)

If you visit my blog posts over Gemini[1]. You'll see even though all my posts are written in Gemtext[2]. Due to the high frequency that I need to seperate inline code from text. I still use backticks for code blocks even it's not a standard in Gemtext. It' just feels natural. And so my Gemtext to...

2022-03-27: 如何使用 VR Performance Kit 提升 VRChat 的性能

VRChat的性能有時非常的糟糕。常常地圖不支援 LoD,是路人開著 > 100萬三角形的avatar等等... 我的自認不算太差電腦,Ryzen 3700X + GTX 970 也只能在我的 home world 跑到36 FPS(Quest 2,中間用AirLink + Wifi 6跟主機連線。地圖:Rainy Attic + 鏡子)。 國外的工程師 fholger 也遇到類似的問題,於是開發了VR Performance Kit。在我的主機上由原先的36FPS: 提升到約略維持在72左右。相片中只有54是因為用了遊戲內的相機拍照,導致GPU必須多負荷相機的計算。 如果你...

2022-03-27: How to boost VRChat FPS using VR Performance Kit

VRChat is a great game. Probably the only MMO that is not a RPG (Besides one time my friend mentioned it's actually a MMO*ERP*G. Hehe). However the performance can be absolutely awful. Mostly maps not using LoD or avatars with 1M+ polygons. My PC, running a Ryzen 3700X + GTX 970 can only get a p...

2022-03-20: The design of TLGS's crawler

TLGS is a search engine. Crawling is a very important part of it's oprtation. A crawler must follow links that it sees, retrive the page and follow more links on that page. While writing a basic crawler with DFS is relatively easy. Implementing a crawler that handles concurrent crawls well, runs o...

2022-03-19: clehaxze.tw, my new hybird Gemini/HTTP website

I decided to rewirite both my personal website and my Gemini capsule into a single service... Whoah.. that is so not UNIX. I should have just kept separate servers doing their own thing. But I have (I hope) good reasons to go the other way. Namely I want Atom feed because I want to explore how A...

2022-03-13: Recover from Linux update disaster

Disaster just stroke me today. My Arch Linux laptop suddenly shutdown for no reason during system upgrade. - I'm 100% sure it's not a battery issue, I have like 23% left when I started upgrade - In any case. When I rebooted the system and got pass GRUB's boot screen. It just says "can't find linux...

2022-02-28: Ranting. My problems with C++

I have been really annoyed by C++ recently. I love C++. It gives me the absolute best performance out of all languages with high level of abstraction. But it has so many problems that makes it borderline unusable sometimes. C++ gives me 100% control over very fine details on exactlly when and h...

2022-02-03: RE: Gemini as a fertile frontier for hacking

gemi.dev have a interesting piece of small article I encourage people to read. For me as a search engine developer at leaset. He poses some important questions. This is totally true. The fact that Gemini is the size of early Internet is a blessing for developers. Commoncrawl[1] is a massive com...

2022-01-24: Does a Free and Open Source Metaverse make sense? Ans: Maybe not?

My friends and I are considering to build a FOSS version of VRChat for fun, from scratch. Maybe just in case VRChat disappeared in the future. I trust that we have technical skills to do it. However, that gets me thinking, how would we run this place? It's likely building the software and infrastr...

2022-01-19: A CryptoPunk's Dream

This is my dream. I perfered to be called a CryptoPunk. But CyberPunk will do. Everyone is just a number. That's no a bad thing. No longer we sign contracts and leagal documents with our name. We sign them with private key(s) that we own. Our identities are no longer bounded to ours names. Now we...

2022-01-14: Designing my ideal secure laptop

This is just something I dream of.. And maybe actually build some day, when I have some extra cash or when I switch to a new laptop. The goal is as follows. But to be frank, it's so I can have the peace of mind knowing that no one, not even the CIA or Russian hackers can get into my laptop. I feel...

Pages:
Author's profile. Photo taken in VRChat by my friend Tast+
Martin Chang
Systems software, HPC, GPGPU and AI. I mostly write stupid C++ code. Sometimes does AI research. Chronic VRChat addict

I run TLGS, a major search engine on Gemini. Used by Buran by default.


  • marty1885 \at protonmail.com
  • Matrix: @clehaxze:matrix.clehaxze.tw
  • Jami: a72b62ac04a958ca57739247aa1ed4fe0d11d2df