generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: For math nerds or people who click on this

Previous Thread :: Next Thread 
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 09:25 AM
I need feedback on this: https://www.roblox.com/Extra-Math-v1-17-item?id=358525642

I've been working on it for a while now, and I need somebody from the outside world to tell me how I'm doing. (basically a "check out my mikstaip mang" request)

It has a bunch of statistical functions, number sequence stuff, totient functions, geometric functions, prime-number functions, root functions, and then some. I'm also gonna be (maybe) adding complex numbers sooner or later.
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 09:29 AM
Basically a bunch of math functions for people who hate math, made by a dude who loves math more than people.
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
30 Apr 2016 09:38 AM
Looking at your code, I notice your organization and light use of OOP terms. You're clearly versed in other coding, or have experience in programming concepts for years.

It's not worth judging your functions, as they're quite firm in accuracy. However, I did notice one thing. Your deepCopy() function clones a table, and apparently its metatable. You say it "copies over," but it, in fact, references the original metatable.

/source/5.1/lapi.c.html#lua_getmetatable

^^ Lua's website

Shows that only a pointer is passed.
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 09:44 AM
@nox7
Thanks for the feedback!

I'll probably deep-copy the metatable as well, then set it. I'm not gonna do it right now, though. Replaced all of the old for-loops to have 'for i in pairs()' rather than 'for i = 1, #data'
Report Abuse
bandithunter123 is not online. bandithunter123
Joined: 27 Oct 2012
Total Posts: 242
30 Apr 2016 10:01 AM
its amazing, im a veryy new person to programming and it looks like the work of god in my eyes, too bad I dont understand anything....
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 10:09 AM
Heh, apologies for the lack of documentation. I'll try and add more sooner or later
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 10:11 AM
@nox

I see what you're talking about now. I should clarify the comments on the 'deepCopy()' function. I set the metatable as a pointer so I can check later (if the need were to arise, such as in the 'matrices') if they are equal.
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
30 Apr 2016 11:37 AM
Oh, okay then! That makes more sense than the comment describes. I can see why you did it that way then.
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 11:39 AM
Was going to do large ordinals, but non-commutative addition and multiplication are hard. I have the addition part done, just... I don't fully understand multiplication for the large ordinals and there is like 0 documentation for it out there. rip aleph-null 2k16
Report Abuse
nox7 is not online. nox7
Joined: 29 Aug 2008
Total Posts: 27467
30 Apr 2016 11:43 AM
I like your library; and to expand on your growing database of mathematical libraries, you could begin a mathematical knowledge engine. That would be quite the spectacle. Lua-based, of course. You could release it for ROBLOX and standalone on the web as well.
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 11:55 AM
@nox
That would be quite interesting. It'd be like... Wolfram for Lua. Hm.
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
30 Apr 2016 11:57 AM
There seems to be some code duplication in primes and euler scripts. You define some private functions (gcd, getFactors, lcm, etc.) that are used in Euler, but are later defined in Primes as public functions. You might want to consider refactoring so that the Euler script uses the public functions in prime. Other than that it looks really nice.
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 12:00 PM
@pwnedu46
Each modulescriptlet is meant to be standalone. I guess I could add what you had said, but personally, I'd prefer to keep them separate entities. I do appreciate the feedback, though.

But, then again, this is why I made it open-sourced. Go crazy!
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
30 Apr 2016 07:51 PM
I pretty much have complex numbers done. Will finish and release tomorrow or late tonight, most likely.
Report Abuse
DoryphoricScripters is not online. DoryphoricScripters
Joined: 14 Oct 2015
Total Posts: 39
01 May 2016 12:56 PM
I updated the math script to include complex numbers. I dunno what I'm going to do next. Maybe large ordinals, but... EH.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image