Page 1 of 1

ChanceLua - Random ____ generator in pure Lua!

Posted: Thu Aug 06, 2015 12:56 pm
by Chef_Panic
Howdy! I want to share with everyone ChanceLua:

https://github.com/edwinhollen/ChanceLua

This is my random (almost) everything generator written in pure Lua. It does simple things, like generate random numbers, pick an item from a list, get a random boolean given likelihood; but it also does more complex things, such as generating names (first and last, male and female), words, street addresses, phone numbers, IP addresses (IPv4 and IPv6), hashes, and more!

Ideally, I want ChanceLua to replicate the functionality of ChanceJS (http://chancejs.com/). I started this project as part of a game I'm prototyping with LÖVE which requires random (semi-realistic) elements. I couldn't seem to find what I was looking for, so I made my own!

Thanks for taking a look! :nyu:

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Sun Aug 09, 2015 5:18 pm
by bakpakin
Looks pretty cool, definitely useful! You still have long way to go, however, if you want all of ChanceJS's functionality :3 . Also, if you want people to use your code, you should include a license in the repository (preferably MIT, ZLIB, or BSD!). Without a license, people will be less inclined to use your code.

That said, looks pretty good so far.

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Sun Aug 09, 2015 7:15 pm
by Chef_Panic
bakpakin wrote:Without a license, people will be less inclined to use your code.
Thanks for the advice, I've added a license.

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Sun Jun 30, 2024 7:52 pm
by ihave~=come2compete
Try this link:

https://github.com/IhavenotComeToCompet ... Love2D-LUA

The way random number is generated, with visual representation, made with Love

Gif:

https://github.com/IhavenotComeToCompet ... 000001.gif

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Mon Jul 01, 2024 1:22 pm
by dusoft
Yeah, spammer, bumping old threads with some windows-only stuff is really useful.

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Mon Jul 01, 2024 1:39 pm
by zorg
dusoft wrote: Mon Jul 01, 2024 1:22 pm Yeah, spammer, bumping old threads with some windows-only stuff is really useful.
It's moreso them not knowing that they could just share their lua file instead of their entire project... the AI generated readme's also not helping, regardless whether it's due to a language barrier or not... but yes, bumping old threads you searched for with the "random generator" keyword is also a big "why".

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Mon Jul 01, 2024 5:26 pm
by pgimeno
I laughed at the part in the README that says "The Lua code you've provided..."

But hey, it's a great example of how NOT to present your project.

Re: ChanceLua - Random ____ generator in pure Lua!

Posted: Mon Jul 01, 2024 7:59 pm
by marclurr
It's one the of gnarliest codebases I've come across. I've heard of "security through obscurity" but not "randomness though obscurity" :D