(deleted topic)

I deleted the post because of how underdeveloped and bad it was, I might open this back up soon.

10 Likes

Dude, this is insane. I really think that this is awesome, and that this can have potential.

1 Like

Great, I can’t wait to learn this? Is there a guide?

Are there any other syntax changes to the language other than if-expressions?

This is amazing and all, but if I were to write regular lua on this, would it work? If I ever get stuck developing and come to the devforum I wouldn’t want to have to rewrite everything in lua for the devforum.

Yup, but the guide includes lua docs also as it was built on top of lua. Use chapter 10-12 here

Yes, thats why the module exists so it’s primary features can also be connected to lua(u)/Lua

Not much. The module just adds the major features to make lua more like my language.

This is really cool! Does your language compile or interpret?

Well, this is interesting. Before we can begin, one quick correction: you made a library, not a programming language.

The code example

First of all, the code example. Time to tear it apart!

local switch, case, default, getFunctions = voxel.Switch -- Install switches from voxel library.

No, I don’t think that’s how Lua is supposed to work. voxel.Switch is one value, not four (and that’s why getFunctions EXISTS). Moving on…

if (2 >= 1) and not lock:IsLocked() then

No! According to your library’s code, lock is supposed to be a function! This doesn’t make any sense!

  lock:Timeout(5)

At least you’re consistently incorrect, I’ll give you that.

local myUnknownPet = if math.random(1, 2) == 1 then "dog" else "cat" -- Voxel allows you to use if statements in one line

Uh, no. This is actually a Luau feature no one seems to remember. Now, to the most significant part of the code example.

   case 1 (function(stop)

…aaaaaaaand syntax error! You seem to have misunderstood the LuaSwitch example you copied and pasted with slight modifications. That example…

   case "dog" (function(stop)
       warn("My pet is a dog!")
       stop() -- skip default and stop to check the other cases, but doesn't stop the execution of the function
   end),

…used a neat special case in Lua syntax, allowing you to omit parentheses on function calls with a single literal string or table argument. However, THIS DOES NOT APPLY TO NUMBERS. Have you tried actually running your code example before posting?

Oh no, I mentioned that topic. LuaSwitch. Let’s dig deeper.

  • Your code example defines a variable myUnknownPet without ever using it. This was copied from the LuaSwitch example.
  • The entire switch block is just the LuaSwitch example with…
    • random instead of myUnknownPet,
    • 1 instead of "dog" (a syntax error),
    • 2 instead of "cat" (also a syntax error), and
    • different messages printed for each case.
The library

We proceed to the real fun, the library itself.


function wrap(f, ...)

Literally just Util.wrap from LuaSwitch.


function wait(seconds)
    local start = os.time()
    repeat until os.time() > start + seconds
end

Busy waiting. Not exactly ideal for Roblox, but the only option for portable vanilla Lua. Fair enough, add one (1) point to your score.


local function run(case, cases)
local function return_it(sentence_type, condition, case)
local function switch(value)
local function default(case)
local function case(condition)
local function getFunctions()

Pretty much identical to the LuaSwitch implementation.


But wait, there’s more! There’s a mutex module! …which you don’t even know how to use correctly. Additionally, it looks like you forgot to copy a comment referencing the author of said mutex module. Is there some unwritten rule allowing anyone to relicense anything and claim it as their own as long as it was posted on DevForum?
To be fair, the license of that mutex module isn’t particularly clear.

BUT

Licensing

Well, you obviously didn’t include a copy of the license or the copyright notice. I am not a lawyer, but not even mentioning the original author of code you basically copied and pasted into your library seems a bit sketchy. Maybe at the very least include a link to the DevForum topic, the GitHub repository, or both. Then again, this is Roblox, so my expectations for copyright may be a bit too high.

Digging even deeper

The rest of your repository may be even more interesting than the library itself.

  • The entire src directory is basically just the Lua 5.4.4 source code. At least the copyright notice is still there.
  • socket-library is basically just LuaSec with all source files moved out of the src subdirectory. Documentation seems to have disappeared entirely, but at least you mentioned it in your README!
  • All the .github nonsense you don’t even need!
    • FUNDING.yml?? Are you sure you need funding for something you assembled from various sources without any attribution?
    • All checks have failed, 1 failing check. You probably don’t need Actions for something as simple as a Lua library. To be completely fair here, seeing “69 workflow runs” is pretty nice.
  • The documentation is basically just the Lua manual, but s/Lua/Voxel/g.
The conclusion

The pinned topic of #resources:community-resources says:

Only post significant resources that you created yourself, or resources that you found off-Roblox that are useful to the Roblox developer community. Do not post other users’ Roblox creations and resources in this category. You may only post resources you have not created if they do not come from Roblox.

This is basically just a repost of a combination of other users’ Roblox creations and resources.

Having spent well over 90 minutes researching for and writing this reply, I hope this covers everything important.

14 Likes

Looking at this post, I now understand that it’s good practice to put a license on any work you’ve released to the public.

Licenses are designed to stop this, well try and stop this, following this I’ve actually added the apache license to all of the module repositories I have developed.

Ontop of this, I would like to add; @bitsplicer, don’t look at the above post in a negative light, look at it form a constructive critism view, what you did was technically sketchy in terms of law & will really make you look silly by claiming it as your own work.

Aside from this, learn from these modules & work to help create something that could be more than this. :smile:

4 Likes

I understand why you claim this, but I said it is a modified version of Lua with extra features. I am adding more to make it more individual and are barely done. Sorry for the inconvenience.


I might close this project because it is very underdeveloped and just a bunch of code merged.


I just flagged it.