Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
simiones
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
42 ms
·
751.
▲
by
simiones
3y ago
While I agree that the design is very clear for the cases illustrated here, and I am a bit puzzled on why the Go designers chose to change these as well, the design is not at all clear for the other case: for i, v := range []int{1, 2, 3
752.
▲
by
simiones
3y ago
I don't think you remember well how you triggered this error, since Java just doesn't allow you to reference a non-final variable from an inner function. It sounds like you're talking about code like this, but this just doesn
753.
▲
by
simiones
3y ago
Java has never had this problem with variables (either in a for loop or free-floating ones), since Java has never had support for closures. There is one somewhat similar problem in Java that you're maybe thinking of: anonymous classes
754.
▲
by
simiones
3y ago
The problem isn't with closures, the closure semantics are perfectly fine. The problem is in the implementation of for-range loops, where the clear expectation is that the loop variable is scoped to each loop iteration, not to the whol
755.
▲
by
simiones
3y ago
Why would it? It's perfectly correct code, it's just not doing what you'd expect. It might complain about the race condition, to be fair, but the same issue can be reproduced without goroutines and it would be completely corr
756.
▲
by
simiones
3y ago
I don't think anyone is puzzled by the Go snippet being wrong. The bigger problem in Go is the for with range loop: pointersToV := make([]*val, len(values)) for i, v := range values { go func() { fmt.Printf("num: %v\n&qu
757.
▲
by
simiones
3y ago
If the two peers are each behind its own stateful firewall (as would be common with something like BitTorrent), then you still need some 3rd party server accessible to both of them that either relays traffic between them, or at least allows
758.
▲
by
simiones
3y ago
What I meant was, almost all server operators on the internet have to support either IPv4-only or dual stack. It is still economic suicide to run an IPv6-only server, at least in most areas of the world. As long as you have to run IPv4 soft
759.
▲
by
simiones
3y ago
No, the migration is only done when you're exclusively running IPv6. Very very little of the internet is accessible only over IPv6.
760.
▲
by
simiones
3y ago
Peer-to-peer still wouldn't work even in a fully IPv6 world without something like STUN or TURN, since endpoints would still be protected by stateful firewalls preventing external connections to them.
761.
▲
by
simiones
3y ago
No, you can't: an IPv4-only device that receives that packet would interpret your extra address bytes as part of the TCP/UDP header. There simply isn't any room in the IPv4 header to squeeze extra bytes in. That is exactly wh
762.
▲
by
simiones
3y ago
> 464xlat allows communication from ipv6 only clients to legacy ipv4 ones without the need for a separate stack on your end device > nat46 allows communication from a legacy v4 device to a modern v6 device without the need for a separ
763.
▲
by
simiones
3y ago
Even if we accept that NAT is the right solution, it still is pretty limited in how far it has been able to extend the address space, since port numbers only give you two extra bytes of address space. And there are no further extra bytes to
764.
▲
by
simiones
3y ago
Really? Do you install Firefox extensions from apt-get?
765.
▲
by
simiones
3y ago
The "elegant" way of distributing 3rd party software for Linux is to ask the user to add your APT/RPM/[...] repo to their system. And most Linux distro maintainers anyway don't vouch for software in the main repos,
766.
▲
by
simiones
3y ago
I also experimented a bit. I was able to reset my own password only with phone access when 2FA was not enabled: in the reset password flow, I started with my phone number, was then asked for my username and email, and then I was presented w
767.
▲
by
simiones
3y ago
If you have 2FA enabled, they can deny you access to your account, but they can't actually access it either (unless they also compromise your 2FA of course). That is, they can reset and change your password with only a phone number, bu
768.
▲
by
simiones
3y ago
And carry it with you at all times, of course.
769.
▲
by
simiones
3y ago
> Newtonianism doesn't seem relevant to my question. It is a random event if you're not trying to make it not-random. I could just say the word "heads" and continue with my day based on the "heads" decision
770.
▲
by
simiones
3y ago
A decision is understood as any point where an agent takes a course of action based on: its perception of circumstances, its evaluation of available options, its evaluation of possible consequences of each option, and its given logic/v
771.
▲
by
simiones
3y ago
> To kill or imprison someone who had no choice about their actions would be unjust. That is not the problem under discussion. The question actually sits in the definition of "choice". You seem to believe that something constit
772.
▲
by
simiones
3y ago
There are many laws or regulations aimed at the protection of humans from things that are not other humans - regulations on what food or medicine is allowed, regulations for how states have to protect people from fire, regulations for putti
773.
▲
by
simiones
3y ago
The difference between moral agents and amoral agents is only relevant if you care about non-physical effects of morality. The legal system wouldn't need to change if we just believed that no one is a moral agent - this is what I'
774.
▲
by
simiones
3y ago
> A “computation” is a concept that we have in our heads. Computations only actually occur as an interaction among some substrate of the physical universe. So you’re still saying that if you arrange atoms and energy in the right configur
775.
▲
by
simiones
3y ago
You can call it blame, of course, but then we also have to say that the fire is to blame for hurting these people. The point was to show that the same analysis for why we should stop a fire (which is not considered a moral agent) is or can
776.
▲
by
simiones
3y ago
The computational explanation would hold that there is some specific computation that can be identified as what we call consciousness. This would be equivalent to how we say that a specific computation is what we call "sorting". I
777.
▲
by
simiones
3y ago
> "Protecting others" carries an implicit assertion that failing to abide by this principle means you are broken, rather than that the principle itself is mistaken, as would be true if you really believed blame didn't exis
778.
▲
by
simiones
3y ago
> If determinism is true, then logic and reason has no bearing on anybody’s conclusion. That is obviously false. In a deterministic model, your beliefs are determined by all of the inputs you ever received. It is in fact stronger than a
779.
▲
by
simiones
3y ago
Why would computational explanations of consciousness be more ridiculous than the non-explanation that is asserting everything is conscious in some way (which is basically what panpsychism means)?
780.
▲
by
simiones
3y ago
> Furthermore, I strongly suspect and assume that other human beings are conscious, but I cannot verify this scientifically (i.e. measure it somehow). I don't think this is fully true, if you really examine this belief. You do have
More ›