ChanceLua - Random ____ generator in pure Lua!

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Chef_Panic
Prole
Posts: 5
Joined: Sun Jan 05, 2014 9:05 pm

ChanceLua - Random ____ generator in pure Lua!

Post 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:
User avatar
bakpakin
Party member
Posts: 114
Joined: Sun Mar 15, 2015 9:29 am
Location: Boston

Re: ChanceLua - Random ____ generator in pure Lua!

Post 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.
((_((_CRAYOLA_((_((_> GitHub <_((_((_CRAYOLA_((_(()
User avatar
Chef_Panic
Prole
Posts: 5
Joined: Sun Jan 05, 2014 9:05 pm

Re: ChanceLua - Random ____ generator in pure Lua!

Post 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.
ihave~=come2compete
Prole
Posts: 3
Joined: Sun Jun 30, 2024 7:43 pm

Re: ChanceLua - Random ____ generator in pure Lua!

Post 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
User avatar
dusoft
Party member
Posts: 604
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: ChanceLua - Random ____ generator in pure Lua!

Post by dusoft »

Yeah, spammer, bumping old threads with some windows-only stuff is really useful.
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: ChanceLua - Random ____ generator in pure Lua!

Post 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".
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
pgimeno
Party member
Posts: 3637
Joined: Sun Oct 18, 2015 2:58 pm

Re: ChanceLua - Random ____ generator in pure Lua!

Post 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.
User avatar
marclurr
Party member
Posts: 137
Joined: Fri Apr 22, 2022 9:25 am

Re: ChanceLua - Random ____ generator in pure Lua!

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests