wetdry.world is one of the many independent Mastodon servers you can use to participate in the fediverse.
We are a community focused on gaming, tech, entertainment, and more.

Administered by:

Server stats:

796
active users

ffmpeg have never been more real

Quiet public
@ipg ffmpeg is based
Quiet public
@ipg @Makura [tech.lgbt] On the other hand, I'd rather C disappears and Ada replaces it, for those things where space constraints are a major concern.

As for Assembly, yes, ultimately it's needed to bootstrap anything else. Even Forth.
Quiet public

@lispi314 @Makura [tech.lgbt] @ipg
it's also needed when you gotta go fast and the compiler doesn't know how to use the fancy special case CPU instructions that are only useful for FFT

Quiet public
@wolf480pl @ipg @Makura [tech.lgbt] Yeah. Some languages do also provide niceties for wrapping that, namely Ada (https://docs.adacore.com/gnat_ugn-docs/html/gnat_ugn/gnat_ugn/inline_assembler.html).

Though it is very nice when an implementation instead gets patched to have access to those as intrinsics.
docs.adacore.comInline Assembler — GNAT User's Guide for Native Platforms 25.0w documentation
Quiet public

@lispi314 @Makura [tech.lgbt] @ipg Eh, it’s easier to bootstrap a forth from machine code directly than write an assembler in machine code first.

Quiet public
@tryst @ipg @Makura [tech.lgbt] I suppose, though that sounds harder to maintain.

I was thinking of one making an old-style primitive assembler whose main benefit is basically just using human-readable (for some definition of that) tokens instead of arbitrary numbers.
Quiet public

@lispi314 @Makura [tech.lgbt] @ipg i mean, you’d immediately throw out the interpreter written in machine code in favor of an interpreter compiled from (or built with an embedded dsl in) forth - just like you would with the assembly version. making the initial version a throwaway lets it be very simple - fixed sizes and linear searches for everything is just fine.

anyway, i basically disagree that c and assembly (or things equivalent to them) are fundamentally necessary, they’re just the prevalent solution to particular types of problems.

Quiet public
@lispi314 heyyyy u like Ada?? fkgjsdhfkjghf :celredcrystalheart:
Quiet public

@lispi314 @Makura [tech.lgbt] @ipg Would have Ariane-5 NOT gone boom on its maiden flight, if its software had NOT been written in Ada? 🤔

Quiet public
@datenwolf @ipg @Makura [tech.lgbt] Considering it was reuse of a codebase with ostensibly compatible interfaces but in fact incompatible with the new setup (owo, hardware/software mismatch) that caused the issue iirc? I don't think so.
Quiet public

@lispi314 @Makura [tech.lgbt] @ipg what ultimately triggered the flight abort system were the integer overflow error debug messages produced by the Ada runtime being sent to a receptor that did expect to arrive just numeric values over that channel. At that particular moment in the flight the number values arriving there were ignored even.

Quiet public
@datenwolf @ipg @Makura [tech.lgbt] Oh, so then the compatibility of the interfaces across the modules wasn't even checked in the first place.

That sounds like an engineering screw-up.
Public

@ipg nah fuck c lmfao, there's absolutely no reason to cling to it other than sentimentality

asm makes sense as a direct representation of machine code, it's not like there's any other way to do it, but C is just another high level language (albeit a very old and influential one)

Public

@halva @ipg C is high level the same way a horse carriage is a car just because you’re technically not on foot

Public

@halva writing in assembly does not make sense in a cross-architecture world - C acts as a higher abstraction onto that without abstracting core behaviours away from you as a programmer
it's not high level by any means, for any given C code you can fairly trivially understand what it gets compiled down to when you build it and you don't have to guess at what it could be doing in the background
what you write is what you get, it hides nothing from you

Quiet public

@ipg @halva The other day, I stumbled upon an article which nuances the idea of C compiling down to something obvious:

C Is Not a Low-level Language
queue.acm.org/detail.cfm?id=32

queue.acm.orgC Is Not a Low-level Language - ACM Queue
Quiet public

@melunaka @ipg @halva yeah, they mean that c compilers can optimize i++ to format c: and lots of babble about UB.

But I dont agree. With some very practical conditions a C compiler can be tamed into emitting previsible asm opcodes. Disable (some) optimization if you need. Check the generated assembly for sanity. Avoid UB by writing sensible C code.

Thats what I say when I also describe C as high level assembly. In no way I trust the compiler.

I would rather say that C is no low level python.

Public
@halva @ipg There's a lot of reasons why people would still cling to C, specially for things like ffmpeg where a lot of it is directly interfacing with the rest of the system where the only API you have is C.
Which is why the core of your favorite Java/Go/Rust/… stuff is still C, and ffmpeg is pretty much a core library.
Public
@lanodan @ipg @halva You don't have to make the core in C and there are quite a few self-hosted languages that don't.

Linux has a stable ABI for userspace (mostly), so it is possible to even do the whole thing from scratch and communicating directly with the system that way, skipping C entirely. In general instead such languages deem it simpler to make a C wrapper which can communicate with their own ABI instead.
Public
@lispi314 @halva @ipg If you target Linux yeah it's somewhat doable (although like strace does you'd need to parse C headers at one point, good luck).
But if you want portability… nope.

https://utcc.utoronto.ca/~cks/space/blog/programming/GoCLibraryAPIIssues
https://utcc.utoronto.ca/~cks/space/blog/unix/CLibraryAPIRequiresC

And sadly the Linux kernel isn't the only ABI you need to care about, like if you do OpenGL/Vulkan/… you'll end up with having to deal with C.
(And there's core system libraries that are very security-sensitive like the nsswitch.conf stuff and pam where it's stuck to C)
utcc.utoronto.ca Chris's Wiki :: blog/programming/GoCLibraryAPIIssues
Public

@lanodan @halva @ipg What do you mean by core here? Neither Rust nor Go have a C core as I would understand it. Not like the typical Java runtimes do (or Haskell).

Rust will link to libc et a on Linux, but that’s an artifact of how “std” support is added, an alternate “std” could target the Linux ABI directly, and x86_64-unknown-none (which does not have the std crate) links in no C.

Go produces static binaries by default, with no C code linked in at all.

If you’re talking about applications and libraries written in those languages… both have cultures of implementing as much as practical in the language itself. For example, the fuse library for rust [lib.rs] only calls to C for mount/unmount (which requires system specific elevated privileges).

Lib.rs · fuserFilesystem in Userspace (FUSE) for Rust
Quiet public

@ipg hell yea!

(am mostly a C dev so I'm biased)

Quiet public

@ipg would love if they're saying "we are hiring/paying someone to do this" then

Quiet public
@ipg they couldn't be more wrong
Quiet public

@ipg hot take

Quiet public

@ipg@wetdry.world so true, I like whoever runs the ffmpeg twitter

Quiet public
@ipg
> C programming matters
yeah because where else would we get the stupidest security exploits known to man
Quiet public

@ipg nah, world needs more useless JS frameworks and overpaid python juniors /s

Quiet public

@ipg yeah they're posting based stuff that makes me think that me being hyperobsessed with low level and c and similar langs doesn't make me worthless in the modern sea of webdev and high level stuff :blobfox3c:

Public

@ipg Are they also on here or only on the Twitter?

Quiet public

@ipg ffmpeg namesearches themself on twitter and brigades anyone who says anything remotely negative about them it's incredibly toxic