Document Number: | Pxxxxxx (not yet) |
---|---|
Date: | 2019-03-23 |
Project: | Programming Language C++, Evolution |
Revises: | P1143r2 |
Reply to: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
import glob | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from collections import OrderedDict | |
fig_size = [12, 9] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fix_url(url) { | |
var bad = ""; | |
var good = ""; | |
return url.replace(bad, good); | |
} | |
chrome.tabs.query({}, function(tabs){ | |
console.log(`Found ${tabs.length} tabs to update.`) | |
var _count = 0; | |
var n_changed = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass, fields as datafields | |
from ujson import dumps, loads | |
# Note: ujson seamlessly serializes dataclasses, unlike stdlib's json | |
@dataclass | |
class Point: | |
x: float | |
y: float | |
# Shallow dataclass can be rebuilt from dict/json: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(macro_rules)] | |
macro_rules! active_match { | |
//Single zero parameter case | |
($m:expr, $i:ident() => $b:block) => { | |
match $i($m) { | |
Some(()) => $b, | |
_ => panic!("Encountered an unmatched active case.") | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused_mut, non_camel_case_types, dead_code, unused_variables, non_upper_case_globals, non_snake_case, unused_imports)] | |
#![feature(optin_builtin_traits, /*unboxed_closures*/, associated_consts)] | |
use std::fmt::{self, Debug}; | |
use std::ops::Add; | |
use std::convert::{self, Into, From}; | |
/*macro_rules! using { | |
[ $pp:path : ( $($elem:ident),* ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::default::Default; | |
use std::sync::mpsc::{Receiver, Sender, channel}; | |
struct Wrap<T>(T); | |
macro_rules! ident_zip_signal { | |
( () ; ( $($id: ident,)* ) ; ( $($idr:ident: $tyr:ty,)* ) ) => { | |
fn signal( &mut self, $($idr : $tyr,)* ) { | |
for f in self.s.iter_mut() { | |
f($($idr),*); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused_mut, non_camel_case_types, dead_code, unused_variables)] | |
use std::fmt::{self, Debug}; | |
use std::ops::Add; | |
/*macro_rules! using { | |
[ $pp:path : ( $($elem:ident),* ) | |
] => [ | |
use $pp :: {self, $(elem),*}; | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(unused_mut, non_camel_case_types, dead_code, unused_variables)] | |
#![feature(trace_macros)] | |
use std::fmt::{self, Debug}; | |
/*macro_rules! using { | |
[ $pp:path : ( $($elem:ident),* ) | |
] => [ | |
use $pp :: {self, $(elem),*}; | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![allow(non_camel_case_types, unused_variables, dead_code, unused_mut)] | |
#![feature(concat_idents, trace_macros)] | |
//#![feature(struct_inherit)] | |
macro_rules! cc { () => () } | |
macro_rules! vv { | |
[ ( $($first:expr),+ ) : $func:ident $($rest:tt)* | |
] => [ | |
cc! { [ $func( $($first),+ ) ] # $($rest)*; } |
NewerOlder