Type_Level Programming in Scala

最近在研究的Shapeless框架,需要我们从新认识Scala的类型系统编程,另外Scala的宏编译也是我们需要关注的部分。

动机,混合集合类型(Heterogeneous collection types, HList, Harray)。

1
2
3
val l1 = 42 :: "foo" :: Some(1.0) :: "bar" :: HNil
val i: Int = l1.head
val s: String = l1.tail.head
Read more

Gentoo+Gnome+Systemd 安装记录

Gentoo Linux(发音为/ˈdʒɛntuː/)是一种Linux操作系统,基于Portage包管理系统,而拥有几乎无限制的适应性特性,被官方称作元发行版(meta-distribution)[2],支持多达10种以上的计算机系统结构平台。此项目和它的产品以巴布亚企鹅命名。Gentoo包管理系统的设计是模块化、可移植、易维护、灵活以及针对用户机器优化的。软件包从源代码构建,这延续了ports的传统。但是为了方便,也提供一些大型软件包在多种架构的预编译二进制文件,用户亦可自建或使用第三方二进制包镜像来直接安装二进制包。

Read more

Modifying an Existing Docker Image

To install a custom package or modify an existing docker image we need to

1 run a docker a container from the image we wish to modify
2 modify the docker container
3 commit the changes to the container as a docker image
4 test changes made to image

Read more