I've had an obsession with random generators since, well, I first got my hands on a computer. (my first home computer was a Sinclair ZX-81, and the first program I wrote for it was a dice roller) I wrote a Traveller sector generator in FORTRAN, back when I worked for Accu-Weather ... it even put out nifty subsector maps on our electrostatic plotter (it's what you had before laser printers ... sort of a cross between a copier, a fax machine, and an accident in a chemical factory). I wrote all sorts of things in all sorts of languages in the years after, most notably my first table-driven program, a name generator creatively called NameGen, in BASIC, and the earliest version of TableMaster in Turbo Pascal. (one of the reasons I completely black-boxed TableMaster this time around, instead of just updating my old code, is that so much of said old code looked like someone trying to teach themself Turbo Pascal ... for good reason). The new TableMaster is Delphi, which is basically Pascal with a fancy front end and an overly high opinion of itself.
Also an overly high price tag. Delphi ain't cheap; I had to run a Kickstarter to be able to afford the version that would let me do cross-platform development (i.e., Mac). It's incredibly powerful, very easy to use (except when it isn't) ... and cost more than my car. (okay, I drive a cheap beater, but still) Even the "starter edition" of Delphi is a couple of hundred bucks. So, given that you're looking for something free, Delphi is definitely out.
There is, however, at least one free object Pascal implementation out there. I haven't looked into it much, because I've been a Delphi developer since the very first version. (when I sent in a picture of my old disc to prove my eligibility for the upgrade pricing, my sales rep almost fainted; she'd never seen the mythical Delphi 2, and I'd only used that because I couldn't find my Delphi 1 disc, 20 years and four moves later) It's something you might want to consider. I wish I could tell you more about it.
I wrote the first TableMaster in Turbo Pascal because it was what I had. However, I could have picked a lot of worse languages. It's also what a friend of mine -- a programmer at a defense contractor, by profession -- used to write a program he called "GemGen", which used the old AD&D gem tables to roll up hoards of gems. That sounds kind of limited, and it is, but he did that in 1989, when it was a much bigger deal. (when he and some of his friends were beta-testing the early TableMaster, I wrote him a table that duplicated what he'd done in GemGen) He had a fair number of choices available -- he had BASIC, Pascal, and C on that machine that I know of -- and his choice was Pascal. So check out that free version; you might like it, and Pascal is dead easy to learn.
If I was going to pick something both common and free, it would be Perl. I have a love-hate relationship with Perl. I don't actually
know Perl; I just code in it anyway. I've been told I write FORTRAN programs in Perl. (of course, I've also been accused of writing FORTRAN programs in assembler, so this may just be a quirk) You can make Perl do pretty much anything you want to if you beat on it hard enough, there is excellent documentation (both free online and dead tree forms ... I'm old enough so I like the dead trees) available, and it's very good at smacking the data around until it confesses. There are several versions available for the PC (I have one attached to my favorite text editor, EditPlus, for handy local development) and just about everything and anything else programmable. It's a *nix native, so it's gotten into everything. I very much like Perl, except when I'm swearing at it.
PHP is another option, server willing. It has the advantage of being quite good at talking to databases. Depending on how you want to set things up, this might be quite useful.
Here's an example of a random generator I wrote in PHP some years back:
http://www.herofiles.org/utilities/namegen/names.php
The code is pretty simple and straightforward, though probably a bit too long to post here without breaking something in the forum. Drop me a message if you want me to zip it up and send it to you.
I'm just not a fan of JavaScript. It seems to me to be needlessly complicated in all the wrong ways, and not powerful enough where it needs to be. Maybe it's me, dunno. I know it's grown a lot since it and I first met, back in the late 90s, and I have occasionally done moderately complicated things with it, but I've never written a random generation program in it -- and I'm the developer of TableMaster, I'm
that much of a table geek; I've written random generation programs in, let me think, FORTRAN, BASIC, Pascal, Delphi, Perl, PHP, and C++ (and of course TBL, TableMaster's own table building language). Oh, and Algol, let's not even go there. Just never JavaScript. So while I don't have a good, solid, sound reason for it, I'd still vote against it.
So, as a person who
wrote a programming language (which, however, isn't free), my first choice for a free language you could write random generators in would be Perl, my second PHP, and my third that free Pascal.