hoansdz

Joined 8 months ago

Karma
1
Submissions
23
Member since
Mar 1
I'm a system developer
View on Hacker News

Recent submissions

Comment · 3 months ago
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.
Comment · 3 months ago
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?
Comment · 5 months ago
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.
Comment · 5 months ago
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 ?
Comment · 5 months ago
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.
Comment · 5 months ago
Will you be supporting React or NextJS or similar things later on
Comment · 5 months ago
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?
Comment · 5 months ago
is this a troll ?

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton