4 ms·
Kobayashi is also canonically a Python programmer, so this doubly fits on HN :) https://i.imgur.com/oxjqM1A.png https://i.imgur.com/oxjqM1A.png
by Lammy 5y ago
Kobayashi is also canonically a Python programmer, so this doubly fits on HN :) https://i.imgur.com/oxjqM1A.png https://i.imgur.com/oxjqM1A.png
- arrakeen 5y agoi could've sworn i saw kobayashi using a kana keyboard in one episode and thought that would be difficult to program with. does anyone here know if kana keyboards just have hiragana overlaid over the qwerty layout?
- Lammy 5y agoQWERTY JIS layouts are common, yeah. Just hit the 英数 key! https://upload.wikimedia.org/wikipedia/commons/2/21/MacBookProJISKeyboard-1.jpg https://upload.wikimedia.org/wikipedia/commons/2/21/MacBookP...
- Hamuko 5y agohttps://github.com/webpy/webpy/blob/16533d3a52065e5ed156219af3858919118c1f5f/web/session.py#L127-L154 https://github.com/webpy/webpy/blob/16533d3a52065e5ed156219a...
- 5e92cb50239222b 5y agoDamn kids, get off my issue tracker! https://github.com/webpy/webpy/issues/420 https://github.com/webpy/webpy/issues/420
- NoGravitas 5y ago420, nice.
- onurtag 5y agoI recognize that code.
- trinovantes 5y agoI like how the function names are in English but comments are in Japanese Don't most modern compilers allow utf-8 characters in symbol names?
- YouMeWeThem 5y agoI'm a programmer in Japan. This is completely normal. It looks ridiculous to have English syntax mixed in with Japanese variables, not great for legibility.
- Lammy 5y agoSupported as of Python 2.3; default as of 3.0: https://www.python.org/dev/peps/pep-0263/ https://www.python.org/dev/peps/pep-0263/ https://www.python.org/dev/peps/pep-3120/ https://www.python.org/dev/peps/pep-3120/ Also default in Ruby as of 2.0: https://ruby-doc.org/core/Encoding.html#class-Encoding-label-Script+encoding https://ruby-doc.org/core/Encoding.html#class-Encoding-label...
- deleted 5y ago[deleted]
- makeitdouble 5y agoUTF-8 is allowed, but it's a trap. Nowadays it's less of an issue, but back in the days windows, mac and linux all used different default encodings. This meant that opening and saving the source file in one of the system could mess it all depending on the editor and how careful the devs are. Also, there is the canonical writing issue, where you can write different utf-8 strings that all end up displayed the same. It's not an issue if it's just display text, it's a different story if you have a method that doesn't get called because the byte sequence was different, or more subtly hash indexes that seem to match but actually don't. BTW there are companies that write some of the UT methods right in Japanese, as it matters less, and it's quite fun as there is less restrictions on what can be put in the identifier (full-width parenthesis, spaces, comma etc, are allowed in that context)
- 5e92cb50239222b 5y agoI am not from Japan, but do work in two languages other than English (both official here). This is pretty typical actually. English names for identifiers (sometimes badly translated or simply transliterated), local languages for comments.
- Bendy 5y agoI discovered the cPickle module thanks to this show.
- jcun4128 5y agoI always like pausing code stuff I see in shows to see if it's legit or random garbage. For example recently in the Netflix Cowboy Bebop they had this bootloader that appeared to be a mix of JavaScript, PHP and Python. Also great show (KMD) last season's OP was great.
- smukherjee19 5y agoNice! In case anyone is wondering what those Japanese comments say: # Check if the IP address has changed """ Generate a random session ID """ Seems accurate. :)