hoansdz
hoansdz on Hacker News
This really annoys me too, though people often justify it as a measure to prevent fraud in Southeast Asia. I feel like simply clicking a few times in quick succession and waiting a minute should be enough, but it seems they are actively trying to block that.
I have some projects but I don't have much money, so I always use gemini flash for UI tasks and some features.
But I realized Gemini Flash is very fast and cheap but it's sometimes very stupid.
It hallucinates members or functions that don't exist and uses "as any" to make everything look OK.
Lightweight models are very cheap nowadays I need to use them for my products, so I thought what would happen if I created a language (but I think it's like a library).
It's my favorite thing to learn about compilers. But I also hope it's useful.
Its name is Autolang.
I wanted it as a library for runtime sandboxing, designed for lightweight models.
Developers would bind functions easily (JS Function, ...) and it has some features to protect runtime that can reduce development time (including bindings, limits, ...)
Developers should bind some features like Database.getProducts instead of Database.query
Supported npm
Some features:
- Static typing
- Stack traces and static typing help AI understand what went wrong and fix its code, especially for cheaper models that may make mistakes more often.
- A statically typed syntax inspired by languages like Kotlin and TS, but I think it should use Products.getProducts(). Many features should be used by developers to bind.
- Opcode limit
- Managed vm RAM (it will manage RAM used by VM)
The current Autolang instance uses about 0.5 MB with the full standard library enabled. A 1,800-line test peaked at around 3.8 MB on Windows 11.
I asked AI about it, and it sometimes asks:
- Why not tool calling ?
+ You should use Autolang when you want to avoid round-trip API calls. For example classify hundreds or thousands of customers where each round-trip adds up in cost and latency, ...
- It doesn't have any library like npm or pip, ...
+ This language is like a library, so I want developers to bind some functions that AI can use instead of everything.
- How is it different from isolated-vm, JS, Python
+ I think I'm building a language that is friendly to AI, with better stack traces and error messages, so lightweight models can understand what went wrong and fix their code more easily.
- Can it replace Docker, KVM, ...
+ No, I want it for sandbox that AI can use bound functions.
- Is prompt tokens large ?
+ I don't think so. I wanted AI to write scripts which don't include new libraries. So I think it should use some features like ?., ??, !., as, is, fun, closures and some standard libraries
- Use case:
+ I think I target internal SME products for analyzing some features, like having getUsers and letting AI classify users as VIP, normal, ... to solve problems quickly and reduce development time
Examples:
compiler.registerBuiltInLibrary(
"company/database", `
class Product(
remaining: Bool
price: Int
)
/* Or
// Mark JS reference in place of cast to autolang object
@js_object
class Product {
@native("get_price")
fun getPrice(): Int
@native("is_remaining")
fun isRemaining(): Bool
}
If you are using some complexity data you should use it
*/
@js_object
class Products {
@native("get_products")
fun getProducts(): Array<Product> // Autolang VM saves the type and will auto cast
}
`,
{ autoImport: true },
{
get_products() {
...
}
...
}
);
TS function
await compiler.compileAndRun("main.atl", `
var expenseCount = 0
var normalCount = 0
var cheapCount = 0
Products.getProducts()
.filter {|product| product.remaining}
.forEach {|product|
when (product.price) {
>3 -> expenseCount += 1
==3 -> normalCount += 1
else -> cheapCount += 1
}
}
println(...)
`);
console.log(compiler.getOutput());
If you were facing the problem of using cheap/lightweight models to generate code for internal SME products, would you actually use something like this?
Leaving aside the technical issues, in my opinion, this is suitable for large companies with large queries. If the goal is simplification, instead of calling your API, large companies will create a similar version themselves, reducing API costs and eliminating the need to contact you. Request from the company -> your server -> your server reads and processes -> returns the result. Therefore, they would rather do it themselves for peace of mind.
This language is used for isolation at the language level and trusts the code written by the library developer. If absolutely necessary, I think environment isolation should still be used. What do you think of this approach ?
Posted by
hoansdz on Saturday May 30, 2026 @10:09AM
from the show-hn dept.
Many people on various platforms say that AI is about to replace developers, but I find that most people selling courses or APIs say the same thing. I think the layoffs are due to the economic downturn; they talk about AI to sound cool.
Posted by
hoansdz on Monday May 25, 2026 @08:31AM
from the show-hn dept.
Will you be supporting React or NextJS or similar things later on
I once heard someone create a QR code scanner to retrieve gigabytes of data, but the biggest problem is that cameras aren't powerful enough to handle it all. Essentially, the QR code needs to be downloaded to the device for loading; relying on the camera to retrieve it is very difficult. Am I wrong about this project? What's your solution?
I think one feature that would make dari-docs significantly more practical for real-world pipelines is a robust, built-in bidirectional converter between Markdown and HTML
What happens if the model continuously hallucinates or provides wrong answers until the user give up ? Will the AI trust those wrong answers and save it ?
It's inevitable, in my opinion; the current trend is to use tools with modern, cross-platform syntax for easier development. Java and XML are becoming outdated and frustrating, at least for me.
You can only view the operating system, you can't view those websites again, haha.
The cost of tokens used by AI in many fields is even greater than the cost of human services; people are experiencing FOMO, but once the wave passes, the market will stabilize.
When a timeout expires, how do you ensure the underlying future is safely dropped without leaking resources or causing a crash
Posted by
hoansdz on Sunday March 01, 2026 @08:11AM
from the show-hn dept.
https://autolang.vercel.app/docs/introduction
Hi HN, I’m a student and I’ve spent the last few months building Autolang—an embedded language and VM from scratch in C++.I built it because I needed a specialized runtime for high-frequency, short-lived tasks (like AI agent loops) where Python/Lua startup latency and GC overhead become actual bottlenecks.Core Architecture:Arena-restart: No Tracing GC. It prioritizes allocation speed (~2x...