====================
== William's site ==
====================

What is folding expression?

I have got a very brief idea about what a fold expression is. Basically from this video and cpp referecences.

I have not completely understand it. All I know so far is:

  • it is related to templates
  • it is deal with a list of parameters

I will go back to here and update a bit more later, just like a JRPG.

One More Thing

I have been bitching about hugo and antora in my last post. Actually there is one more thing.

mdbook.

It is not as powerful as hugo. It cannot even be considered as a full fledged package. It is just a wrapper around the mdbook crate. The biggest pro is tight integration with Rust. All documentation including about Rust, for example, the book, is generated by mdbook. Another good example is neovide website.

neovide (github) is an interesting project that enlightens me in may ways.

Read more...

So Far So Good

In the last a couple of days, I have been researching about writing in markdown and asciidoc. The general approach is to get the respective toolchain working, then find a hosting site.

My ultimate goal is to have a blog that supports

  • markdown
  • asciidoc
  • mermaid
  • hosting in, say, netlify, github pages, gitlab pages, with automated CI/CD
  • resize the image properly

Hugo does have asciidoc support but why another blog?Under the hood, hugo uses asciidoctor as and extension or add-on functionalities to render the asciidoc. That is to say, it does not support asciidoc natively, viz., the functionality is not built-in has part of the single hugo binary.

Read more...

Mermaid at Last

At last I have got mermaid working! The bad news is that the the official guide doesn’t work. I am following the recipe from this post. It is not that difficult, but it needs to be set up each and everytime. May be I can custom a theme myself. This is the mermaid flowchart documentation.

Graph
graph TD; A-->B; A-->C; B-->D; C-->D;
Sequence Diagram
sequenceDiagram participant Alice participant Bob Alice->>John: Hello John, how are you? loop Healthcheck John->>John: Fight against hypochondria end Note right of John: Rational thoughts
prevail! John-->>Alice: Great! John->>Bob: How about you? Bob-->>John: Jolly good!
E-R Diagram
erDiagram CUSTOMER ||--o{ ORDER : places ORDER ||--|{ LINE-ITEM : contains CUSTOMER }|..|{ DELIVERY-ADDRESS : uses
Class Diagram
classDiagram Class01 <|-- AveryLongClass : Cool Class03 *-- Class04 Class05 o-- Class06 Class07 .. Class08 Class09 --> C2 : Where am i? Class09 --* C3 Class09 --|> Class07 Class07 : equals() Class07 : Object[] elementData Class01 : size() Class01 : int chimp Class01 : int gorilla Class08 <--> C2: Cool label

Why I Use Hugo

This blog is generated by Hugo hosted in github as a github page. This post answers the questions:

  • why i do it this way?
  • how?

I have been blogging since 2000’s. My primary platform was google’s blogger. It was a good platform. Yet it is geared towards blogging with a desktop computer. the 2000’s saw the rise of smart phones or iPhones. I am an iPhone user since 3GS. I did have a period of time that carrying two smart phones with me. One iOS and one Android most of the time.

Read more...

My Gears

These are my gears.

0v2iBhk

On the top is my M2 Macbook Air with which I am writing this blog. Below it is my M1 14-inch macbook Pro.

餃子 - the M2 Macbook - is my personal laptop. My previous Macbook Air was a Core2Duo 2010 model. It was still in good shape, solid build, the keyboard, screen display and wifi are all working good in excellent condition. The overall performance is the only reason to retire it.

Read more...

Linux Virtualization

Containers

The switchdev driver model

Ethernet chips

A summary of High Speed Ethernet ASICS

Some routing links

Getting Started with BIRD Routing Software
Modular, Pure Layer 3 Network for Kubernetes: The Implementation
BIRD
Intro to BGP with BIRD
cilium - Using BIRD to run BGP
FRRouting, OpenBSDd and BIRD
BGP Open Source Tools
Comparing Open Source BGP Stacks
Followup Measuring BGP Stacks Performance
Oreilly BGP in the Data Centre

Its an Internet World

I am using Byword to write this post now. I create the post with hugo new <post_name>.md then edit it with Byword.

I am fond of markdown and static site generator such as hugo. I have been resarching my workflow in the last couple of days and my goal is:

  • share picture from my iphone
  • jot down the points in the draft in my iphone
  • sync the draft and continue working on the post

I have tried quite a few solutions and the bottleneck is at sharing the pictures. Most of the workflows are dealing with the path names of the picture in the local store. Once I decided to upload the picture to my imgur account and embed the generated links in my post, all problems suddenly goes away.

Read more...

With Typora

This is my first hugo post written with Typoa. My environment is setup up according to this post.

The layouts/_default/_markup/render-image.html mentioned in the post is like below:

{{ if in .Destination "/static/" }}
<!-- 12 is count of ../../static carachers -->
{{ $new_file_path := substr .Destination 12 }}
<!-- just for testing, you can delete this pre tag -->
<pre>{{ $new_file_path }}</pre>
<!-- render the image with new path -->
<img class="img-fluid" src="{{ $new_file_path }}" alt='{{ .Text }}' />
{{ else }}
<img class="img-fluid" src="{{ .Destination }}" alt='{{ .Text }}' />
{{ end }}
Previous Page 3 of 5 Next Page