lobsters score: 1 · tags: c, rust
I wish I’d thought of this.
As a Python→Rust programmer who later picked up C for MS-DOS retro-hobby programming, it never occurred to me to blog about what I learned.
score 1 · canonical
A Racket comp sci course has a if you must learn c attatched which I reallt liked.
score 1 · canonical
I loosely planned a short book “Python for Rust programmers” in 2014. It was to be humorous but at least mildly insightful. I never quite made it (the previous project took far longer than anticipated) and the time for that sort of thing has kinda passed by now. But honestly I do think it’s a useful concept, and might eventually do something significantly briefer. I’m exploring a new direction of technical book, handwritten, with no paragraphs and not much prose, and probably not more than 50–100 pages long.
score 1 · canonical
The corresponding Rust function is not idiomatic, and can only correctly handle ASCII text. If I were writing a production version of this function, it would be a single line of code
Of note: because it works on codepoints the line in question only works for scripts without combining characters or those which have all the precomposed form you need and you have normalised the input. I believe that is a very common issue for Aramaic and Brahmic scripts, but even the first can occur in Latin scripts despite their favoured position: the guarani script uses the character g̃ which afaik has no precomposed form, it only exists as the sequence Latin Small Letter G, Combining Tilde.
score 1 · canonical

