News for hackers. Stuff that matters.

parminya

Re:static-server: an HTTP server in Go for static content on Saturday September 16, 2023 @02:07PM (#37537120)
or the go one:

$ go run github.com/eliben/static-server@latest

Re:An Internet of PHP on Saturday September 09, 2023 @07:15AM (#37444080)
JSX and PHP are actually seriously different. When you break out of PHP, you're just outputting text to standard output. When you're using JSX syntax, you're constructing Javascript objects that can be manipulated using standard javascript techniques. Anyone who believes they're comparable seriously doesn't understand the task that is before them.
Firefox on iPhone is Firefox on iPhone, but it uses WebKit instead of Gecko.

Chrome on iPhone is Chrome on iPhone, but it uses WebKit instead of Blink.

The reason this is important for you to keep in mind is because Firefox is whatever Mozilla says Firefox is, and Chrome is whatever Google says Chrome is. There's no reason to suppose the iPhone version of some product should share any code with the Android version of the same product.

Re:The guide to software development with Guix on Thursday June 08, 2023 @08:52AM (#36241043)
Nix is also generally run as a daemon. It doesn't have a dependency on systemd and it does run on MacOS. I think also it runs on FreeBSD in principle.

The parent poster was probably conflating NixOS and Nix. NixOS is a way of using nixpkgs to build/configure and install/upgrade an operating system based on Linux and systemd. But you are not obligated to use systemd just because you're using nixpkgs.

NixOS uses sytemd for essentially the same reason other Linux distributions do: most user environments are now built with the assumption that systemd underlies them if Linux does as well. In principle you could fork nixpkgs and make all the necessary changes to remove the systemd assumption - managing a NixOS system and hacking on nixpkgs are basically the same skillset so it's not like managing an Ubuntu system where you would have to become familiar with how Ubuntu gets built. With nixos, the command is the same whether you're building an entirely new distribution based on a custom fork or whether you're just downloading builds of the latest security upgrades. Aside from the actual energy it takes to maintain a second system manager, you would only have to wait for the builds to complete rather than learning how to build everything. But so far no-one who has tried that has got enough traction - the cost-benefit just isn't there. Honestly, I think this is part of the reason people are offended by NixOS in particular using systemd: it feels like it should be possible for you to remove the systemd dependency, but you haven't done it.

The change in discussion quality has occurred because old Twitter had an objective to cultivate one particular quality of discussion, and Musk Twitter has an objective to cultivate a different quality of discussion. These goals were stated up front by the respective decision makers. Any particular technique is simply a tool for the job. If old Twitter or new Twitter thought a method would aid in their quality cultivation goals, then they would have adopted it: if it proved counterproductive, then they would drop it.

So there is almost certainly a correlation to the boost that is given to comments. But even if it is a causative correlation, the ultimate cause is not the bluecheck boost, but the desire of the decisionmaker.

It's much easier to label buttons when you work for a small company, because you know exactly who does what and exactly who is responsible for labelling the buttons and you know exactly what's going to happen to you when you label them, so you just do it and have that debate whenever it happens. Bystander effect, etc.
Re:Grass Makes Better Ethanol Than Corn Does on Thursday June 08, 2023 @03:53AM (#36238592)
How is this not a breach of the constitutional protection for the right to freedom of assembly? A caucus, in particular, is literally an assembly. Surely for elections to be free and fair, the private associations who put forth candidates should be able to freely determine who those candidates are.
"Tire" and "curb" were once the normal spellings in the UK; "kerb" is an innovation whereas "tyre" is either an innovation that is coincidentally the same as an archaic spelling, or the restoration/repopularisation of an archaic spelling. The spelling "kerb" upsets me whenever I see it because it's clearly referring to the curvature of the kerb, but fortunately I almost never see it.

Likewise, spellings like "programme" are deliberate changes to mimic the French spelling. These have been rather more successful than they have any right to be, but some have completely failed (like "gramme") and a lot of people still use the older spelling.

-ize, also, used to be the standard spelling with -ise an alternative also found in the UK. In this case, it's clear that an understanding that -ize is used in the US and -ise is used in the UK became an understanding that -ize is the US spelling and -ise is the UK spelling which raised its currency. But I think they both remain in use in the UK (-ise has more-or-less chased out -ize in Australia though).

-or spellings like "honor" and "color" were once much more common in places where they are now rarely seen and vice versa. To an extent they follow the same story as -ize/-ise, with the US standardisation of one chasing its use out in the UK. In Australia, -or was much more common (than now) when the power to distinguish oneself from was the UK, but now that the main power one needs to distinguish oneself from is the US, -our has chased it out except in the name of the Labor party (because the paperwork was filed by someone who happened to prefer the shorter spelling in a time when both were current) and some uses of "honor" that are literally etched in stone. (The last general use was until about the year 2000, by "The Age", a Melbourne newspaper which used -or as its house style, but by then it was seen to be improperly American and they switched to -our.)

Generally, spellings and spelling variations remain open and subject to gradual change in all English-writing countries.

I don't think they're concerned so much by the people who don't know what a flat is, but by the people who do. There's more than a handful of bookreaders out there who are very protective of any difference between their national form of English and some other national form of English, who will get upset if a local publisher uses the foreign form.
Re:DNS0: The European public DNS that makes your internet safer on Tuesday February 07, 2023 @07:22AM (#34691785)
How can you trust any company you pay to stay up even if you are their customer? I've used discontinued products before. Paid subscriptions to companies that merge with others and the service no longer really exists.
Me too, I wish the companies would obey the law without putting in the consent banner. It's not like there's any law obliging them to put in the consent banners. They freely chose to piss us all off even though they had the alternative of behaving like perfectly profitable pre-internet businesses and ... not tracking us.
Generally speaking ink printers are regarded as a decent option for someone whose printing is predictable. Its the people who print a bunch this week and then nothing for a month or so and then another burst, who benefit from laser printers, because there's no ink to dry up. It's not that hard to find yourself in this "sweet spot" where neither print shops nor ink printers are good value for money especially if you live in a country where bureaucracy is still paper-based.
Re:Ask HN: Is anyone successfully self-hosting Firefox Sync? on Monday February 06, 2023 @04:08PM (#34684352)
Instead of directly exposing the server to the internet, you could keep it behind a VPN. That way you only need to keep the VPN secure, the VPN serves as a whitelist.
Re:“Invalid Username or Password”: a useless security measure on Wednesday November 23, 2022 @03:27PM (#33724108)
> Permanently losing access to an account sucks a lot.

But mostly that's all. Usually it's a minor inconvenience. Occasionally it sucks a bit. Rarely it sucks a lot. Almost never is anything of value lost. It can be wholly eliminated by good data practices e.g. backups. (No one backs up their Amazon account data. It isn't designed for it. Because the "webdevs" think of the data as their boss's - squarequoting "webdev" because the effective decision is the CEO's and the "webdev" is just taking some abstract, ill-thought-through decision and making the ramifications concrete.)

On the other hand, it also sucks a lot when your gratuitously collected private information is taken to the darkweb. As countries become more accustomed to dealing with databreaches, they are beginning to consider legislating harsh compensation requirements and painful fines. Once that's happened, almost all of the private data that the user has in their account? Let the user keep it. We webdevs and our mortal enemies in business/sales/product will have to innovate new decentralised databases - where each node is a users' computer. And yeah, some things will be harder or not even possible (for the user). Other things will become possible that aren't at the moment (for the user). And at least you won't go bankrupt when a state level actor decides your database is valuable.

It's completely correct. You can follow say @[email protected] from an account on say mastodon.nz.
Re:EU electricity production by country and source on Sunday November 06, 2022 @08:23AM (#33492329)
Time didn't stop in the pandemic. The 2007 election was fought on the topic of a carbon transition. It's at least a decade and a half, and the anti-transition side hasn't given up yet so it's still ongoing. If the Andrews government is returned it may be the beginning of the end with their proposal for a renewables oriented renewed SEC, but it won't be the end for the country as a whole.
Re:EU electricity production by country and source on Sunday November 06, 2022 @08:13AM (#33492226)
Why does Canada report information for so few provinces/territories? Are they unwilling or unable to collect the information?
Re:Searchable List of Mastodon Servers on Saturday November 05, 2022 @04:03PM (#33485075)
People aren't mass-leaving Twitter because Twitter owns their data. They were happy with someone else owning their data to the extent that they were users of Twitter. They're mass-leaving Twitter becomes Elon Musk bought Twitter. Elon Musk cannot buy Mastodon. He might buy your particular server, but the chances he'd try to are much more remote because the benefit of doing so is much less.
Re:Searchable List of Mastodon Servers on Saturday November 05, 2022 @03:53PM (#33484980)
> to normies actually Gmail does equal Email and such

I'd love to hear of some evidence for that. I've never encountered anyone assuming that the bit after the @ has to be gmail.com, or being unclear and uncertain if they can communicate between their work Outlook account and their home Gmail account. This feels very much like someone's taken the idea "to most people, the internet just is the web" and run wild with it.

"Planes should not fall out of the sky. Aviation experts please fix this."

"Also, lawmakers, ensure the aviation experts fix this."

"Having regard to our advisors, we, the US lawmakers, have concluded that one criterion according to which aviation experts should judge their fix is that planes should have a doobywhacky in them, because aviation experts have assured us that a doobywhacky is important. But we will give them two years to get their plane certified without the doobywhacky on a legacy basis, since it seems like a good faith effort should be able to get legacy planes certified within two years."

"Aviation experts at Boeing, we, the aviation experts at the FAA would like to know some information about your planes."

"Aviation experts at Boeing, we, the aviation experts at the FAA need to know some information about your planes; what you have said is not good enough and you've left many questions unanswered."

"Oh, hi, US lawmaker, we, the lobbyists at Boeing thought you might like to know how bad it would be for you if the law isn't changed, yeah, we know everyone thought a good faith effort should be able to get legacy planes certified within two years, but you know how complicated planes can be."

And at this point, I think there are two possible replies: "Everyone believed it should have been possible, and there are clearly problems at Boeing's end, so they need to wear their mistakes; it's not like they're left with nothing and it's widely agreed that 737 MAX represents an end-of-line design so the cost is not excessive" or "The two years was written into the law to get these particular models out without conforming to the law; if they can be approved under the strictest application of the old rules, does it hurt if the approval is made just before the two year deadline, or just after it? In either case, it's flying according to the legacy certification. So we'll just extend the period a little."

I certainly think a case can be built either way, but knowledge of aviation is really only a minor part of the decision making process facing lawmakers right now.

So why not just reinterpret the original comment so it survives, and take it to highlight the difference between a rule-of-law legal system that punishes rich companies who break the law until it has motivated law-following behavior, and a corrupt legal system that does not punish rich companies who break the law enough to motivate law-following behavior. I don't think the balance between Europe and the US has always been in Europe's favor, so it's not like there's no capacity to improve.
The UK has one or two state religions, bishops ex officio have seats in (the less powerful house of) parliament, and the upcoming coronation of their king will be a church service (with communion and all). Germany collects taxes on behalf of religious communities. Australia and Canada regularly send public money to religious schools.

I don't think the separation of the Church and State in the US is particularly less than normal. The separation of Church and Politics in the US is probably less than normal, but that's an entirely separate matter, which - to the extent that is antidemocratic - can probably only be addressed by democratic reform.

That doesn't make Facebook like a government though. If twenty years ago the government chose to advertise a job in the three largest newspapers in a city, and not in the Dah00n Times, that doesn't make the newspapers like a government or incorporate them into the government. It might mean that people should question whether the government is too closely tied to certain private corporations. But that's a different question.
This is a case for regulation* and for promoting competition and diversity in the marketplace. It's not a case for treating them as governments. If they're governments, who chooses their leadership? Do they have one board, selected by the US president/according to the rules of the US Congress, that is applicable in the US, and another board, selected by the Canadian PM/according to the rules of Canadian law, that is applicable in Canada? How much are we going to pay to their shareholders for confiscating their property?

* Banning moderation is a form of regulation. It falls far short of treating them as governments. It is possible to say "I want to regulate Twitter" without having to make weird statements like "We should treat Twitter as a government".

If they're defacto governments, then they should be nationalised. If government is government, that extends to elected leaders or appointments by elected or responsible members of the executive. This of course entails the balkanisation of the internet, but it's the logical conclusion of your position.
Re:Simon Peyton Jones – Haskell Foundation Podcast on Sunday October 16, 2022 @05:05PM (#33227190)
I don't know. But - and this is my interpretation, not some summary of another talk - it sounds like Simon Peyton Jones, who is one of the people who are responsible for the poor state of the code, already answered that: "The difficult stuff is envisioning and being very clear about what you’re trying to do." Presumably, wherever his skills lie, they don't lie in envisioning a better state and refactoring the code towards that goal (to him, it was "difficult stuff", and left aside as he implemented changes that had a greater impact on its users). Afaik, for a long time GHC was maintained by the same two or three people so it probably shows the imprint of individual developers much more than your average compiler of similar size. Now development is much more open and this kind of technical debt is getting paid off.
Re:A Danish Political Party Led by an AI on Sunday October 16, 2022 @04:54PM (#33227118)
If you skip representation, you don't know what you're optimising for. If you include representation, then you will not exclude groups you didn't know existed in the process (or even groups who are generated by AI's policy development process). Skipping representation would be an awful, authoritarian distopia.
Re:Simon Peyton Jones – Haskell Foundation Podcast on Sunday October 16, 2022 @04:47PM (#33227057)
I guess that's two different things. One person says "You can give GHC a heart transplant" and the other says "GHC needs a heart transplant: Here is our proposal". In fact, the very text you quote as saying GHC was famously a nightmare says:

> On the bright side, GHC is written in Haskell, and this language is particularly well suited to performing massive refactorings with confidence that nothing breaks. Thus, it should be possible to refactor the GHC library towards a more robust and versatile design

and in fact Simon Peyton Jones continued by saying exactly that:

> You can do a heart or lung transplant on GHC and make truly major changes and the type checker just guides you to do all the right things. The difficult stuff is envisioning and being very clear about what you’re trying to do. Actually doing it is often not that hard.

So the two texts and the two opinions are completely in alignment. GHC is famously bad insofar as it has a poor design. But once a better design is designed, you can give it the heart transplant it needs without excess stress.

I have no idea how the heart transplant proposed by Sylvain Henry, John Ericson and Jeffrey M. Young is going. I suppose at some point there should be something checked in and a report about how painful or painless it was (and, potentially, if it's really completely wrong, perhaps a series of bug reports in the next seven releases of GHC).

I guess part of the problem here is that everything changes so frequently. If technology moved so slowly that generational change in craftsmen was the major source of a change in quality, then you could actually use word of mouth and other external sources of information. Nowadays, the experience of a year or two ago really doesn't necessarily tell you much about the quality of the products that are available now.
Re:I wish my web server were in the corner of my room on Tuesday October 11, 2022 @05:22PM (#33169403)
No matter how common it is, I never know what "2.5x less than some reference number" means. Is it "divide the reference number by 2.5"?

Older »