You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
💻
Hacking
Xie Jingyi
hsfzxjy
💻
Hacking
Cutting-edge Tech Lunatic | Creative Software Designer | ML Researcher | PL Enthusiast
||
Phd Student at USTC
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A utility to automatically time-stamp and edit a work-log, or what have you.
It's like a task list, a "done list" that can be saved.
Has a handy calculator built-in.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've been fiddling about with an idea lately, looking at how higher-kinded types can be represented in such a way that we can reason with them in Rust here and now, without having to wait a couple years for what would be a significant change to the language and compiler.
There have been multiple discussions on introducing higher-ranked polymorphism into Rust, using Haskell-style Higher-Kinded Types (HKTs) or Scala-looking Generalised Associated Types (GATs). The benefit of higher-ranked polymorphism is to allow higher-level, richer abstractions and pattern expression than just the rank-1 polymorphism we have today.
As an example, currently we can express this type:
Replacement for the unix wall command, which also works with gnome-terminal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation
README
The example below creates a TCP server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to
create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.
An example server
Create an simple echo server at ~/tmp/foo/serve.py.