It's nothing special, but it's special to me :)
from KindaABigDyl@programming.dev to programming_languages@programming.dev on 27 Jul 2024 20:54
https://programming.dev/post/17411636

#programming_languages

threaded - newest

KindaABigDyl@programming.dev on 27 Jul 2024 21:03 next collapse

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.

RiikkaTheIcePrincess@pawb.social on 27 Jul 2024 21:11 next collapse

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? 😅

MrWafflesNBacon@lemmy.world on 27 Jul 2024 21:37 collapse

Congrats! 🎉