Hacker News new | ask | show | jobs
by Wolfspirit 1726 days ago
Timezones are the most annoying thing... right after encoding
2 comments

I personally find timezones more annoying. At least with encoding once you figure things out it will work indefinitely. Timezones can simply change from under you with or without notice.
You think timezones are simple, and then you realize this, when you try to implement them (in the US): https://en.wikipedia.org/wiki/Time_in_the_United_States#Boun...

(And that's not counting daylight savings time, and its varied observance!)

Unicode 14 just came out. If you are using collation, NFD, ... you need to update your libs.
> right after encoding

No joke. Today I ended up writing a whole essay explaining the issue I was having and almost sending it off to the core developers because I thought I had discovered an issue with the actual language. The bug was because I had forgot to convert too&from utf-8 in these two procedures:

    proc 2Hex { input } { binary encode hex [encoding convertto utf-8 "$input"] }
    ;# Converts base32 string data to base16

    proc 2Base { input } { encoding convertfrom utf-8 [binary decode hex "$input"] } 
    ;# Converts string hex data to base32
On the plus side, I now have written documentation of the internals of my program.
Oh TCL. I didn't miss you.