Today, John Tromp - creator of the Binary λ-Calculus, and one of the smartest functional wizards alive - ported his famous prime number generator (first published 12 years ago!) to HVM:
| ╭────────────────────────────────────────────╮ | |
| │ ✻ Welcome to Claude Code research preview! │ | |
| │ │ | |
| │ /help for help │ | |
| │ │ | |
| │ cwd: /Users/v/vic/dev/IC │ | |
| ╰────────────────────────────────────────────╯ | |
| ! cat InteractionCalculus.md |
Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!
The advantages of versions 0.8.* over <0.8.0 are:
- Safemath by default from
0.8.0(can be more gas efficient than some library based safemath). - Low level inliner from
0.8.2, leads to cheaper runtime gas. Especially relevant when the contract has small functions. For
https://www.nerdfonts.com/font-downloads
The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;
brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || trueArchived. Please see https://www.sainnhe.dev/post/status-line-config
First of all, install a nerd font, and apply it: nerd font
See how a minor change to your commit message style can make a difference.
git commit -m"<type>(<optional scope>): <description>" \ -m"<optional body>" \ -m"<optional footer>"
This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.
I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/ in my Dockerfiles, and also work from
isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/.
At the end of the day, vendoring (and committing vendor/) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:
First, find the container that runs your MongoDB and ssh into it.
Then, find the collection you want to export:
mongo
show dbs
use <database>
show collections
exit| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |
Here's the simplest example showing how to do functional options in Golang.
They're a great way to enable users to set options and ease adding new options later.
package main
import (
"flag"
"fmt"