ADDED ransul.ml Index: ransul.ml ================================================================== --- ransul.ml +++ ransul.ml @@ -0,0 +1,113 @@ +let pick (r : 'a array) : 'a = r.(Random.int(Array.length r)) +let chance i = (Random.int i) = 0 + +type root = { + ra : string; + en : string; +} + +let roots = [| + { ra = "lis"; en = "flower"; }; + { ra = "uan"; en = "joy"; }; + { ra = "saf"; en = "just"; }; + { ra = "vas"; en = "gem"; }; + { ra = "mir"; en = "love"; }; + { ra = "uen"; en = "small"; }; + { ra = "shir"; en = "need"; }; + { ra = "ser"; en = "true"; }; + { ra = "liv"; en = "trust"; }; + { ra = "cir"; en = "strong"; }; + { ra = "ros"; en = "galaxy"; }; + { ra = "sur"; en = "socialism"; }; + { ra = "ran"; en = "People"; }; + { ra = "lin"; en = "health"; }; + { ra = "nish"; en = "stone"; }; + { ra = "shen"; en = "tender"; }; + { ra = "cas"; en = "hope"; }; + { ra = "pash"; en = "gentle"; }; + { ra = "ren"; en = "generous"; }; + { ra = "car"; en = "cause"; }; + { ra = "han"; en = "sure"; }; + { ra = "shad"; en = "wisdom"; }; + { ra = "vir"; en = "spirit"; }; + { ra = "has"; en = "peace"; }; + { ra = "uin"; en = "heart"; }; + { ra = "shal"; en = "sun"; }; + { ra = "lac"; en = "air"; }; + { ra = "cit"; en = "strong"; }; + { ra = "cov"; en = "meaning"; }; + { ra = "ien"; en = "event"; }; + { ra = "sav"; en = "unity"; }; + { ra = "vin"; en = "obedience"; }; + { ra = "pel"; en = "comfort"; }; + { ra = "vit"; en = "effort"; }; + { ra = "tas"; en = "liaison"; }; + { ra = "sosh"; en = "passion"; }; + { ra = "ten"; en = "river"; }; + { ra = "sal"; en = "sea"; }; + { ra = "sel"; en = "vulnerability"; }; + { ra = "til"; en = "victory"; }; + { ra = "sad"; en = "bastion"; }; + { ra = "tov"; en = "sacrifice"; }; + { ra = "gal"; en = "belonging"; }; + { ra = "ved"; en = "vigilance"; }; + { ra = "cam"; en = "harvest"; }; + { ra = "pan"; en = "sowing"; }; + { ra = "hil"; en = "root"; }; + { ra = "nus"; en = "persistence"; }; + { ra = "cud"; en = "return"; }; + { ra = "nom"; en = "similar"; }; + { ra = "pen"; en = "blood "; }; + { ra = "sish"; en = "patience"; }; + { ra = "mon"; en = "gentle"; }; + { ra = "tac"; en = "hard"; }; + { ra = "rig"; en = "aid"; }; + { ra = "nir"; en = "air"; }; + { ra = "lan"; en = "leadership"; }; + { ra = "cad"; en = "fortune"; }; + { ra = "div"; en = "many"; }; + { ra = "cos"; en = "line"; }; + { ra = "dor"; en = "will"; }; + { ra = "iun"; en = "bearing"; }; + { ra = "uol"; en = "sky"; }; + { ra = "sof"; en = "bright"; }; + { ra = "tal"; en = "part"; }; + { ra = "teg"; en = "mount"; }; + { ra = "var"; en = "shadow "; }; + { ra = "sil"; en = "light"; }; + { ra = "iur"; en = "life"; }; + { ra = "mad"; en = "source"; }; + { ra = "far"; en = "voyage"; }; + { ra = "tel"; en = "world"; }; + { ra = "shet"; en = "moon"; }; + { ra = "med"; en = "space"; }; + { ra = "ios"; en = "water"; }; + { ra = "tur"; en = "energy"; }; + { ra = "ris"; en = "justice"; }; + { ra = "vis"; en = "love"; }; + { ra = "can"; en = "touch"; }; + { ra = "len"; en = "patriot"; }; + { ra = "van"; en = "forest"; }; + { ra = "cef"; en = "duty"; }; + { ra = "nil"; en = "peace"; }; + { ra = "tir"; en = "force"; }; + { ra = "tef"; en = "discipline"; }; + { ra = "tar"; en = "humility"; }; + { ra = "shar"; en = "girl"; }; + { ra = "sar"; en = "black"; }; + { ra = "uer"; en = "rose"; }; + { ra = "seh"; en = "cyan"; }; + { ra = "iash"; en = "blue-green"; }; + { ra = "pir"; en = "silver"; }; + { ra = "mat"; en = "gold"; }; + { ra = "iem"; en = "glow"; }; + { ra = "ian"; en = "giving"; }; +|] + +let name () = + let fst = pick roots in + let lst = pick roots in + (String.capitalize_ascii fst.ra) ^ (lst.ra) ^ ": " ^ + fst.en ^ "-" ^ lst.en;; + +let () = Random.self_init () ; print_string (name())