vendredi 7 mars 2014

taking notes aka compiler targetting your brain ISA

learning better by correlating one domain to another. idea into graphemes. idea into actions, into spoken words, shapes.

remember taking notes in high school. The more I paid attention to formatting the better I learned. First I pruned the content. Similar to the original meaning of lecture, I sorted and picked words differently. IIRC it was mostly based about the "newness" of a subpart of the concept discussed. The less I understand it, the more carefull I'll be when writing it down, the more space I'll allocate to this part. It's a differential overlay of my brain. The format was important too, even though I despise the term format for it's superficial conotation, it is a reflection of relationships between ideas. Most of the time it's nested (up down dimension). But there's also aside dimensions which made me use colors to denote comments or any kind of lateral relationship. In the end it looked like the handwritten projection of a DAG into a yaml/xml structure. Maybe the term ontology would fit.

dimanche 2 mars 2014

xargs, map and gnu parallel -- async

Fed up with `xargs` syntax, I googled for rants about it being a poor `map` function, and found ... `map`: gitolite.com/map/map.html. Someone wrote a lighter non parallel `gnu parallel` and called it map.

Redditors didn't think it was important and mentioned gnu parallel being better so I reinstalled it. My first attempt a few years ago didn't go very well. Since I gained the ability to RTFM. So I can do some basic stuff. And I also read some blog article ... Weak me.

Here's a small test reminding me of talks about golang, async, concurrency etc :

$ time parallel -j12 ping -c1 ::: DOMAINS &> par

real    0m11.023s
user    0m0.563s
sys     0m0.110s

$ time for dom in DOMAINS; do ping -c1 "${dom}" ; done &> seq

real    1m1.509s
user    0m0.013s
sys     0m0.027s

DOMAINS is {google,amazon,microsoft,yahoo,bing}.{com,fr,co.uk}

QED

ps: someone suggested me these too
  - parallel tutorial
  - parallel man #example(s)