Every single time I check out one of those upcoming shiny new programming languages that claim to be *simple*:
I just checked out NIM and it says "Simple Example" right there, and it does stuff that C can do but in way more steps.
A 2024 programming language that's more convoluted than C from 1975 calling itself "simple"
Then there's Crystal, that insists on NOT using parenthesis, yet adapted the dumbest operator from C++, the double colon ::
EDIT: Seems like the :: was not taken from C++ and this thing jsut tries to be PHP
I was trying to look for Squirrel replacement for my scripting system and came across Wren too. That tagline at the beginning gives me chills and I don't understand anythign else that's going on there.
@sos yeah I find zig baffling. manual resource management in a time when we have solved resource management with automatic reference counting is, well, certainly a decision in 2024. it is something i find offputting about hare too
@ariadne @sos We haven't solved resource management in many scenarios, though: Gaming (especially on systems that have no virtual memory manager), embedded systems, [really] high performance systems.
I do agree it's a "done" thing for many scenarios, but a language like Zig aims for the other scenarios IMHO.
@sos they took that from Perl/Ruby actually, not C++
@ariadne Ahh, my bad!
@sos if you're looking at C-likes have you checked out odin? i've been meaning to look into it properly after using C for a bit and wanting smth that can deal with strings and arrays better lol
@jazz Just lookingfor languages to make fun of! :P
@sos @jazz Don't skip out on Pony! https://www.ponylang.io/
@sos one of my current goals with my new engine (well, "new" as in being updated from the same basic codebase I've used since like 2001) is to allow M68k and Z80 asm to be used as scripting languages.
@sos Like, I'm assuming you're doing a bit here. Esp tagging the respective languages. But this sure comes across as gleeful ignorance of some interesting languages & paradigms
@sos oooh! I started writing a programming language! Roast my syntax. https://konascript.org/
@Kowfm Alright, youre language is trying to be simple so much that half of the example is implicit!
@sos it’s too true! Too true!!!!!
@sos what they made a turbo pascal with emojis? This is exactly what I've been looking for!
@sos this is just rust. whose syntax still scares me.
@sos the nim guy is an unhinged right wing bigot so that's probably enough of a reason to pass on that one https://peoplemaking.games/@eniko/110652598034999459
@eniko Oh that's why the hashtag summoned the trolls.
@sos I wouldn't call Crystal simple but it is a joy to use
It has convenience functions for almost everything and the checking is so strict that if your program compiles it probably works
@sos @docRekd Comparing a natural language such as C to programming languages is a bit unfair tho, since it requires knowing which town, erm, compiler you are from and what guild- uh, compiler flags you grew up with because while some groups can sort of understand each other they invariably assign wildly different meanings to words and you'll look like an idiot any time you open your mouth in the wrong district if you're not very careful.
@sos@mastodon.gamedev.place @docRekd@hachyderm.io if we do the same thing you did to zig here:
- typdef struct? Why not just struct?
- Why is the struct named Person twice?
- char\* vs a string in nim is... not simple or intuitive
- why are the [] after the identifier instead of with the type?
- why do fields need a .? What does the dot mean?
- p++?? Why are we incrementing a person?
I don't disagree with your initial assesment but C is not a simple language.
@sos @sekoiatree besides the #nim version is waaay safer, with a sane loop that doesn't siak blowing off the entire program if the pointer arthmetic is wrong or if the printf parameters are wrong…
https://xeiaso.net/shitposts/no-way-to-prevent-this/CVE-2024-2961/
@sos I find it reasonable and readable. I’ve seen much much worse
As a not-really-programmer, Nim is the best that I've seen with easy syntax that still offers performance and flexibility (so I can agree on the other languages not being simple in this same way). Simple in the higher-level stuff it gives you, allowing multiple/easier ways do things. I know this is a different type of simple than you probably mean, which is the language itself being smaller (less concepts to know and less to go wrong, but more manual work). But with Nim you don't need to know everything to work at a script-like level (and nimscript is even a subset of the language) and memory management can be tweaked or disabled if you know what you're doing.
Though Nim is somewhat niche (lacking community), I can see why some things like whitespace and other choices may be polarizing (though I like them), and I don't disagree with the point that @eniko made (that also caused a big contributor to quit, the creator of Nim's package manager, so that made the bus factor worse).
Sidenote, I didn't fully implement it but here is some of my Nim code for loading a polygon from a text file (format example) (readability note: instead of something like float32(i)
I could've done i.float32
). Though this is via for Raylib bindings, I know that using libraries like this probably makes language differences a bit more trivial, and maybe there are people who can write more-readable C this way.
@sos Funny thing is that I've never seen zig and I'm pretty sure I get everything there, though adopting rubyish pipe-delimited lambda arguments is definitely not something I'd do for a new lang
@eudaemonious @sos Yeah of all the newfangled languages, #Zig is definitely the clearest/purposeful and, at least to me, seems to be the one with most traction (excepting, of course, #Rust).
@sos nobody remembers how Ruby worked out for Twitter
@sos Reminds me of every JavaScript library, they all claim to be "lightweight" yet they end up being 100k.
@mike @sos I forget which site I was looking at the other day but I was curious as to why everything on it was running so slow..they had like 20MB of javascript libraries loading just for some simple dropdown menus...you know...like the ones HTML5 supports without any scripting whatsoever.
Javascript is a blight on the web....
@sos Well, there are many ways to understand the word "simple". In this case it means a minimal language you can pick up quickly and little to no magic behind the curtain. Zig is certainly simpler than C if you don't count that always explicit allocator. What it gives you and takes away from you is debatable. In this case, you could write a simpler code example in C++ for sure, but that doesn't mean that C++ is simpler than Zig, so I don't think you are being really objective here.
@mfranc Well, for one that always explicit allocator is explicit in one var definition in the sample and not in the other.
@sos I'm not a Zig expert and maybe I'm missing something, but why do you want to allocate a small fixed-sized iterator dynamically? I think the idea is to use an explicit allocator when you actually need it for something.
@mfranc It just contradicts itself. It says "No hidden memory allocations." right there, not "No hidden memory allocations, unless it's a small variable."
@sos What do you imagine as an alternative? Stack allocations are always implicit. But you can be sure they happen, otherwise you would have no local variables or severe restrictions on which functions and how many of them can be called. If you need to allocate from the heap, you need an explicit allocator. I see a little contradiction to their claim.
@sos YOU MEAN ZIG ISNT THE C KILLER
@sos I like how LDPL began life as an esoteric language, hobby project but actually became useful. https://www.ldpl-lang.org
@sos the thing most new "simple" language don't seems to get is that C has pretty much everything a simple programming language should have. It's not perfect and has some lacking.... But sincerely it has everything you need.
On top of my head I can think about Lua as another simple language that get's "simple" and it's another "old" language.
@sos We definitely need more languages and frameworks to make trivial programs easier and easy programs harder.