
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
english-script
Advanced tools
english-script
Embed natural language in your code.
Allow me to completely take out of context this great Djikstra essay:
It may be illuminating to try to imagine what would have happened if, right from the start our native tongue would have been the only vehicle for the input into and the output from our information processing equipment...
-- Edsger W.Dijkstra
npm i english-script
const f = await makeFunction({
apiKey: "your openai key here",
iterations: 4, // How many "turns" are given for the AI to get the function right.
description: "determine if prime",
testCases: [
[1, false], // By definition
[2, true],
[4, false],
],
});
[53, 44].map(f); // Gives back [true, false]
We can now generate code with fairly good quality, depending on the task, using LLMs.
The common developer goes through this cycle:
Committing code generated by a machine doesn't feel right because it's kind of like committing a compiled binary.
If I compile some code and save the binaries, I now have in my repo two things which are coupled together, and it's unclear if the versions match, how they match, which derives from which, and therefore it becomes unclear which I need to iterate on in order to improve.
This is why it's a common practice to commit only the "topmost" work, i.e. the one others derive from. This has always been high level code, until now. We've now reached the point where at least in some cases the topmost form is a prompt in natural language description, and so we should commit that form instead.
Furthermore most of what LLMs generating code are really good at is code that already exists in some form in the web, in the form of libraries or code examples in stackoverflow. So it's unlikely that adding generated code into our repo will contribute any concrete innovation, rather than provide more duplication.
How do we commit natural language alongside code and iterate on it, so that we can avoid duplication, benefit from the LLMs incredible abilities and have a workflow that makes sense?
english-script
is a js library that allows you to embed natural language descriptions of pure functions inside your code seamlessly. It calls an LLM API in the background to get code and replace it on the fly.
FAQs
Embed natural language in your code
The npm package english-script receives a total of 0 weekly downloads. As such, english-script popularity was classified as not popular.
We found that english-script 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.