Peter's Blog
https://peterloleungyau.github.io/
Recent content on Peter's BlogHugo -- gohugo.ioenThu, 15 Jul 2021 00:00:00 +0800More Guix: Private Channel and Internal Package
https://peterloleungyau.github.io/post/more_guix_private_channel/
Thu, 15 Jul 2021 00:00:00 +0800https://peterloleungyau.github.io/post/more_guix_private_channel/Having introduced the basic ideas of Guix in previous posts, this time we explore setting up a private Guix channel. Guix package definitions are managed with git repositories called channels. There is an official channel at https://git.sjtu.edu.cn/sjtug/guix.git, there are also third party channels such as https://gitlab.com/nonguix/nonguix (for some software which cannot be included in the official distribution for ethical or policy-related reasons) and https://github.com/guix-science/guix-science.git (for scientific software, which cannot be included upstream).Guix Introduction Part 6: R Development with Guix
https://peterloleungyau.github.io/post/guix_intro_6_dev/
Sun, 27 Jun 2021 00:00:00 +0800https://peterloleungyau.github.io/post/guix_intro_6_dev/This is the sixth part of a brief introduction to the Guix functional package manager, and how it could be used to manage dependencies of projects, much like virtual environments for Python, but with much larger scope.
This time we explore some ways to use Guix for per-project dependency management, for R development using Emacs, Jupyter lab, VSCode, and Sublime Text 3. Here we demonstrate with Guix running inside qemu VM in MacOS.Guix Introduction Part 5: Per-Project Depedency Management
https://peterloleungyau.github.io/post/guix_intro_5_per_proj_dep/
Thu, 13 May 2021 00:00:00 +0800https://peterloleungyau.github.io/post/guix_intro_5_per_proj_dep/This is the fifth part of a brief introduction to the Guix functional package manager, and how it could be used to manage dependencies of projects, much like virtual environments for Python, but with much larger scope.
This time we show a little demo of managing per-project dependencies with Guix, through the guix time-machine and guix environment commands.
Demo settings Suppose we have two projects ~/guix_demo/proj1 and ~/guix_demo/proj2, each with different channel file channels.Guix Introduction Part 4: Try Guix
https://peterloleungyau.github.io/post/guix_intro_4_try/
Wed, 12 May 2021 00:00:00 +0800https://peterloleungyau.github.io/post/guix_intro_4_try/This is the fourth part of a brief introduction to the Guix functional package manager, and how it could be used to manage dependencies of projects, much like virtual environments for Python, but with much larger scope.
This time we look at how to install Guix, either in a physical or virtual machine, either as a complete GNU/Linux distribution, or just as a package manager on top of another Linux distribution.Guix Introduction Part 3: Why Guix?
https://peterloleungyau.github.io/post/guix_intro_3_why/
Tue, 11 May 2021 00:00:00 +0800https://peterloleungyau.github.io/post/guix_intro_3_why/This is the third part of a brief introduction to the Guix functional package manager, and how it could be used to manage dependencies of projects, much like virtual environments for Python, but with much larger scope.
This time we look at why bother with Guix and how it compares with some other dependency management alternatives such as: system and language package managers; including all dependencies as in docker; another functional package manager Nix.Guix Introduction Part 2: What is Guix? A closer look
https://peterloleungyau.github.io/post/guix_intro_2_what/
Mon, 10 May 2021 00:00:00 +0800https://peterloleungyau.github.io/post/guix_intro_2_what/This is the second part of a brief introduction to the Guix functional package manager, and how it could be used to manage dependencies of projects, much like virtual environments for Python, but with much larger scope.
This is written in a way that I wish Guix was introduced to me back when I first learned it. This time we take a closer look at Guix, and briefly introduce the various main components of Guix.Guix Introduction Part 1: Motivation and What Guix Promises
https://peterloleungyau.github.io/post/guix_intro_1_motivation/
Sat, 01 May 2021 00:00:00 +0800https://peterloleungyau.github.io/post/guix_intro_1_motivation/This is the first part of a brief introduction to the Guix functional package manager, and how it could be used to manage dependencies of projects, much like virtual environments for Python, but with much larger scope.
This is written in a way that I wish Guix was introduced to me back when I first learned it. We first look at the basic concepts related to dependencies, then the motivation of better dependency management, namely the dependency hell, and the desire for reproducible builds.Discrete Distributions - Part 2
https://peterloleungyau.github.io/post/discrete-distributions2/
Sun, 16 Jun 2019 00:00:00 +0800https://peterloleungyau.github.io/post/discrete-distributions2/In the previous post, we have looked at some basic concepts of distributions of discrete random variable. In this post we look at some examples of common discrete random variables, including discrete uniform distribution, Bernoulli distribution, Binomial distribution, Geometric distribution, Negative binomial distribution and Poisson distribution.
Common Discrete Distributions Discrete Uniform Distribution When a discrete random variable has \(k\) different possible values, and we think that the different possibilities are equally likely, what should the distribution be?Discrete Distributions - Part 1
https://peterloleungyau.github.io/post/discrete-distributions1/
Mon, 27 May 2019 00:00:00 +0800https://peterloleungyau.github.io/post/discrete-distributions1/A probability distribution of a random variable refers to the probabilities that the random variable takes various values. In the case that the random variable can take only countably many different values, it is called a discrete random variable. In this case, we can summarize the distribution by simply specifying the probabilities of the different values. In this post, we first look at a simple example to get an intuitive idea of distribution of discrete random variable, then talk about some related concepts such as conditional probability, independence of events and random variables, expected value and variance.Basics of Probability and Random Variable
https://peterloleungyau.github.io/post/probability-distribution/
Mon, 13 May 2019 00:00:00 +0800https://peterloleungyau.github.io/post/probability-distribution/Roughly speaking, probability describes how likely a certain event takes place, and probability distribution refers to how likely a random variable takes different values. In this post, we look at some examples to get an intuitive idea of probability, sample space, events, random variable and probability space.
Probability Probability is used to quantitatively describe how likely an event would occur. A probability is a number between (inclusive) 0 and 1, where a larger value means the event is more likely.First Post
https://peterloleungyau.github.io/post/first-post/
Mon, 29 Apr 2019 00:00:00 +0800https://peterloleungyau.github.io/post/first-post/Hello, this is a first post for testing the various parts of this blog.