ysaie

31 / ⚧ / code, music, art, games

──────────────────────────────
🌸 many-shaped creature
✨ too many projects
🚀 cannot be stopped
🌙 stayed up too late
:eggbug: eggbug enjoyer
──────────────────────────────
header image: chapter 8 complete from celeste
avatar: made using this character builder


📩 email
contact@echowritescode.dev

i was happily chugging along fixing bugs, making Crucible better, having a great time, and i have now encountered An Issue™️


  • MSVC has had broken char8_t literal support for a while now, and i don't know when they're going to fix it
  • so okay, i switched to my String type to use char internally. woops, that can be signed! and it's ✨implementation-defined✨ whether it is or not!
  • if char is signed, as it happens to be on my particular version of macOS, then my constexpr UTF8 validator doesn't work, because it was written for char8_t, which is always unsigned. and even if i switched it to work with a signed code unit type (ew), there are also platforms where char is unsigned!
  • guess what! the only ways to convert char[] to unsigned char[] are runtime-only! this super sucks because i need something that will work in a constexpr context
  • so now char is broken on one platform and char8_t is broken on a different platform
  • oh and irrelevant at this point but char[] to unsigned char[] conversion at compile time has also been broken on MSVC for a couple years lol

i think the only clean way to solve this is to go into my UTF8 validation code and add static_cast<unsigned char>(code_unit) everywhere that i have a code unit; these should optimize out on all relevant architectures, but ooooohhhhhhh i'm gettin' peeved by C++ againnnnnnn grrrrrrrrrrr


You must log in to comment.

in reply to @ysaie's post:

i will admit i definitely considered it... i'm not exactly honor-bound to supporting it or anything, but i would like to give less-experienced folks who won't know to install Clang access to my work if i can. like, if they're a compsci student who juuust installed visual studio for the first time, for example