HNHacker News
TopNewBestAskShowJobs

albinofrenchy

530 karma · joined March 15, 2013

submissionscomments
albinofrenchy··on What is the difference between Keto, Paleo and NSNG diets?
This seems very much like an ad for the NSNG site. And as far as I can tell, it's just keto with a dose of "don't feel bad if you have pie for xmas".
albinofrenchy··on Why I love Go
Yes, people absolutely use code generators with C. But they do this because of deficiencies in the language, and everyone basically agrees that C is the lowest common denominator in terms of languages -- it's portable assembly essentially.

Go missing generics except for built-in containers; and then not having anything but the bare minimum for those built-ins is a critical defect of the language. The fact that you can work around that defect doesn't make it any less of a defect.

albinofrenchy··on Why I love Go
You might as well claim C has garbage collection since there are libraries for it. It's a hack. Might as well claim no language benefits from generics since you can always code gen.

For practical issues you have things like compile time, extra tool dependencies and up front setup time to enable a given type.

It makes c++ templates look down right elegant in comparison.

albinofrenchy··on Writing a Simple Linux Kernel Module
The C++ runtime is too big for the kernel. It is also largely unnecessary. You can easily compile C++ code without STL or larger library support.

This still leaves some holes that the runtime provides, but all of which are easy to provide -- namely things like 'new' and 'delete'.

albinofrenchy··on “I thought I could ship at least 700 units to stay in business”
I am moderately familiar with video games but have no idea what itch is. I have a largish steam library though.

$100 dollars is nothing compared to dev costs. It should have been just counted as startup costs and the demo should have been up since day 1.

albinofrenchy··on An Open Letter to the FCC
Net neutrality isn't about paying more for consuming more. It is like needing to upgrade your water plan to make coffee as opposed to tea; unless you brew with starbucks or something.
albinofrenchy··on An Open Letter to the FCC
The George Soros demonization is one of the odder things I've seen lately.

This isn't some psyops nonsense. Net neutrality isn't some George Soros conspiracy meant to cripple capitalism while making him rich.

albinofrenchy··on The cargo cult of versioning
> Rich Hickey pointed out last year that the convention of bumping the major version of a library to indicate incompatibility conveys no more actionable information than just changing the name of the library.

Unless, you know, you care about the purpose or authorship of the library.

I don't think pinning dependencies at package levels is a bad idea - ubuntu does this for a lot of packages but this relies on properly followed semantic versioning to work.

albinofrenchy··on How Ketogenic Diets Curb Inflammation in the Brain
Roughly 10%, where fiber makes up half of that or so. The limit I've seen is 20-40g of non fiber carbs.
albinofrenchy··on How Ketogenic Diets Curb Inflammation in the Brain
I thought the only real limit for keto was on non fiber carbs? Is there typically a max ratio on protein too?
albinofrenchy··on Announcement: RT and Sputnik Advertising
> So if you claim that he has not right to make a threat, then how can he enact something that he has no right to say?

No, I'm claiming he has no more legal right to make threats than any other person. There is a large difference there. Largely speaking a persons right to make threats is protected under the first amendment.

There are very narrow instances where verbal or written threats become assault (or terrorism, or attempts to incite a riot, etc); and since one of the criteria there is ability to carry out threat, someone in a position of power has somewhat more liability here, not less.

Which is all besides the point -- twitter isn't a government entity; your first amendment protections don't apply to their ban hammer. Their rules and regulations are more restrictive in all cases than what is allowed by law.

> You mean as in the case that we're discussing?

I mean, yes? My point is that a) Trump is in technical violation of the TOS and b) The TOS constrains the behaviors of the users, not Twitter so they have no real obligation to enforce it.

albinofrenchy··on Announcement: RT and Sputnik Advertising
Trump has violated that TOS aplenty[0]. The NK non-sense wasn't even the first thing I thought violated the TOS; he basically harasses someone new every few weeks punctuated by retweeting gifs of him punching CNN or knocking Clinton out with a golf ball.

0: https://www.wired.com/story/twitter-ban-donald-trump/

albinofrenchy··on Announcement: RT and Sputnik Advertising
POTUS has no more rights by law than any other citizen to make violent threats. POTUS has _authority_ to enact those threats in certain cases whereas one typically doesn't.

For instance -- I have the right to say 'Nazis should be punched in the face' in most circumstances. It would violate Twitter TOS to tweet that however and they'd be well within their right to take that message down or ban the account.

The 'spirit' of the TOS is civility in most part, not legality. Donald Trumps twitter account isn't civil.

And if you disagree about that, or about the spirit of the TOS so be it -- that is why things like terms of service are held to the more objective letter, and not the highly subjective spirit.

albinofrenchy··on Announcement: RT and Sputnik Advertising
> For instance, he has the right to make violent threats in certain circumstances compared to normal citizens.

No one has the 'right' to make violent threats on twitter. It is a private service with a ToS.

There are no principled reasons to treat the president as a special case here. The practical reason is simply that it is often and free advertising for them and the terms of service dictate what they can do when breached; not what they must do.

albinofrenchy··on Implementing Go's defer keyword in C++
I somehow completely misunderstood that from the Go documentation when first reading it; thank you for clarifying that.

There must have been some other leaking going on. He was using a largish library when he saw the leak and eventual crash so maybe it was due to improper pooling or C api calls? I'll have to ask him more about it.

albinofrenchy··on Implementing Go's defer keyword in C++
I was wrong, apparently it is. Really wish there was a way to edit that comment now.
albinofrenchy··on Implementing Go's defer keyword in C++
There is a substantial issue with this pattern for things like files -- the operating system imposes a max limit on the number of file descriptors you can have open.

Defer gives no guarantees about when that thing is going to run -- just that it is after the function returns. Because of this, you can get erratic behavior if you open and defer closing a lot; essentially openFile just stops working at some point.

This can happen with any limited resource and isn't theoretical; I had a friend who ran into this in long running process with a lot of IO.

albinofrenchy··on Implementing Go's defer keyword in C++
You usually shouldn't use unique_ptr for C api stuff unless you really only need to free it.

Typically though there are custom delete/free API calls you need to make, and to use them with unique_ptr you have to pass that function pointer in as the second argument to the unique_ptr constructor.

At the very least you should have a C++ function that gives you the unique_ptr back that does the right thing; but at that point you almost might as well just make a class and give it member functions to map the C calls.

albinofrenchy··on Implementing Go's defer keyword in C++
The only time I can think of where this is useful is when you are trying to be super defensive with possible exceptions being thrown.

Otherwise it seems a lot like you can just make the call at the end of scope yourself for the same line count and _much_ more readable code.

I guess if you have multiple return paths it's more tenable to use scoped dtors for this but it all really seems questionable to me -- I can't think of a single use-case where it'd be preferable to use something like this rather than a dedicated class.

albinofrenchy··on Implementing Go's defer keyword in C++
This seems unnecessary and possibly even harmful.

In C++ the destructor handles this as part of the lifespan of the object. Making users of the object encapsulating the resource handle resource cleanup is an antipattern, which is why the standard library does this for you.

albinofrenchy··on Pointer Free Programming and the Future of Nim
Smart pointers are not at all useless and not at all deprecated (you are thinking of auto_ptr; there are still unique_ptr and shared_ptr).

They don't try to address the check for null problem at all; that isn't their intent. All they mean to do is eliminate several classes of common, easy to make mistakes such as not zero initializing or not freeing the resource.

albinofrenchy··on Pointer Free Programming and the Future of Nim
There are definitely better smart pointer semantics than others -- see the now deprecated auto_ptr.

But it really doesn't fit the argument as framed. All smart pointer implementations are some valuable niceties wrapped around a naked pointer. It has nothing to do with preferring references to pointers; at the end of the day you just have a pointer -- just one that gets default initialized to 0, and deletes itself when you are done with it.

Frankly, the type of C++ developer that spends any serious amount of time trying to come to terms with a smart pointer API; even one they haven't seen before is the type of developer I wouldn't really want manipulating naked pointers.

albinofrenchy··on Pointer Free Programming and the Future of Nim
Yes, both unique and shared ptrs default to null and in many ways are drop in replacements for naked pointers.

If the empty state thing was in reference to smart pointers, it'd be a remarkable misunderstanding of how they work and how they should be used.

albinofrenchy··on Pointer Free Programming and the Future of Nim
Is this really considered modern c++ style? Best practice as far as I've ever known it is to disallow wherever possible the allowance of having an invalid state; typically with constructers locking those details down.

Obviously references are better in most circumstances but only because you don't have to check for an empty or invalid state. They offer no performance or optimization on their own.

albinofrenchy··on Why we switched from Python to Go
I tried using Go this weekend and basically just abandoned it when I learned that it only had 'generic's for three built-in types and other than that you are forced to essentially dynamic cast everywhere.

I just don't get the appeal. Go seems a lot like what you'd get if you just removed every language feature that anyone has ever complained about; for good reason or not.

albinofrenchy··on Duck Duck Go: Illusion of Privacy (2013)
I'm not missing the point. I'm not saying it isn't happening because it's some crazy Tom Clancy plot. I'm saying the intelligence agencies have better ways of getting that data without also giving it to a ton of other bad actors
albinofrenchy··on Duck Duck Go: Illusion of Privacy (2013)
This vaguely reminds me of the time a paranoid coworker told me not to store tax documents on the cloud because the government could get at it.
albinofrenchy··on Building the Linux kernel with clang
Sanitizers are run-time tools; I'd be surprised if any of them worked out of the box with the kernel.

Address sanitizer was "ported" to the kernel a while ago; not sure if UBSAN is or will be in the future.

albinofrenchy··on Main is usually a function, so when is it not? (2015)
Sure; same point applies though -- just because 0 happens to be in RAX doesn't mean it's defined behavior.
albinofrenchy··on Main is usually a function, so when is it not? (2015)
This isn't that conclusive of a test -- uninitialized memory is 0 relatively often.
← PreviousPage 2 of 6Next →