News for hackers. Stuff that matters.
Re:Why is there a “V” in SIGSEGV Segmentation Fault? by kazinator on Thursday June 18, 2020 @10:54AM (#23563633)
Actually, the "segmentation" comes from segmented memory management, which was integrated into in AT&T Unix. BSD went with paged virtual memory, and there we get "fault" from "page fault", which is an often correctable situation that is invisible to the application, but is sometimes an access violation.

So "segmentation fault" is a weird combination of terms.

And of course "core" is from "magnetic core memory" that nobody uses any more.

The SIGSEGV constant having come from AT&T Unix propagated into other variants, for the sake of source code compatibility, even though those other variants didn't use segmented memory.

I suspect that what happened was that hackers not working with segmented memory at all somehow adopted the "segmentation" term from the AT&T code and documentation, but did not warm up to the "violation" part, sticking with the "fault" terminology of their paged world.

The "Segmentation fault" string you see displayed by the shell comes from the strsignal function that maps signals to descriptive strings. I think that originated in BSD Unix. "(core dumped)" is locally generated by the shell if that flag is true in the process status.

Bash internationalizes that with gettext. Here it is in Hungarian:

  po/hr.po:msgid " (core dumped)"
  po/hr.po-msgstr " (jezgra izbačena)"
Estonia gets a cool one:

  po/eo.po:msgid " (core dumped)"
  po/eo.po-msgstr "(nekropsio elŝutita)"
Trivia: very early Linux kernel versions used 80386 segments for processes.
Re:Why is there a “V” in SIGSEGV Segmentation Fault? by rob74 on Thursday June 18, 2020 @11:35AM (#23564045)
"hr" is Croatian, Hungarian would be "hu" (and no doubt it sounds cool too).

And yeah, a "necropsy" (synonym for autopsy) definitely sounds cooler than a "dump"...

Otherwise: great summary, almost more interesting (and more compact) than the original blog post!

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by zvrba on Thursday June 18, 2020 @12:15PM (#23564536)
> "hr" is Croatian, Hungarian would be "hu" (and no doubt it sounds cool too).

And the translation is abysmal: "jezgra" = "core" (of nuclear reactor) or "nucleus" (of an atom); the closest translation for "izbačena" is "ejected". I believe that "core" comes originally from memory technology of the time (https://en.wikipedia.org/wiki/Magnetic-core_memory) so it should have been possible to find a more meaningful translation.

EDIT: As a native Croatian speaker, I have NEVER used any program in Croatian locale. It is simply unintelligible. Funnily, I find Norwegian (where I live now) translations more approachable.

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by pantalaimon on Thursday June 18, 2020 @02:30PM (#23566096)
Localized error messages (that are still full of jargon) are terrible. It makes looking them up online much harder and often the translation does not more than obfuscation.
Re:Why is there a “V” in SIGSEGV Segmentation Fault? by necovek on Friday June 19, 2020 @01:17AM (#23571216)
The goal of "izbačena" here is clearly to indicate that the memory has been stored elsewhere. FWIW, "dumping trash" would be readily translated to "избацити смеће" (izbaciti smeće) in Serbian, so I am surprised it's such a stretch in Croatian. Perhaps the Croatian translation has been based off Serbian one.

You are probably more accustomed to Norwegian translations because you never learned Norwegian IT-speak before the translations appeared, whereas I imagine you grew up on English interfaces while speaking Croatian (we term that Srblish, maybe you've got Croglish :)).

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by zvrba on Friday June 19, 2020 @01:23PM (#23576707)
Croatian "izbaciti" is closest to this meaning: https://www.merriam-webster.com/dictionary/eject or the phrase "throw out". F.ex., "Izbacivac" [sorry, haven't bothered with setting up HR keys] is the guy throwing out too drunk people from a club.

> "избацити смеће" (izbaciti smeće) in Serbian, so I am surprised it's such a stretch in Croatian

But that's exactly it! You "izbacis smece" and you don't care what happens to it after. Likewise with "izbacivac", he throws out a person and doesn't care what the person does afterwards. You don't "izbacis" something FOR someone to use it after. That's why the translation is bothering me.

Whereas the kernel writes the core FOR THE USER to inspect it, back it up, delete it, whatever.

The closest word I can come up with for English "dump" https://www.merriam-webster.com/dictionary/dump is "ostaviti" ("leave around") ili "(is)pustiti" (in the meaning of "drop", not "flushing the toilet" :D). A better literal translation would thus be "Jezgra pustena." (Like a space probe is "pustena" into space and there it goes.) I guess the authors originally used "dump" because it's kinda random (system-wide config) where it ends up.

The most meaningful translation to Croatian would be, IMHO, "Memorija sacuvana." [or "Memorija spremljena."] ("Memory preserved".)

> I imagine you grew up on English interfaces while speaking Croatian

Indeed. Some professors at the university did use Croatian terms, but everything about it was awfully alien to me. "Thread" would be "dretva". Which is ironic, as the professor explained that it's borrowed and mangled from German, whereas we have a perfectly valid, even nice, Croatian word "nit" that is literally "thread".

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by necovek on Friday June 19, 2020 @02:30PM (#23577466)
Those are all great points, but in English, "dumping" is also used when you want to get rid of something/someone (dump a boyfriend, dump into trash...).

If anything, the translation is too literal, and you are advocating for a better translation for the actual action. It's a common complaint, but it's a hard balance to strike: literal translation is (usually) easier to translate back (not the case here), but a translation that is more descriptive is easier to understand.

I think I am in the same boat as you, in that I usually prefer descriptive translations when a literal one uses a metaphore or concept that's alien to the local culture.

Still, in this particular case, I'd use a less commonly used term (I imagine spremiti/sačuvati is also used for "save") like "zapisana" or "zabeležena", just so there's a better chance to keep 1-1 mapping between English and Croato-serbo-bosnian-montenegrin language.

What English has mostly done was keep using old concepts (like "core" to represent "memory"), or repurposed seldom used words which I always found intriguing. Such approach would require some re-learning for us who grew up on English IT terminology, but every profession has a specialised terminology like that too (I like to bring up the example of maths, where in Serbian it's integral and izvod for integral and differential: always try coming up with a good native word, and if it _is_ good, it will stick :)).

Note that people translating free software are usually volunteers working without much local support, and without an established vocabulary for all these specialised terms, so they will frequently come up with awkward translations.

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by necovek on Friday June 19, 2020 @02:35PM (#23577504)
I think I posted while you edited your post so you added a couple of good examples for a better literal translation.

But this is exactly the point, it's hard work, it's not always done by people who understand the actual concepts or history, and they are doing it in their spare time. Imagine spending this much time and saying "I translated one message".

Thus, I'd encourage you to contribute your suggestions upstream :)

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by zvrba on Saturday June 20, 2020 @08:07AM (#23583482)
> Croato-serbo-bosnian-montenegrin language

"In confidence": I miss the days when there was only serbo-croatian and croato-serbian :D (I grew up in Yugoslavia and still remember cyrillic.) Politicizing of the languages is just f*up. It says enough that I understand "urban" (i.e. newspapers/TV) serbian better than heavy croatian dialects from Dalmatia, Istra or Zagorje :p

> integral and izvod

Wow, "izvod" is really nice, I like it :D We used just "derivacija". If I had to guess what some eager translator would translate "integral" to, it'd be something like "ocjeljivanje" :D

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by dzsekijo on Thursday June 18, 2020 @04:08PM (#23567372)
I checked Hungarian, it's simply "core készült" ("core has been made"). I guess they did not want to go too far with translating "core" as possible faithful translations would collate with expressions for ejaculation...
Re:Why is there a “V” in SIGSEGV Segmentation Fault? by schoen on Thursday June 18, 2020 @01:02PM (#23565118)
> Estonia gets a cool one:

Sad to say that's also not Estonian -- it's Esperanto. :-)

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by cat199 on Thursday June 18, 2020 @12:24PM (#23564667)
didn't go too deep on the code spelunking, but v7 Unix (and 2BSD) used 'swapping' rather than paging, where the whole process was moved in/out of RAM, 32V (32bit v7 for the vax by AT&T) kept this, 3BSD (32V++ in a way) added paged memory, and this was reworked in 4.3BSD (see 44doc newvm), Mach VM, etc.

can confirm SEGV is in v7 signal.h from 1979:

https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/si...

where it is happily #defined as 11, and continues as such to this day:

https://github.com/freebsd/freebsd/blob/master/sys/sys/signa...

(etc, in the other BSD-derived systems)

if anyone wants to dig further.

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by necovek on Friday June 19, 2020 @01:27AM (#23571275)
When I played with IA32 in assembly, I think it was possible to swap segments in and out as well (you could order actual printed IA32 books from Intel for free, which was great for a high-school student in Serbia in late 1990s ;)). It was a long time ago, so maybe I am misremembering things.

Thus, I always considered "paging" a shorthand for "swapping of memory pages".

Re:Why is there a “V” in SIGSEGV Segmentation Fault? by kazinator on Friday June 19, 2020 @11:57AM (#23575720)
The term "swapping" originally comes from the multiprogramming technique of exchanging an entire program in memory, and its data, for another program and its data (without any virtual memory support).
Re:Why is there a “V” in SIGSEGV Segmentation Fault? by WesolyKubeczek on Thursday June 18, 2020 @12:00PM (#23564364)
eo is Esperanto, Estonian looks like a version of Finnish.

(so does Hungarian, as sibling has pointed out)