Skip to content

Instantly share code, notes, and snippets.

@futile
futile / log.md
Created March 23, 2022 15:35
`cargo build && cargo test` in enet-sys with bindgen 0.59.2
$ cargo build
   Compiling enet-sys v0.2.3 (/some/local/path/gits/enet-sys)
warning: `extern` block uses type `u128`, which is not FFI-safe
   --> /some/local/path/gits/enet-sys/target/debug/build/enet-sys-d162a1864a0ef054/out/bindings.rs:798:10
    |
798 |     ) -> u128;
    |          ^^^^ not FFI-safe
    |
    = note: `#[warn(improper_ctypes)]` on by default
@futile
futile / server.c
Created September 10, 2018 18:58
QUANT server using q_close_stream instead of q_write*
// SPDX-License-Identifier: BSD-2-Clause
//
// Copyright (c) 2016-2018, NetApp, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
@futile
futile / get_libcxx.sh
Last active August 15, 2018 14:36
Script that pulls and builds a libcxx 3.7 with wllvm
#!/bin/bash
set -e
set -o
set -u
function pull_libc++37 {
DEST="$1"
pushd ${DEST}/projects
git clone --single-branch --branch release_37 --depth 1 https://github.com/llvm-mirror/libcxx.git libcxx
@futile
futile / gist:7ab1e725ce3375fc0b001463ab5c6569
Created November 16, 2016 19:56
Rustc 2016-11-15 ICE
% cargo build
Compiling vec_map v0.4.0
Compiling tuple_utils v0.2.0
Compiling custom_derive v0.1.5
Compiling crossbeam v0.2.10
Compiling winapi-build v0.1.1
Compiling libc v0.1.12
Compiling smallvec v0.2.1
Compiling winapi v0.2.8
Compiling kernel32-sys v0.2.2
@futile
futile / output
Created August 5, 2016 23:05
Test timeout warnings
running 2 tests
test test_fooblubb has been running for over 60 seconds
test test_fooblubb2 has been running for over 60 seconds
test test_fooblubb2 ... ok
test test_fooblubb ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured
@futile
futile / client.rs
Created December 22, 2014 21:44
client & server for '+ ERROR'
extern crate mio;
use mio::{event, EventLoop, Handler, Token, IoWriter};
use mio::buf::{SliceBuf};
use mio::net::{SockAddr, Socket};
use mio::net::udp::{UdpSocket};
const CLIENT: Token = Token(0);
struct UdpClientHandler {
@futile
futile / compile_commands.json
Last active January 3, 2016 12:29
compile_commands.json generated by cmake & ninja
[
{
"directory": "/tmp/yl-build",
"command": "/usr/bin/clang++ -g -I/home/felix/gits/yololand/src -Wall -Werror -std=c++11 -o CMakeFiles/server.dir/src/server/main.cc.o -c /home/felix/gits/yololand/src/server/main.cc",
"file": "/home/felix/gits/yololand/src/server/main.cc"
},
{
"directory": "/tmp/yl-build",
"command": "/usr/bin/clang++ -g -I/home/felix/gits/yololand/src -Wall -Werror -std=c++11 -o CMakeFiles/server.dir/src/common/Network/Packets/StringPacket.cc.o -c /home/felix/gits/yololand/src/common/Network/Packets/StringPacket.cc",