TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Italian Ruby

206 点作者 kinduff超过 4 年前

28 条评论

roflc0ptic超过 4 年前
There&#x27;s this absolutely mind bending idea that is - every single function should have a unique identifier. Which is to say:<p>def square(x: Int): Int = x * x<p>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.<p>This totally solves the localization problem: you can just write localizations in one place, and whenever you need to represent them, use the hash to look up your representation. This lets everyone (compatibly) name their functions&#x2F;variables whatever they want.<p>Less intuitively, it also basically removes the need for builds. Every function has a verifiable unique identity, so your compiler can tell with 100% certainty whether or not something needs to be rebuilt. When you modify a function, it changes the hash, so you end up with both the old and the new function. Any code which requires the old function can still access it.<p>This has been implemented in the Unison programming language (<a href="https:&#x2F;&#x2F;unisonweb.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;unisonweb.org&#x2F;</a>) which is very much in alpha. I don&#x27;t know if there are other platforms implementing it.<p>It is so elegant and freeing. I am really stoked for the future of programming languages, when localization is just a matter of translating some words.
评论 #24331610 未加载
评论 #24331401 未加载
评论 #24333211 未加载
评论 #24332896 未加载
评论 #24333452 未加载
评论 #24334318 未加载
评论 #24338474 未加载
评论 #24337369 未加载
jaclaz超过 4 年前
Also, sometimes, translations have a different (perceived) meaning.<p>A pet peeve of mine is &quot;by default&quot;.<p>In Italian it is translated (correctly) &quot;per difetto&quot;, and it is &quot;fine&quot; when other people already know the term, but otherways &quot;difetto&quot; is also the translation of &quot;defect&quot;, and you will have a tough time explaining to a layman that it is not a &quot;defect&quot; in that other sense.<p>Another &quot;queer&quot; word (I found it in the Italian version of some database tools) is &quot;ometti&quot; (which is the correct translation of &quot;omit&quot;) but that actually I normally read as &quot;little men&quot;.<p>In Excel there is &quot;MODE&quot; (statistical function) that is translated into &quot;MODA&quot; which I read as &quot;fashion&quot; and &quot;MOD&quot; (modulo operation) which is translated into &quot;RESTO&quot; (which has a more common meaning of &quot;change&quot; in the sense of what a cashier gives you back when you pay besides that of &quot;remainder&quot;).
评论 #24330691 未加载
评论 #24331003 未加载
评论 #24331226 未加载
评论 #24332136 未加载
评论 #24331034 未加载
评论 #24331052 未加载
评论 #24331031 未加载
评论 #24330718 未加载
评论 #24332034 未加载
评论 #24332482 未加载
seek3r超过 4 年前
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.<p>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 -&gt; English -&gt; Ruby). It depends on your knowledge of the English language. As you master the language your brain becomes better at context switching; you don’t even notice it anymore (Myers and Cotton, 2002).<p>We should fix our schools, not translate programming languages. The technology sector speaks English. You can’t escape this language.<p>[1] <a href="https:&#x2F;&#x2F;www.ilsole24ore.com&#x2F;art&#x2F;conoscenza-dell-inglese-alta-ue-ma-italia-e-francia-sono-ultime-AErQAzYG" rel="nofollow">https:&#x2F;&#x2F;www.ilsole24ore.com&#x2F;art&#x2F;conoscenza-dell-inglese-alta...</a>
评论 #24330640 未加载
评论 #24331412 未加载
评论 #24330743 未加载
评论 #24333584 未加载
评论 #24330823 未加载
评论 #24330626 未加载
cptwunderlich超过 4 年前
There have been some attempts for localized programming languages. In fact, e.g., MS Excel Macros are localized (e.g., &quot;SUMME()&quot; in german instead of &quot;SUM()&quot;). There is even a Wikipedia page: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Non-English-based_programming_languages" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Non-English-based_programming_...</a><p>I&#x27;m a bit conflicted. On the one hand, I am all for language diversity and empowering local languages. It may also help novices and very young learners. On the other hand you are already learning an unfamiliar formalism and it hinders interoperability, sharing and collaborating. Hm..
评论 #24330722 未加载
评论 #24330239 未加载
评论 #24330233 未加载
评论 #24330305 未加载
评论 #24330633 未加载
评论 #24330439 未加载
评论 #24330421 未加载
remix2000超过 4 年前
Related stuff:<p>* Claim that word order in Japanese suits ST-style message-passing OOP better than English: <a href="https:&#x2F;&#x2F;thoughtbot.com&#x2F;blog&#x2F;learning-japanese-the-rubyist-way" rel="nofollow">https:&#x2F;&#x2F;thoughtbot.com&#x2F;blog&#x2F;learning-japanese-the-rubyist-wa...</a><p>* APL, a language that uses symbols instead of keywords: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;APL_(programming_language)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;APL_(programming_language)</a><p>* Non-English-based PLs on Wikipedia: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Non-English-based_programming_languages" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Non-English-based_programming_...</a><p>* How does English proficiency correlate with programming mastery: <a href="https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;277097932_A_CORRELATION_BETWEEN_STUDENTS%27_ENGLISH_PROFICIENCY_AND_THEIR_COMPUTER_PROGRAMMING_MASTERY" rel="nofollow">https:&#x2F;&#x2F;www.researchgate.net&#x2F;publication&#x2F;277097932_A_CORRELA...</a>
评论 #24330861 未加载
评论 #24330804 未加载
评论 #24330734 未加载
评论 #24331333 未加载
makach超过 4 年前
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&#x27;s just BLISS to work with. This makes it MUCH easier to search the interweb for my specific formula question.<p>We obviously need much more localization. Particularily in error messages.
评论 #24330453 未加载
评论 #24331513 未加载
nathell超过 4 年前
Finally, a spiritual successor to Lingua::Romana::Perligata.<p><a href="https:&#x2F;&#x2F;metacpan.org&#x2F;pod&#x2F;Lingua::Romana::Perligata" rel="nofollow">https:&#x2F;&#x2F;metacpan.org&#x2F;pod&#x2F;Lingua::Romana::Perligata</a>
评论 #24330716 未加载
Tade0超过 4 年前
I spent a few years in Italy but never learned the language properly(my only Italian friend there happened to speak my language - Polish), still it strikes me as odd that Italians should have issues with learning English when the two languages are grammatically much closer than English or Italian is to e.g. any Slavic language.<p>Thing is, the way I speak Italian is I use English as an intermediary language, because at least the tenses are somewhat similar.<p>Of course this strategy falls flat on its face in a more complex conversation, because spoken Italian is chock full of phrases - my favourite being &quot;in bocca al lupo&quot; - which taken literally translates to &quot;in the wolf&#x27;s mouth!&quot; (note the lack of predicate here) and to me sounds no different than &quot;Darmok and Jalad at Tanagra&quot;.<p>One other thing is that during my time in that country I was surprised to note that the IT job market there is actually a little <i>smaller</i> than in my native Poland. Weirdly enough the salaries are roughly the same - especially after taxes. I can&#x27;t explain this, because I met a lot of smart and passionate about their work people in Italy.
CaciaraAsAServi超过 4 年前
OT, sorry, but related (well, related only in the language):<p><a href="https:&#x2F;&#x2F;github.com&#x2F;esseks&#x2F;monicelli" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;esseks&#x2F;monicelli</a><p>(humorous PL based on a cult movie)
ris超过 4 年前
And this is the perfect illustration of why I find ruby&#x27;s obsession with attempting to make code read like natural language abhorrent. Imagine you&#x27;re told to pick up a project written like this. This is what it&#x27;s like for non-native-english speakers every day.<p>Natural language is weird, vague and quirky.
Kreotiko超过 4 年前
No intention to be rude but the Readme page doesn’t seem written by somebody native. I understand that English is basically the only language for technical writing but writing that bad in Italian defies the purpose of this Gem altogether.
评论 #24330503 未加载
评论 #24330525 未加载
评论 #24330761 未加载
neallindsay超过 4 年前
Ruby is great for these kind of shenanigans: <a href="https:&#x2F;&#x2F;github.com&#x2F;searls&#x2F;emoruby" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;searls&#x2F;emoruby</a><p>I worry about the cultural hegemony of the English language. Projects like this are interesting, but I don&#x27;t see a world where they overcome the inertia of English-based programming.<p>Ruby itself is a great example - created by a Japanese guy, but entirely with English keywords.<p>Maybe if China makes a concerted effort they could do it. ¯\_(ツ)_&#x2F;¯
K0nserv超过 4 年前
I created something like this when I was first learning to code in C++. A horrible Swedish variant of the language based on massive abuse of the pre processor, good times.
bfabio超过 4 年前
I&#x27;m having Vietnam-style flashbacks right now, courtesy of Excel&#x27;s localization.<p>Please don&#x27;t ever use it in production, ever.
vasilakisfil超过 4 年前
I had filled a relevant issue [1] a while ago in Ruby issue tracker. I also thought that teaching Ruby language in children, in their native language, would be so cool.<p>[1] <a href="https:&#x2F;&#x2F;bugs.ruby-lang.org&#x2F;issues&#x2F;12722" rel="nofollow">https:&#x2F;&#x2F;bugs.ruby-lang.org&#x2F;issues&#x2F;12722</a>
Kosirich超过 4 年前
Love the idea. There is something about using the language I associate with Calcio, Art, Moda, Renesanse, Culinary experience that goes well with programming. That being said and someone pointed out italian has a lot of synonyms and double (close) meanings but then again so does English. According to some study, German is the most precise language. Since I recon not many people would like to write their algorithms in German, the next best neutral(ish) language with high precision is Latin! It is still taught in many schools with classical education and most of European languages are based on it.
oneplane超过 4 年前
In itself this seems like a ton of fun. But for interoperability it seems horrible to me and is pretty much a nightmare. Working with codebases from different companies in different countries, the ones that lag behind in on way or another are often written in the local language (i.e. German or Dutch) which essentially cuts a lot of it off from the common knowledge pool on the internet.<p>While English isn&#x27;t the biggest or the best language, it&#x27;s the language with the must useful body of information regarding technology.
untog超过 4 年前
I remember many years ago when MooTools (yes, that long ago) announced localised APIs as an April Fools joke. At the time I thought it was an interesting idea!<p>I do wonder if there’s still something to it. I can imagine that in the not too distant future we won’t check in text code files any more, instead checking in ASTs that represent the code. That would end all the silly debates about code formatting: everyone would check out their preferred format then check in something standard. Maybe languages could be treated the same way.
ecmascript超过 4 年前
Seems like a better version of <a href="https:&#x2F;&#x2F;github.com&#x2F;pushmatrix&#x2F;fikascript" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pushmatrix&#x2F;fikascript</a>
评论 #24330466 未加载
TimTheTinker超过 4 年前
At my last job (at a company in California), half of the development team was contracted out of a firm in Russia.<p>I once asked the Russian developers how they felt about programming in English as opposed to Russian. They all said they strongly prefer programming (both keywords and identifiers) in another language, because it feels more like a &quot;computer language&quot;. And there really aren&#x27;t that many words to memorize, anyway.<p>Just an interesting perspective in the discussion.
casualrandomcom超过 4 年前
Noting that &quot;accessore&quot; is not an Italian word was on the tip of my tongue (or, rather, fingers), when I realized that not even &quot;accessor&quot; is an English word.<p>Terms used in programming languages are probably much more awkward in an English mother tongue&#x27;s ears than in those of a foreigner.<p>I wonder if &quot;by default&quot; had any meaning in English before it was adopted in the IT context.
评论 #24331777 未加载
makach超过 4 年前
I think my next project will be to localize befunge. <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Befunge" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Befunge</a>
capnorange超过 4 年前
I just got back into ruby after a while and I must say it feels so zen.
评论 #24331355 未加载
thalesmello超过 4 年前
Finally! The perfect language for my spaghetti code!
Gravityloss超过 4 年前
This could work very well when teaching programming.
评论 #24330429 未加载
评论 #24330500 未加载
simonebrunozzi超过 4 年前
This is a &quot;fun&quot; idea. Being able to write Ruby code, using Italian instead of English.<p>Not practical. Not useful. But fun. I like that.
eclat超过 4 年前
Bravo
browsergap超过 4 年前
Only ~5% of Earth speaks English natively. Another 15% speak it as an <i>nth</i> language.<p>I think English based programming is an anomaly that came out of the post-WWII US&#x2F;UK cultural world order, and from that sustained economic boom came modern computers, languages and the internet to a mass market.<p>20% of the world speaks Mandarin Chinese (not all as a first language tho). And, about the same % as speak English natively, speak Hindi (+ dialects) natively, and again about the same amount speak Arabic, and again about the same amount (all above 300 million) speak French, tho a greater % of those have le français as an nth language.<p>HN, and programming, shouldn&#x27;t get carried away with the myopic, &quot;fish in the fishbowel&quot; view of English primacy. It&#x27;s really not. Not globally. Just like &quot;white people&quot; are not a majority. Only in a very narrow, very opinionated and specific corner of the globe are those things true. It&#x27;s a big world out there, much bigger, it seems than many of you imagine from your keyboards.<p>Even tho HN is in English, many HNers are not native English speakers. I see people associating programming languages with English and thinking it&#x27;s simply natural (if just by convention), but for most of the world, this simply isn&#x27;t true, and it could have been another way. In the future it might be another way.<p>So I really feel it&#x27;s not accurate to say there&#x27;s some &quot;problem&quot; with people on Earth creating languages that are founded in Chinese, or Japanese, or Italian, or Russian, or Hindi, or any of the many other languages people speak. For a large corner (or even a small corner) of the world, it would not be a &quot;problem&quot;, it would be perfectly natural.<p>I just don&#x27;t think it&#x27;s that accurate, or that useful, to think of programming and English as being somehow a natural match.<p>When people speak about &quot;representation&quot; in the &quot;tech industry&quot; they ought to consider this factor as well. I&#x27;m not just talking about SV, I mean &quot;global representation in engineering&quot;. Of course, if Japanese people decide to embrace a language that somehow uses Japanese letters or characters then, there&#x27;s probably not much you can do about it.<p>I&#x27;m just saying, don&#x27;t assume it&#x27;s a bad thing and don&#x27;t think somehow English and programming has to go together. Certainly at the level of logic, and CS, programming is completely independent of English (tho interesting to think about how the grammar of English maybe constrained and drove initial language structures, concepts and flow control and do a comparative study of differences to languages that emerged from cultures and used other human languages.)
评论 #24330514 未加载
评论 #24330700 未加载
评论 #24331322 未加载