Skip to content

Instantly share code, notes, and snippets.

View cristicbz's full-sized avatar
🦀

Cristi Cobzarenco cristicbz

🦀
View GitHub Profile
@cristicbz
cristicbz / csv.rs
Last active October 26, 2017 17:36
csv.rs for expressive rust
use std::env;
use std::io::{self, BufReader, BufWriter, BufRead, Write};
use std::fs::File;
use std::process;
enum Error {
Io(io::Error),
Program(&'static str),
}
export interface IDispatchBinder<S> {
<A extends Action>(creator: () => A): () => A;
<X1, A extends Action>(creator: (x1: X1) => A): (x1: X1) => A;
<X1, X2, A extends Action>(creator: (x1: X1, x2: X2) => A): (x1: X1, x2: X2) => A;
<X1, X2, X3, A extends Action>(creator: (x1: X1, x2: X2, x3: X3) => A): (x1: X1, x2: X2, x3: X3) => A;
<X1, X2, X3, X4, A extends Action>(
creator: (x1: X1, x2: X2, x3: X3, x4: X4) => A): (x1: X1, x2: X2, x3: X3, x4: X4) => A;
thunk<R, E>(creator: () => ThunkAction<R, S, E>): () => R;
thunk<X1, R, E>(creator: (x1: X1) => ThunkAction<R, S, E>): (x1: X1) => R;

Raw report

Analysis

Out of the 20 root regressions reported, the following are duds:

  • statistical-0.1.1: Duplicate of simple_stats.
  • volatile-register-0.1.1: Spurious failure
  • chipmunk-sys-0.0.4: Spurious failure.
  • shout-sys-0.1.1: Spurious failure.
  • scrutch-0.0.4: Spurious failure.
import java.util.ArrayList;
interface SomeInterface {
public long getA();
}
class Wrapper implements SomeInterface {
long a;
Wrapper(int i) {
@cristicbz
cristicbz / Cargo.toml
Created March 28, 2015 00:33
Multiple crates for rlib
[package]
name = "cargobug"
version = "0.0.1"
authors = ["Cristian Cobzarenco <cristi.cobzarenco@gmail.com>"]
[dependencies]
log="0.3"
getopts="*"
@cristicbz
cristicbz / gist:8a2ed587d1a7a6740d97
Created January 13, 2015 15:58
RV/V Move ctors
#include <cstddef>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <vector>
struct ByValue {
ByValue(std::vector<int> a, std::vector<int> b)
: a_{std::move(a)}, b_{std::move(b)} {}
@cristicbz
cristicbz / lazy.rs
Last active August 29, 2015 14:08
Rust Lazy Cell
use std::cell::UnsafeCell;
use std::kinds::marker;
enum LazyState<T> {
Deferred(proc(): Send -> T),
Evaluating,
Cached(T),
}
pub struct Lazy<T> {
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Example aliases
#include <type_traits>
#include <functional>
#include <utility>
#include <iostream>
#include <string>
#include <memory>
template<typename Handler>
class Connection {
public:
@cristicbz
cristicbz / cpporgo.md
Last active December 19, 2015 22:29
C++ or GO
  • 1984 is a lo-ong time ago. Tot articolul ala mi se pare ca e destul de outdated, super mult revolves around cod discarded de preprocesor si reparsarea headerurilor. Zilele astea compilatoarele moderne fac chestii destul de destepte. MSVC de exemplu (si suspsectez si clang & gcc), are un embedded db in care asociaza AST-uri pt header files sub diverse macro definitions. Asa ca super multa munca e cached. Exemple lor sunt 1984,1986,1987, middle ages as far as compiler technologies go.

  • Sunt super de-acord cu ei in ceea ce priveste sistemul de dependente din pct de vedere al maintenance. #includes adauga dependente ascunse, nu specifica dependentele fata de un "package" ci fata de ceva super low-level -- un fisier, probabil o clasa doua.

  • D-aia in C++ e absolut vital sa manager-uiesti dependente extern, fie cu un build system destept sau cu ceva gen pkg-config. blaze la Google face asta destul de bine, dar in continuare, practic, trebuie sa specifici dependentele de doua ori: #includes si in build system