Emacs Lisp programmers must know about pcase

Pattern matching is available in a bunch of programming languages. For some reason, I never thought to look for a library in Emacs Lisp for it, and it is here in pcase.
There is this weird thing that happens when you start using Emacs Lisp. Unlike other languages where you start learning it for “its great features”, most of us only learned it to configure Emacs. Because of this, our brains kind of turn off when it comes to using the language. Or perhaps instead, our expectations change. They are just, lower, and it makes our minds slower. That is why you see so many posts like “if you are programming Emacs Lisp then you must…”.

A faster rsync for Vagrant

[vagrant-gatling-rsync is ] an rsync watcher for Vagrant 1.5.1+ that uses fewer host resources.

How it works:

The built-in rsync-auto plugin sometimes uses a lot of CPU and disk I/O when it starts up on very large rsynced directories. This plugin is designed to work well with such large rsynced folders.
The rsync-auto command that ships with Vagrant 1.5 uses the listen gem. The Listen gem is quite thorough – it uses Celluloid to spin up an actor system and it checks file contents on OS X to ensure that running “touch” on a file (to do a write but not update its content) will not fire the rsync command.
The downside of using Listen is that it takes a large amount of host resources to monitor large directory structures. This gem works well with to monitor directories hierarchies with 10,000-100,000 files.
This gem’s implementation is much closer to the underlying fsevent or inotify APIs, which allows for higher performance.

Drop of water

A drop of water struggles so hard to return to the ocean. The ocean welcomes it
back with open arms. That is not the time for the ocean, with all of its magnitude
and unlimited beauty and kindness, to remind the drop that it came from the ocean,
left up into the atmosphere, and to came the Earth to serve it, and it is natural for it to
eventually come home, and that the ocean was waiting the whole time.

The story

The creativity that you apply and capture to assemble your system… this is where
all of the fun stuff is. Let me elaborate, everything in your artifacts are
valuable because they tell the story. Actually, they tell the story about a
story, a story that has yet to occur and also a story that has previously
occurred. It is here, where the actions lives, that all of those things are
learned, practiced, suffered accordingly from, and reveled in! In other words,
it is yet another story, a fun one.

If you haven’t noticed by now, either by hearing rumors, reading accounts, or
learning of it yourself: human beings are story-oriented. Your ability to
successfully function in and contribute to society will be directly proportional
to your ability to listen to stories, tell others’ stories, live your life such
that you have new stories to tell, and capture them in some form of persistent
storage. Stories grant us the power to learn from others wisdom that was
painfully acquired thousands of years ago, and it gives you a chance to
contribute the results of your hard work, for the future of humanity, too. A
belief system about the value of story-telling is essential, critical, and
mandatory to successfully achieve your goals with literate programming.

As I change, the story will change, and the action will change. The cycle will
never end.

Nevertheless, I will attempt to do my best here with the good part of me being
a flawless, rational, and logical human being to:

  • Deliver a supportable system
  • Deliver an adaptable system
  • Deliver an expandable system

The perennial fear revealed by a rules engine

When seeking to attain mastery of rules engines (RE), you will experience an odd phenomenon. Others, upon hearing some details of your course of study, will react in a what initially appears to be a manner angrily dismissive of the topic itself. This is strange given the fundamental role that computation plays in literally everything we do, from a manifest perspective, with hardware computers, organic computers, and other.
Upon further interaction, and reflection, it quickly becomes apparent what motivates this reaction is fundamentally, the re-experience of a long inaccessible, perennial fear.
Continue reading “The perennial fear revealed by a rules engine”