HNHacker News
TopNewBestAskShowJobs

gnode

2,428 karma · joined May 4, 2016

submissionscomments
gnode··on BZFlag
> even in scenario with a completely untrusted client receiving only final video output, there's no guarantee that the actions being input are human.

I imagine it would be a fairly trivial application of computer vision to make an aimbot for first person shooters that works most of the time.

gnode··on BZFlag
I don't expect it would be that hard to make an aimbot look human by throwing in some random variation. It would probably then be difficult (even for a human auditor) to reliably differentiate genuinely good players from "too good" players.
gnode··on Rob Pike on the reasons for Go’s success
Some popular Rust projects include actix-web (HTTP serving), diesel (database ORM), Firecracker (micro VMs for serverless). Web APIs and virtualisation / cloud computing are also areas where Go is popular.

They're both statically typed compiled system programming languages; both trying to provide solutions for safe memory and concurrency.

gnode··on Rob Pike on the reasons for Go’s success
I'm not sure that principle applies well to JavaScript. It was popular almost from the get-go, being the only language of the Web. A lot of bad practises were popular in the early days.

JavaScript has changed a lot as a language over time -- ECMAScript 2019 makes it a lot easier to write good code than the original JavaScript. It's now better understood how to write JavaScript code, and how not to.

gnode··on Rob Pike on the reasons for Go’s success
Not the OP, but I think a good contrast is with Rust. Both languages purportedly emphasise memory safety and concurrency. Rust achieves this within the type system at compile-time; no nil pointers (conditional destructuring is used instead), no garbage collection is required, and concurrency is safe by virtue of compile-time checks. In Golang nil pointers exist and can be dereferenced, you can make a mistake when using concurrency primatives, and clobber shared memory.

On the other hand, Golang is a much simpler language. It's relatively easy to learn and understand.

gnode··on Rob Pike on the reasons for Go’s success
Golang has shortcomings a plenty, although that doesn't necessarily make it a poor language to use.

It's a fairly simple language, which makes it relatively easy to grasp and understand the majority of Go code. This is particularly useful for group development (i.e. in companies), where you want everyone to understand each others' work.

Anecdotally, although I prefer to write Rust, and consider it a better language in many ways, it took me a lot longer to learn the language, and longer still to write idiomatic Rust code. I was up to speed with Golang relatively quickly.

gnode··on Rob Pike on the reasons for Go’s success
I'd say Go's success is almost nothing to do with its design, and everything to do with social factors.

Rob Pike was famous before its creation (within the relevant community). The language was designed within Google, and gained much hype from that. The effort to foster a community paid dividends.

Writing Go code for a living, I find it a very mediocre language. It's largely redeemed by its library ecosystem, which reflects not on the language, but the enormous size of its community and commercial backing.

If anything is noteworthy about its design, it's that it's simple (crucially, to those already familiar with C-like languages), and easy to bring people on board. What is lost for want of features and abstractions, is gained in human resource.

gnode··on Rob Pike on the reasons for Go’s success
Probably in that it's the language with first-class support on that platform. Adoption of the language is encouraged more by the target platform's support for it, than by its independent merits as a programming language.

I'm not sure I'd agree though; Swift shares this position with its predecessor Objective-C. Swift's success versus Objective-C can be attributed to its relative merits as a programming language.

gnode··on The Tyranny of the Rocket Equation (2012)
But we're talking about air-breathing rockets, not merely engines. Crucially, a rocket supplies its own oxidiser, and an air-breathing rocket supplements this with intake air. An example of such would be Sabre: https://en.wikipedia.org/wiki/SABRE_%28rocket_engine%29
gnode··on Indian nuclear power plant’s network was hacked, officials confirm
> China is not communist at least in economics any more.

This depends on your interpretation. It could be argued that China's state capitalism -- where the state is the dominant capitalist, and owns most of the companies, property, and natural resources, is a form of communism, perhaps the most effective realisation of communism seen so far.

True private ownership is very limited, as property rights are subordinate to the will of the state. Land can not be owned as freehold, and is instead leased from the state.

gnode··on Police blow up innocent man's home. No recompense, court rules
Generally police must assess the risk to public safety (including the suspect's and their own safeties) and balance that with the need to apprehend the criminal.

Capturing a non-violent criminal would not typically justify a high risk of causing a deadly road traffic accident. In the UK for instance, the National Decision Model must be used to evaluate whether to pursue a criminal; authorisation must be requested to conduct a pursuit.

gnode··on Police blow up innocent man's home. No recompense, court rules
A suspect would likely be liable for damage caused by the police in the course of them resisting arrest. However, they are likely judgement-proof, not having the wealth or income to compensate the homeowner. They will likely "pay" in the form of a custodial sentence, but of course that's little remedy for the homeowner.

I expect the police would be liable if a court found them to have caused damage which was completely unnecessary, although they have a lot of latitude in interpreting this. It's fairly easy to argue that doing whatever is safest for them (doesn't put them in the line of fire) is justified, and they shouldn't take any unnecessary risk to protect property.

Given that (rightly or wrongly) typically the police will not be liable for these situations, and the liable criminal will be unable to compensate, the burden should probably fall to insurers.

gnode··on SiFive Announces First RISC-V OoO CPU Core
Interestingly, although all the RTL for the SiFive Freedom platform is in the SiFive's GitHub repository, and they've produced chips and boards (with public schematics and BOM), the hard IP doesn't appear to be public.

I wonder if this is because the hard IP is specific to the fabs' trade secret tooling, and so subject to their NDAs, making it impossible to distribute publicly.

gnode··on SiFive Announces First RISC-V OoO CPU Core
I think this may be more than a register-level transfer abstraction. The slides make claims about die area and frequency, and show a layout.

SiFive offer IP but also produce SoCs (presumably with TSMC, SMIC, and GlobalFoundries, who are listed as partners).

gnode··on WhatsApp sues NSO Group for allegedly helping spies hack phones around the world
> The whole point of weapons is to help murder civilians.

The sanctioned use of weapons is against belligerents. The intentional killing or torture of civilians or prisoners is a human rights violation, or a war crime during warfare.

gnode··on WhatsApp sues NSO Group for allegedly helping spies hack phones around the world
I find it interesting that NSO, an Israeli surveillance technology company, was allowed to have such dealings with Saudi Arabia. Their statement that "the sole purpose of NSO is to provide technology to licensed government intelligence and law enforcement agencies [...]" implies that their technology is subject to export controls.

My understanding is that Saudi Arabia has poor diplomatic relations with Israel.

gnode··on Teens are spending nearly half their waking hours on screens
> Those children were more likely to become depressed by age 12 or 13, to be the victims of bullying, to be aggressive, to have lower interpersonal skills, to have unhealthy diets, and to be overweight, the researchers found in the April study.

> The findings suggest that very young children are missing out on key aspects of their brain development when they spend so much time staring at a screen instead of interacting with the outside world.

Or alternatively, they suggest that victims of bullying, less socially successful, and less physically fit children are more inclined to spend time using a screen.

So often studies like this find a correlation, then jump to the causation they had set out to find, ignoring all other plausible relationships suggested by the data.

gnode··on Legitimate Use of Variable Length Arrays
> A too large of an array would not fit in RAM and you should get a compile/link/out of memory error.

Except we're talking about variable sized arrays, where the wanted size is not known until runtime (e.g. from user input). We can't check this at compile time.

This also isn't the same problem as an out of memory error; we need to check that nn didn't overflow the size of size_t, as well as that the memory allocation is successful. Something like:

    int n = /* run-time value */
    size_t sz = (size_t)n;
    // Check n fits in size_t.
    if ((int)sz != n) <error>
    sz *= sz * sizeof(float);
    // Check against overflow.
    if (((sz / (size_t)n) / sizeof(float)) != (size_t)n) <error>
    float *matrix = malloc(sz);
    // Check allocation succeeded.
    if (matrix == NULL) <error>
gnode··on Legitimate Use of Variable Length Arrays
They're trying to allocate an n·n element array. If int and size_t are 32b (typical 32-bit architectures), and n == INT_MAX, then n·n·sizeof(float) can't be represented by a size_t.

(Used · for multiplication, because HN turns stars into emphasis.)

gnode··on Ask HN: What is the most beautiful piece of code you've ever read?
Another thing to note, is that loop unrolling can be harmful to performance, as it requires more instruction cache. Beyond branch prediction, modern compilers can also convert loops into vector / SIMD instructions, and other magic.

The Duff's device is still useful for creating co-routines though; a handy way of yielding, then returning to the yield point.

gnode··on Mass Driver
I realize that I made an assumption in my first answer, that the moon is not rotating. A rotation may cause you to move out of the orbital path of the bullet before it gets back to you. If you shot from the poles though, you would remain in the bullet's orbit.

That said, in ideal conditions, even with rotation, the bullet will hit you eventually, but not for a long time on average, given the scale of the moon. In reality it's orbit would probably destabilise due to collisions with dust and perturbations from other gravitational bodies (the Earth, Sun, etc. create an n-body situation which slowly changes the orbit over time).

> Does there always exist a velocity `v(theta)` that will make the bullet hit you in the back after one orbit?

The velocity must be great enough to stay above the surface, and not high enough to escape. Additionally, you must shoot horizontally, like I mentioned before, and not rotate out of the orbit (e.g. by being at the poles, or at the rotational equator, shooting along the equator).

gnode··on New Hampshire Lawmaker Kills Repair Bill Because 'Cellphones Are Throwaways'
> Most failures I've seen are either mechanical wear on a port, button or cable of some sort

Eliminating ports seems to be some manufacturers' solution to this. There's no wear if it doesn't exist.

> There is also 'glue & waterproofing wear' as the glue & rubber goes through multiple heat / cooling cycles and unsets, then water damage occurs.

I wonder if in the future, the glass will just be hermetically welded to the case (glass-to-metal seal). No moving parts; no external adhesives; no possibly of getting into the device without cutting through it.

gnode··on Mass Driver
Fragile cargo at least. For some otherwise fragile things, you could submerge them in an incompressible fluid of similar density to reduce the difference in force throughout them. Your brain's tissue is very soft, yet by being buoyant in its cerebrospinal fluid it becomes capable of withstanding much higher acceleration.
gnode··on Mass Driver
> If you shoot a gun on the moon, will it return to your location from the behind, no matter what angle you shoot it?

In most cases no. Although the orbit of the bullet is cyclical (below escape velocity), unless you shoot perfectly level with the surface, its orbit will intersect the moon. Obviously if you shoot slightly down, it'll hit the ground. If you shoot slightly up, it'll hit the ground behind you on its return.

> Is this the velocity required for a bullet to leave orbit no matter what angle you shoot it?

Yes. Although if it hits the moon first, it'll slow down and not escape (unless you were to shoot through the moon).

gnode··on Who Killed the Scrollbar?
The screen real estate isn't particularly precious on a desktop / laptop with a large, high-resolution screen (much less precious than mobile, for sure), but I also like to get rid of menu bars, tool bars, etc. just because they're visual clutter, and like you say, a keyboard makes up for them.

Ironically, I do enable them on my tablet, because I don't always have a keyboard attached to it. Tablets generally have enough space for full menus / toolbars, and lacking a keyboard they're arguably the form factor most in need of them.

gnode··on New Hampshire Lawmaker Kills Repair Bill Because 'Cellphones Are Throwaways'
I'm not sure the repairability of many types of electronic devices will be able to meaningfully survive into the future. The general trend in computing is to bring all the components together into a single module, as this improves power efficiency, latency, and bandwidth (e.g. going from DDR memory chips to stacked HBM chiplets connected to the processor by an interposer). Portability, and the aesthetics of thinner / lighter devices also creates a push towards more extensive integration. Repair increasingly means replacement.

Maybe the legislative solution we should be pursuing is longer mandatory warranties.

That said, in many cases a device fails due to a low value discrete component -- a resistor; a capacitor. This repair legislation would help here.

gnode··on New Hampshire Lawmaker Kills Repair Bill Because 'Cellphones Are Throwaways'
> I doubt that many people re-soldered defective chip on a ram module.

What individuals can do to repair a device isn't particularly relevant to this discussion. The legislation seeks to force manufacturers to make repair manuals available to independent repair shops. It's fairly common for such establishments to have the tools and expertise to replace soldered components.

gnode··on Aluminium-air battery that can power electric cars for 1,500 miles
It's quite a different model to petrol: the batteries themselves are very expensive, and the stored energy very inexpensive. Futhermore, the batteries degrade, losing capacity over time, making them vary in value, and non-fungible. Practically, battery swapping requires a leasing / rental scheme. Batteries can't just be sold for consumption like petrol.

Transporting batteries might make sense for some extremely remote locations with no grid access, but people don't commonly drive far away from the grid. As these batteries are very heavy, I would expect the handling involved to make this far more expensive than just charging on-site.

gnode··on Aluminium-air battery that can power electric cars for 1,500 miles
> didn't Elon try and shoot for a battery swap station similar to a gas station and Tesla deemed it unfeasible?

It was developed and demonstrated. https://www.youtube.com/watch?v=H5V0vL3nnHY My understanding is that it was deemed more unnecessary than unfeasible. That it would change the battery ownership model would also create administrative complications too.

Supercharging improved to 250kW, bringing down charging times. That people need to recharge their Tesla at intervals when they should probably take a break from driving anyway, on the occasions when they take long road trips, makes it hard to justify a battery swapping program.

gnode··on Google’s Play Store gives a worse age rating to Fleksy, a Gboard rival
There are many swastika characters in Unicode, with different contexts, none of them being Nazi specifically. That's not to say that usage of any of them would inherently preclude them from being subject to section 86a.
← PreviousPage 4 of 34Next →