7 ms·
I made a few web application servers (mostly for games) and it's been a real pleasure, not to mention that my programs run for months handling millions of queri
by canop_fr 14y ago
I made a few web application servers (mostly for games) and it's been a real pleasure, not to mention that my programs run for months handling millions of queries (mostly json) without the slightest problem.
Using the go tool to get libraries, build, compile, test, benchmark, is like a dream.
An example of what I found kind of marvelous : I had sometimes queries leading to the call to a function updating a lot of things in a kind of specific database. That is the browser had to wait about 1 second because there was in the query handling code something like this :
for _, ami := range amis {
bra.EnrichitCouchePNG(ms.répertoireCartesBraldun(ami.IdBraldun, ami.Mdpr), couche, PNG_CACHE_SIZE)
}
I just made a tiny change and the work was done after the answer was sent to the browser :
for _, ami := range amis {
go bra.EnrichitCouchePNG(ms.répertoireCartesBraldun(ami.IdBraldun, ami.Mdpr), couche, PNG_CACHE_SIZE)
}
This small go was the only needed thing (the "database" being yet protected by a mutex)
- huhtenberg 14y agorépertoire Never gave much thought to Go's UTF8 support, but this makes me think that it might've been better limited just to the string literals. The last thing I want is to patch other person's code by copy-pasting original variable and function names, because all I have is a standard US keyboard locale.
- maaku 14y agoLearn how to use your ALT-keys.
- huhtenberg 14y agoDo tell how I would enter Ж with my Alt-keys. Or better yet, tell me how to tell apart 'e' and 'е' (one of them being a Cyrillic letter.)
- krasin 14y agoA popular Russian CRM (1С) has a scripting language where the code looks like: СпрСотр = СоздатьОбъект("Справочник.Сотрудники"); СпрСотр.Новый(); СпрСотр.Наименование = ФИО; СпрСотр.Должность = Должность; СпрСотр.Оклад = Оклад; СпрСотр.ДатаПриема = ДатаПриема; СпрСотр.Записать(); It's not surprising they were not able to expand to the Europe market.
- maaku 14y agoOp was complaining about é, not Ж.
- canop_fr 14y agoI don't know if I'll be able to go on with that. When I was coding in smalltalk and at the very beginning of java I was happy to use the full power of my speaking language in my programs but I had to give up my accents because most tools were unable to handle them. Now that (on linux) most tools deal correctly with UTF-8, I try again, at least on programs that I'm sure I won't share with people not understanding French (for example French MMORPG). Time with tell but I don't take this risk at work.
- chc 14y agoI've said it before and I'll say it again: Somebody really just needs to clone Apple's input method on Linux and Windows. Then you don't need to copy and paste — "é" is just one more keystroke than normal "e", option-e-e. This alone solves probably 95% of the international issues I encounter to the satisfaction of everyone involved.
- ethereal 14y agoI believe that is the purpose of the AltGr [0] key, is it not? [0] http://en.wikipedia.org/wiki/AltGr_key#US_international http://en.wikipedia.org/wiki/AltGr_key#US_international
- groovy2shoes 14y agoOn X11, the keymap can be set to "US International" which is the same as a stock US layout but with deadkeys and an AltGr key. I find it to be even easier than Apple's input method.
- chc 14y agoYou're right, I should have mentioned that. I admit to only having learned about that recently, but it didn't sound quite right to me. You really like it better? As I understand it, the US International keymap makes any character that might be used as a deadkey always act as a deadkey, right? Because that sounds a little annoying for programming. In a Ruby program, even a French or Spanish one, probably most of the ` and ~ characters are going to be syntax, not diacritics. (But like I said, I haven't gotten to try it, so I might have gotten the wrong impression.)
- omaranto 14y agoI found it annoying enough that I now use US International without deadkeys. And definitely "Alt gr-o" is a lot easier than the "Option-e o" that I'm forced to use on the school's Macs.
- reidrac 14y agoActually that's my configuration of choice, being Spanish, I use a UK keyboard + AltGr and it's perfect. I find the UK layout more comfortable for programming, and still can type Spanish when needed.