Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This is a tutorial on the Curry-Howard correspondence, or the correspondence | |
between logic and type theory, written by Keith Pinson, who is still a learner | |
on this subject. If you find an error, please let me know. | |
This is a Bird-style literate Haskell file. Everything is a comment by default. | |
Lines of actual code start with `>`. I recommend that you view it in an editor | |
that understands such things (e.g. Emacs with `haskell-mode`). References will | |
also be made to Scala, for programmers less familiar with Haskell. | |
We will need to turn on some language extensions. This is not an essay on good |
#!/bin/sh | |
prog_name=${0##*/} | |
version=1.0 | |
version_text="Boilerplate for new scripts v$version" | |
options="h o: q v V" | |
help_text="Usage: $prog_name [-o <text>] [-hqvV] [<file>]... | |
Boilerplate for new scripts |
port: 7890 | |
socks-port: 7891 | |
redir-port: 7892 | |
allow-lan: true | |
mode: Rule | |
log-level: info | |
external-controller: 0.0.0.0:9090 | |
secret: "xxxxxx" | |
dns: | |
enable: true |
#!/bin/bash | |
# !!WARNING!! | |
# This will DELETE all efforts you have put into configuring nix | |
# Have a look through everything that gets deleted / copied over | |
nix-env -e '.*' | |
rm -rf $HOME/.nix-* | |
rm -rf $HOME/.config/nixpkgs |
I was recently asked to explain why I felt disappointed by Haskell, as a language. And, well. Crucified for crucified, I might as well criticise Haskell publicly.
First though, I need to make it explicit that I claim no particular skill with the language - I will in fact vehemently (and convincingly!) argue that I'm a terrible Haskell programmer. And what I'm about to explain is not meant as The Truth, but my current understanding, potentially flawed, incomplete, or flat out incorrect. I welcome any attempt at proving me wrong, because when I dislike something that so many clever people worship, it's usually because I missed an important detail.
Another important point is that this is not meant to convey the idea that Haskell is a bad language. I do feel, however, that the vocal, and sometimes aggressive, reverence in which it's held might lead people to have unreasonable expectations. It certainly was my case, and the reason I'm writing this.
I love the concept of type class
#!/usr/bin/env bash | |
# Script to create ansible playbook directories | |
# With thanks to https://gist.github.com/skamithi/11200462 for giving me the idea | |
# We attempt to lay everything out according to Ansible best practices: | |
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#playbooks-best-practices#directory-layout | |
gitinit(){ | |
# Start with sensible .gitignore defaults |
This is the second article in a series of articles around Rusts new async/await
feature. The first article about interfaces can be found
here.
In this part of the series we want to a look at a mechanism which behaves very
different in Rust than in all other languages which feature async/await
support. This mechanism is Cancellation.
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized