Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
So, I wrote a JS->Lua converter. Instead of being based on regex or some other dumb idea, it's based on acorn, an awesome and superfast JavaScript Annotated Source Tree (AST) generator. Pinecone takes that and turns it into mostly-valid Lua.
It was written by running $ acorn try.js > try.json
and looking at the JSON over and over, so don't expect very good standard conformity.
var a = 1
var a = 1, b = 2
a = 2
function a() { return 1 }
var a = function () { return 1 }
typeof thing
(turned into type(thing)
)repeat
loops)Don't.
var k = 'blue', b, f = 12;
var p = 4;
if (typeof k == 'string') {
print('String!');
}
function bacon() {
return 'bacon';
}
var f = function () {
};
turns into
--# Converted using pinecone v0.1.0
local k, b, f = "blue", nil, 12
local p = 4
if type(k) == "string" then
print("String!")
end
function bacon()
return "bacon"
end
local f = function() end
Not to be rude, but good luck. The codebase is in sore shape.
I tried to comment as much as possible, but it's not that great, and badly organized.
But if you do decide to contribute, make sure you code passes a jshint lint.
Outputted Lua code made from JS code that passes jshint (that pinecone fully supports) should pass luac.
MIT licensed. Refer to LICENSE
.
FAQs
JavaScript->Lua converter
We found that pinecone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.