stebalien

u/stebalien


r/KeybaseProofs•

Keybase proof

I hereby claim:

  • I am stebalien on reddit.
  • I am stebalien on keybase.
  • I have a public key whose fingerprint is 327B 20CE 21EA 68CF A774 8675 7C92 3221 5899 410C

To claim this, I am signing this object:

{
    "body": {
        "key": {
            "eldest_kid": "0101d31a7d11aade9443f86cbfdc6ace9d58fe8c22741e910f78b6f1ce8731a78ba90a",
            "fingerprint": "327b20ce21ea68cfa77486757c9232215899410c",
            "host": "keybase.io",
            "key_id": "7c9232215899410c",
            "kid": "0101d31a7d11aade9443f86cbfdc6ace9d58fe8c22741e910f78b6f1ce
10

r/rust•

A secure cross-platform temporary file library for rust. This library should be race free, reliable, and secure in the presence of pathological temporary file cleaners.

crates.io: https://crates.io/crates/tempfile

Example:

use tempfile::TempFile;
use std::io::{Write, Read, Seek, SeekFrom};

// Write
let mut tmpfile = TempFile::new().unwrap();
write!(tmpfile, "Hello World!").unwrap();

// Seek to start
tmpfile.seek(SeekFrom::Start(0)).unwrap();

// Read
let mut buf = String::new();
tmpfile.read_to_string(&mut buf).unwrap();
assert_eq!("abcde", buf);
2121

r/rust•

Redirect stderr/stdout output to a file, temporary buffer, temporary buffer that prints on drop, or /dev/null. Currently, this library only supports *nix operating systems.

Use cases:

  • Work around misbehaving libraries.

  • Log panics to a file by redirecting stderr.

In general, you shouldn't need this functionality but it's annoying to implement so I figured I'd publish it.

crates.io: https://crates.io/crates/gag

96

r/rust•

CoatCheck is a library for storing values and referencing them by "handles" (Tickets). This library is designed to be used where you would otherwise use a hash table but you don't actually need to be able to choose the keys.

Advantages:

  • You don't have to generate your keys.
  • CoatCheck is at about 5x faster for insert/remove operations than the stdlib HashTable (and could probably be faster).
  • CoatCheck is ~40x faster for lookups (it's an array lookup).

Design question:

Currently, Tickets can't be copied. You can use a reference to a ticket to get a reference to the associated value but to "claim" the value (get it out of the CoatCheck) you need to give up the ticket.

Pros:

  • Owner
148

r/KeybaseProofs•

Keybase proof

I hereby claim:

  • I am stebalien on reddit.
  • I am stebalien on keybase.
  • I have a public key whose fingerprint is 327B 20CE 21EA 68CF A774 8675 7C92 3221 5899 410C

To claim this, I am signing this object:

{
    "body": {
        "client": {
            "name": "keybase.io node.js client",
            "version": "0.7.3"
        },
        "key": {
            "fingerprint": "327b20ce21ea68cfa77486757c9232215899410c",
            "host": "keybase.io",
            "key_id": "7C9232215899410C",
            "uid": "770b98c98a1f57f9f221585e0261cf00",
20

You've reached the end of this feed.