I hereby claim:
- I am lifthrasiir on github.
- I am lifthrasiir (https://keybase.io/lifthrasiir) on keybase.
- I have a public key ASAndI2FTJiHlek_hU48ZYrs1cOb4RWFf5kNUO9PAB3Fywo
To claim this, I am signing this object:
//usr/bin/env go run $0 $@; exit | |
package main | |
import ( | |
"time" | |
"fmt" | |
"net" | |
"net/http" | |
"io/ioutil" | |
"encoding/json" |
#include <string> | |
#include <cstdio> | |
#include <cstddef> | |
using namespace std; | |
int from_xdigit(char c) { | |
if ('0' <= c && c <= '9') return static_cast<int>(c - '0'); | |
if ('a' <= c && c <= 'f') return static_cast<int>(c - 'a') + 10; | |
return 0x10000; | |
} |
I hereby claim:
To claim this, I am signing this object:
// next leap second information via DNS | |
// http://phk.freebsd.dk/time/20151122.html | |
// 2016-05 Kang Seonghoon, public domain | |
use std::io; | |
use std::net::{SocketAddr, Ipv4Addr, ToSocketAddrs}; | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
struct NextLeapSecond { | |
year_valid: u32, |
Suppose that you are a programmer primarily working with compiled languages. Somehow you’ve got tired of those languages, there may be multiple valid reasons, and heard of a trendy new programming language called Rust. Looking at some webpages and the official forum, it looks great and you decides to try it out. It seems that Rust was a bit cumbersome to install in the past, but thanks to rustup the problem seems gone by now. Cargo seems to be great, so you follow the first sections of the Book and put a small greeting to the new language:
fn main() {
println!("Hello, world!");
}
Amazingly cargo run
runs without a hassle. It is kind of a miracle as you used to configure the build script, Makefile, projects or whatever before building things. Impressed, you realize that the executable is available in target/debug/hello
. You instinctively type ls -al
out (or is it dir
?) and
target | |
Cargo.lock |
target | |
Cargo.lock |
target | |
Cargo.lock |
| / Antidiagonals | |
|/_ | |
Horizontals m l k j i h g | |
\ ,-------------. f Clues: | |
---} a / . . . . . . . \ e Ha .*H.*H.* Aa .*SE.*UE.* Da .*G.*V.*H.* | |
/ b / . . . . . . . . \ d Hb (DI|NS|TH|OM)* Ab .*LR.*RL.* Db [CR]* | |
c / . . . . . . . . . \ c Hc F.*[AO].*[AO].* Ac .*OXR.* Dc .*XEXM* | |
d / . . . . . . . . . . \ b Hd (O|RHH|MM)* Ad ([^EMC]|EM)* Dd .*DD.*CCM.* | |
e / . . . . . . . . . . . \ a He .* Ae (HHX|[^HX])* De .*XHCR.*X.* | |
f / . . . . . . . . . . . . \ Hf C*MC(CCC|MM)* Af .*PRR.*DDC.* Df .*(.)(.)(.)(.)\4\3\2\1.* |
// Example implementation for the proposed Temporenc byte format | |
// Kang Seonghoon, 2017-01-29, public domain | |
#include <stdint.h> | |
#include <stddef.h> | |
#include <string.h> | |
struct temporenc { | |
int has_date: 1, has_year: 1, has_mon: 1, has_day: 1; | |
int has_time: 1, has_hour: 1, has_min: 1, has_sec: 1, has_nsec: 1; |