Edit: This list is now maintained in the rust-anthology repo.
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.network "private_network", ip: "192.168.100.100" | |
config.vm.synced_folder "./www", "/var/www/", :nfs => { :mount_options => ["dmode=777","fmode=666"] } |
#!/bin/sh | |
# SPDX-FileCopyrightText: 2017-2024 SanderTheDragon <[email protected]> | |
# | |
# SPDX-License-Identifier: MIT | |
arch=$(dpkg --print-architecture) | |
echo "Detected architecture: $arch" | |
case "$arch" in |
Quote from Elixir Mix 63 - "063: Designing Elixir Systems With OTP with Bruce Tate and James Gray", starting at 01:03:13
"I've worked at a bunch of companies building web apps for a long time, and I keep seeing this same pattern, and it haunts me. In the web world, all we want is these long interactions with people, and we live in this stateless world. So what we do is, the first part of every request, we do thirty queries to re-establish the state of the world that we just forgot a few seconds ago after the last request. And then we go forward and make one tiny step forward, and then we forget everything again, so that when the next request comes in we can do thirty queries to put it all back and make one more tiny step. And I kept thinking, "there has to be a better way than this, right?"
And if you look at web advancements over the years, most of the things we're doing are
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
// ConsoleHandler formats slog.Logger output in console format, a bit similar with Uber's zap ConsoleEncoder | |
// The log format is designed to be human-readable. | |
// | |
// Performance can definitely be improved, however it's not in my priority as | |
// this should only be used in development environment. | |
// | |
// e.g. log output: | |
// 2022-11-24T11:40:20+08:00 DEBUG ./main.go:162 Debug message {"hello":"world","!BADKEY":"bad kv"} | |
// 2022-11-24T11:40:20+08:00 INFO ./main.go:167 Info message {"with_key_1":"with_value_1","group_1":{"with_key_2":"with_value_2","hello":"world"}} | |
// 2022-11-24T11:40:20+08:00 WARN ./main.go:168 Warn message {"with_key_1":"with_value_1","group_1":{"with_key_2":"with_value_2","hello":"world"}} |