With a fuzzy graph, what the essay shows, we plug each point into a recipe, the equation, and see how badly it fails. Big failure → dark region (like a bitter taste). Small failure → light region (almost right). It’s just showing the raw mistake you get after plugging in x and y.
With a signed distance function, instead of looking at the recipe’s mistake, we measure how far the point is from the perfect curve—like pulling out a ruler and measuring the nearest distance to the “correct” line.
It always has units of length and behaves nicely (positive outside, negative inside, zero on the curve).
So the fuzzy graph is about “how wrong is the equation here?”
A signed distance function is “how far away from the exact solution am I?”
They’re related ideas (both start from equations written as something = 0), but they’re not the same thing.
Reasonably, I ask myself: "but isn't dark region far distance and light region close distance?"
Sitting with that:
In the fuzzy graph, we’re coloring by equation error—how badly the equation is satisfied at each point.
In a signed distance field, we color by actual geometric distance to the curve.
Those two numbers aren’t the same unless the equation is written in a very special way. If you multiply an equation by some huge factor (say, multiply everything by 1,000, or divide by something small), the shape of the solution curve doesn’t change—distance hasn’t changed—but the equation’s error suddenly becomes 1,000 times larger (or smaller). That would completely change the shading in the fuzzy graph while leaving the real distances untouched.
Signed distance is measured with a ruler (pure geometry). The fuzzy graph is measuring algebraic error (how close the formula comes to zero). Both can get lighter near the curve and darker away from it, but they’re doing it for different reasons, so they’re not interchangeable.
I'm pretty sure they know, and that's what makes it funny. There's an entire genre of internet humor based on using incorrect (because of homophone/homograph words) english-to-french translation. For example saying "vérifie les buches" for "check the logs".
As a native french speaker, I feel so uneasy reading source code in french. It feels very very uncanny. I've often wondered if English native speakers feel the same when reading normal source code which is always in English. They probably don't. But how? I've always associated the "other language-ness" to correctness and technicality. It must be so weird to code in your own language. Feels like reading bad pseudo code. It's very nice to be able to map "english" to "technical, correct" and "native language" to "descriptive, approximate, comments, pseudo-code". Having only a single language to work with is like removing a color from the rainbow.
I'm a native English speaker. I do actually remember programming languages feeling a little uncanny at first. Like you can tell that it's "computery" and that the language author tried to make it English-like and only sorta succeeded.
So I think at this point, for me, programming languages just aren't English. One odd thing I've noticed is that in Ruby the `unless` keyword confuses the hell out of me, and yet when speaking English I never get tripped up on the actual word "unless". So I guess it's handy that the keywords in programming happen to be English words, but my comprehension of programming languages seems to occupy another region of my brain.
I’m not a native speaker, but I always liked the postfix “unless” in Perl, for use with operations that are performed in the common case and only omitted under special circumstances.
do_something() unless special_condition;
It vibes with “unless” in English usually implying an exception.
I'm quite fluent in english and "unless" is also weird to me, for some reason, "when" in ansible is also very weird, I don't know why. Back to the original post, I would never work for my (French) government again if they adopt something like rouille ; just reading the README felt very weird.
I think that’s because it (¿almost?) always splits “is not” in two parts. Compare “If x is not y” with “if not (x is y)”.
> for some reason, "when" in ansible is also very weird
When feels weird to me, too. I think that is because “when” often implies something will happen, but you don’t know the exact time, while “if” means you don’t know whether it will happen at all (compare “when it rains” with “if it rains”). So, using when to describe a trigger is fine, but to me it doesn’t make sense as a statement in an imperative programming language.
> just reading the README felt very weird.
I had to check, and yes, there is a README.md, and no LIVREMOI.md.
But rust lets you use unicode for identifiers. Just make every variable its own greek letter. Or Tamil, plenty of languages available. Why waste screen space by using entire words? That is mostly sarcasm, maybe?
Didn't someone say something about using French to speak of love and german to speak of science? Maybe english is getting it's use.
> Didn't someone say something about using French to speak of love and german to speak of science? Maybe english is getting it's use.
That's interesting - as someone noted below, in musical notation, the keywords are nearly all Italian, and it would feel quite weird if they were written in English instead. So in that sense, yeah, maybe `for`, `if`, `then`, `import`, etc. are the "fortissimo" and "d.s. al coda"s of the programming world.
> But rust lets you use unicode for identifiers. Just make every variable its own greek letter.
This can actually be useful for locally-defined variables. Even more so if you're using an editor with LSP support where it's trivial to bring up the doc comments for an identifier as a tooltip - with some added support, you could even write these doc comments in multiple natural languages, while keeping the code itself quite linguistically neutral.
The closest I've ever felt to this as a native English speaker is reading words in music scores in English. I'm a classically trained cellist, and grew up learning notation with Italian and French words for directions and expression. I've never learned either of those languages, save the words used in music notation. Seeing a score with those words in English just feels... wrong. Not in any big way, but as you said: uncanny. Definitely get the "bad psuedocode" vibe, because to me it English in music notation feels similar -- like the person who wrote it didn't know what they were doing, even though the notation makes perfect sense and the music is good. It removes some of the flair of the art of the notation itself for me.
This is a very good analogy, sheet music with all the Italian replaced by English would be very funny. "Loud!" "Very loud!" "Super-duper quiet!" "This is the end of the song!" "play this part reallll smooootthh" etc.
(Actually I believe the late P.D.Q. Bach [1] did this a lot, and it was in fact quite funny)
(Brit here) My first encounter with a foreign PL was a French Prolog implementation in the mid 80s whose only compiler error message was IIRC something like 'Erreur syntactique'. This seemed superbly Gallic, if somewhat less than helpful.
Two of the best things I learned in French class (which was basically “Parisian culture of 1982” class) was that “impossible” in French meant “I don’t feel like it”, and if someone shrugged in a way where the edges of their mouth touched the top of their shoulders, you were shit out of luck with whatever you were asking for.
Off-topic but that reminds me of the quote from "Stand on Zanzibar" where 'impossible' is defined as IIRC "1) I can't be bothered or 2) I don't approve or 3) God can't be bothered"
For anything vaguely technical, I use the English term. I don't feel comfortable in any other language, no matter how well I speak it. It just doesn't sit right with me to use eg a Danish term for density, or power, or eigenvalue, or anything programming.
Part of it is that even though I might know the term, it won't be long before I need to bring in something where I don't know the term. At that point I'll be inventing a local term, when I know what the English term is.
In this particular case, it might also feel uncanny because the keywords were merely translated; but the grammar (most notably word order) doesn't (always) match.
`asynchrone fonction` feels wrong because it's the wrong word order for French; it should be `fonction asynchrone`...
I'm a native Portuguese speaker. Here, when people are first starting to learn programming, it's very common for them to write code in Portuguese. For example, they would write this simple age verification algorithm:
int verifica_idade(int idade) {
if (idade < 18) { return -1; }
return 1;
}
int main() {
int idade;
scanf("%d", &idade);
int verificacao = verifica_idade(idade);
if (verificacao < 0) { printf("Acesso negado\n"); }
else { printf("Acesso liberado\n"); }
return 0;
}
Do French (or other languages) speakers also do this?
> Do French (or other languages) speakers also do this?
I don't know anything about the Portuguese script. But your example seems to be made entirely of regular Latin alphabets. Now imagine another language where that isn't the case. Just switching the layout even on a programmable keyboard is going to be a major annoyance. I can touch type on two layouts (English Qwerty and Malayalam Poorna Inscript, in case you're wondering). Occasionally switching between the two layouts is the biggest distraction while typing prose - even with convenient layer switchers programmed in. Programming is going to be hell if the keywords and identifiers are in different scripts. I reckon that it would slow me down to about one-third of my full speed.
There are genuine reasons why identifiers could be in another language - like programming for linguistics (spelling and grammar checkers, morphology analyzers, etc) or while dealing with regional concepts. But even in those cases, programmers simply transliterate it into Latin script, rather than use the original script. Their sound roughly the same. But full fidelity is not possible (there are sounds that you may not have even imagined before). Even so, it's easier to just compromise on fidelity rather than do constant layout switching.
And then there is the reality that many language scripts are simply unusable for programming. My own language is agglutinative - meaning that multiple words fuse into one (even 4 words combining is not unusual). The same thing can be written in a dozen different ways. This isn't a big issue if you're reading or listening. It won't confuse you. But the moment you start applying formal rules like in a computer, it's a dozen different ways to type it wrong! I like my script for anything other than programming. It's very expressive. But the anemic simplicity of the Latin script is actually a big advantage when it comes to things like programming and mathematics. I believe that you will find many such peculiarities and nuances with other scripts if you go searching.
> your example seems to be made entirely of regular Latin alphabets.
Portuguese is a direct descendant of Latin. But it has quite a bit of punctuation, OP just ignored that as the programming language, C, does not support it. In Common Lisp you can happily go:
(when verificação (print “pessoa é maior de idade”))
You could even go all the way:
(defmacro quando (cond corpo) ‘(when ,cond ,@corpo)
(defun imprime (x) (print x))
; now we can do this
(quando verificação (imprime “pessoa é maior de idade”))
Ah! Yes! I was wondering about the diacritics/accents. How do you deal with those? Do you have to switch keyboard layouts like me, or are they trivial additions to the qwerty layout?
I have 3 different keyboard layouts installed.
As I live in Sweden, my keyboard shows the Swedish layout, but I also use both English and Brazilian ABNT layouts and know them by heart.
I have a single key shortcut to switch between them.
Accents work as if I was using a native keyboard, so they're not too bad (unless you're on mobile, there it sucks), except the keys do not show the right symbols.
If you don't know the mappings by heart, you can get your OS to show you the layout... maybe leave that on the side and look up when you forget something.
Providing a translation in English so people stop downvoting:
Writing programmes in Malayalam is something I've always wanted to do. I know that programming is primarily the language of mathematics, and it's just expressed in English. However, I've felt that seeing it in Malayalam would help in understanding things a bit more easily. At the very least, the documentation would be easier to read. There's no need to use Malayalam script for writing the programme; writing it in Manglish using Latin script would suffice. Only the description needs to be in Malayalam. That way, the problem of changing keyboards would be solved.
I actually didn't have to make any of these comments here as I already have finished with this subject(programming) and moved on. But somehow, when I see a post like this, I did.
Best of luck with your projects. May god bless you all.
Yeah it's quite common in French (for learners). At least in part because French people aren't very good at English, it'd add more friction to the learning process (and even for the ones who aren't bad at english, it's a whole new vocabulary to learn).
I'm not sure when I did the switch myself! Maybe as late as my first professional experience, or maybe a bit later in my studies
I think so. You don't know who might touch your code later, better to use English than for them to figure out what those words mean. It would be like using giberish for all your variables.
Another issue, even for other speakers of your language, we don't all translate english words the same, some words are just not translatable and some words look the same but mean different things, how can they tell if it was meant to be English or not?
For example in Spanish, "default" translates to "por omisión", two words, there's no single word for it, a lot of people translate it to "defecto" because it's similar but that means flaw, defect. It's so used, people say "por defecto" instead of "por omisión" now and some dictionaries added it as a translation already.
Another example, "cache", I know its meaning in computer lingo, the times I've had to use it is in the context of computers, so I have no idea what its translation to Spanish is or if there's even a word for it. If someone used the translation in code I would have no idea what I'd be looking at.
One more, "library" translates to "biblioteca" but some people use "libreria" (bookshop) because it sounds similar. You can find usages of both in documentation. People will probably understand both but it hurts searchability.
Well. Although this rouille thing is obviously a joke, it's also just a preprocessor macro layer, so it'd be pretty easy to switch to any view of the code. Could write it in "french" then transform it to english, then to russian.. Could also imagine doing that in an IDE without even impacting copy and paste just as a visual layer.
Not sure what one would do for that spanish por omisión, but maybe just put an underscore. por_omisión
There is nothing mandating you have to write things in English. It’s often but not always the de facto common languages between foreigners but it’s just a language.
If you read the code of Chinese projects, it’s very often in Chinese for exemple. They don’t really care about English speakers.
If the application domain is country-specific, this even happens in professional programming, because it doesn’t make sense to invent English translations for the local-language domain-specific technical terms. Whenever people do this, the result is non-idiomatic English terms that neither make sense to an English speaker nor to a local domain expert.
When learning a new computer language, using names in your native tongue makes it easier to tell what's yours and what belongs to the programming language itself.
Now when syntax highlighting is everywhere language separation doesn't give much benefit.
I started self-learning programming from Swedish resources, using Swedish variable names and (trying) to store Swedish text in databases. The good news is that I learned about encoding and how to store "åäö" properly early on, the bad news is that it was really difficult to ask questions on Stack Overflow when your PHP is 50% Swedish and 50% English. Actually entering the code into Notepad++ was difficult too, weird finger movements to get to the common "special" characters.
Since them I've moved to US keyboards after starting to work with others in an office and not being able to pair program otherwise, and obviously default everything else to English too.
I'm not a native English speaker, but when I come across that sort of "programmed in the country's language" programs today it does take some time to get used to the style and translating stuff while also trying to understand the logic. I wouldn't say it's a huge time-sink, but particularly names can be difficult to convert/translate on the fly when you're trying to get product and developers to agree to what we're talking about.
As a native french speaker, I have the same feeling when reading code written with french keywords, except that since I learned boolean and arithmetic in french, it makes more sense to me to read them in french. As others have pointed out, it seems to only be a matter of how you learn to read and write code.
For comparison, in mathematics I learned to read all the symbols in french, and only learned their english equivalent much later, so it feels uneasy for me when i read their english version. So it is clearly a matter of habit that took its root when you learned reading.
As an American...no uncanniness to English. I guess because it was always the default and what was taught.
The first time I encountered a non English PL, I did feel the same uncanniness you spoke of. It felt... wrong? I wish I remembered which one it was. It was probably the first time I realized how prevelant English was, and that PLs could even be written in any language .
The first language I gained any proficiency in was Logo which, as an educational tool, was translated to my language and that felt to me like a 1960s understanding of communicating with an AI.
I learned English via immersion as I was thrown into an international environment at age four and to me it radiated confidence as the few native English speakers there were obviously much more proficient in the language.
I have a problem with the word "robot", as it's essentially a loanword from my family of languages, but I was unaware of that initially and once I've made that connection, the "coolness" faded somewhat.
Strangely French to me has this same air of confidence, displayed in, among other, the French word for "computer". Truly the French copy no one, nobody copies the French.
My first language was also Logo, which I learned first in English at home, then in French at school. I wonder how many languages Logo was translated into?
Mine was exclusively in Polish because it was some kind of demo version which lacked documentation and some functions.
Fortunately most commands had TLA aliases and were highlighted in the editor, so I just generated all three-letter combinations, inspected them visually and reverse-engineered what they were doing.
Computer comes from French, so they could just have settled on pronouncing it properly and gotten on with their day, but nooo, gotta invent a new word for this very old french word.
> I've often wondered if English native speakers feel the same when reading normal source code which is always in English.
I think that depends on if they understand how to program. For me, as a native English speaker, a computer program is not speech.
In a program, there's three areas where the spoken language influences:
1: The keywords in the language: IE, "if," "switch," "return," ect. These take on a meaning in my head that is distinct from the meaning of the spoken word. "class" is a good example: Its use in programming is shortened from "classification" which comes out of category theory; but its use in English means something very different. Likewise, "if" in my head has such a different meaning in code that if "si" were used, it wouldn't make a different.
2: The API names: By convention, APIs typically are English. Learning these is like learning any kind of professional lingo. I've never tried using a non-English API, and would probably struggle significantly if I had to.
3: My code itself: A significant amount of my time spent writing a computer program is making sure that my code is understandable to me and the other people who have to maintain the program. There's always going to be an "other-worldliness" to a program until someone understands the conventions and style.
"Class" in the sense of classification and taxonomy is a common English word used in many contexts: working class, second class, business class, etc. Those aren't obscure concepts. I don't think it is any more weird than "if", though I am not a native speaker.
I've worked with Japanese and German code. It is definitely unfamiliar and gets me thinking a lot more about how I approach code. I'm liking your description as I keep wanting to map "english" to "technical, correct" too and this helps. thank you!
It is uncanny but in that case I had a fun feeling reading usual abstraction (maybe types, self traits) in French, it tapped into a different part of the brain, that helps thinking about what the code means less mechanically
I always felt the same and one theory I have is because the imperative nature of source code feels rude if you try and put it in French.
It feels like yelling orders to a dog.
Then I don't know if it's just because in French, despite everyone calling us rude, we are usually quite polite.
Or if it's the same for every ESL.
Excel is a good one, another one is World of Warcraft macros which depend on the client language because Blizzard is too good at i18n and they translated spell names which are used as spell identifiers in the UX lua code.
I want to write Structure and Interpretation of Geometric Optics. I have an outline already in my notes and I'm convinced that the computing-first approach would benefit the field immensely. I've been learning optics for a while and writing a python library [0]. With a background in software it's very obvious that there is strong SICP vibes in lenses, refraction, etc. I just need someone to trust me and write me a check for 1 or 2 years salary so I can go full bunker mode and write it =)
Sicp is not computation first. Sicp is understanding first.
Doing the calculations automatically is a happy side effect of finding the right abstractions for describing what's happening physically and those abstractions being expressed in scheme already.
E.g. Exercise 3.73 in SCIP asks how to implement an electrical circuit using a stream data structure. Because of all the work done beforehand you end up with an expression which describes the time behaviour of the circuit using the same expressions that describe its layout.
Obviously we can't break backwards compatibility, but why doesn't css have opt-in "use version" strings that could tell the browser: I want this set of defaults. Something like "use-defaults: system-ui;" or "use-defaults: none".
Is there, somewhere, a list of theorems that were considered proved and true for a while, but after attempts at formalization the proof was invalidated and the theorem is now unknown or disproved?
> It doesn't generate 5 bloody files when compiling
This was a question [0] I asked on stack overflow more than 15 years ago, and is to this day the most up votes I've gotten on SO. I still get notifications from it occasionally.
Unfortunately home to grindadrap [0], one of the most cruel traditions in the world where hundreds of white dolphins are hunted with high speed motor boats and painfully slaughtered for sport.
I dislike Sea Shepherd as an organization, due to their distasteful methods (and personal bias, being a Faroese resident). But I spoke with several of their volunteers during one of their campaigns, and was pleased to realize that, as individuals, their hearts are mostly in the right place. Nearly all of them claimed to be vegan, which I feel does give you legitimate ethical grounds from which to criticize grindadráp.
However, if you don't oppose the general consumption of meat, I don't find the argument against grindadráp compelling. It yields more meat per killed animal than most, and the slaughter itself is arguably no less humane than most commercial meat production (not a high bar, I admit).
In terms of publicity, grindadráp suffers from being inherently more visible than commercial meat production. Personally, I think this is a positive thing. It confronts you with the fact that meat doesn't magically appear in a supermarket freezer - if you want to eat meat, then by definition a living animal has to die. The visibility of grindadráp has prompted conversations with my young son about where meat comes from, and the animal welfare consequences of eating it.
Most animals these days are killed as efficiently as possible - a quick stun for chickens, a bolt through the skull for cows, etc.
The problem with commercial meat production is pretty much always the mega-farms that have them in horrible conditions during life. It's just cheaper, easier, and results in tastier meat to quickly perform the slaughter.
Note that "religious meat" can be cruel for certain animals as well. Chickens are still a quick stun, IIRC, but cows are brutalized - they basically slowly drown in their own blood, because of the way they are slaughtered to be Halal.
And then companies try to push for more Halal meat, because there are fewer rules to account for, when it comes to Halal (great way for them to skirt the law, legally). The chicken supposedly tastes better, though.
The only reason it tastes better is because its not factory farm sourced in the same way and youre closer to the slaughter date when consuming it. Massive suppliers control the entire chain including slaughter. Halal suppliers or live chicken suppliers tend to be smaller operations.
Handling nitrogen is more dangerous than CO2 for the same reason it is more humane for the animals; you don’t notice you’re being asphyxiated. Not that it is impossible or even particularly difficult to handle nitrogen safely, but it would incur a cost (training, equipment, ...), and inevitably result in accidents when these costs are skimped on.
Unless legislation changes, it's simply better business to let the animals suffer.
Not as cruel as factory farming though. I find it weird how people obsess over grind when pigs are treated a lot worse at a hugely larger scale. Maybe the problem is it is out in the open?
Whale hunting (and dolphin hunting) tends to come up any time the Faroes are mentioned, and I don't understand why it's such a cause celebre. I don't see how this is worse than any other form of hunting or fishing, and frankly I prefer it to most forms of animal agriculture.
Industrialized whaling has done massive damage to global whale populations, but the Faroes are tiny and (to my knowledge) their hunting practices do not have a significant ecological impact.
It's probably because a lot of people see whales and other large sea mammals (and some large land mammals) as much closer to humans than say, tuna. I'm not going to argue about whether or not that's a correct take.
And yes, there are plenty of very arguable inconsistencies (eg: eating pigs and cows is okay, eating horses is not) in how people look at animal consumption, but I don't particularly think that invalidates ethical concerns over whaling.
What do you mean eating horses is not OK, in Switzerland we have plenty of horse butchers, you can find horse meat products like salami in all bigger supermarkets.
Its not consumed in same amounts as beef for sure, but its not shunned by most. And yes there is no logical reason to eat beef (especially calves if we consider the cuteness factor) but not horses, horse meat is even healtier.
I'm not sure how "it's okay in <country x>!" is really relevant, TBH.
There are plenty of places where it's not considered okay by a significant portion of the population, so it's a pretty valid to use it as an example of an inconsistency.
The point of horses was an example of an inconsistency. Saying "I have a counter example" doesn't create a relevant discussion.
It doesn't make the horses example any less of an example of an inconsistency.
Edit: not only that but the whole point of me bringing up inconsistencies was to say that just because they exist doesn't mean people can't have ethical concerns about whaling (or other kinds of animal hunting / farming).
Curious contrast about eating horses. My grandmother used to live in a very humble area of my hometown and I was there often. One day, when I was a kid, there was this agglomeration in the main avenue in that neighborhood: people lynched the butcher because for years he sold everyone horse meat for cow meat, and eating horse is taboo in my region of Brazil. Years later, when I moved to Switzerland I was very surprised when I first saw packaged horse meat for sale in the supermarket right next to cow meat, pork, etc.
>eating pigs and cows is okay, eating horses is not
This is the situation in the UK. Some people trace it back to chivalry, where horses were very expensive and mostly owned by the nobility. But I don't know if that is the real reason.
Although it turned out that British people have been eating plenty of horse. They just didn't know it:
I think it is because of the popularity of riding, people are used to seeing horses in that role. Not quite pets, but in a relationship to people closer to that of dogs and cats than that of farm animals.
Being French, I feel pretty well informed when I say that not a whole lot of French folks want to eat horse meat, and the numbers are dropping over time.
Well the French invented chivalry (=horseman) didn't they? So I would say it was an even stronger part of their culture back then. But I don't know about now.
Just makes it look like people jump on the virtue signalling bandwagon when they espouse opinions that aren't broadly consistent with their actions. Like eating beef several times a week, but feeling compelled to bring up the killing of pilot whales in amounts that are not at all concerning from a species conservation point of view.
I think a lot of it has to do with how they do it. I believe a lot of other whaling operations catch and process whales at sea. In the Faroes, whales are driven into shallow water and killed near land in sight of people who aren't accustomed to such things.
Traveling to other cultures involves being exposed to seeing things you aren’t accustomed to. In many ways, that is the whole point.
I’m not defending the Faroese here (nor casting aspersions on them, either), more just saying that it’s your responsibility to research the customs of the places to which you travel, and to not go if you think you might not like what you see.
> "The squealing from the whales was horrible. They were putting hooks on ropes in their blowholes to pull them in and then hacking at them with knives."
I actually don't think it's fine to hear someone mention another culture and immediately butt in to say how disgusting you think their dietary practices are, especially given that our culture engages in factory farming, which is far crueller and more disgusting.
Whenever the Faroe Islands come up, people complain about whaling. Do people complain about factory farms any time (e.g.) France gets mentioned? No. Frankly, even as an opponent of animal agriculture, I find it a bit xenophobic.
There are cruel practices in almost every country, including the US or [wherever you are from]. Society evolves over time. Different countries overcome different problems at different points in time, and the time differences are just noise on the grand timeline of history.
The developed world has more or less eradicated slavery, but it was commonplace just 0.5% ago on the human civilization timescale. Some countries eradicated it at 0.4% and others at 0.6%.
Whaling is pretty weird these days. On the one hand you got Japan, which is well known for it, and on the other is Norway, with a similar operation, but remains pretty unknown. They also spend loads of money researching "beneficial effects of whale products" (or something along those lines), to justify the continued whale hunting
reply