jckarter

everyone already knows i'm a dog

the swift programming language is my fault to some degree. mostly here to see dogs, shitpost, fix old computers, and/or talk about math and weird computer programming things. for effortposts check the #longpost pinned tag. asks are open.


email
mailto:joe@duriansoftware.com
discord
jckarter

jamesmunns
@jamesmunns

My wife and I were joking around about knuckle tattoos that would be two four-letter words (one one each hand), but if you interleaved your fingers, it would spell a different eight-letter word.

Because I am who I am, I used linux's dictionary file to find all of the potential matches. I am happy to report there are some (though some of the words are sort of archaic):

a: buns, b: lees, combo: blueness
a: clip, b: aloe, combo: calliope
a: cons, b: oles, combo: coolness
a: cult, b: opes, combo: couplets
a: cuts, b: ones, combo: countess
a: duns, b: ores, combo: dourness
a: fins, b: ares, combo: fairness
a: gals, b: oles, combo: goalless
a: hint, b: ares, combo: hairnets
a: pens, b: loam, combo: pleonasm
a: shoe, b: cold, combo: schooled
a: suns, b: ores, combo: sourness
a: term, b: hoes, combo: theorems

a: cons, b: oles, combo: coolness gets extra points for ALSO forming a word ("consoles") when put next to each other when interleaved. Rust code for this search after the jump.


use std::{
    collections::HashSet,
    fs::File,
    io::{BufRead, BufReader},
};

fn main() {
    let file = File::open("/usr/share/dict/words").unwrap();
    let br = BufReader::new(file);
    let mut fours = Vec::new();
    let mut eights = Vec::new();
    br.lines()
        .filter_map(Result::ok)
        .for_each(|s| match s.len() {
            4 => fours.push(s),
            8 => eights.push(s),
            _ => {}
        });
    println!("4s: {} 8s:{}", fours.len(), eights.len());
    let eights: HashSet<String> = eights.drain(..).collect();

    // AB
    for outer in fours.iter() {
        for inner in fours.iter() {
            let mut combine = Vec::new();
            outer.chars().zip(inner.chars()).for_each(|(a, b)| {
                combine.push(a);
                combine.push(b);
            });
            let res: String = combine.iter().collect();
            if eights.contains(&res) {
                println!("a: {}, b: {}, combo: {}", outer, inner, res);
            }
        }
    }
}

You must log in to comment.

in reply to @jamesmunns's post: