A Graphviz Go by

As I wrote the other day, the Graphviz dot language for drawing graphs is pretty simple and easy to learn but if, like me, you don’t use it very often, it’s easy to forget the details. There’s an excellent manual and a man-page-like reference page but for most diagrams you only need a a few of the commands.

Justin Worthe over at Worthe It has a very nice introduction to Graphviz (actually dot) that’s worth bookmarking. Then when you want to draw a graph you can use his examples as a go by. Be sure to also take a look at the list of attributes that he links to. As Worthe’s examples show, it’s amazing how much you can do with just a few easy-to-learn commands. It’s especially useful if you write with Org mode because you can embed the dot commands in an Org source block and have the diagram automatically embedded in your document.

Posted in General | Tagged , , | Leave a comment

WeChat and Privacy

As most of you know, I’m a big fan of the “digital life.” By that I mean moving as many chores and record keeping tasks as possible into the digital realm—in particular, onto my iPhone. Thus I pay almost all bills digitally, take notes, scan and store receipts, keep copies of important documents on my phone, and generally strive towards making my iPhone the only thing I need to carry.

I haven’t quite emptied my pockets of everything but my iPhone although it’s certainly possible as WeChat users in China have shown [1, 2, 3]. As I wrote in those previous posts, though, I’m not necessarily looking for a single portal like WeChat and in particular, I have no interest in installing WeChat. This article explains why.

WeChat is manufactured by the Chinese company Tencent and has therefore long been suspected of sharing its users’ data with the Chinese government. As the article makes clear, this is indeed the case and virtually everything a user types into the app is recorded and made available to the government. This isn’t Tencent’s fault of course: they have to abide by the laws of their country just as American firms have to abide by US laws. Nonetheless, I have no interest in sharing the details of my, admittedly mundane, life with the Chinese or anyone else.

What I’m hoping for is Apple Pay or something like it to become universal so I can ditch my cash and credit cards and for more services (governmental, taxi, takeout ordering, and so on) to be available through a smart phone app. I don’t care if there are multiple apps. In fact, that’s probably preferable because it eliminates a single point of failure (or attack). As I’ve said before, I don’t think we in the West will have to wait much longer. The Chinese have already shown it can be done and Apple has shown it can be done securely and privately.

Posted in General | Tagged | Leave a comment

Zamansky 37: Treemacs

Mike Zamansky has a new video up. This time he discusses the Treemacs file browser. The idea is to recreate file browser side tab that editors like Atom popularized. You can watch the video to see its features and how it works or you can check out the project README at GitHub. One nice feature is its integration with Evil and Projectile.

Coincidentally, I read the project description just before I saw Zamansky’s video. Like him, my first thought was, “That’s nice but I probably won’t use it.” My reason for that is that it takes up valuable screen real estate but doesn’t offer me a compensating efficiency gain. I don’t use the mouse in Emacs so navigating through the menus would take longer than finding the file with my usual Avy assist. Helm or ido users would doubtless find the same.

You could argue that it helps when you’re not familiar with a directory structure but in those cases Dired offers the same functionality and gets out of the way once you’ve picked your file. Still, if you’re coming from Atom or one of the other editors offering a file browser or if just like the idea, you might want to give Treemacs a try. It’s not that I think there’s anything wrong with the package, it’s just that it doesn’t fit in with my workflow.

Zamansky’s video is just short of 10 minutes so it should be easy to fit it in. Like all of Zamansky’s videos, it’s definitely worth the time.

Posted in General | Tagged | Leave a comment

Karl Voit on the Superiority of Org Mode Markup

I’ve been following a tweet discussion between Karl Voit and several others over the relative merits of light weight markup languages. You can get a feel for the arguments by expanding the following:

Tweets are not, of course, a very good platform for making reasoned arguments about technical issues or anything else for that matter so Voit has pulled his arguments into a blog post in which he make the case that Org-Mode Is One of the Most Reasonable Markup Language to Use for Text. As I’ve said many times, I do almost all my writing these days in Org mode so I already agreed with his conclusion but Voit makes a good case for his conclusion.

He looks at several light weight markup languages such as Org mode, Markdown, AsciiDoc, Wikitext, and reStructuredText and identifies how Org is superior to them. He notes that Org is better even without Emacs because you can write it in any editor and use tools like pandoc to get it into whatever final form you need.

Of course, the right tools make all the difference and using Org markup from within Emacs is a real win. Still, even some people who prefer not to use Emacs, write Org markdown in some other editor and convert it using pandoc. Even if you don’t already agree that Org syntax is the best, be sure to read Voit’s post. He’s got some good arguments and may convince you.

Posted in General | Tagged , | 5 Comments

Burying Power Cables

After the recent visit by Irma, I idly wondered why the electric utilities don’t simply bury the power cables. After all, the cables in my development are buried so it’s certainly possible. As with most such questions, the answer is much more complicated than you might think. The power companies are, of course, familiar with the idea and even have a name for it: undergrounding. Some states do have part of their power transmission grid underground and in the US about 25% of new transmission lines are undergrounded. Some countries like the Netherlands and Germany have made significant commitments to undergrounding. It is, however, a hard problem.

Part of the problem is cost. It takes roughly one million US dollars per mile to bury the cables although population density can triple the cost. Some studies show that undergrounding would double the rate utility users pay. There’s also the problem of effectiveness. While burying the cables certainly protects them from wind and falling trees, they are more susceptible to water damage.

I didn’t know any of this until I read this excellent article in Fortune about undergrounding and why it isn’t the obvious solution that it might appear to be at first thought. Those of you living in more northern climes may think that none of this concerns you but it does of course. Instead of hurricanes, you have to worry about ice and snow bringing down the lines and, of course, you occasionally get strong winds too.

None of this has anything to do with software or Emacs or any of the other things we usually discuss at Irreal but it is an engineering problem and does illustrate the tradeoffs involved in solving that problem. The article is definitely worth a read.

Posted in General | Tagged | Leave a comment

Org Entities

Today I saw this tweet about Org entities:

I didn’t realize how much I needed org-entities-help. It’s pretty easy to enter many of the common Unicode characters into an Org buffer but I usually didn’t know or had forgotten their names. With org-entities-help you get a nice (Org) buffer with the entity, its Org code, its \(\LaTeX\) code, and its HTML code.

I’ve been maintaining bookmarks to Xah Lee’s HTML/XML Entity List and a \(\LaTeX\) cheat sheet for the last two encodings but didn’t have a handy reference for the Org codes. Now I have all three in a single handy listing that I can bring up at will. If you do a lot of writing in Org mode you really should check it out.

Posted in General | Tagged , | 5 Comments

The New Luddites Strike Again

What do you get when you mate an Apple hater with a luddite? This.

If you’re one of those people who yearns for earlier, simpler times when there were no cell phones, feel free to throw yours away. Feel free to drop off the grid. Feel free to move to a cabin in the woods. But in the name of all that’s holy, please leave the rest of us alone. Stop being that guy in a tunic carrying a sign that says, “R E P E N T” and accosting hapless strangers with your message of doom.

Most of us actually like our smart phones and the digital life they enable. What we don’t like is being associated with Ted Kaczynski. And what do you want to bet that Chapman is one of those annoying people who is always speaking loudly on his cell phone in public places?

I’m sure Chapman is a decent enough guy but he really should stop writing profoundly silly articles like this one.

UPDATE [2017-09-20 Wed 19:29]: should → should stop.

Posted in General | Tagged | 3 Comments

Graphviz and Org Mode

Over at The Joy of Programming there’s a nice introductory post on using Graphviz’s dot command to draw graphs and how you can make the process almost interactive by calling dot from within an Org source block. The dot command language is pretty straightforward, at least for relatively simple graphs, so it’s easy to learn.

I almost always use dot when I want to draw a graph. There’s an excellent manual that shows how to make arbitrarily complex graphs. Page through the manual to get an idea of what you can do. If you don’t use dot very often you may forget the details. For simple graphs there are tools that make the process easier. One example is Org Mind Map that I wrote about the other day. It draws the graph from the structure of an Org tree. That may seem limiting but as the examples show, you can make reasonably complicated graphs with it.

Posted in General | Tagged , | 1 Comment

Orgmode 9.1.1

Bastien sends word that there’s a new version of Org out:

If, like me, you’re OCD about keeping up to date with Org, it’s already in Melpa. I’m not sure about Melpa-stable.

Posted in General | Tagged , | Leave a comment

Emacs Rocks! #16

After 3 years, Magnar Sveen has smiled upon us with a new episode of Emacs Rocks! For newcomers, Emacs Rocks! episodes are short videos of 2 or 3 minutes that explore some aspect of working with Emacs. If you haven’t already, be sure to spend some time watching them all. There’s a lot to learn.

The newest episode is about Dired. First Sveen shows how to make Dired show less information. This can be handy when you’re working with limited screen space and want to fit everything necessary into the Dired window. Sveen uses the dired-details package for this but you can get almost the same thing by toggling between short and long listings with (.

Next Sveen demonstrates how to easily copy files between directories by setting dired-dwim-target to t and opening another Dired for the target directory in another window. That’s very nice and it reminded me about using o to open a directory in another window.

Finally, Sveen demonstrates what is surely one of the nicest features of Dired: the ability to make the Dired buffer writable. Once made writable, you can make changes to the file names and/or attributes and those changes are reflected in file system when the buffer is saved. I use this all the time and it makes dealing with file changes so easy it would be reason enough by itself to use Dired.

This episode is only 1 minute 35 seconds long so there is no reason not to watch it now. Just follow the link.

Posted in General | Tagged | 1 Comment