mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.1K
active users

Sos Sosowski

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

And Carbon, aka "What if C++ but only the bad parts"

Oh and then there's Odin, Turbo Pascal with emojis!

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++

@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 you should look at Go next, it's the punching bag of web development (other than the one-we-never-mention, PHP) 🤪

@sos Have you considered using Guile Scheme for that? :^)

@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 🤷‍♀️

@Kowfm Alright, youre language is trying to be simple so much that half of the example is implicit!

@sos @Kowfm I don't know if this is on purpose but I found it quite funny that the example has Element.new("Karl") but karl means male in Icelandic, and kona means female.

@esi @sos totally not on purpose. My name is Karl, a German name, and Kona is a place in Hawaii with a popular coffee variety. So konascript.

But this is funny and I like it.

@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.

@eniko Oh that's why the hashtag summoned the trolls.

@eniko

@sos

He once DM'd me a YouTube link on IRC with a white supremacist talking (forgot who, maybe Richard Spencer) saying he thinks he's right. This was after I pushed back on him saying that Muslims are the biggest threat to society.

So yeah.. I left that community

@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 #C would require way more steps than that, and it would snuck some kind of undefined behavour in the process

@docRekd The nuances are different, but C can do this as easily.

@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 and already you are playing with fire
printf load a gun to the most important data structure in your program… just to write out some log lines

Meanwhile the #nim version is memory safe, like almost everything outside of #c land

@sos and that for loop is anything but readable for anyone without #c braiinrot

@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…

xeiaso.net/shitposts/no-way-to

xeiaso.net"No way to prevent this" say users of only language where this regularly happensXe Iaso's personal website.

@sos I find it reasonable and readable. I’ve seen much much worse

@sos

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

@jack @sos I'm going to assume it's why Elon took over and renamed it X, because nothing makes sense over there.

@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....

@raptor85 @sos lol, it probably wasn't Medium, but that's how I often feel every time I visit (for a blog site this is remarkably slow).

@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 @mfranc Well, it is "no hidden HEAP memory allocation". Allocations on the stack do not use a dynamic memory allocator. It isn't really about the variable size here. It would crash but the compiler blindly accepts to allocate a 1GB variable in the stack if you ask for it.

@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. ldpl-lang.org

www.ldpl-lang.orgThe LDPL Programming Language

@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.