Hacker Newsnew | past | comments | ask | show | jobs | submit | Lvl999Noob's commentslogin

What if Go went all the way? Referencing a zero pointer (nil) gives you the zero value of the pointed to type. If you try to access a zero map, it tries to deference the zero pointer to the underlying buffer. The zero pointer gives you the zero slice with zero length. The presence check fails without crashing and you get some pretension of reasonable behaviour.


Really bad idea.

Silently returning some (the wrong) value is always worse than catching the error right then and their and panicking. A panic is a noticeable symptom of something just having go wrong that is easy to chase after and debug. A silently returned wrong value just causes data corruption down the line, at great pain. It is very annoying to debug, in particular if people start to some times rely on this behaviour as an intentional part of their data flow.


I agree. I prefer Optionals over Nulls in any case. This was just a thought of what if Go went all the way instead of just halfway. In my ideal language, you would have explicit assignments and compiler checked (runtime checked if absolutely necessary) pointer validity (with allowed length) at construction. As far as I know, the only time you need to make a pointer and say "trust me" is when doing MMIO so that can given its own mechanism. If it exists in the program state, it's valid.


So what happens when you write through the nil pointer?


Well, what happens when you write through an invalid pointer? The runtime can swallow the write or crash the program or allocate new storage and replace the pointer. Depends on the wanted semantics.


Nil of course (nothing happens). Not saying it’s a good idea, it would just be consistent.


> Pix is already 100% surveilled

And Visa and MasterCard aren't surveiled? Isn't one of their selling points that they surveil every transaction and automatically block anything suspicious? And increasingly, the parameters for suspicious include anything pornographic or even 'pornographic' (see: the bullying of steam to remove explicit games).

At least with Pix, the costs get lower for the end users.


Of course they are. Theirs is a more corporate surveillance, though. I'm genuinely afraid of what the brazilian government can do with this sort of data.


> Theirs is a more corporate surveillance, though.

The thing about US' corporate suveillance system, and why the US government is so tolerant about it, is that US government branches either buy or are given all the data they need.

You don't get government surveillance or corporate surveillance, you get government surveillance or government and corporate surveillance.


Third party doctrine means corporate surveillance is state surveillance. And unlike Pix covering just Brazil, CC companies cover the whole world.


Such a naive take. Like the US government espionage is not deeply embedded in even the most basic infrastructure, let alone payment gateways. They probably spend millions on huge data pipelines straight to the fucking pentagon.


Nothing naive about it. Brazil is not the USA. It hasn't exactly demonstrated an ability to "deeply embed" itself into internet backbones the way the USA does. The problem with Pix is: they don't need to.

Lack of capabilities limit the scope of government tyranny. It used to be that the government didn't have the manpower required to audit everyone and everything, so only the bank transactions above some threshold would be monitored. With pix, they are monitoring 100% of transactions now. This is a massive gain in capability that should not be ignored.


>With pix, they are monitoring 100% of transactions now.

First, I don't think they are.

Second, good - they should have an _algorithm_ checking every transaction. MasterCard and VISA do it and do nothing for me; the government could catch all the money laundering that is the lifeblood of crime, or maybe just finally eradicate tax evasion, the necessary first step towards rationalizing our tax code and one of the core issues of our country?

Your opinions read like you have misplaced worries, if not values.


> First, I don't think they are.

100% of pix transactions are unconditionally sent to government bodies for monitoring. It's not an algorithmic "only if it matches some criteria" affair.

What they're actually doing with the data is anyone's guess. They could be doing anything. The tax department is no doubt going to be the first part of the brazilian government to adopt AI. Who knows what other creative uses they're going to find for it?

> MasterCard and VISA do it and do nothing for me

And we should be making it illegal for them to do that, not compounding the problem by piling on equivalent government functionality on top of it. The problem is supposed to be fixed, not replaced with a national version.

> the government could catch all the money laundering that is the lifeblood of crime

The optimal amount of money laundering, fraud, crime, are all non-zero. You can "catch all the money laundering" quite easily, just install a totalitarian state panopticon where everybody is guilty by default and constantly surveilled by an omniscient intelligence apparatus, problem solved.

You're going to need to accept some amount of crime if you want to have some semblance of freedom and basic human dignity.


> Second, good - they should have an _algorithm_ checking every transaction. MasterCard and VISA do it and do nothing for me;

You are confusing transaction authorization done by card networks/issuers with the kind of fraud analysis that happens post settlement and requires correlating multiple transactions and accounts

> the government could catch all the money laundering

No, you don’t have enough information in transactions alone to identify all money laundering, specially the sophisticated kind.


>It hasn't exactly demonstrated an ability to "deeply embed" itself into internet backbones the way the USA does

I’m not sure how that’s even relevant to the point I was trying to make which is: you are monitored by a foreign and openly hostile government through its privately owned collaborators. That’s worse than your own government using transactional data to monitor money laundering and tax evasion activities that detracts from your direct quality of life. And again, it’s naive to think Brasil has no control over the internet backbone in its own territory, you must not understand how it even works to say something like that.

> Lack of capabilities limit the scope of government tyranny. It used to be that the government didn't have the manpower required to audit everyone and everything, so only the bank transactions above some threshold would be monitored. With pix, they are monitoring 100% of transactions now. This is a massive gain in capability that should not be ignored.

And yet here you are arguing against something that decreases the amount of potential bad actors who can gain direct access to your data. It’s the digital age for a while now, there is a general privacy tradeoff in anything you do online. If that’s a concern, use money. My issue with you is that, again, you seem to prefer to hand over your data to foreigners that have no incentive to use it for anything other than extracting as much value as possible out of your country AND with the additional criminally flagrant behavior of inflicting their interests on judicial and political decisions AND make your pay a 3 fucking percent charge over it.


A sizable amount of Americans are completely hoodwinked by capitalists that have made their material lives worse in every capacity. Thinking that an accountable entity, a democratic government, as a worse than the unaccountable centrally planned dictatorship (a corporation) is just laughable but America has been a laughable place for quite a while as we prefer helping corporations over literal people.


> > Pix is already 100% surveilled

> And Visa and MasterCard aren't surveiled?

Who is doing the surveilling is the difference. In the latter, the surveillance is done by the private sector, in aims of better targeted advertising.

In the former, it's done by either the government or by a government-tied organization, and thus invites a left-hand-passes-to-right-hand scenario, wherein the data & metadata obtained from the system could be passed to law enforcement for prosecution (doubly so if the transactions could be bundled as evidence).

> Isn't one of their selling points that they surveil every transaction and automatically block anything suspicious? And increasingly, the parameters for suspicious include anything pornographic or even 'pornographic' (see: the bullying of steam to remove explicit games).

The censorship pressures made onto Visa & Mastercard was done not by the government, but by PACs & non-governmental organizations. It is through the use of "think of the children" that they push them into censoring transactions, under the implicit threat that lawsuits will be filed if such transactions remain allowed.


The censorship is a massive issue though as it effectively means that private companies can overrule the law if they effectively monopolize critical infrastructure. Private companies are even less accountable to individuals than governments are when there is no real market choice.


The government already have card transaction access though. If you are in the banking system - you are being tracked. Doesn't matter if is Pix or a card.

Doesn't mean they will automatically expose you, as it requires justice approval technically...


I thought newtonian gravity was already proven to be inaccurate with Einstein's Special Relativity (or General Relativity?) giving better results on cosmic scales (basically analogous to an approximation vs an exact formula)?


General Relativity reduces to Newtonian gravity as the curvature goes to zero, that is when you're very far away from objects relative to their masses, for slow non-relativistic objects like stars and galaxies.

Galaxies are typically so far away from another they're almost like point sources to each other, hence Newtonian gravity explains their motion very well.

However, inside galaxies things do not behave as expected, as stars in almost all the galaxies we've measured does not move like Newtonian (nor GR) behaves based on the matter in the galaxy we see. One alternative to the mainstream theories of dark matter is to modify Newtonian gravity, called MOND.

This work tested if MOND fit the motion of galaxies in galaxy clusters. They found it did not.

MOND already does not explain other phenomena that dark matter can so it's not terribly surprising. Here[1] is a nice accessible talk going through all the evidence for dark matter.

But it is technically a possibility that there's two things are going on, something MOND-like as well as dark matter, so worth checking.

[1]: https://pirsa.org/26030070


Why is the article titled "Newton's law of gravity passes its biggest test" if it doesn't explain the movement more than MOND?


Other way around. Newtonian dynamics explains the data very well, MOND did not.

In particular, Newtons law of gravity says the effect of gravity falls off as 1/r^2 where r is the distance from the mass. MOND modifies the standard equations so that gravity starts like 1/r^2 when r is small, and acceleration is large, but for greater distances, when the acceleration is low, instead falls off like 1/r.

MOND explains the movement of the stars in (most) galaxies very well. However this result showed that MOND was not consistent with the motion of the galaxies in the cluster. On the other hand the motion was consistent with plain Newtonian dynamics. Hence Newtons law of gravity (and by extension GR) passed the test.


Special Relativity is an extension of Galilean/Newtonian mechanics (motion of projectiles and other objects) to the case where the object is travelling at speeds that are a fraction of the speed of light. It deals with non-accelerating frames of reference. Satelites need to use this to correct for time dilation effects, but tracking the trajectory of an arrow/etc. or a car/etc. travelling from one location to another then classical mechanics is sufficient.

General Relativity is an extension of Newtonian gravity. It is also an extension of Special Relativity to cover accelerating frames of reference. Satelites need to use this, as does tracking the orbit of Mercury. However, for the orbits of other planets and the moon, using Newtonian gravity is sufficient for a reasonable degree of accuracy, and is used for tracking things like equinoxes/solstices, full moons, etc..


At these scales (entire galaxies, very weak forces), it doesn't make a significant difference.

There are ways of adapting MOND to match general relativity, should it turn to be correct at explaining what it is supposed to explain (like the movement of galaxies).


I think OP's question is more how could Newton's law "pass" a test any more than General Relativity would, considering that it's merely an edge case of GR?


Oh yes, I think the title is a bit misleading.

It is an argument against MOND, a theory that says that gravity has to be modified to account for some observations. But for these particular observations, general relatively and Newton's laws gives the same results in practice, the difference is negligible, so showing that these observations can be explained by Newton's laws implicitly mean that they can also be explained by general relativity. No need for modifications.


General Relativity. It explained the anomaly in the precession of Mercury's perihelion, and the bending of starlight by the Sun (double the value predicted by Newton's law).

The test here is for the inverse square law of gravity. The rival theory in this case isn't GR, but MOND: https://en.wikipedia.org/wiki/Modified_Newtonian_dynamics


Aren't there companies that still use C89 for their production systems? I don't know any in particular but I have read comments here on HN implying that. Just do the same for Rust. Stick to the one major version you started with instead of trying to update the toolchain regularly.


Wouldn't you face the same problem as Dotnet on Windows? AFAIK, dotnet based frameworks and apps suffered from huge performance issues. It might have improved in recent times, I am not actually a windows dev.

If just the end user application is in Lua, then maybe it's fine and the high level language slowdown won't matter. If you want to wrap the low level kernel APIs etc in a high level language as the canonical interface, I would be very skeptical.


I’m not sure the ‘language slowdown’ is as significant as one might think, given the common shared libs that would be in place with a one-size-fits-all solution, but its really all just a dream until someone does it, anyway.


Dotnet is pretty fast these days. It has a lot more low level control than something like Java, with value types and manual memory management available (it invented the unsafe{} blocks Rust is famous for).

MS even had a prototype version of Windows where the entire OS from the kernel up was managed code (a little excessive, IMO).

Dotnet GUI apps failed on Windows mostly because their UI toolkits are a mess and Electron won the cross platform war. I avoid this stack like the plague, but I write a lot of web backends in C#/ASP.NET (on Linux deploying to k8s) and it's great!


I noticed a major problem. If I just keep writing in a single paragraph, the lines don't disappear. I was expecting it to automatically start fading the text once it reached 3-4 lines. As it is, I am afraid of adding new paragraphs because then I would 'lose' what I already wrote.

Edit: adding, it's also surprisingly... slow? I noticed some lag as I moved my mouse around. I don't know if it's because of the website or my browser (firefox) or my OS (Ubuntu) but I don't believe there's any reason for lag here so something should be fixed.

My autocorrect also didn't work. I did get the red squiggles on a misspelling but no suggestions on right click. Again, not sure if it's something wrong with the website or something with my setup (it works fine on other sites).


Thanks for the detailed feedback.

You're right about the fading — if you keep writing in one long block, lines stay. I write in short paragraphs myself, so I hadn't noticed. I'll think about how to handle this better.

On losing text: lines don't fade the moment you hit return. They wait until you start typing again. I found that fading on return alone left the screen empty at exactly the moment I needed to think.

The lag on Firefox/Ubuntu is something I'd like to look into — I haven't tested on that environment. The autocorrect issue is likely a browser limitation, but I'll see if there's a workaround.


I am not too into windows dev but I am currently using msvc at work. We are told to import a config file into the installer and it automatically selects all of the components any of our projects will need. Wouldn't that solve the problem too? Just distribute a project level config file and add documentation for how to import and install the stuff.


Are you saying you want foo and bar to completely overlap? And baz and foo / bar to partially overlap? And have lots of unused bits in there too?


C# can do this with structs. Its kind of very nice to unpack wire data.


My internet providers (both home wifi and cellular) do this. The problem with unlimited slow speed is that it's too slow. I am sometimes unable to open the carrier's own app and pay for a recharge. Either the app just doesn't open or the transaction in the payments app fails.


I recently switched to linux from windows. The only reason I was sticking with windows was because hoyoverse refuses to support linux. I finally decided I need some break from them anyways and took the plunge.

First, I tried to install fedora atomic cosmic. It kind of worked but I could not get it to work with my dock + external monitors at all. Now that I am used to that setup, I can't go back.

Not wanting to spend time figuring it out, I just installed Ubuntu instead. Thankfully, that worked out though it's not perfect. Everytime I turn on my laptop, I need to spend 10-15 minutes turning the monitors on and off until ubuntu recognises them correctly and also sends dp output (it shows the monitor in settings and I can open windows on it but the monitor doesn't actually show anything; other times, it reads the monitor as something nvidia with the lowest resolution).

I tried to install genshin anyways on ubuntu. I couldn't get it to work via wine/lutris. Virtualbox doesn't support gpu passthrough so I tried using virt-manager. The setup was too hard and it didn't work anyways. I gave up on hoyo at this point and install steam instead.

Honestly, ubuntu is rough and Linux as a whole is very rough. But on the whole, I would still pick this over dealing with windows any longer.


The trick with linux is being selective when you buy hardware. Getting things to work the first time is hit or miss, but once they work, they tend to continue to work without too many surprises. For laptops, that means thinkpads.


The dock and monitors aren't mine actually. I got them from work. The work laptop runs windows 11 so the hardware is only tested for windows. I will buy my own stuff when I have to return these and then I will make sure it all works with linux.

What distro / wm / de is good with external monitors, in your opinion? After going through some of the comments on some threads, it feels like external displays are a common pain point across all linux systems.


Yes, external displays can break in weird ways. I remember that a common annoyance used to be that windows and applications don't go back to where you left them before suspending. There are likely other paper cuts as well in areas of variable refresh rates, colour management, etc. I think the biggest issue with external displays, screen tearing, is solved now due to wayland. As for hw and distros, stick to intel or amd igpus, especially in laptops. Both gnome and kde are pretty good these days. Ubuntu and Fedora are both quite good. Distros aren't that different anymore these days. The differences boil down to release cadence mostly.


check out the launchers here for hoyo stuff, i haven't tried the genshin one but zzz worked nearly out of the box (had to change the wine version it was using iirc) https://github.com/an-anime-team


GPU passtrough on a laptop? If GPU is not in a separate IOMMU group I wouldn't even try.


Not only you could escape from Windows, you are now free from Genshin dark patterns.


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

Search: