DEV Community

Discussion on: Welcome Thread - v11

Collapse
 
dmerand profile image
Donald Merand • Edited

Hi, I'm Donald, and I'm jazzed to have found such a supportive and diverse community of developers, on the internet no less!

Fun fact: I recently designed a password-generating app as a way to learn some basic Elm, and an accompanying Ruby Gem that uses Markov chains against a dictionary to generate words that sound right, but aren't usually real words!

Collapse
 
andy profile image
Andy Zhao (he/him)

Woah! Would love to see the dictionary app in action!

Collapse
 
dmerand profile image
Donald Merand

:) Well, I use it in the password app to generate "words that sound like English, but usually aren't English". The thinking being that you want a nice long password, easy to remember + type, but hard(er) to crack against a dictionary.

I also have a semi-secret API that I use to generate fake names for humans: robot.lab.explo.org/randomname/3 where you can substitute any number for 3 and get back that number of names :) You can also get JSON from it: robot.lab.explo.org/randomname/3.json. Handy!

And in general, if you have a dictionary (say, of Elvish words), you can make an "Elvish word generator" like this:

require 'markov_words'

generator = MarkovWords::Generator.new(corpus_file: '/path/to/elvish_words.txt')
# returns a random word
puts generator.word