10 comments

  • lioeters 12 days ago
    > The goal of wax is to be a "common subset" of most major imperative programming languages. By lacking the unique fancy features in each of these languages and being as boring as possible, wax transpiles to all of them seamlessly

    I love the concept. I was recently studying a very small language called "subscript", with a similar idea they called "common syntax".

    > Subscript supports common syntax (shared by JavaScript,C, C++, Java, C#, PHP, Swift, Objective-C, Kotlin, Perl etc.)

    https://github.com/dy/subscript

    ---

    Lingdong Huang, the author of Wax language, is a genuine artist of software. His projects are a feast.

    https://lingdong.works/

    https://github.com/LingDong-

    A programming language in Classical Chinese. First person shooter controlled by facial expressions. Procedurally generated flowers, fish drawings, imaginary creatures, landscape paintings, calligraphy. In my mind, he's up there in the Olympian heights with Fabrice Bellard, Justine Tunney, etc., in terms of technical mastery and innovative thinking.

    ---

    Here's a screenshot from a project called Image Sequencer, to programmatically sequence crowd-sourced images into gifs.

    https://lingdong.works/media/imgseq.png

    Or this project called chinese-radical-vis, visualizations & animations of Chinese ideograms and radicals.

    > Each Chinese character is described as a combination of components. These components can be other characters or radicals, as well as building blocks, which defines the simplest shapes that make up every component. Combination can be applied recursively to describe ever more complex glyphs.

    https://chinese-radical-vis.glitch.me/

    I love this kind of interdisciplinary synthesis, with a visual and conceptual beauty.

  • garyrob 12 days ago
    Here's a link to the language itself. Hasn't been updated in a couple years, unfortunately. Maybe getting some attention here could help. The README says: "wax is currently experimental, so there might be bugs as well as aspects to be improved, in which case PR and Issues are very much appreciated."

    https://github.com/LingDong-/wax

  • chirsz 12 days ago
    This remineds me of Haxe[1]. I like Wax better because of the Common-Lisp-like syntax.

    [1]: https://haxe.org

    • zem 12 days ago
      seems like the opposite philosophy to haxe - insofar as you want to draw a line between "compiling" and "transpiling", haxe falls firmly on the compilation side, whereas wax is focused on more of a direct source translation approach
    • giancarlostoro 12 days ago
      Yeah I thought of Haxe immediately. I've never used Haxe for anything serious, I know some people were using it to port Flash games, but I'm not sure if its used for more than just that.
  • Etherlord87 12 days ago
    Ouch! I checked the transpilation to Python, and at the very beginning I see:

        # === WAX Standard Library BEGIN ===
        def w_arr_remove(a,i,n):del a[i:i+n]
        def w_slice(a,i,n):return a[i:i+n]
        def w_map_get(m,k,d):
            try:return m[k]
            except:return d
        def w_map_remove(m,k):
            try:del m[k]
            except:pass
        # === WAX Standard Library END   ===
    
    catching all errors is bad because you can catch keyboard interrupts or similar messages telling the program to end. It seems in this case it should be `except KeyError`, or better yet, for `w_map_get` it could be `return m.get(k, d)`.
  • idle_zealot 12 days ago
    This isn't directly related to Wax as a language, but I quite like the formatting used for S expressions on this page. It's much more pleasant than the typical train-of-closed-paren I normally see lisps formatted with, at least to my C-formatting-accustomed eyes.
  • RicoElectrico 12 days ago
    How does it compare to e.g. fusion-lang? Does anyone actually use any of the "universal languages" in production?
  • karmakaze 12 days ago
    This sounds perfect for LLMs. Then all the imperative languages have a shared Rosetta stone entry for everything.
  • bbkane 12 days ago
    How does this compare to using wasm to communicate between languages?
  • barfard 12 days ago
    [dead]