skysight-inc/HackerNews huggingface dataset:
why don't you do a memmove() instead of a realloc() on inserts

Oh, it's actually worse than that because when inserting we do a realloc (which could require automatically copying the entire memory block), then (if inserting to the head) we memmove the entire contents down to the end of the new allocation. Fun!

Mainly we don't pre-allocate because it's built on top of existing components, and the existing components don't do that. The actual "max size" limit is configurable and we don't really want to allocate the full max size for each list up front. If you have 500,000 lists each with 3 40 byte elements (~60 MB total), it would be overkill to allocate 500,000 8 KB blocks (~4 GB total).

Ideally, we would automatically determine if the user is doing "big operations" then switch to a page-based approach versus smaller "store as much data as compactly as possible" approaches, but it's just not done yet.
The last time this post appeared, I actually submitted a PR which did this, among other things: https://github.com/andreaferretti/kmeans/pull/3

The post wasn't really updated.
Incredible story of a startup
Jit is activated in webviews since iOS8
Hello, formerly suicidal depressed twentysomething replying from an old throwaway account here.

As you might have noticed, I did found some reasons for continuing to live.

However, I won't tell you! If I told you my reasons, you would find them trivial because I would talk about my family and friends, I would talk about beauty of nature, warm bread, long and lonely morning walks, and other blah blah like this. Also, you might not even need all these things right now to feel better. The whole point here is not the reason.

I've been locked into my house for about one year because of a major depression that degenerated into agoraphobia. I whispered my own name and found it not to be familiar anymore on some nights. No wonder I felt suicidal!

But I kept repeating to myself: "One day I'm going to be fine again. I just have to hang in there a little bit more". And it worked. That simple thought gave me something which stands between hope and curiosity. That simple thought made me feeling prepared to something good. They say you have to be always prepared to handle bad things, but sometimes we forget to be prepared for good things! With this in mind, I found the strength to continue living, which resulted into understanding what was the cause of my depression in the first place (I won't tell you that either), and then one little step at a time, whitout even noticing it, I found myself living a happy life (...again).

I'm not a doctor but these practical things helped me a lot feeling AT LEAST alive during that time:

- math exercises; there is no way 2 + 2 is going to equal 5, do some simple math and enjoy the relief of dealing with something that works as expected everytime

- keep notes of what you do everyday; depression flattens your days, and it gets harder for you to distinguish yesterday from the the day before yesterday and this gets the whole thing harder

- write down some day-by-day to do list; simple things just to get to the end of the day with the feeling of having done everything that was supposed to be done

- turn off the computer; when in an alienation-prone mood, computers don't help at all

- do not expect gratitude from other people; right now your mood cannot possibly rely on someone else! Do good things and forget about it. You have to be the only one to know how good you can do right now

And in the end, put yourself first. Yes, I said it, be egoist until you find out who are you now, what you want now, what you need now, and why you feel so crappy now. One day you're going to be fine again, you just have to hang in there a little bit more.
> That causes a lot more harm than good. [...] and you do so for barely no practical advantage.

That's highly subjective.

As far as fucking up a site goes, I really don't care. It's my account after all. (Or is it?)

> just because you didn't care to read the Universal small print of the interwebs

What?
Which says something unsettling, to me at least, about interviews.
It's easy to think of a few "not all bugs are created equal" reasons this might be misleading.

Weighted averages of CVSS by OS might have been more useful, for example, and dis-aggregating Microsoft OS versions but not the various OSX or Linux distros/kernels (and lack of Android) also paints a potentially misleading picture.

With any exercise of this type, the conclusions one draws are typically encoded a priori in the way the analysis is framed and defined.
"The right to be forgotten" has no effect on what others can or cannot say about you as it in no way forces people to take down the sites targeted.
Completely agree. Sampling is fine; but you need to understand that the free version of Google Analytics isn't a replacement for a proper BI tool. GA also doesn't even do sampling until your traffic is over a certain threshold, so at low traffic levels it's actually accurate (though those levels are also low enough that you probably shouldn't try to draw too many insights).

This is not to say that GA is bad; in fact I would call you stupid if your web startup went out and bought a tool before you launched. GA is free, it works well, it's super-easy to implement, and people should use it; but once you've reached the point where you can afford something better (usually in addition to GA, not in replacement of) you should look into doing so.
This was my favourite App from the Clojure Cup 2014, had so many laughs by adding every repo I had to unlock new achievements.
I don't think Apple really cares about that since one of the most important design decisions made to create the iPhone/iPad was dropping stylus support. If they wanted their products to be creation devices we'd notice, they just don't.
Now with the way their product line has been going recently they very well could announce an iPad "creative edition" to compete with Wacom but that'd be a huge change of direction.
The government does't audit their own code; they contract Lockheed, SAIC, and Raytheon to do that.
Show HN: A daily aggregator of all remote jobs out there
Then you need another type. A float has NaNs and Rust knows it and prevents you from possibly shooting yourself in the foot.
I mean it should be like a basic right on the Net to have your account deleted.

No, it shouldn't.

Setting the expectation that individuals have the responsibility to clean up after themselves, means that anything they don't clean up still matches their current beliefs.

Which will cause problems when there are a few sites that you don't remember being part of, or have lost your login info for.
I know I enjoy making a large salary, then I can (for example) hire a maid to clean my apartment, saving my time. That's more-or-less my rational for money improving happiness.
Tried it with my own prescription (-3.75 and -3.25 dioptre) and I'd say the result is very exaggerated. Especially considering my actual eyesight is worse than my prescription.

How does it create a single image from two different eyes, anyway?
It is a shame that everything are apps and for them to work we need to convince people to install them and keep them running.
I just looked, and unless you're talking about something different, Sublime Text 3 allows disabling telemetry by way of the "enable_telemetry" setting.

See http://www.sublimetext.com/3dev under build 3023. It was turned on by default on build 3030.
> because it is MY PIE!
Not always. Most "pie" bakers either inherit their "pie" directly in terms of wealth or education or healthy upbringing from parents. The ones you call incapable of baking their own, probably did not have all the advantages that you did.

There's also the aphorism about standing on the shoulder of giants (or indeed standing on tax created infrastructure.) That applies to all "pie" bakers.
Virtually all of the languages that aren't C, C++, and Objective C have the same (for all intents and purposes) memory safety property as Rust, so you can just check out the Programming Language Benchmark Game site to answer that question.
Is it about Systems Programming?
While I agree that writing backends in Rust may not be the best, Crates.io uses Rust as a backend for Ember, and it seems to be working out really well. I'm skeptical, but interested to see how it develops.
Still puzzles participants in conversations and gives them an incentive to spider and backup whole threads.

It's probably an acceptable workaround but I believe it's best to always remember than the Internet simply doesn't forget. Even if some level of exposure can be minimised, nothing you can remotely call "protection". It can even be argued that this feature promotes irresponsible behaviour ("I can always delete it later" - no, you really can't).

You can take many approaches between not deleting at all and delete from your servers (obviously you can't "delete" from the collective internet memory). All of them with pros and cons.
Use paper trading for a while on a platform like Interactive Brokers before going live. You will find it's unlikely you discovered the holy grail but hey maybe you have. Just be wary of a common trap for both beginners (excusable) and longtime market pros managing billions (not so excusable) - lots of strategies look great while testing because they have a payoff matrix which yields +1$ 95% of the time and -$1000 5% of the time. Obviously this is a poor ex ante bet but you are unlikely to empirically observe/discover the asymmetry at first when it just seems like you are printing free money.
I'm in Lithuania. Thanks for the tips, I'll definitely try contacting some consulting agencies or offering my service to businesses directly.
This will be a horrible mess, not to mention hostile changes.

Why not use Github?
I can understand that the word "undeniable" psychologically evokes resistance because it has an air of zealotry, but I do not think it is deceitful. Probably a poor choice of words on my part.

As far as I know, if you look at the richest one percent of the population, their wealth relative to the total has been increasing, while it has been decreasing for the poorest.
At least I have not seen statistics supporting the contrary, hence my choice of words. See for example [1] (unfortunately it does not say whether it is before or after taxes).

You can argue about details of the methodology (for instance the many problems of the Gini coefficient), but I think it is fair to say that the trend is there.

By the way, don't you think that "partisans" is a bit tendentious?

[1] https://en.wikipedia.org/wiki/File:United_States_Income_Dist...
Feels like a mashup of a 100 odd talks on Startups. I think Sam needs to first create a billion dollar company himself before lecturing.
Money, to an extent, buys time. That's the main reason I pursue it.

The issue is that most people seem to leverage their money to the hilt. They earn $10,000 more, they spend ~$10,000 more. I can see money making you less happy in that situation, because you now face more downside risk if the money goes away.

Whereas if you earn $10,000 and only spend $0-$1,000 more, then you have options, including the option to not do anything to earn money at some point in the future.

The above is a version of the Mustachian philosophy, but you don't need to cut spending to a bare minimum to pursue time. Nassim Taleb argues for "fuck you money", and has written skeptically of the "money doesn't lead to happiness" idea. For him, self-ownership and independence of money is the key. The main purpose of money is not to spend most of it, to have a reserve.

People often ask how my business is going by asking if it keeps me "busy". They're using the wrong metrics.
Location reminder is a very nice idea. I would like to use it, for myself only (but it would be much better if I could make my friends use it), but I can't. Using smartphones with lots of apps destroys my life (and my battery).
Application that measures your heart rate during a cinema session
It's true, Mac/Windows/Linux is first tier, but we also test Android in CI, and possibly iOS? And there's a few BSD hackers who keep things reasonably up to date. We're investigating a way to allow community-run CI servers for platforms we don't officially support.

Being based on LLVM, we should able to support a wide variety of things, though there are C compilers for all sorts of exotic platforms, of course.
How an American sergeant’s journey through Russia inspired historical fiction
Hi, author of the post here. I did in fact, update the post, mentioning your PR in the first paragraph.

I cannot really change the rest of the content: I am reporting the mail I sent, and that was it. Changing it after the fact would only add more confusion
I liked the landing page.
It suggests that succeeding in an interview requires you to be all three of competent, confident, and clever about demonstrating your skill. Only the first attribute is relevant to the job.

20 years from now, the idea of hiring programmers with interviews will be as weird as the idea of hiring an orchestra cellist with an interview.
A 'newtype wrapper' has your back in that situation, which lets you do exactly that.
Do you feel that writing in all caps somehow makes you more right?

According to your profile your mission is apparently to write the 'most downvoted comments on HN', it looks like you're succeeding.
I don't think this is an underhanded CS question. It just asks if you can make the conceptual leap from: "does the game terminate?" to "does the sequence get stuck in a loop?" They don't ask for the constant-time cycle finding algorithm, which someone may not necessarily know, but I think the interviewer's providing it reflects well on him.
Yes and no. In fact, Nim can be used without a GC. Actually the GC of Nim is written in Nim, which certinaly proves the point. Now, it is not really convenient to avoid the GC in Nim, and you certainly do not have the safety features of Rust, but it can be done when needed (and you are still writing in something more productive than C)
I was referring to the triple buffering, full use of GL for rendering and better vsyncing when I talked about graphics changes, not GC stuff. That was separate and also makes things smoother but it's unrelated.

Deferring pauses is quite realistic for many kinds of UI interaction and animation. If your animation is continuous/lasts a long time and requires lots of heap mutation then you need a good GC or careful object reuse, but then you can run into issues with malloc/free too. But lots of cases where you need something smooth don't fit that criteria.
Just noecho makes no sense. Passing -n suppresses printing the new line, noecho sounds like it suppresses all output
Not scheme, but ocaml : https://ocaml.github.io/ocamlunix/
Re: Cavirtex Hack
Stupid question, but how do you download this? I can't see any menu at all, whether I'm logged into Google or not.
And let's not forget that Google isn't doing this for "history". They'll happily ruin someone's chances of getting a new job, just for a few dollars of ad revenue.
For some context, conal did the pioneering work on "classic" Functional Reactive Programming with Hudak, before the Haskell language had moved to monadic IO.

Originally, IO in Haskell was done based on streams as in Miranda from which it was inspired. A program is then a transformation on a stream of operating system events into a stream of operating system commands, both represented as data. That's pretty cool, because it makes it easy to write your program and then mock the operating system rather than actually touching the real world. The closest we have to this now is the "interact" function, which allows you to model your IO as a transformation of a stdin stream to a stdout stream.

Conal isn't much convinced that monadic IO was the best solution to the IO problem. The idea that monadic IO is a "pure" or "denotational" way to interact with the real world is arguably pretty weak, and that's the point of conal's post here: if you take the idea to its logical conclusion, we might end up just concluding that cpp is pure and denotational.

Instead, conal has worked on FRP approaches to interacting with the real world which are pure and have a very denotational feel to them: you're just writing down functions from time and a time-stamped stream of events. I still hold out enormous hope for this approach, but I'm not placing any bets on it.
Just so everyone knows, this is Alex "I have a weird interest in application bundling systems" Larsson, who is doing some badass bleeding edge work on full on sandboxed desktop applications on Linux. :-)

http://blogs.gnome.org/alexl/2015/02/17/first-fully-sandboxe...

http://www.youtube.com/watch?v=t-2a_XYJPEY

Like Ron Burgundy, he's... "kind of a big deal".

(Suffer the compliments, Alex.)
Cross-compilation looks pretty simple in Nim:

http://nim-lang.org/nimc.html#cross-compilation

Since Nim uses C as an intermediate representation, cross-compilation support should be as good as your C compiler's.

Rust's cross-compilation seems to not be that great at the moment. Although i believe that's because it hasn't been done yet, rather than having been done badly.
Black History Month: Annie Easley helped make modern spaceflight possible
I would be curious on how Go would compare to these two on that example.
Whip out an HTTP debugging proxy and I'd imagine you could get pretty close to unpacking Skype's API in less than a day. It uses the Bond protocol, which is easy enough to deserialize, and some tricks to verify that the message being sent is really the one that should come after the last one that was sent.

I didn't get as much time as I would've liked to play with it so they may have more tricks waiting, but it looked simple enough from an hour or so of tinkering.
Startup salary and equity visualized
>Similarly, it's not surprising that yeast extract (nutritional yeast Good) contains the Bad MSG. Glutamate is a fundamental building block of life. If you've ever tasted yeast extract, you will immediately notice that it's very salty.

The issue I have with yeast extract (vs. pure MSG) is that it tends to leave an unpleasant aftertaste in my mouth that won't go away for hours. This is why I generally try to avoid it.
The real issue if find about that, is StartUp with this kind of thinking tend to put number before people or actual results.
And most of the time, you cannot reduce problem or solution with crunching number.

Once the breach is opened, it became a nightmare explaining your coworker that a small drop in Session does not probably need a complete restructuration of the website.

Currently working in this kind of startup, doing a good job is actually impossible as we changed everything every 3 month or so, because number changed in analytics.
Use a cryptographic hash function, and there will be no collisions. There are a lot of things that rely on the assumption that hash collisions do not happen.
1) The title itself claims "costing thousands of American jobs" assuming that Americans somehow deserve these jobs over foreigners.

2) Even if most countries discriminate foreign workers, that does not make it right.

3) Discrimination (if it is not based on skills) is making economy less efficient.
But then you'd have to update the certs, which an appliance manufacturer isn't going to do.
The Entrepreneur's Guide to Guest Blogging
They are way too late with this.

I imagine that most people who experienced this failure have gotten their device repaired out of pocket or moved on to a different laptop. I got mine repaired by some dude on eBay and it only worked for about a month after that, that $150 is gone. But at least I can finally have a usable MacBook Pro to possibly sell, as opposed to just a really expensive paperweight.

However, I would like to know if they've actually fixed the fundamental design flaw that caused this problem to begin with. If they're merely going to replace the faulty parts for free with the exact same part, then it won't do much but give you an extension on the life of your advice until the same thing happens again.
The interviewer requires for a solution in finite time and space, and explicitly says that the size of the chequerboard is unknown but finite. The constant space requirement is totally made up by the interviewee.

Also, the code is a bit muddy to me, but it seems (please tell me if I'm wrong) that the proposed solution requires being able to move two separate pointers on the chequerboard. If this is true, note that the specification of the problem is

"A chequerboard is hidden from us. A player (note: a single player) moves the chequer one square and calls out the move".

For how the problem is stated, there is no chance of moving two separate pointers along the chequerboard. The list of moves could be streaming through a web service, so in order for the tortoise to move at half the speed of the hare, we'd need to remember in an array all the moves that separate the tortoise from the hare, making it for a solution equivalent to the plain and readable one.

So it sounds like the zealous overengineering somehow (in fact through the usage of iterators) brought the interviewee to a solution that's plain wrong with respect to the given requirements. Where did I see that before? :)
Escolar, delicious in moderation - http://www.thekitchn.com/use-caution-when-eating-escola-6660...
Money does buy happiness - just spent them on someone else.

It is not a mutual recursion, not of a single process.) You will get happiness in a feedback loop.
> People often ask how my business is going by asking if it keeps me "busy". They're using the wrong metrics.

Or just being polite? Or following norms about not asking about money? Or just using "keeping busy" as a construct for "not unemployed"?
iOS is supported but unfortunately is "manually" tested, for example snapshot of alpha2 is broken.

Version which is going to build with iOS support can be found on https://github.com/vhbit/rust (pre-built binaries on releases page)
Or use refinements.
Is PrivDog another Superfish
While reading about Superfish, I ran this simple test at https://filippo.io/Badfish/ by visiting the webpage and noticed despite the fact i don't have superfish installed i failed the test and got “Yes, Your connections can be tampered with”.

After quick check on my system, I realized I might have failed the test due to the presence of PrivDog (http://www.privdog.com/) on my system.

Here is a screenshot of Bank of America http://i.imgur.com/pbEFW5X.png

Is this another Superfish?
What?

That nothing is forgotten. That precisely malicious private info traffickers will have your info, plus big corps, plus some government agencies. You basically protect yourself against random strangers who don't give a fuck about you and maybe your ex-girlfriend (if she doesn't care enough to pay the right people).
Yes. The tech community has no trouble whatsoever understanding that getting good grades in school is overdriven by skill at taking tests, but somehow misses the fact that getting hired in tech is overdriven by skill at being an interviewee.
Yet another technology lifted straight out of an anime: Eden of the East [http://en.wikipedia.org/wiki/Eden_of_the_East] where contestants compete to win a reality game with access to a concierge by phone backed by a staggering sum of money.
Do you create a new repository on GitHub for everything you want to write?
tl;dr: Google Analytics is a great tool and informs you exactly what it does very well. You need to read what it does though.

I would say its a click bait.
It's more a FAQ than a book.
One problem with a mesh, is it might be hard to avoid or shutdown.

I will never, ever, connect a TV to the internet. At least at current very low quality levels. There's no reason an Apple iTV would have to suck as much as present smart-ish TVs.

I'd be pretty angry if a junky TV got owned and started spamming all viewers because it connected to the internet by talking to my kids video game console which is connected, or my roku or even worse my cabletv settop box.
TL;DR Functional programming evangelist bashes object oriented languages.