Saturday, December 02, 2023

Zoxide

 Zoxide is such a small, nice command line utility that significantly reduce the amount of typing. It works with the Nushell nicely. 

Tuesday, November 28, 2023

Rust, Helix, and Zellij

I know about Rust programming language for many years but did not think it will be a major player in the open source software world simply because there have been so many good programming languages and development tools. I recently stumbled into a couple of really good open source software, including the Helix file editor and the Zellij terminal multiplexer, both were developed using Rust. Also, there are at least two R packages, rextendr and cargo, that facilitate the calling of Rust function from within R. Maybe it is time to pay more attention to Rust. 

The Nushell is another essential component of this Rust-centric free software ecosystem. 

Tuesday, August 01, 2023

Cold War II: Niall Ferguson on The Emerging Conflict With China | Uncommon Knowledge

In this interview, Ferguson basically argued that the US needs a credible threat to pull its people together and China fits the bill ... so there will be a second Cold War and possibly a hot war. Wow ...

Saturday, July 08, 2023

8 ChatGPT tools for R programming

This post is very informative and helpful.

Sunday, June 25, 2023

Smart Connections

 Smart Connections is the best combination of Obsidian and ChatGPT so far. 

Monday, January 09, 2023

Integrating Obsidian and Rstudio workflow

This little Obsidian plugin called qmd as md Obsidian plugin. It enables Obsidian to recognize Quarto Markdown source file, which is the new generation of the widely used R Markdown format. As a result, now it is possible to index all the intermediate project source file and visualize their relationship. 

This can fundamentally change my research life. 

Sunday, August 07, 2022

Marginalia

 Very nice and comprehensive post on marginal effects. 

Wednesday, April 27, 2022

Processing the sugar map

 Different implementations of the Sugarscpe agent-based model have different ways to get up the sugar map. SugarscapeCW used a built-in matrix (no space between each number) whereas the NetLogo model library uses an external text file with a blank space between each number. 

The easy way to translate between these two different format is to use the readr R package, something like this:

library(readr)

sugar_map1 <- read_fwf("~/tmp/sugar-map1.txt", fwf_widths(c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1), col_names = NULL))

write_delim(sugar_map1, "~/tmp/sugar-map-out.txt", delim = " ", col_names = FALSE)

Wednesday, December 29, 2021

Using Obsidian as a Markdown editor

 I have been using the open source Typora editor for light editing. It appears to become commercial recently. I was about to purchase a licence when I realized that the recent upgrade of Obsidian (v. 0.13.14) has provided very nice Markdown editor feature and can complete replace a dedicated editor such as Typora. 

I really like Obsidian!

Counter