Hacker News new | past | comments | ask | show | jobs | submit | arielcostas's comments login

How can I possibly trust the Discord client is actually using that library and not a modified version that calls home? The whole point of using open source is being able to see the entire code of the program, and compile it yourself

At work we have it implemented as follows:

1. Check if there is a language cookie set previously 2. If no cookie, check if the Accept-Language is present and contains one of the supported locales 3. If no Accept-Language matches, use the fallback application language

Not that hard to implement, except perhaps parsing the Accept-Language preferences with their quality value can be cumbersome.


> Not that hard to implement, except perhaps parsing the Accept-Language preferences with their quality value can be cumbersome.

Many web frameworks provide a tool for parsing these for you. If yours doesn't (or you're not using one) you may be able to find a package that does. Some will also do the matching for you, so you can pass it a list of languages you can support alongside the Accept-Language string and it will pick the best option that's found in both.

For example, here's the documentation for such a method in the excellent Nette PHP framework that I've been using where I can lately: https://doc.nette.org/en/http/request#toc-detectlanguage

But I've also used this stand-alone package: https://packagist.org/packages/willdurand/negotiation


Ruby on Rails has built in localization and actually respects whatever headers the user agent sends

`Accept-Language` contain both language and locale. Depending on your app you might have supported languages or language/locale combinations. When there's no exact match after step 2, you'll want to do a partial-match on only the language.

Same as what we do. Only one additional thing: when people log in to their accounts, it switches to the preferred language for that account (and any changes in language selection whilst logged in are also saved into the account preferences).

How does the language cookie get set in the first place? Is there any option for the user to set his preferred language?

It is a part of browser's settings (for Chrome and Firefox at least), and it is default to system's default language I think.

You’re talking about the Accept-Language header. They are asking about the cookie.

To answer the question, yes, normally you would have some kind of manual switcher that sets the cookie. Please don’t use flags for this, because flags indicate countries, not languages. Don’t make a Russian-speaking Ukrainian seek out the Russian flag, and don’t make an English-speaking Irish person seek out the Union Flag.


> To answer the question, yes, normally you would have some kind of manual switcher that sets the cookie. Please don’t use flags for this, because flags indicate countries, not languages. Don’t make a Russian-speaking Ukrainian seek out the Russian flag, and don’t make an English-speaking Irish person seek out the Union Flag.

Yes, why make things easy. :-)

Controversial opinion: Flags are great as a visual aid, shorthand, look neat, and give a better UX for 90+% of users, even if it hurts some linguists' and nationalists' feelings.


Its not just a matter of hurt feelings, it has multiple problems. If it was just hurt feelings I might agree with you, but it is ambiguous, inconsistent and fails to cover many cases. That is bad UI.

What flags to you suggest people use for Cantonese, Tamil, Arabic and Xhosa?

Why use the Union flag for English? If the language is en-US surely an American flag would be more accurate? You can then use the British flag for en-GB. However, if you offer Welsh you would use the Welsh flag (and presumably the Scottish one for Scottish Gaelic, although I cannot recall ever seeing that) so it would surely be more consistent to use the English flag for British? Even for or generic English?


I dunno, which flag would serve as a comprehensible shorthand for Arabic? How many Arabic readers would recognise that flag? How many Spanish speakers would recognise the Spanish flag?

If you use flags I would still recommend putting the language name in the language next to it, for example the French flag next to 'Français'.


Better yet: Offer en_CA, en_GB, en_IE, and en_US, with appropriate flags.

(Bonus point for fr_CA with the CA-QC flag)


But then where's the flag for Liberia and Belize and Singapore? What if I'm in Indonesia and you don't offer an Indonesian option but I know enough English to get by - what country's flag should I click?

Just don't use flags, man. It's ridiculous that this is even still a discussion.


I gave an example of Russian-speaking Ukrainians. Why are you characterising this as “hurting some linguists' and nationalists' feelings”? It’s not nationalism or pedantry to be offended at being forced to identify with the flag of the country that is currently murdering your friends and family.

I like when the language is in it's own name, eg: Suomi -- makes it easier to find.

Except when the names are in non-Latin script and therefore sorted arbitrarily.

European here (not used to checks, "checking accounts" or any of the USAmerican banking system). How does this really work? Don't they take your money off the account once the check is cashed?

As far as I can tell, this works as follows: 1. You have 50$ in an account (for example) 2. You write a check for yourself worth 200$ 3. You cash that check, thus having 250$ in your account 4 .You withdraw 200$ at an ATM and still have 50$ in your account.

At what point doesn't the bank figure "hey, someone cashed this check, you now have -150$ thus owing us [JPMorgan Chase] 150$ plus any fee we agreed on" ?


Nope, and there are many reasons why other languages keep going up in popularity while PHP is stagnating, and used mainly by developers stuck on WordPress, or don't know/want to learn anything else.

> This is a great fun for developers to learn and try new shiny things, but a big problem for business costs.

Which is why companies should have more seasoned developers making the important decisions, while of course contemplating what the new but well-established technologies can offer. React is no longer a hype-only thing, it's a well-established technology that is here to stay and is used by a lot of companies. Same goes for Angular, Vue, etc.

You choosning `randomframework` for an enterprise project that shouldn't need to be rewritten or replaced in the next 5-10 years is a bad decision, and it's not the fault of the technology, but of the decision-makers.

> PHP has Long-term Stability you can Rely on > [...] > What frameworks are used by majority of PHP developers? Symfony and Laravel.

So... like Java has Spring and Jakarta EE (among others), Python has Django and Flask, .NET has ASP.NET Core, and so on. Yet many minoritary frameworks exist for every language, including PHP (CakePHP, CodeIgniter, Zend, Slim, etc). However, mostly in PHP you see people reinventing the wheel building frameworks/abstractions on top of PHP itself for their own projects, instead of using a well-known framework.

> We have 1 new PHP version released every year, with a clear release path ahead:

You mean in a similar fashion than about Python (new version of python 3.x every year around October), Java (two versions per year, february and september, with LTS every 3 years) or .NET (new version every november, every two years being LTS)?


Picasa -> Photos was actually a new thing, right? Photos is cloud-hosted while Picasa was a program you installed on your computer and had web-sharing abilities.

Google Talk was the original one, then transitioning to Hangouts, while Allo and Duo were created too (I supposed to compete with Apple's iMessage and FaceTime), which also died, and finally we got to today with Google Chat and Google Meet.


I still use Picasa on Windows, but its cloud features (uploading and mapping) don’t work anymore.


Maybe I'm too young, but I can't imagine building stuff locally and then pushing. Too messy later figuring out why stuff worked on your machine but not the end users'. I like way better setting up a CI pipeline on GitHub, building stuff remotely and then downloading the final binary to my own device or a VM to do manual testing.


They removed the "Bus del barri" line that uses minibuses from popular apps like Google Maps and Moovit, mostly used by tourists. These buses are mainly for the neighbours, and goes through narrow streets to take them shopping/connect them with other lines.

If they want to handle all the demand in that line, they'd probably need many more buses, which is more expensive and would cause more congestion than just hiding that line from popular calculators.

There are more options to get to Parc Güell, such as bus lines V19, 24, 129 and others, with a small walk, leaving the "Bus del Barri" (literally "Neighbourhood bus") for the actual neighbours, which can still find the schedules at tmb.cat and the official mobile app.


It seems "Bus del Barri" on tmb.cat corresponds to lines 122 to 131 [1]

Only the 129 bus seems to have little to do with the park when you select it [2], so if we are talking about those bus lines, the translation certainly is "Our bus, not yours" by the city council.

[1] https://ca-m-wikipedia-org.translate.goog/wiki/Bus_del_Barri...

[2] https://www.tmb.cat/en/barcelona-transport/map/bus


Nope, there are more lines, as per the Wikipedia article you mentioned [1] and TMB's bus map [2] at the bottom right corner, lines 112 to 135 are Bus del Barri, being 116 (La Salut-Gràcia) originally line 216 inaugurated in 2000

> so if we are talking about those bus lines, the translation certainly is "Our bus, not yours" by the city council.

The translation is "buses with small capacity going through smaller neighbourhood streets so neighbours can get to the doctors' or school without walking as much or depending on a car". Especially since those are less populated areas and closer to the mountain.

Problem here is line 116 stops right next to Parc Güell, and other lines that allow for bigger buses don't stop as close, so most transit apps provided routes using line 116, essentially flooding it.

Until they find a better solution, they decided to stop showing that route in the apps, so people won't use it as much. Neighbours and people that use the TMB app will still see it (so tourists using the official app will too), but it will get rid of many users with such a simple step.

[1] https://ca-m-wikipedia-org.translate.goog/wiki/Bus_del_Barri... [2] https://www.tmb.cat/documents/20182/96078/Pl%C3%A0nol+xarxa+...


Thanks,

>Until they find a better solution

I believe that the solution starts with increasing the number of buses or adding stops to existing bus lines with bigger capacity, while studying the algorithms and passenger flow involved. However, if the city council has decided to maintain costs, reducing the number of buses on weekends included, it seems unlikely that they will seek out other solutions. The city council has set a precedent that is probable to happen again.


> Very hard for me to understand why, in a world of Google docs, anyone would want to deal with the bloated mess that is ms office.

Precisely because some of that "bloat" is useful for others. Off the top of my head, I really dislike that Google Docs doesn't support stuff like creating your own styles to apply in the document. My use case, for example, is having a style for inline code, with a monospaced font and a different colour, which I can do in Word creating a new style and applying it, but can't in GDocs.

> The poor person re-did about 4 hours of their work 3x because they couldn’t find the file MS Word had guaranteed them it had saved, so they had to start from scratch.

It should appear as a recent file once you open word, no matter if it was saved to OneDrive or locally. And it certainly isn't so hard to choose where to save it, if OneDrive, a SharePoint site or locally. At least nowadays.


> What sort of infrastructure would i need for one school with reliable strength? Any recommendations for actual equipment? What is the price estimate/range for one school in the first approach? Are there any companies that already exist that offer this solution including the login stuff as well?

You need multiple APs and then an authentication/authorisation system that allows navigation for users once you know who they are and that they should have access to the network.

The difference between both systems relies mainly on the authentication, and in both cases, most equipment vendors provide options to set a Guest Portal up. The other option would be to host a RADIUS server (also referred to as WPA Enterprise) that does the authentication.

The regional administration where I live maintains some sort of student network for schools too, and they use RADIUS. They maintain a public website where user credentials are managed (you identify with a username/password they give you and you can change those credentials) and then connect to the wifi using those credentials

Again, how you deploy this, depends in many cases on the vendor you choose and what they support.


It does hinder competition and locks you in, doesn't it? Since you need a licence from the software owner to provide your own hosted solution, and they might give it to you at an huge price or not give it at all.

Say I had MongoDB hosted on some cloud provider before the change to SSPL. I can't keep getting support from the cloud provider for updates or at all, so I'd have to migrate to their MongoDB Atlas product or host it myself (which I wanted to avoid in the first place).

Then they could raise the price (almost) as much as they wanted, just slightly below the point where I'd consider migrating to another DBMS (engineering cost) or self-hosting (DBA cost), in any case affecting me.

Alternatively, had I chosen MySQL or Postgres, well established DBMS not built by startups with a single product that desperately need to make money, I could choose Azure, GCP, AWS or any other provider depending on my needs.


Yes, it hinders competition for cloud hosting in certain ways.

Someone could set up a separate hosting service for it as long as they made their supporting code FOSS too.

It also lets you self host, including on a cloud platform.

The rules for hosting SSPL software, are not very different from those for distributing GPL software. It certainly seems to be in the same spirit as someone offering software under GPL with a proprietary alternative.

What I do think is unfair is when there is an element of bait and switch.

> Alternatively, had I chosen MySQL or Postgres, well established DBMS not built by startups with a single product

That was how MySQL started, IIRC?


> Someone could set up a separate hosting service for it as long as they made their supporting code FOSS too.

Isn't this more-or-less what the AGPL does? Allow hosting for others, but sharing the server-side code. I get that big providers aren't happy by this for multiple reasons, though

> The rules for hosting SSPL software, are not very different from those for distributing GPL software

They are in the way that they forbid you from competing with them. For a GPL program, I could build my own redistribution (see Linux distros consisting on packaging and distributing software made by others)

> That was how MySQL started, IIRC?

Actually, it seems so, but they used the GPL instead of BSD, and based their business on support and dual-licencing, and was later on bought by Sun/Oracle, being just one of their products and not their only product, like Redis or MongoDB.


> What I do think is unfair is when there is an element of bait and switch.

What's the bait? The expectation to get free development and support forever? The pre-switch Redis code is still BSD licensed, that can't be changed.

Additionally, using SSPL licensed code doesn't concretely change anything for essentially any end user/developer besides BigCos - which are free to use and hack Redis at will as before. As a matter of fact, almost all those who complained about the license change on HN, are actually not affected.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: