Forum Home
Press F1
 
Thread ID: 98139 2009-03-13 01:43:00 Mass word generator ubergeek85 (131) Press F1
Post ID Timestamp Content User
755970 2009-03-13 04:45:00 Heh, it's a javascript solution so it's going to be slow anyway compared to your C version, but has the benefit of no compilation and browser basedYup. Your solution automatically wins on the grounds of being far more immediately usable - just save it somewhere and point a browser at it :thumbs:. I'm just a sucker for excessively optimised code. It doesn't really matter... I'm a pedant, arrays like that are the stuff my nightmares are made of (that, and the forum clock) :rolleyes:. Erayd (23)
755971 2009-03-13 04:53:00 Yup. Your solution automatically wins on the grounds of being far more immediately usable - just save it somewhere and point a browser at it :thumbs:. I'm just a sucker for excessively optimised code. It doesn't really matter... I'm a pedant, arrays like that are the stuff my nightmares are made of (that, and the forum clock) :rolleyes:.

That's the beauty of refactoring, you can go back and fix the monkey code ;).
dyewitness (9398)
755972 2009-03-13 04:54:00 That's the beauty of refactoring, you can go back and fix the monkey code ;).

Yes... I'm currently trying to restrain myself and get on with the stuff I'm *supposed* to be doing...
Erayd (23)
755973 2009-03-13 05:04:00 Hi all. I'm looking for a program to generate random words/strings. I've been googling, but haven't found much freeware. It has to be able to generate words to a filter (eg: llnnllnn = ah78yr88) en masse. Can anyone suggest anything? Thanks.

what do you want this for??

looks like random passwords......
robsonde (120)
755974 2009-03-13 06:12:00 But a random string by definition depends on the seed for the output. If the seed itself is not random as in generate output by typing in the seed as in the example given.

It is, of course, highly unlikely that I could guess the outcome but if you were to type in the same letters each time then where comes the random event to change the output?
Sweep (90)
755975 2009-03-13 07:29:00 But a random string by definition depends on the seed for the output. If the seed itself is not random as in generate output by typing in the seed as in the example given.

It is, of course, highly unlikely that I could guess the outcome but if you were to type in the same letters each time then where comes the random event to change the output?Sweep, the example string wasn't a seed - it was a format key specifying which characters should be a random letter and which should be a random number.

The javscript prng is automatically seeded, I'm not sure where from (probably implementation-specific). The C program I wrote above uses the unix epoch (number of seconds since 12:00am, January 1st 1970) as the prng seed - you could make this more precise, or add an additional source of entropy, if you wanted to make the output more random.

I'd initially planned to seed from /dev/urandom, but I wasn't sure what kind of system Geekster was running and wanted to be sure it would work on his system.
Erayd (23)
755976 2009-03-13 07:50:00 Sweep, the example string wasn't a seed - it was a format key specifying which characters should be a random letter and which should be a random number.

The javscript prng is automatically seeded, I'm not sure where from (probably implementation-specific). The C program I wrote above uses the unix epoch (number of seconds since 12:00am, January 1st 1970) as the prng seed - you could make this more precise, or add an additional source of entropy, if you wanted to make the output more random.

I'd initially planned to seed from /dev/urandom, but I wasn't sure what kind of system Geekster was running and wanted to be sure it would work on his system.

Output more random? The output should be random or not in my opinion.
What is more random than random? Possibly hook up inputs into a forest and wait until a certain tree falls over.

It is not over to me to guess what the original poster want or needs.

The most elegant solution may be best.

But the OP asked a question. It is not for me to question your programming skills as you have done with another member.
Sweep (90)
755977 2009-03-13 09:55:00 ...It is not for me to question your programming skills as you have done with another member.Then I offer my sincere apologies to dyewitness - that was not my intention, and I'm sorry if that's the way it came across. I guess I just got caught up in 'pedantic coder' mode.

Regarding your comments about randomness, there's actually so such thing as a truly random number generator - hence 'pseudo-random'. As you say, a prng is only ever as random as its seed. Most generators work on the basis of selecting numbers in sequence from a *very* large set produced by an algorithm. The seed determines the order and / or starting position of the set. The more entropy is in the seed, the more unpredictable the output - that's what I meant by 'more random'.
Erayd (23)
755978 2009-03-15 05:34:00 Thanks everyone, this will compliment my random bang generator quite nicely.

I think I'll go for Erayd's version (looking at generating a lot of strings). I'm using windows, but I've got a few Linux VM's lying around.


what do you want this for??

looks like random passwords......

pfft, I've already got password generators. This is for usernames!
ubergeek85 (131)
755979 2009-03-15 07:02:00 ...I'm using windows, but I've got a few Linux VM's lying around.That code *should* compile in Windows - you probably won't need Linux - but note I haven't tested it under anything other than Linux.

If you do decide to run it under Linux, are you OK to compile that yourself or do you want me to compile a binary for you? If so, do you want one for x86 or x86_64?
Erayd (23)
1 2 3