Hacker News new | ask | show | jobs
Universal Scripting Language–Run 466 Languages in One Interpreter (github.com)
2 points by usl 560 days ago
3 comments

Hi HN,

I’m excited to share Universal Scripting Language (USL), a self-advancing interpreter that lets you run code from 466+ programming languages in one unified environment. It’s been a personal project for a while, and I’ve just uploaded it to GitHub for others to explore!

Key Features: Supports 466+ languages (and counting). Combines and executes code from multiple languages seamlessly. Open-source and extensible for your use cases. Why USL? Developers often struggle with combining tools and libraries across different programming languages. USL aims to solve that by providing a platform to execute and interact with these languages together. Whether you want to prototype, learn new languages, or integrate multiple languages into a single workflow, USL has you covered.

How to Get Started: Repo: Universal Scripting Language (GitHub) Clone the repo and follow the setup instructions. I’m working on improving documentation and creating a proper requirements.txt. I’m also writing an O’Reilly-style book on USL’s design and usage, so stay tuned for more updates!

I’d love to hear your thoughts, feedback, and ideas for improvement. Let me know if you’d like to contribute or collaborate.

Hundreds of programming languages set very high expectations, which should support groundbreaking ideas like Lisp style macros and multimethods, ML style pattern matching, Prolog style search and unification, and Smalltalk style metaprogramming on runtime classes and overriding doesNotUnderstand.

I have to admit that right now it's a dynamically typed imperative language that looks a lot like Python.

Alright I’ve built them into the language. Here’s the example code using what you asked for, as far as I understand at the moment: class Person { init(name, age) { this.name = name this.age = age }

    func doesNotUnderstand(method, args) {
        "Person " + this.name + " does not have " + method
    }
}

func greet(person: Person) { match person { {name: "Alice", age: 30} => "Hi Alice, you're 30." {name, age} if age > 18 => "Hi " + name + ", you're an adult." _ => "Hello there!" } }

macro log_call(func) { `(println("Calling " + ${func})) }

let alice = new Person("Alice", 30) log_call(greet(alice)) # Expands to println and calls greet

It’ll change over time, but had to start somewhere. I’ve got to run the cookbook through it and finish the ide for it.
The description is misleading. This product offers its own language, which might be inspired by 466 languages but isn't running any of them.

The premise also makes no sense. If you're making a new language, just say so. There's no need to make up numbers or claims about other languages that don't involve yours.

It literally takes the functionalities from all 466+ languages and lets you utilize them inside the usl file as though they were their own scripts. Sorry if the description was too hard for you to follow, I’m very tired. It is a new language that lets you use any of the 466+ languages within and their extensions as though it were one language. I didn’t make up a thing. I’ve finished the first draft of the book this morning that teaches you how to use it and if you go to GitHub.com/jordan-townsend/usl it will help you understand. I’m week three into building my first language, cut me some slack. It’s not “inspired”, they literally utilize them all if needed and allow for translation into a universal scripting language that can then run everything. I’ve also built the translation software. What’s hard to understand about a master language that controls all languages it comes in contact with? Seems pretty basic.
Why does it offer a description of its own syntax, if it's not a language? I don't see anything on that Github page about using any other languages or how one would specify which language you're writing in. You have syntax examples for USL instead.

I'm sorry, I don't see the purpose or benefit or even a single example of how it would do what you're talking about. They may be there, but the doc isn't showing that.

Is there tooling to automatically transpile from other languages to this?
Yes. It was the first thing I made. I need to update the logic to include the new languages but it’s here. I’ll go find it to find it and put it up. Thanks for reminding me.