News for hackers. Stuff that matters.

alextgordon

Re:Myths about Integer Overflow in Rust on Friday April 29, 2016 @05:12PM (#11598800)
Literally the definition of the integers is that (x + 1) != x. Wrapping is bad enough, but at least tends to makes failures noticeable. Saturating arithmetic makes it really hard to see that a failure has occurred.

Depending on the performance penalty you're willing to take, there's good alternatives to wrapping, such as: A) 64-bit integers, B) bigints, C) crashing on overflow.

Sure, saturation might be useful in certain circumstances, like manipulating audio samples, but it's generally something you want to make explicit. Using it everywhere? It's madness!

Re:A Password Manager That Doesn't Store Passwords on Saturday April 23, 2016 @11:23PM (#11558419)
It also lacks what you might call 'forward secrecy'. If someone gets access to my master password and an old 1password backup, then they get all the passwords in the backup.

But with this, if someone gets access to my master password, they get access to recent passwords, and when I create new passwords they get access to those too. If I'm not aware that my master password has been compromised (why should I be?) then I'd be merrily creating new passwords that are compromised at the moment of their creation.

Don't roll your own crypto, kids.

The use of != there is very confusing but what they mean is stores a precision along each number, not that -0 != -0.0

e.g. in Python:

    >>> from decimal import Decimal as D
    >>> 2 * D("1.0")
    Decimal('2.0')

    >>> 2 * D("1.000")
    Decimal('2.000')

    >>> D("1.0") == D("1.000")
    True
Re:The Internet of Things has a dirty little secret on Sunday April 10, 2016 @03:26PM (#11467725)
Maybe it is a failure of imagination, but I don't get how nest can be more efficient than manual control. Cold? Switch the heating on. Hot? Switching the heating off. Why'd you need a learning algorithm for that?

The website says stuff like

> The babysitter calls to say she picked up the kids from soccer and they’re heading home. You adjust the temperature from your phone so they’ll be cozy.

..which is a first-world problem if I've ever heard one. Just wear an extra layer for 10 minutes while the heating warms up. Jeez.

Re:Algebrite, a computer algebra system in JavaScript on Saturday April 09, 2016 @01:29AM (#11460077)
You're right, but I guess you're being downvoted because nobody wants to hear it. JavaScript will never get anything like numpy, because it doesn't have integers. Doing mathematics without integers is like driving a car without wheels.
Re:What It’s Like to Almost Get Executed on Sunday April 03, 2016 @12:15AM (#11414894)
It's interesting that you give the example of Breivik. Don't you think that a far-right nutcase like him would relish the reinstatement of the death penalty?
Re:Spaced repetition and practice on Saturday April 02, 2016 @01:22PM (#11412316)
I don't bother reversing decks. It's more efficient to do more repetitions of Native->Foreign than it is to do equal repetitions of N->F and F->N.

i.e. if you can respond that the French for cat is "chat", then you will very likely remember that the English for "chat" is "cat".

The average person isn't even aware that VLC is an illegal circumvention tool in the United States under the DMCA. I fail to see how restrictions on encryption software would have a different outcome. Encryption is built into so many products, it's part of daily life and most people don't even know they're using it.
Re:How to Get Out of Bed on Sunday March 27, 2016 @11:44AM (#11370327)
The comment system on HN discourages discussion of the article, because threads cannot be collapsed and so there is only space for 2 or 3 top-level comments to get much attention.

The top comment is often a poor quality one, expressing some controversial view that gets replies, starving the lower top-level comments of upvotes, and cementing its place at the top.

It would be better to collapse replies to all top-level comments, and allow people to expand the replies to the comments they find interesting.

kik = a messaging app

kike = a jewish person

Re:People with names that break computers on Friday March 25, 2016 @07:59PM (#11363677)
The curse of oil.
This has the same problem as hyperloop, then. Sure the main part of the journey is quicker, but if you have to take a connecting flight from New York to Boston, and a train from Luton to London, it's overall slower than a subsonic plane.
Re:I've Just Liberated My Modules on Tuesday March 22, 2016 @09:28PM (#11341429)
If he wants to control where people get his software, he should have published it under a proprietary license. Not saying he does, though.
Re:Boom (YC W16) – Supersonic Passenger Airplanes on Tuesday March 22, 2016 @02:13AM (#11334734)
People are only trying to help. Better now than when the press hears about it and starts taking the piss out of them.
Re:Swift 2.2 Released on Monday March 21, 2016 @05:35PM (#11332313)
Xcode works fine for me. I can't say the same for Android Studio, which seems to require a machine more powerful than a top-of-the-line MBP.
I don't think I understand. If they could rehabilitate unsuitable donor organs and didn't have to worry about rejection, there wouldn't be a shortage. Isn't that the end game?
Re:Uber seeking to buy self-driving cars: source on Friday March 18, 2016 @02:19PM (#11313716)
Still, Uber knows who you are. If you damage their car they can invoice you. Presumably they will have CCTV in these things?
Useless clickbait. Nobody ever claimed that the one and only benefit of standing is to "burn excess calories".

Personally I had developed back pain from too much sitting. When I stand, I have better posture and so I don't get the pain.

Re:Open Sourcers Race to Build Better Versions of Slack on Wednesday March 16, 2016 @05:10PM (#11300705)
On OS X, Adium, Textual and Colloquy are predominantly built in HTML. It's hardly groundbreaking.
Or fruit juices. Orange juice has almost as much sugar as coca cola.
They could use multiple signing keys. One in America, one in Hong Kong, one in Germany, etc. If a firmware update is not signed in all (or N of M) jurisdictions, the secure enclave simply rejects it.
Totally awesome! I was just about to make exactly this tomorrow, now I don't need to.

My problem is that I would like to generate wrappers for an API, in a variety of popular languages. I could just implement each wrapper separately by hand, but maintaining them as the API changes would be obnoxiously difficult.

Re:AlphaGo beats Lee Sedol 3-0 [video] on Saturday March 12, 2016 @04:14AM (#11272055)
What is our purpose if computers can do everything better than us?

It feels like computers have taken one aspect of humanness: logic. Computers could do arithmetic, do algebra, play chess, and now they can play go.

It hurts because logic is usually thought to be one of the highest of human characteristics. Yes computers might never be able to replicate emotion, but even dogs have that.

There's still some aspects we have left to call our own. Computers perform poorly at language-based tasks. They can't write books, write math papers, compose symphonies. I hope it stays that way.

Re:Call for support for Lisp in WebAssembly development on Saturday March 12, 2016 @01:18AM (#11271619)
…as is Swift with NSOperation/GCD. Apple's process isolation tech (XPC) is built upon their multithreading tech (GCD). The two are complementary, not antagonistic.
Re:State of the Art JavaScript in 2016 on Friday March 11, 2016 @09:15PM (#11270982)
jQuery is an 86kB static resource that almost certainly already exists in the browser's cache. You can choose to use it, or not, but you can't get stop it from being there!

So I'm unsure what kind of complexity you're adding by using it. Mental? Spiritual? Metaphysical?

Re:State of the Art JavaScript in 2016 on Friday March 11, 2016 @08:24PM (#11270811)
The workshop is free to use (it's on Google CDN), but the hammer and nails cost money. Seems like a no brainer to use the workshop.

If the hammer and nails were actually better, then fine. But there's nothing actually wrong with $.ajax, that I can tell.

Re:State of the Art JavaScript in 2016 on Friday March 11, 2016 @07:24PM (#11270598)
> Unless you’re working on a legacy application or have 3rd party libraries that depend on it, there’s no reason to include it. That means you need to replace $.ajax.

> I like to keep it simple and just use fetch. It’s promise based, it’s built in Firefox and Chrome, and it Just Works (tm). For other browsers, you’ll need to include a polyfill.

I laughed. Is this satire? There's no reason to have X, therefore you need Y and Z to replace X. It just works.

This is what I struggle with. Are they evil, blind, or both? The Conservatives are firmly in power now. Labour, the Lib Dems and even UKIP have been neutered. Corbyn is not going to lead Labour to victory in 2020.

You would think that they could relax. They no longer need to pander to the tabloids. If they liked, they could dismantle the media and rebuild it in their image. They could build a gigantic statue of Theresa May. They could go to war. The potential for evil doings is endless.

Instead they spend their time fucking over disabled people. I mean... why? What's in it for them?

How am I supposed to contribute to your project if the files required to build it are in one place (the tarball) but patches have to be made in another (the git repo)?

If your best practices require you to make potential users and contributors jump through hoops, then maybe those best practices are a bit shit.

Older »