General discussion about LÖVE, Lua, game development, puns, and unicorns.
VladC@T
Prole
Posts: 1 Joined: Sun Mar 04, 2012 2:22 pm
Post
by VladC@T » Fri Mar 29, 2013 7:54 pm
I can't use math.pi...
Error:
Error: Syntax error: Vector.kia:1: declaration for symbol 'math' expected near ';'
stack traceback:
[C]: in ?
[C]: in function 'require'
[string "boot.kia"]
37: in function <[string "boot.kia"]:233>
[C]: in function 'xpcall'
_ex_
Citizen
Posts: 65 Joined: Thu Dec 08, 2011 2:59 pm
Post
by _ex_ » Sun Mar 31, 2013 6:05 pm
sorry about the lack of documentation,
if you are using the last version (0.3) it must be:
Code: Select all
> print(Global.Math.PI)
3.1415926535898
_ex_
Citizen
Posts: 65 Joined: Thu Dec 08, 2011 2:59 pm
Post
by _ex_ » Sun Apr 21, 2013 7:42 pm
YellowAfterlife wrote:
Now that JavaScript-like naming conventions for global classes are used, maybe it should be "IO", "OS", and not "Io", "Os"? JavaScript name examples of treatening abbreviatures include "innerHTML", "baseURI", "CSSStyleDeclaration", "getAttributeNS", etc. Similarly, things should be probably camelCase'd and using uppercase for constants. Here's a rough list of renaming to be done:
Code: Select all
tostring > toString ; actually, maybe add it to "core" metatable, like in JS
tonumber > toNumber ; could be "parseFloat" with a separate new "parseInt"...
Math.huge > Math.HUGE
Math.pi > Math.PI
Math.randomseed > Math.randomSeed
rawlen > rawLen ; or rawLength
rawequal > rawEqual
rawget > rawGet
collectgarbage > collectGarbage
Package.loadlib > Package.loadLib ; or loadLibrary
Package.searchpath > Package.searchPath
Os.setlocale > OS.setLocale
Os.getenv > OS.getEnv
Os.diffTime > OS.diffTime
Os.tmpname > OS.tmpName
Debug.getupvalue > Debug.getUpValue
Debug.setuservalue > Debug.setUserValue
Debug.getmetatable > Debug.getMetaTable
Debug.setmetatable > Debug.setMetaTable
Debug.setlocal > Debug.setLocal
Debug.gethook > Debug.getHook
Debug.sethook > Debug.setHook
Debug.upvalueid > Debug.upValueId
Debug.upvaluejoin > Debug.upValueJoin
Debug.getinfo > Debug.getInfo
Debug.setupvalue > Debug.setUpValue
Debug.getuservalue > Debug.getUserValue
Debug.getregistry > Debug.getRegistry
Debug.getlocal > Debug.getLocal
Io.tmpfile > IO.tmpFile
getmetatable > getMetaTable
setmetatable > setMetaTable
dofile > doFile ; I'm not so sure about need in this one renaming.
loadfile > loadFile
Pattern for above list could be something like "(%S+) *> *(%S+) *;? *(.*)".
Uploaded a new version with most of the renaming done.
Some functions changed:
dofile > execute
tmpFile > temporalFile, etc.
More info here:
https://bitbucket.org/ex/love/commits/7 ... 8f1a4b7337
easy82
Party member
Posts: 184 Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary
Post
by easy82 » Wed Jun 11, 2014 12:50 pm
Hello!
I've just found this, it looks awesome. Where can I find more information about Killa? How to use it? Do you still develop it?
Cheers,
easy
_ex_
Citizen
Posts: 65 Joined: Thu Dec 08, 2011 2:59 pm
Post
by _ex_ » Wed Jun 11, 2014 12:57 pm
Hello, thanks!
the official repo is in github, however I'm not longer actively maintaining it,
I was working in updating Killa to 0.3 with the Lua 5.2 fixes but its unfinished and probably not going to happen any time soon.
Also the Love2D port is very old, I'm using cocos2d-x more now.
easy82
Party member
Posts: 184 Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary
Post
by easy82 » Wed Jun 11, 2014 1:44 pm
Allright, I understad it. It's a very nice project though, the syntax is beautiful.
Users browsing this forum: Bing [Bot] and 9 guests