
1·
12 days agoI was a little surprised to see the J8 string syntax for a literal byte was \yFF rather than \xFF. The FAQ mentions that’s because \xFF in JavaScript and Python is an abbreviation for \u00FF - that is, in a Unicode string (in Python, and which is the only kind of string in JavaScript) it represents a codepoint rather than a byte.
But it seems like Oils already has a variety of string literals that support different escapes depending on their encoding (only u'' (UTF-8) strings support \u{10FFFF}, only JSON (UTF-16) strings support \uFFFF), so it seems reasonable that b'' strings could have \xFF as their special code unit literal that other kinds of string don’t support.
score 3 · canonical
Sometimes I get tired of working in higher-level languages like Python and I feel inspired to try my hand at something lower-level and closer to the machine. Go and Java are too corporate, Zig and Odin and Hare are too trendy, Rust is too industrial and C++ too Lovecraftian.
“I know”, I say, “I’ll use C - it’s been around for fifty years, it’s small and simple and got to be polished to a sheen by now.” Then I read an article like this one.
Maybe I need to look more into Forth…
score 1 · canonical