Live data from Hacker News

Italian Ruby

github.com

91–100 of 178 posts

Re: Italian Ruby

#91

There's this absolutely mind bending idea that is - every single function should have a unique identifier. Which is to say: def square(x: Int): Int = x * x should get hashed (and if it has dependencies, they should get hashed in there, too), and your programming language should track the unique identity of this function, and keep a list of names separately from the hashes. This totally solves the localization problem…

Do you know how they would hash a recursive function? Or where I can learn about this? Thanks!

EDIT: I am asking more about the hashing function than about the language. Because if there is a recursive function, that means that one would need the hash of itself in order to compute its own hash. One can probably try to compute a hash iteratively until a fixed-point is achieved.

EDIT2: but... it is probably a bad idea to do that.

Re: Italian Ruby

#92
post #32

The thing is most Italian schools don’t do a great job at teaching English [1]. Students either pay for courses, self-study, or forget. I’m Italian and I don’t agree with the author’s premise that non-native speakers have an additional translation layer (e.g. Italian -> English -> Ruby). It depends on your knowledge of the English language. As you master the language your brain becomes better at context switching; yo…

> We should fix our schools, not translate programming languages. The technology sector speaks English. You can’t escape this language.

Seconded. Additionally I never met anyone who could learn the concepts of programming, but who would be stopped by 20 keywords because they're in English. Half of the words when Italians discuss IT are already in English (Internet, Router, Switch, Server, Wireless/Wifi, Smartphone), or some bastardized mix ("formattare", "reboottare", "debuggare").

And honestly, despite how it might disgust the purists of the language (who will even insist on using "Instradatore" for router, "Servente" for server, etc), I believe this is a good thing. It reduces the barrier to communication and collaboration, and you are ALREADY learning "the language" of IT, may as well have it nearly universal and get more out of your effort.

Writing code in a language other than English (I mean translating the actual code keywords, not the strings and comments) also reduces the chances someone will help you on StackOverflow by a good 95%. And many excellent books or tutorials will be less accessible to you until someone translates them.

Re: Italian Ruby

#93
post #32

The thing is most Italian schools don’t do a great job at teaching English [1]. Students either pay for courses, self-study, or forget. I’m Italian and I don’t agree with the author’s premise that non-native speakers have an additional translation layer (e.g. Italian -> English -> Ruby). It depends on your knowledge of the English language. As you master the language your brain becomes better at context switching; yo…

You simply can’t be effective in programming without knowing English. Having few words translated in your language wouldn’t help much. Moreover it is much easier to learn English than learning how to code.

Learning how to code is trivial next to the years it takes to learn a natural language. Tiny unambiguous vocabulary and syntax. Objectively, a programming language is a much smaller thing to learn that's simple by design.

If you polled people who learning programming and a second language in adulthood, I'd wager the vast majority of them would say learning the natural language was harder.

Of course "learning to program" is extremely imprecise. Learning enough of a language to use its control flow constructs is a much different bar than learning enough to write an Emacs plugin or whatever you might have in mind here.

Re: Italian Ruby

#94

There's this absolutely mind bending idea that is - every single function should have a unique identifier. Which is to say: def square(x: Int): Int = x * x should get hashed (and if it has dependencies, they should get hashed in there, too), and your programming language should track the unique identity of this function, and keep a list of names separately from the hashes. This totally solves the localization problem…

Do you know how they would hash a recursive function? Or where I can learn about this? Thanks! EDIT: I am asking more about the hashing function than about the language. Because if there is a recursive function, that means that one would need the hash of itself in order to compute its own hash. One can probably try to compute a hash iteratively until a fixed-point is achieved. EDIT2: but... it is probably a bad idea…

It's an interesting question that I don't have an answer to. I don't actually know what this technique is called - I heard about in passing at lambda conf, and just saw last week that Unison is using it.

The unison crew is super friendly (Runar once patiently spent 20 minutes trying to explain adjunctions to me, a perfect stranger). I'll ask in their slack channel if this has a name.

Re: Italian Ruby

#95
post #7

ah, this reminds me of how much JOY I am having using my localized Microsoft Excel. All formulas have been translated to my native language and it's just BLISS to work with. This makes it MUCH easier to search the interweb for my specific formula question. We obviously need much more localization. Particularily in error messages.

I encourage you to remove the sarcasm from your post and look at what's left. You probably wouldn't have even posted it.

Let's ween off sarcasm.

Re: Italian Ruby

#96
And this is the perfect illustration of why I find ruby's obsession with attempting to make code read like natural language abhorrent. Imagine you're told to pick up a project written like this. This is what it's like for non-native-english speakers every day.

Natural language is weird, vague and quirky.

Re: Italian Ruby

#97

Earlier quoted context omitted.

Do you know how they would hash a recursive function? Or where I can learn about this? Thanks! EDIT: I am asking more about the hashing function than about the language. Because if there is a recursive function, that means that one would need the hash of itself in order to compute its own hash. One can probably try to compute a hash iteratively until a fixed-point is achieved. EDIT2: but... it is probably a bad idea…

It's an interesting question that I don't have an answer to. I don't actually know what this technique is called - I heard about in passing at lambda conf, and just saw last week that Unison is using it. The unison crew is super friendly (Runar once patiently spent 20 minutes trying to explain adjunctions to me, a perfect stranger). I'll ask in their slack channel if this has a name.

Thanks! I'll try to join their slack after work :)

Re: Italian Ruby

#98

There's this absolutely mind bending idea that is - every single function should have a unique identifier. Which is to say: def square(x: Int): Int = x * x should get hashed (and if it has dependencies, they should get hashed in there, too), and your programming language should track the unique identity of this function, and keep a list of names separately from the hashes. This totally solves the localization problem…

Do you know how they would hash a recursive function? Or where I can learn about this? Thanks! EDIT: I am asking more about the hashing function than about the language. Because if there is a recursive function, that means that one would need the hash of itself in order to compute its own hash. One can probably try to compute a hash iteratively until a fixed-point is achieved. EDIT2: but... it is probably a bad idea…

I also was interested in the answer to this, which turns out to be here:

https://www.unisonweb.org/docs/faq/#how-does-hashing-work-fo...

Tldr: A singly-recursive function works just fine: the current function has a name at hashing time which it can use to refer to itself. A set of mutually recursive functions gets hashed all together as a "cycle", and to refer to one of those functions you need the hash of the cycle plus an index representing which function in the cycle you want to call.

Re: Italian Ruby

#99

There's this absolutely mind bending idea that is - every single function should have a unique identifier. Which is to say: def square(x: Int): Int = x * x should get hashed (and if it has dependencies, they should get hashed in there, too), and your programming language should track the unique identity of this function, and keep a list of names separately from the hashes. This totally solves the localization problem…

> I am really stoked for the future of programming languages, when localization is just a matter of translating some words.

My experience with localised codebases (in my native language) have been horrifying - like it or not terminology is developed in EN, you either get unnatural sounding "borrow" words and the translation is pointless or worse you get people coining new terminology nobody but them understands. Not to mention fragmented communities, knowledge bases, etc.

IMO localised codebases would be a regression not progress and I dread every time I see Chinese in a codebase (simply because they are a large enough market to split the dev community)

Re: Italian Ruby

#100
post #86
post #71

Earlier quoted context omitted.

As a native speaker I would never read - in context - "ometti" as little men. IE: "Se ometti un parametro...". Every language is context sensitive. Same for "moda", when I read: "moda, mediana e media..." I would never - ever - think that "moda" is, in the context, "fashion". "resto" - as used in: "Here is your change" - "Ecco il tuo resto" - would never be read as such in context. IE: the nursery song [1] "Quarantaq…

I always remember “mode” as coming from “moda”, i.e. popular. The mode is the peak of the distribution, the most “fashionable” number. Maybe it’s fake etymology, but it works

I was sure this was the etymology, but apparently "mode" in statistics is quite a modern use, from a work by Pearson in 1895 in English. Whether he was influenced by the Romance languages is not clear, but there certainly isn't a direct path from Latin or French as one might have expected.

https://hsm.stackexchange.com/questions/7675/what-is-the-ety...

Post reply on HN