Skip to content

Instantly share code, notes, and snippets.

@joehalliwell
joehalliwell / names.csv
Created September 14, 2017 23:18
Names extracted from Wikipedia
We can't make this file beautiful and searchable because it's too large.
firstname,male,female
a,39,17
a'ala,1,0
a'dia,0,1
a'eau,1,0
a'ja,0,1
a'jiniyaz,1,0
a'lelia,0,2
a'maal,0,1
a'me,0,1
fn main() {
let target: uint = from_str(std::os::args()[1].as_slice()).unwrap();
for line in std::io::stdin().lines() {
let l = line.unwrap();
let word = l.as_slice().trim();
if word.len() != target { continue; }
let mut chrs: Vec<char> = word.chars().collect();
chrs.sort();
chrs.dedup();
if chrs.len() != target { continue; }