cheatdeath's comments

cheatdeath | 9 years ago | on: Building a BitTorrent client from scratch in C#

Thanks for the comments! I'm all for improved readability. I definitely wasn't aiming for much performance wise, at least initially. These were two areas (of many) that I felt could do with some improvement (especially the file IO). I will look into making some modifications like those suggested when I get a chance.

cheatdeath | 9 years ago | on: China’s tyranny of characters

I guess I've just been assuming any Roman characters are English, some definitely might be Pinyin. I generally try not to stare at peoples screens for too long haha. I did an intro to Chinese (Mandarin) class a few years ago so I'm aware of Pinyin but have forgotten almost everything (except some of the bits I found particularly interesting like word order for times and places, how numbers are represented and a few other things).

cheatdeath | 9 years ago | on: China’s tyranny of characters

In Hong Kong, I sometimes see peoples screens when I'm using public transport. WhatsApp audio recordings are very popular, sometimes I can see the entire conversation is just audio recordings back and forth. Other times it's Chinese (I can't differentiate which), sometimes English, often a mix. I've only seen someone drawing characters with his finger once.

cheatdeath | 9 years ago | on: Building a BitTorrent client from scratch in C#

Thanks.

Actually organising the write up forced me to tidy up the code much more than I otherwise would have. I definitely find C# to be one of the more readable languages although I have had to debug and untangle some C# messes before.

Yeah I remember changing it to a SortedDictionary but I changed it back. I can't remember exactly why, possibly because it's supposed to be sorted by raw UTF8 bytes rather than a nice neat C# string and I didn't want to start using byte arrays for dictionary keys. I guess it only needs to be sorted when in the BEncoding format and it felt better to keep the internal structure as simple as possible. The tradeoff is it doesn't support incorrectly encoded torrent files – I'm really not sure how much of an issue that is.

cheatdeath | 9 years ago | on: Building a BitTorrent client from scratch in C#

I'm not that familiar with .NET Core. It doesn't look like MiscUtil is compatible with it.

The executable project has some minor references to Mono.Posix just so it can catch kill signals while running in the Terminal and die gracefully.

Both dependencies can be removed quite easily from the project.

page 1