Killa: a new scripting language for Love 0.8.0

General discussion about LÖVE, Lua, game development, puns, and unicorns.
VladC@T
Prole
Posts: 1
Joined: Sun Mar 04, 2012 2:22 pm

Re: Killa: a new scripting language for Love 0.8.0

Post by VladC@T »

I can't use math.pi...

Code: Select all

var pi = 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"]:337: in function <[string "boot.kia"]:233>
[C]: in function 'xpcall'
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Killa: a new scripting language for Love 0.8.0

Post by _ex_ »

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
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Killa: a new scripting language for Love 0.8.0

Post by _ex_ »

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
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Killa: a new scripting language for Love 0.8.0

Post by easy82 »

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
User avatar
_ex_
Citizen
Posts: 65
Joined: Thu Dec 08, 2011 2:59 pm

Re: Killa: a new scripting language for Love 0.8.0

Post by _ex_ »

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.
User avatar
easy82
Party member
Posts: 184
Joined: Thu Apr 18, 2013 10:46 pm
Location: Hungary

Re: Killa: a new scripting language for Love 0.8.0

Post by easy82 »

Allright, I understad it. It's a very nice project though, the syntax is beautiful.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 65 guests