Modules in Rust 2018
Modules in Rust 2018https://doc.rust-lang.org/nightly/edition-guide/rust-2018/module-system/path-clarity.html
Rust 2015.├── lib.rs└── foo/ ├── mod.rs └── bar.rs
Rust 2018.├── lib.rs├── foo.rs└── foo/ └── bar.rs
In top level, the same level of the main.rs
123// module.rspub fn some_module_fn() {}
Then if you want to add more stuff in the module, helper functions, sub-modules, add them in the folder named the same name as your module.
123// In ./module/shared.rspub fn ...
Arch installer - alis
I start using linux and ditched my Macbook for about 3 years ago. Mainly because Apple kept making Mac OS more and more like a media consuming product and there aren’t any good laptops from them recently. So I moved to linux, the switch to full linux workflow is a bit different but not unfamilar for me. I was able to use most of the software I wanna use for my personal work and entertainment.
So I first tried the distro I am most familar with:
Homepage: https://ubuntu.com/
Later I had some har ...
About Google
Its been a while since I considered the idea of reducing my online footprints. I still remember I started using Google’s service in 2006. At that time, Gmail is not open to registration yet, I remember I had to ask for someone online for an invite. It was a great time to have a @gmail.com account for a 14 year old.
Now 14 years has passed, I use so much Google. My email, photo, home automation, videos. I really love the modern internet where everything is seemlessly integrated. Recently I found ...
StyleGAN2 generation with Genome
Previously I have written a simple library called genome using Javascript repo. The idea came to me when I wanted to build something like cryptokittie (crypto cat breeding and trading). I wanted a way to generate random values that can be used to generate random things, also the ability to merge these values. The project is really crude, it basically stores 4 markers and 1 influence as number. When merging two DNA together, there is random change that one gene might mutate. There are 5 type of m ...
2019 Review
A lot have happened in 2019, and I have decided to make up a habit on recording the things I have done each year so I can look back and see if I had a good year or not.
Finished Doing
Made life changing decision by leaving marriage
Left a job that I no longer feel valued
Went back to China and visited Shenzhen, Fuzhou, Nanjing
Wrote a book “Professional JavaScript” and published
Getting from 90kg to 80kg
Got a good position at EA
Had better relationship with parents
Known a couple friend with si ...
豚骨拉面汤底 (未必正宗版)
虽然未必正宗,但是味道其实还好的豚骨拉面配方🙃 (10人份)
汤底原料
猪腿骨 4-8个腿骨 切半
猪脊骨 1千克
姜片 三片
大葱葱绿 一个
大蒜 6个
准备汤底
用冷水加入猪骨、沸腾以后出浮沫倒出,用冷水一个一个清洗里面的血和沫
再放入锅里加水没过中火加热六小时(汤需一直沸腾但是不是很激烈的那种)
放入姜片,大蒜和大葱葱绿,继续加热两个小时,过滤备用
简单的出汁(给汤咸味和鲜味)
柴鱼片 一小杯
煮干し 或者是普通小鱼干 一杯
酱油
糖
味淋
把出汁的原料全放到锅里加水煮半个小时(这个会很咸但是属正常的)
汤底和出汁都可以冷藏保存一个星期
制作的时候碗里放入出汁然后把烧开的汤底放入加上煮好的面,叉烧,葱末,豆芽…..就好了。
Adapta Theme Review
I don’t really review themes here, but sometimes you come across a really breautiful theme. I normally use the arc theme for my Linux Mint installation. Today I found out that Google is making its Chromebook to run native linux applications and some of the application will have the material theme.
Chrome OS native app with material design
Looks pretty nice isn’t it?
To install just follow the instruction on the github repository Github
For Arch users you can install it from the awesome AUR
1ya ...
Amazing cheese toast recipe
Ever since I took that culinary class in high school, I always loved to cook. During my senior year in college, I even worked as a cook in my school’s memorial union. Now I work as a software engineer during the day but when the sun sets, I turns into a passionate cook. I often experiment with various cusines and recipes. Luckly my wife enjoys my food just as much as I enjoy cooking them. From time to time I will post some recipe I am experimenting.
Cheese toastI got this recipe from a friend, w ...