I am still recovering from the cold I've caught last week. Most of the nasty side effects are gone, but I still feel incredibly tired.
Other than that, I've had extremely little time for myself this week. Company where I work permitted one team building for our team (one day) and organized other for the whole company (two days). I've spent one evening with my daughter, so that left just one evening of free time + Sunday (that is for me today).
On the other hand, although the second (whole company) team building was just a standard bullshit, the first one was most excellent. I've suggested going to shooting-range, and our scrum master knew someone from the company who could rent a whole shooting-range in the woods for one day. He also provided weapons, training and legal oversight.
- Glock 17
- Colt 1911
- Some smaller Glock (43?)
- AR-15 with 4x scope
- vz. 58 with some newer tactical railings and plastic handles
- Two shotguns
- One .22 hunting rifle with 16x scope
It was only the second time for me, and the first time was just with Glock 17, so I was very curious and had great time. Most of the people I know don't have a gun and I would say that laws are fairly strict, so this was quite rare opportunity for me.
I've refactored parent lookups and caching, so now it is slightly faster and it also shares parts of the code there were almost same.
I did some benchmarks, and I was quite surprised by results. Generally, stuff that I thought would make code faster made it slower and by removing optimizations, I've sped the code significantly.
I am using benchmark, which is just one million while cycles:
# Just simple benchmark file to quickly measure, whether the optimization had # any effect or not. (| benchmark = (| i <- 0. | [i < 1000000] whileTrue: [ i: i + 1. ]. ). run_benchmark = (| start_time. end_time. | start_time: primitives time timestamp. benchmark. end_time: primitives time timestamp. end_time - start_time asString + '\n' print. ). |) run_benchmark.
Benchmark is then measured under the compiled version by running:
./compile.py -q; sudo perf stat ./tSelf tests/scripts/count_to_1000000.self
Which outputs something like:
3.211040 Performance counter stats for './tSelf tests/scripts/count_to_1000000.self': 3208,483098 task-clock (msec) # 0,991 CPUs utilized 266 context-switches # 0,083 K/sec 0 cpu-migrations # 0,000 K/sec 2 132 page-faults # 0,664 K/sec 11 556 596 790 cycles # 3,602 GHz 26 732 327 756 instructions # 2,31 insn per cycle 5 295 270 921 branches # 1650,397 M/sec 7 821 002 branch-misses # 0,15% of all branches 3,238224427 seconds time elapsed
Most important measurement is this line:
26 732 327 756 instructions # 2,31 insn per cycle
This says how many instructions were executed by the process. I shorten this using SI notation prefixes. 26 billions, 732 millions is shortened to 26G7.
Optimizations I've made shortened the run from 32G to 26G7, that is, made it 8.5% faster.
I've added thumbnail generator to the blog script, so pages should now load faster. This reminds me, that the blog script will need some serious refactoring.
This is the 13th and so far last episode translated to Czech language, so I'll have to read others in English, which will be extremely weird, because the terminology is quite unique.
Other than this, I've made only little progress thru Effective pycharm and Moldable tools. GEB was put on hold.
I've been reading about Guix: https://ambrevar.xyz/guix-advance/index.html
Streaming to/for the drawer
I've tried streaming for the drawer, that is to create a recording of myself programming, giving explanations of what I do, like it is popular nowadays. Except I don't have any intentions to stream it, I just saved it as a mp4 file and then hid it in my personal archive, never to be seen again.
As I mentioned in Weekly update 2019/09/08; Bugs and a lot of stress, I wanted to try this as an alternative to pair programming. I can't say whether it had any real effect on my performance yet, but at least it made me work on something for a dedicated amount of time. As the webcam was pointed on me, I was able to notice few strange things I do, especially banging too loud into the keyboard from time to time, which is really strange in retrospective.
I have really shitty webcam, that is able to stream audio. Speaking of which, audio is horrible, full of strange noises and squeaking interference picked up from some part of cabling.
I've tried to speak in Czech language, which is much easier for me, and I didn't have yet time to try it in English, which will be probably cringe worthy because of my pronunciation.
Tokamak Energy is an incredible eye bleach and restorer of the faith in humanity:
Yes, my English is probably horrible, but this kind of blog post doesn't qualify for (paid) grammar corrections yet (there is stuff with higher precedence in queue). If you want to change this, subscribe to my patreon.