• KindaABigDyl@programming.devOP
    link
    fedilink
    arrow-up
    19
    ·
    edit-2
    4 months ago

    In case you’re interested, the language is a derivative of an esolang I made called NaBD. The idea was a Turing tarpit but for functional languages. What’s the minimal I could get by with and still feel like a real language? (And no, not just lambda calculus; needed a real implementation)

    I realized this sort of stripped-down functional language would make a great basis for a graphical programming language, something I’ve wanted to make for a while, so I set out to refine and remake it into just that.

    That’s why the syntax is a little bizarre, bc it mimics the flow of graphical blocks. It also is very simple. Every function has one input and one output with no first class funcs/currying. It’s also statically typed.

    Here’s a truth-machine (doesn’t work yet bc I haven’t implemented some of the standard functions; it does parse and type check tho at least):

    truth_mach :: Num -> Num =
        { inp -> bool,
            1 -> str -> print -> truth_mach,
            0 -> str -> print } -> if.
    main :: <<Char>> -> Num = read -> parse -> truth_mach.
    

    It will also support the C ABI via extern_c name_of_lib : name_of_function :: Type -> Type. This is not implemented yet either.

  • KeriKitty (They(/It))@pawb.social
    link
    fedilink
    English
    arrow-up
    12
    ·
    4 months ago

    Yaaay! 🥳

    It’s always really cool when something starts coming together and feeling like it’s working :3 Maybe some day I’ll get around to actually finishing one 😓 Does an assembly language count? 😅