|
|
Subscribe / Log in / New account

Linux-for-Rust or Rust-for-Linux

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 7:34 UTC (Tue) by viro (subscriber, #7872)
In reply to: Linux-for-Rust or Rust-for-Linux by anthm
Parent article: Rust-for-Linux developer Wedson Almeida Filho drops out

Funny... I've caught quite a few bugs in C; memory safety problems were nowhere near the majority. And one thing that is really required is being able to reason about the program behaviour, which is where the simpler model helps a _lot_. What's your experience, if that's not a too tactless question?

Don't get me wrong - memory safety issues do happen and automated tools are useful; what's more, C type system is genuinely not strong. But that's only a part of the picture. Far more often is the case when you need to change existing code (as opposed to "write a replacement from scratch and pray that CI will catch any logical problems") and _that_ is where the things get painful. Again, being able to reason is an absolute must-have; you _can't_ just treat the compiler as an oracle that needs to be appeased and be done with that. In any language.

And frankly, I don't understand the idio^Wpeople who treat language as identity - _any_ language (natural ones included) is a set of tools. It does not determine how you think, for fuck sake! You really can write FORTRAN in any language - certainly so in Rust. Familiarity with more languages is a good thing - it widens your toolkit, and if you really understand a language you will be able to come up with equivalent idioms in another - provided that you *do* understand them in the original, and not just on the level of "it's a magical incantation". Whorf-Sapir hypothesis is garbage; mixing it with Herderian nonsense is completely insane. "Rust Culture", "C Culture"... get a life, already.


to post comments

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 12:39 UTC (Tue) by Wol (subscriber, #4433) [Link]

> You really can write FORTRAN in any language

rofl ...

Most of my C code was probably just FORTRAN and DataBASIC in disguise ... for the most part I just didn't see any advantage in using unfamiliar C idioms when Fortran did just as well - eg malloc a chunk of memory and access it with [] rather than *. If the C idiom was better than Fortran then I learnt it and used it, if I couldn't see an advantage I stuck with what I knew.

Cheers,
Wol

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 12:46 UTC (Tue) by Wol (subscriber, #4433) [Link] (7 responses)

> It does not determine how you think, for fuck sake!

Well, how do you think about tense, if your language does not have tenses? Given that you NEED language to enable you to think, the two are completely intertwined.

Your comment about "learning multiple languages" underlines this point! By learning another language, you learn that other people think different to you, and it broadens your mind.

But it's pretty obvious from - let's say khim's posts - that his language determines the way he thinks. He can't even express himself in English some times because his language does not have the context to enable him to grasp ours! I get the impression that many of my spats with him are down to the fact that the GRAMMAR gets in the way and obstructs mutual understanding.

Sorry khim - no disrespect - I'm sure you'd say pretty much the same about me from the other side of the fence :-)

But sorry, yes, language DOES determine how you think. If you don't have the words/grammar to say it, then you don't have the words/grammar to think it.

Cheers,
Wol

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 15:49 UTC (Tue) by viro (subscriber, #7872) [Link] (6 responses)

Are you serious? "event X happened before event Y" can be expressed in a lot of ways; surface representation matters very little. The same goes for aspect and mood. Do you really think that learning Latin changes the thought process when you see several buggers who are already visibly plastered and keep switching between port and beer without bothering to eat anything? Just because Latin expresses the notion of "that bunch is going to be throwing up" with a single word while English uses several? The underlying notion will be the same; it can be approximated with words (some of them possibly even printable), but that's not how we are thinking.

As for the words... that's why we have mechanisms to introduce new words and expressions. There's a particularly debased form of Whorf-Sapir bollocks (to be fair, neither had been responsible for that bit of BS - that came from popularizers) that seriously claims that inhabitants of Caribbean in 1490s must've been unable to process what they were seeing and somehow developed a blind spot in place of caravels. I don't know how one could believe that, because we all know what really happens when there's no terms for what we are seeing. "Oi, what the fuck is that thing over there? Hadn't been there this morning... Looks like there's a bunch of wankers on it; are they wrapped in some strange shit? Seems rigid; some kinda shields strapped on, maybe? Don't like how that one is pointing our way whatever the hell he's holding, let's get out of the open and warn the blokes back in the village" is far more likely than ignoring the sight just because there's no proper term for caravel, cuirass, etc. More likely to get passed to offspring, anyway... Mind does not stop when running into the lack of proper terms; it cobbles something up (that's what the obscenity is for, often enough) and keeps going.

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 16:44 UTC (Tue) by Wol (subscriber, #4433) [Link] (5 responses)

> Are you serious? "event X happened before event Y" can be expressed in a lot of ways; surface representation matters very little.

Then why is it so hard to understand what khim is actually saying? I learnt the rules, I (think I) have a basic grasp of Russian grammar, I try to see it through his comprehension, and he STILL succeeds in saying something that is clearly not what he meant.

It's like double negatives. I know we Brits abuse it a lot, but a lot of other languages use an emphasised negative. Translate that naively into English, and you've just COMPLETELY changed the meaning. And it's hard to unlearn something. I can hear you perfectly, and still walk away with a completely wrong understanding of what you said.

Surface representation matters a LOT. It's behind many misunderstandings and wars.

Roosevelt: Let's table that idea.
Churchill: Oh no we can't!

And that's only the difference between English and American ...

Cheers,
Wol

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 18:23 UTC (Tue) by viro (subscriber, #7872) [Link]

Umm... Thinking as internal monologue is already somewhat questionable, but thinking as internal _dialogue_ with participants using different dialects... Ouch. I mean, DID exists, but it's not exactly common. IOW, examples you are giving are irrelevant to the way one thinks - grammatical differences between dialects would matter only if you switched the dialects halfway through thinking of something *and* forgot which one have you been using at earlier step. Not impossible, I guess, but that's hard to run into without recreational chemistry, which is likely to cause other problems...

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 20:57 UTC (Tue) by rschroev (subscriber, #4164) [Link]

> > Are you serious? "event X happened before event Y" can be expressed in a lot of ways; surface representation matters very little.

> Then why is it so hard to understand what khim is actually saying?

Because English is a foreign language for khim? Of course it's more difficult to express yourself clearly (and/or succinctly) in a language that's not your native language. I can express my thoughts pretty fluently in Dutch; English is significantly harder, even though both languages are pretty closely related. French is almost hopeless even though our education system tried pretty hard making us learn that language. German is closer related still, but while I can read it a bit I can't write or speak it at all (other than trivial things like "Zwei Bier bitte"). If I try to express something in French, chances are French-speaking people will think it's difficult to understand too. And it's more difficult for things that are expressed differently in native versus foreign language.

How much study of Russian would you or I need before we are as proficient in it as khim is in English? Will khim wonder why he can't always understand our reasoning expressed in Russian?

I think you're thinking of the linguistic relativity, also known as the Sapir–Whorf hypothesis (and other terms), and more specifically it seems you're thinking of the strong form which says that language determines thought and that linguistic categories limit and restrict cognitive categories. Modern linguists don't accept that hypothesis anymore (or at least that stronger form).

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 21:04 UTC (Tue) by rschroev (subscriber, #4164) [Link] (2 responses)

> Surface representation matters a LOT. It's behind many misunderstandings and wars.

You can express repetition in different programming languages in different ways.

What you're saying is: The representation matters, because different compilers/interpreters/programmers will understand different ways of representation.

What viro was saying (or at the very least, how I interpreted it): The representation doesn't matter, in the sense that any programming language can express repetition, and the choice is a simple consequence of the choice of programming language. It doesn't influence what concepts can be expressed in the different languages.

Linux-for-Rust or Rust-for-Linux

Posted Sep 5, 2024 12:01 UTC (Thu) by taladar (subscriber, #68407) [Link] (1 responses)

The flaw in that line of reasoning is that how easily something is expressed matters a whole lot more in programming, maintainability, readability,... than how possible it is to express it at all.

Linux-for-Rust or Rust-for-Linux

Posted Nov 28, 2024 18:32 UTC (Thu) by deepfire (guest, #26138) [Link]

Thank you for saying the obvious!

Linux-for-Rust or Rust-for-Linux

Posted Sep 3, 2024 18:53 UTC (Tue) by SLi (subscriber, #53131) [Link]

> Funny... I've caught quite a few bugs in C; memory safety problems were nowhere near the majority. And one thing that is really required is being able to reason about the program behaviour, which is where the simpler model helps a _lot_.

A serious question. Do you think you could reason equally well about high level behavior in C and assembly? Even if we ignore the memory safety aspect.

I find this idea surprising. In my experience, the language you work in significantly shapes your thinking.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds