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)

lundi 17 février 2014

Using pyvenv and pip under python 3.3 -- article list

Just a quick gathering

- http://homework.nwsnet.de/releases/8aff/
- http://www.gossamer-threads.com/lists/python/python/1038291
- http://robinwinslow.co.uk/2013/12/26/python-3-4-virtual-environment/

dimanche 8 décembre 2013

org-mode - markdown backend -- Emacs 24.3.1

A little reminder of something I failed to do before. Org-mode has optional export backends, some are loaded by default:

(message "%S" org-export-backends)
;; "(ascii html icalendar latex)"

(add-to-list 'org-export-backends 'md)

(message "%S" org-export-backends)
;; "(md ascii html icalendar latex)"

Now in an org-mode buffer, `C-c C-e` (org-export-dispatch) will have a markdown entry accessible through `m`.

ps: done on GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 3.8.2) of 2013-08-07 on -mnt-storage-buildroots-staging-i686-eric; archlinux

mercredi 9 octobre 2013

lambda linguistic and logical interface

For a long time I've been amazed how much the `lambda` expression construct gives you. The introduction of name into expressions is seen through `let` which is syntactic sugar for lambda underneath. I believe Scala `for` nested iterations are also syntactic sugar toward flatmap + lambda. It's also a clean expression of data dependency. The sub-expression has meaning only if the lambda abstraction can be reduced by application to values. Otherwise well it's another smaller lambda expression. Wonderful.

reified side effects

Just wondering if there was some research into reifying the effected external entities back into the 'denotation'.

Instead of

f :: a -> b -> IO ()

you'd get

f :: e -> a -> b -> e

now that e is inside our algebra, maybe we can see programs as pairs (local,global)
bound by a protocol, or a fixed model of state transitions.

that's all.

jeudi 3 octobre 2013

Form vs editable trees (DOM). Shifting toward simplification.

html has this split between content (p,li,..) and communication (form,input) that will seems less and less justified. With html5 you can modify any node. Then transposed as json which can be sent to another peer as a structured message. The old way is a nice in-standard microDSL implemented by the browser, which guarantees freedom from javascript. This would be a large move off the 'web' as it's perceived but ...

Pedestal.io is already far away from the current paradigm, I believe they do send subtrees diffs between clients and servers. This is fascinating, clojure guys are jumping boldly on the fringe (edn, datalog, datomic, pedestal).

ps: to be edited.