# Clearing tabs: npx, Mermaid, diagrams, hugo and fountain pens

- Link: https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/
- Published: 2021-05-15T11:17:06-07:00
- Author: rich

I’m having real trouble “clearing my tabs.” I have this rule that every time I learn
something new, I leave it open as a tab on my Mac, phone or iPad. I’m probably right
now at over 100 unposted items, so it is pretty out of control. I think I’m changing
my strategy to just trying to clear all the tabs on a single device once a week.

So in reverse tab order, here are the many things that I see this week that are 
living on my main Mac:

 1.  [Npm install -g vs npx](https://www.freecodecamp.org/news/npm-vs-npx-whats-the-difference/).
     I’ve been perennially confused by which command to use, but the simple idea is
     that if you are going to reuse the utility, then you need to do a npm install -
     g which means install for all users. If it is just for your local development 
     project, then you can do `npm install` without the g. So, what’s the point of 
     npx it stands for npm execute, and what it means is that if you just need it occasionally,
     it will go out to the Internet download the module, and execute it but it won’t
     leave anything permanent. Most of the time I use npm install -g in a script to
     have it around.
 2.  [Mermaid as a better description language](https://mermaid-js.github.io/mermaid/#/flowchart).
     The DOT language that graphviz uses is pretty clunky, but Mermaid is a much simple
     language and more expressive, you can make flowcharts, you can add font-awesome
     icons and the syntax is very Markdown like.
 3.  [Using Mermaid in Jupyter](https://mermaid-js.github.io/mermaid/#/Tutorials?id=python-integration-with-mermaid-js).
     What is super cool is that you can use Mermaid in Jupyter pretty easily, the trick
     is that there is a free Mermaid rendering service, you feed it a base64 encoded
     text document and it produces an image, this is way nicer than using Python Graphviz,
     you literally feed it a text string and get back an image. Really cool.
 4.  [Diagramming beyond Graphviz Dot and Draw.io with diagrams](https://github.com/seflless/diagrams#flowchart).
     Thanks to a wowchemy, I learned about Mermaid. I had previously been using Graphviz
     and the Python support to do charting for things like patents, but it felt so 
     1980s particularly with the need to use raw HTML tables to make complex objects.
     Fortunately, there are quite a few tools I’ve found. For instance, diagrams is
     a command-line tool that ingests a zillion formats (include dot) and produces 
     an image. The basic idea is that you run diagram watch in the background and any
     time you create a file of whatever type, it will produce the SVG or JPG automatically.
     This is not particularly graphical but is really nice if you are doing large-scale
     document production and want to use to do “diagram as code” or better yet “diagram
     as description” easily. Turns out that there are lots of formats other than Mermaids
     like for instance Sequence Diagrams that are used for user interactions, so Diagrams
     can consume them all.
 5.  [Mermaid diagrams in GitHub through mermaid marked code block](https://github.com/Redisrupt/mermaid-diagrams)
     s. OK, this is a bit of a niche use case, but if you want a [nice diagram in your GitHub repo](https://chrome.google.com/webstore/detail/github-%20-mermaid/goiiopgdnkogdbjmncgedmgpoajilohe),
     there is no way to get it. Git flavored Markdown (GfM) does not support graphing
     languages like Mermaid, but you can sort of getting there if all your users use
     Google Chrome, Firefox, or Opera and are willing to load a browser add-in. That
     sounds like a small universe, but there it is, this browser extension turns code
     blocks that have a mermaid type into flow charts.
 6.  [From vim preview markdown](https://nickjanetakis.com/blog/writing-and-previewing-markdown-in-real-time-with-vim-8).
     OK, so this led me down the rathole of how you can look at Markdown visually from
     inside Vim. Mermaid has a plug-in that claims to do this, but it doesn’t work.
     I found that markdown-preview is really powerful. First I found vim-markdown-preview
     which supports basic markdown, but [markdown-preview](https://github.com/iamcco/markdown-preview.nvim)
     handles Ktext, Planuml, Mermaid, and dot even, so it is really nice. So with Ctrl-
     S you can run a preview window and Ctrl-P toggle preview on and off. It even handles
     table of contents by detecting `[[toc]]` and it detected looking for a `uml` code
     block and it handle math using the Katex syntax which looks like $\sqrt{3x-1}$
     so between dollar signs and finds mermaid code blocks too and js-sequence-diagrams
     by look for sequence-diagram code blocks and flowchart format by looking for flowchart
     blocks and finally good old dot with dot code blocks. It works well for editing,
     but for users, you still need a way to show these blocks properly which is where
     tools like diagram come in handy.
 7.  [Wowchemy](https://wowchemy.com) [Hugo](https://wowchemy.com/docs/getting-started/install/).
     Wow the miracles of wandering around, needed to get a site going for Grace and
     I’ve been using Themefisher Hugo fonts which is a bit of pain with documentation
     and other issues, but looking at the Academia theme (super powerful), there is
     both a Themefisher port and then Wowchemy (looks like a great one-man band) port.
     That one is fantastic as he actually supports widgets. The document is a little
     confusing as are all Hugo themes right now but the basic idea is that you have
     a series of widgets that you can turn on and off, [each page on your site lives in a directory](https://wowchemy.com/docs/content/landing-pages/)./
     content/name-of-your-page-dir so for instance, the home page is in ./content/home
     and then you get a [series of widgets](https://wowchemy.com/docs/getting-started/page-builder/)
     that are separate markdown files in that directory. And it even bundles the [Netlify CMS](https://wowchemy.com/docs/getting-started/cms/)
     in it (which is a pain to work mainly because Netlify Identity doesn’t work, you
     need to toggle it on and off). You can turn anything on by adding active=true 
     in the yaml files so it is a nice way to turn things on and off. Finally, you 
     can add new pages (which they call a landing page) just by editing ./config/_default/
     menu.yaml which is really pretty simple. You can even make a [slide deck online](https://wowchemy.com/docs/content/slides/).
 8.  [Great fountain pens and fixing the TWBSI 530](https://www.twsbi.com). I have 
     a fountain pen and have been doing more writing and finally got it going. This
     is a $50 pen and I got it years ago, but never really figured out how to make 
     it work. The confusing part is how to load the ink, I couldn’t figure out the 
     graphics on the one-page sheet, but you basically dip the nib into the ink and
     then turn the back of the thing. Of course, I took the whole thing apart, and 
     then it wouldn’t go back together so it leaks. Philip at TWBSI is so amazing, 
     I send an email and then literally one minute he is later and tells me I have 
     probably cracked something in the assembly, one $4 PayPal later and the replacement
     part is on the way. Wow, that is soooo great! I had first gotten it because of
     great reviews (which they still have with the current Diamond 580, I have the 
     530). The thing by the way writes superbly. I have the fine nib and once the leak
     is fixed, it is going to be my daily driver. As a technical aside, this doesn’t
     have an ink cartridge, so you need ink to go with it, I got a fancy Japanese ink
     and it really easy, just stick the nib in and turn the back. These things are 
     called demonstration pens because you can see the ink inside which is pretty cool.
 9.  [Buyers guide to fountain pens](https://www.jetpens.com/blog/the-best-fountain-pens-for-every-budget/pt/368).
     So now of course I want to get a really nice fountain pen for less than $100, 
     there are quite a few review sites, but it is hard to know what a good one is 
     as the prices literally range from $15 to $1,000. I have previously used [Jetpens.com](https://www.jetpens.com)
     or [Pen Chalet](https://www.penchalet.com) when I was really into this and got
     some great ones, but it is literally raining pens. The [Lamy Studio](https://www.jetpens.com/Lamy-Studio-Fountain-Pens/ct/1308)
     is a good example of a super sleek modern pen and the [Diplomat Optimist](https://www.jetpens.com/Diplomat-Optimist-Fountain-Pens/ct/5672)
     is a so-called professional pen that is simple with etched lines and it is cartridge
     base so easier to fill. And for $40, you can get a pen made by Sailor in Kobe 
     Japan, the [Nagasawa Original Profit Jr. Skeleton](https://www.jetpens.com/Nagasawa-Original-Profit-Jr.-Skeleton-Fountain-Pens/ct/5895)
     which uses Sailor ink cartridges, or if you want an American-made one, you can
     get the [Karas Kustoms](https://www.jetpens.com/Karas-Kustoms-Fountain-K-Fountain-Pen-Aluminum-Red-Body-Fine-Nib/pd/15608)
     which makes conventional pens, and the Fountain pen version for $70.
 10. [The high-end pen market](https://www.jetpens.com/blog/the-best-fountain-pens-for-every-budget/pt/368#premium)(
     [under $200](https://www.jetpens.com/blog/the-best-fountain-pens-for-every-budget/pt/368#premium)).
     The [LAMY 2000](https://www.jetpens.com/LAMY-2000-Fountain-Pens/ct/1542?&f=3e29cb29569d6320)
     is one of the [most iconic pens](https://www.jetpens.com/blog/the-lamy-2000/pt/349)
     of all time from Bauhaus, Germany (just go one size smaller on the nib as it is
     very wet and broad). AND of course from Japan, there is the [Sailor Pro Gear Slim with 14K nibs](https://www.jetpens.com/Sailor-Pro-Gear-Slim-Fountain-Pens/ct/4019)(
     and if you morecolors, they make the Nagasawa stationary brand like the [Nagasawa Original Pron Gear Slim](https://www.jetpens.com/Nagasawa-Original-Pro-Gear-Slim-Fountain-Pens/ct/5535)
     as well (like the [Nagasawa Original Profit Skeleton](https://www.jetpens.com/search?q=Nagasawa+Original+Profit+Skeleton+Proske+Fountain+Pen+-+Antique+Gold+Trim+-+14k+Broad+Nib&v=2)
     which is a demonstrator/clear pen). More expensive is the [Pilot Custom 823](https://www.jetpens.com/Pilot-Custom-823-Fountain-Pens/ct/3728)
     has been called the ultimate writes pen and a great graduation gift too which 
     is the [classic Japanese pen](https://www.nibs.com/content/japanese-fountain-pens)
     with gold nib literally. Or you can get an Italian pen that is displayed at the
     MoMA as well called the [Aurora Hastil](https://www.moma.org/collection/works/1919)(
     note the LAMY 2000 ad copy says it is also there, but [no one can find it](https://www.fountainpennetwork.com/forum/topic/265091-is-the-lamy-2000-really-on-permanent-display-in-momo/)),
     although there is the [Platinum Pen Mechanical Pencil and Ball Point Pen](https://www.moma.org/collection/works/2876?classifications=any&date_begin=Pre-1850&date_end=2021&q=pen&utf8=✓&with_images=1)
 11. [Picking the right nib](https://www.jetpens.com/blog/guide-to-fountain-pen-nibs-choosing-a-fountain-pen-nib/pt/760).
     Most nibs are rounded, but you can also get a calligraphy or stub nib which gives
     those cool wide vertical strokes and narrow horizontal ones. The common nib is
     1.1mm or Medium but Japanese nibs tend to be smaller since their characters are
     finer. Technically speaker a medium nib will give you 0.75mm for medium Western
     or 0.5mm for Japanese (so a Japanese medium is a Western fine). The basic pro 
     of a broader nib is that the ink looks better but you have to use high-quality
     paper (why use a fancy pen on crappy paper I guess would be the main point). Finally
     nibs can be very firm (like the Lamy steel nibs) so they don’t have variations,
     but gold nibs tend to have some line variation which is pretty. As a final point,
     the nib sizing is based on where the nibs are sources, so the Lamy 2000 as an 
     example is a Western size with firm flexibility which is good to know.
 12. [Pen convertor which means that you can use it a bottle as well](https://www.jetpens.com/blog/how-to-use-a-fountain-pen-converter-2/pt/479).
     The cartridge is the easiest to carry and not messy, but if you want just about
     any ink, then you do not get all the zillions of bottles so you have a converter
     which you plugin where the cartridge goes, and then with a piston converter, you
     stick the nib into the ink then either rotate or if it is a squeeze one, then 
     fill it. And of course, some pens are just designed to use ink with a builtin 
     piston or vacuum mechanism

### Share this:

 * [  Mastodon ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=mastodon)
 * [  LinkedIn ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=linkedin)
 * [  Facebook ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=facebook)
 * [  WhatsApp ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=jetpack-whatsapp)
 * [  Email ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?subject=%5BShared%20Post%5D%20Clearing%20tabs%3A%20npx%2C%20Mermaid%2C%20diagrams%2C%20hugo%20and%20fountain%20pens&body=https%3A%2F%2Ftongfamily.com%2F2021%2F05%2F15%2Freal-trouble-clearing-my-tabs%2F&share=email)
 * [More](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/#)

 * [  Telegram ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=telegram)
 * [  Print ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/#print?share=print)
 * [  Pinterest ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=pinterest)
 * [  Tumblr ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=tumblr)
 * [  X ](https://tongfamily.com/2021/05/15/real-trouble-clearing-my-tabs/?share=twitter)

### Like this:

Like Loading…
