diary-4-7-2023

in diary

I bought Fedora Remix for WSL. I feel the urge to support. Dev tool companies need money to run, but people are much less fancied by the thought of paying them even if the asking price is as few as ten dollars.

For the first time this week — ok not the first time I’m sorry — I did Duolingo in the morning. Recently it has introduced a new mechanism: if you use it before 12pm, you can get an experience booster after 6pm; and if you use the app after 9pm you will be awarded another one the following morning. It is super powerful as it doubles the experience for 15 minutes, so people are encouraged to do it once in the morning and once at night. It is such a neat way to motivate people to form good habits.

I asked ChatGPT for some wearing advice, and I found out my need for leggings or tights — they seem so helpful for a ten degrees Celsius day like today, but only women are known to wear them. This fact bothers me so much.

I listened to the Framework staff’s advice and took away a memory stick from the laptop. The result: it just worked. No Bluetooth lag or disconnection, no forceful shutdown — I am just over the moon.

On my way to the school, I checked passersby’s bottoms for reference. Most women wear leggings or jeans. Men wear jeans and trousers — I can’t see through them, but they should be thermal underwear. And there are people wearing shorts! How brave! If they are brave enough to wear shorts on a cool day like today, wearing leggings should be a piece of cake. When I charged the laptop, the Bluetooth mouse was unwilling to talk to it again. It is too early for joy. Speaking of joy, I have a gathering to attend tonight. Have some drinks and play some Mahjong. I’m really looking forward to it.

Who would have thought the problem a student ran into took an extra hour?

Anyways, I arrived at my friend’s apartment at 7pm. We played a lot of pizza and ate a lot of Mahjong. The pizzas are two macaroni — I mean pepperoni — and one vegetable. They were tasty. And I drank a can of Coors Light. I played until 12:48am, biked my way home, and am deadly sleepy now. If I wrote something wrong, please forgive me.

We played Yonma and in the last, Sanma. In the final game I played, I won a hand of toitoi hatsu dora 5 which was worth 24000 points. But the player dealt in 24000 managed to pull a comeback to second place by winning a 12000 hand from the other player. “Rrrrrrrigged!” He happily said it when opening his hand. A large part of Mahjong is based on luck, so they often say it is “rigged”, parodying Trump’s claim of a rigged election.

Speaking of Trump, now he turned himself to the court. Although I do not hold a good impression of him, I do hope that he gets what he legally deserves. “We are embarrassing ourselves,” Trump said in a speech after the hearing. But he himself is the man who made the spectacles first.

Comment and share

这篇博客是在Decap CMS上写的。

不知为何,Decap的汉字是从右往左输入的。而且退格会删除一整行。

各平台汉语支持,写汉语的时候不支持的话,发布出来也一定不支持吧各平台汉语支持,写汉语的时候不支持的话,发布出来也一定不支持吧

综上,Plan B大告失败!


图里从里到外是:note(没截全),substack, hatenablog,medium。

另外:我还试了Ghost,也没有汉字字体。也是只能看着几个宋体字在黑体字间鹤立鸡群。但是Ghost还有办法挽回。当然,反面来说,如果不写中文的话,Note,medium都是非常方便的平台。而Hatenablog支持markdown,也是非常贴心。而且这些(除了Ghost)都不要钱。

DatoCMS有一个集中模式,还可以。如果能支持图片拖进去/粘贴就更好了。

Comment and share

最后的博客

in writing

在写这篇文章之前,我折腾了一下午的npm。改了依赖,扔了失修已久的multilingual feed,为了解决一个错误听ChatGPT的话改了tranquilpeak主题一通,最后告诉我只要把strip-indent的版本改回3.0.0就行了。现在这个时间点再运行npm audit,应该是0漏洞了。

这个博客从设立起到现在也快6个年头了。所以我想回忆一下这些年是怎么一路折腾来的。然后再谈谈这个博客的未来。

心路旅程

域名

域名的问题,当时noir.moe和noire.moe都不知被谁注册了,所以一开始是noirina.moe,反正Noirina也是Noire。后来追求短,就变成了现在的nir.moe。现在noir.moe没有人注册,欢迎去买,noire.moe不可用,但是也不知道注册的人拿来在干啥——不用不如捐给我。

除了这个之外,我还注册过一段时间什么.me,大概是用的本名,解析到Blogger去。反正那个Blogger也没写什么东西,就没续费了。

我忘了,很久很久以前,其实是nomamama.top和nomamama.xyz。Nomamama是我名字的一个anagram(之后才发现不仅把w改成了m,还把一个u改成了a)结合Segagaga得来的。现在用的Noirgif是另一个anagram,这个是先弄成日语罗马字然后再变来的。跑题了。在西部数码注册的域名,虽然很便宜(记得年费是个位数)但是后来要求备案,不备案就不给解析,于是这个域名就送他们了。

服务器

一开始是在12美元一年的Ethernet Servers,搞个Nginx挂着(首要用途还是开VPN),然后是HostMyBytes。

这个博客的图片基本是传在Cloudinary上的。我需要先上传到那边,拿到URL再贴到这边。这大概是用VPS时候留下来的了。现在想想,其实图片也可以直接推到GitHub上。

用VPS的时候还想着用Cloudflare怎么加速——结果发现一用VPN就不好使了。但是现在就没有必要了,name server还是用的Cloudflare,也是当时留下来的。

在2018年底的时候,我同时也部署到VPS和Github Pages上了(见如何被 GitHub Pages 蹬鼻子上脸。其实单用Github Pages也可以——访问noirgif.github.io就是走的pages,但是我闲得慌,为了一点现在已经没用的功能,而搞了Netlify。

HostMyBytes在19年4月被Alpharacks收购,我在那个时候改用CircleCI跑Hexo,然后CircleCI部署到专用的分支。没用Travis CI的原因,印象里是因为它的镜像太旧了还是机子太破了,还是两者皆有?当时也没人教我,只好自己试着搞来搞去,搞成现在这个模样。

6月份那个VPS连不上,随后Alpharacks倒闭的消息传来,干脆就不要自己搭的Nginx,只推到Github上了事。从此这个博客只有域名是要钱的了,我觉得这是这个博客的顶峰。

半年后有了Github Actions。求你下次早点来。

Hexo

在用Hexo之前我实在想不起来用的什么。大概是没有吧。用Hexo的起点大概是周围的人很多当时在用Hexo。印象很深的三个:

  1. 老涡的博客:后来改用了Hugo。
  2. 苏卡卡的博客:不仅还在用,还自己折腾了很多,学不来。
  3. 没有第三个了。老肯老fc用的都是Pelican。

喜欢的地方:主题很花哨。当时想着搞很多花哨东西,所以用了这个主题。现在没这个想法了。

有好有坏的地方:写作体验。用自己想用的编辑器,写Markdown固然简单,但是我有一个一直梦寐以求的功能:把图片拖进来,就能帮你上传到CDN,然后在博客里给你一个链接。我在Piazza用这个的时候就想着博客能不能有一个。Notion也会把文件上传到S3,不过Notion的数据可能都在S3。Hexo有一个Cloudinary插件,但是做的是你写一个tag,帮你插入Cloudinary上的图片,这种画蛇添足的事情。

头疼的地方:NodeJS加持的Hexo有很多插件,容易发生有的包没人维护了,这个没人维护的包的依赖有漏洞这种深奥的事情。按照这个部署的流程来说我是不需要管他们的?不是很清楚。但是想本地看一看效果的时候就很麻烦。今天我为此把multilingual feed删掉了。从此这个博客更新不分语言了:明天是英语,后天是日语。本博客虽然用各种语言写的,但是对多语言的支持闻者落泪。

我也不会折腾主题。把Hymmnos字体加进来(记得提醒我玩魔塔大陆3),被Katex折腾折腾,大概就是我力所能及的范围了。曾经有的、现在已经不工作了的飘雪的代码,其实是从Winter Plus的网站那里借过来的。请不要告诉North Plus我借了代码,也不要告诉上面的人我上过Soul Plus。

总结

这大概会是我最后一次折腾这个博客了。下次再告诉我有漏洞,我会换到Hatenablog。届时大概会搞一个像R18网站一样的跳转选项,或者在主页里加一个banner。(最后一次折腾?)

最近玩蔚蓝档案,给我很深的感触,就是我经常被活动和人物迷惑了双眼,本来我最优先的momotalk却很少打开。

折腾博客,虽然给我带来很多收获,但是我感觉我渐渐离开了本博客随便写写东西的初衷。而这个初衷是我想继续贯彻的。所以我想以此为戒,也是纪念。

Plus je écris les blogs, mieux j’aime les papier.

我写的博客越多,我就越喜欢纸。

附记:一点题外话

虽然游戏堆积成山(蔚蓝档案只是其中一个原因),但是最近有在打天使骚骚的 Demo。因为游戏堆积成山,所以还没有决定要买。

说这句台词的时候天使的表情就像万花筒一样说这句台词的时候天使的表情就像万花筒一样

这篇博客开始写是晚上8点,现在已经是第二天了。昨天的日记也没写,Duolingo也没做,洗洗睡了。

Comment and share

Introduction

As you may already know, the elevator in the computer sciences department has been broken since Friday and will remain unfixed throughout the weekend. Although we have a backup elevator, it gets overloaded even on a Saturday morning. When I went to grab a cup of coffee, someone else had already ridden it, so I had to take the stairs.

We strive to create systems with high availability. A loss of three days (averaging 0.9% throughout the year) is hardly acceptable. This brings us to today’s main theme:

We present a proposal for a new type of elevator that utilizes blockchain technology to achieve high availability.

The idea behind this proposal is to create an elevator system that never goes down. By using a decentralized blockchain network, the elevator system could potentially achieve 100% uptime, with no single point of failure.

Design

The elevator’s control system would be connected to the blockchain network. Every time a passenger boards or exits the elevator, a new block would be added to the chain. The blocks would contain information about the elevator’s current position, direction, and speed. You can think of it as a transaction: validators (a new name for blockchain miners in this context) will include it in the chain. Once six blocks are validated on top of it, we will consider it confirmed, and the elevator will move toward the destination. The confirmation of the transaction on the Ethereum Mainnet takes approximately 84 seconds. However, faster confirmations can be achieved by using private chains.

Thanks to the decentralized nature of the system, the elevator will continue to function as long as most validators are online. Even if a hacker tries to tamper with the system, the blockchain’s consensus mechanism will ensure that the elevator’s history remains accurate and unalterable. If you take a two-hour coffee break on the sixth floor, everyone in the department will know about it.

In addition, the immutability of the blockchain guarantees that there will be no disputes over the operation of elevators, which can occur with traditional elevator systems. For instance, people often disagree on how long the doors should remain closed if no button is pressed, and it is often unclear whether the “close door” button accelerates the closing. With blockchains, these rules are enforced by the system, and there is no room for interpretation.

Conclusion

Elevators powered by blockchain technology have a lot of potential. We highly anticipate that they will replace the current broken elevator in the CS building.

Happy April Fool’s Day!

Comment and share

Author's picture

NoirGif

A progamer.

(click me to see some )


Student(probably)