skysight-inc/HackerNews huggingface dataset:
If you can change the name_path struct to a standard STL data structure (std::vector<std::string> might work just fine), you can easily rewrite the function such that all memory allocation and all exploitable memory access is delegated to STL containers. If your STL std::string has a buffer overflow issue, you’re of course still in trouble, but the same is true if there are bugs in the STL/implementation of Go/Rust/Python/Java/Haskell…

Something like:

std::string path_name(std::vector<std::string> const& dirs,
std::string const& name) {
std::string p;
for(auto const& dir : dirs) { p += (dirs + "/"); }
p += name;
return p;
}

should work. If you feel like it, you can also add something like:

std::size_t len = name.size();
for(auto const& dir : dirs) { len += dir.size(); }
p.reserve(len);

Of course, len may overflow, but even if it does, all the harm that causes is that the string will have to reallocate memory during growth until running in a segfault when further memory allocation fails.
My fairly crude theory is that those sites have slightly broader and thus less tech-savvy userbases, so searches might represent ingrained ways of accessing the site more than they would for Reddit or Tumblr.

As even the least-tech-savvy becomes more aware of faster ways of accessing the websites, and browser software starts to pre-empt user intention more and more, this kind of convoluted search starts to drop off.

Not sure if that theory holds water, or is in any way necessary.
Good morning everyone!

I wanted to drop by and announce that Draftly, my brand-new Dribbble client for Apple TV, has officially been released.

I love Dribbble. I may not be much of a designer – more a “design-minded engineer” – but hardly a day goes by where I can’t be found browsing the latest and greatest from designers all over the world. It’s a constant source of inspiration for me.

My goal was to create a Dribbble client that feels at home on Apple TV. Draftly omits unnecessary features and cluttered interfaces to keep the focus where it should be: browsing the best Dribbble has to offer, right from your couch. Here’s some of the highlights:

- Large, beautiful images and animated GIF support
- Sections dedicated to Popular, Recent, Animated, and Debut Shots
- Top Shelf support: browse Popular Shots right from the home screen
- Full-screen mode, for when you need to see every detail
- Detail views, showing off the Shot description, likes, tags, and more
- Team & user profile views

It’s a solid v1, but I’m far from done. I have a ton of features in mind for future updates. But I’m super proud of this first release and I’d love to know what you all think. The best part? Draftly is completely free.

Thanks!
Windows has UAC that does something similar, and the Windows\System32 directory can't be written to by an ordinary user. The malware I see doesn't install in this directory, but in Program Files - and they can't really lock this down.

The way that folks get themselves into a mess and get malware installed are largely via programs with network access. Locking down the /usr directory isn't going to prevent this sort of thing from occuring - what will stop it is not allowing users to run as admins by default, which OS X is doing already.

At which point, the way malware will get installed is via software vulnerabilities, in things like git. It won't be occurring because Apple stopped me from turning off the execute flag on potentially vulnerable programs like the git that they install by default.
The paper discusses the fundamental difference between the Sieve of Eratosthenes and Trial Division, then goes on to discuss a number of ways that the Sieve of Eratosthenes can be implemented in a pure functional style with greater and greater optimizations.

Since I wanted to talk about laziness and not priority queues, I eschewed trying to write the fastest possible implementation in favour of the simplest implementation that is still recognizable as “cross off every nth number.”

If you feel that the implementation is inefficient, I agree. But if you feel it isn’t actually the Sieve of Eratosthenes in some fundamental way, please explain the difference in a little more detail, it would be instructive to share with HN and me.
No, it's just perpetuating the very damaging mindset of 'everything must be codified and spelled out into tedious detail'. Look, I enjoy taking the mick out of religion as much as the next guy, and there are many cases where current practices wrt government treatment of organisations based on faith or philosophical convictions haven't caught up with modern views of separation of governments. And yes, that 'last mile' of leveling the playing field takes some people to make a case for it; and will cause some social strife etc and that's all to be expected in a free society.

However, basing such 'activism' (for a liberal definition of that word) on pedantic (and frankly, juvenile) definition games is not the way to go about such a thing. All it leads to is the actual manifestation of the (satirical, debunked) 'EU regulations on the sale of cabbage' (x). It's pointless, much like the definition of what constitutes 'pornography', or what warrants moderation (see the articles on that topic today and yesterday).

It's not like "This creates a neat conundrum for the lawmaker; what is a religion? " is a new or even insightful question. It has been asked for thousands of years. It's fine to have people writing theses and books about it, but for pragmatic purposes, it's senseless to demand an 'algorithmic' answer where a precise set of rules allows one to machinistically answer it for every possible case one can throw at it. I've been banging this drum many times on this site, but that's simply not how policy making for diverse groups of humans works, much to the chagrin of many of us here who prefer our human interactions with as low levels of ambiguity as possible (for clarity: yes, I'm saying, in a roundabout manner, "let's try to keep our autistic tendencies in check".)

So no, one "must" not conclude that any religion is as much a religion as others. In the end, it's all just social constructs, and social constructs just do not work the way you claim. Courts across the world have ruled on organizations being 'religions' or not, and while here and there there is a debatable one, it's not as indecidable as you make it out to be. (one of my favorite ones is that of the 'Sisters of Saint Walburga' where the Dutch Supreme Court decided in 1986 that an organization that claimed to be a religion with one of its main rituals being offering live sex shows to paying audience members was, in fact, not a religion but rather a sex club masking its commercial leitmotiv behind a claim of religion. Shocker!)

Anyway, TL/DR: Pedanticism bad, common sense good - 'pastafarianism' long in the tooth, let's not encourage anything that gives us even more rules and laws and regulations, it's bad enough as it is with anti-social assholes exploiting corner cases (and that goes for all sides).

(x)

Pythagorean theorem: 24 words
The Lord's Prayer: 66 words
Archimedes' Principle: 67 words
The Ten Commandments: 179 words
The Gettysburg Address: 286 words
The Declaration of Independence: 1,300 words
The European Commissions regulations on the sale of cabbage: 26,911 words

(edit: formatting)
Browserball
I was just going to say this but add w3m. If anyone hasn't tried w3m for this purpose they should give it a 30 minute trial run.

Also this has the same issue of not being able to vote or comment like many other Hacker News Apps.
If I understand correctly, functions are inlined[0] (not saying this is bad, just different). If you declare functions as inline then you can get rid of the dispatching code in contexts where the type is known in advance.

[0] https://github.com/JuliaLang/julia/issues/265
Yes you can! Just share the "Group" name that you used for the fingerprinting.
GPS navigation is generally a good thing. GPS tracking is a slippery thing, seen by some as an invasion of privacy. The vehicle owner should be entitled to know where their property is, but it is none of their business where I go and what I do during the day. Insurance companies would love to hike premiums based on where you park, where you eat, how many mistresses you entertain, or those brief stops in the seedy part of town.

On one hand, GPS tracking can help against theft, or at least facilitate recovery. On the other hand, it opens up a wealth of possibilities for abuse
Matchmaking Algorithms Unraveling the Causes of Rare Genetic Diseases
Apple's data centre in Ireland could increase its power consumption by 8.2%
nano is a much better comparison. When comparing the two micro seems like the better tool.
Little lander that could–the legacy of Philae
Why not use cURL? This is a novelty! It's fun, it's a neat project to build something while likely learning something new.
Well, obviously, I'm not a web developer. Nor am I a music producer, nor a film maker. As the world becomes increasingly more digital, more technologies can be expressed as code. You all like MPEG-4, but many patents are involved there, such a http://www.google.com/patents/US6092120
Like my parent post said, a religion can be any explanation (for how things work) that helps the species to better cope with their world, either physically or mentally.

The idea of deities need not be necessarily involved; there's major religions in our own world that do not place a focus on "higher beings."
Apparently some people argue that the absurdity of these religions can itself lead to a spiritual experience:

"Several religions that are classified as parody religions have a number of relatively serious followers who embrace the perceived absurdity of these religions as spiritually significant"

https://en.wikipedia.org/wiki/Parody_religion
I Code Like a Girl
Instagram is just the way of sharing experiences, no less important than, you know, talking about things.
reply

Except Instagram users (and every other social network) is not about "sharing". They're about broadcasting. If it was about sharing then there would regularly be multi-way conversations between users. Instagram is about posting a picture and receiving likes and comments in response, but that's where the conversation ends. That isn't "social" by any definition I understand.
Really? Talking about how homebrew is pretty painless is "Apple fanboyism at its best?" Sure it's another thing to do, but look at any thread about running Linux on a laptop. How many people are like X laptop runs great you just need to add Y kernel parameter to the boot options. Isn't that a "hoop to jump through" too? Or all of the people fighting to keep their Windows install from upgrading to Windows 10. Isn't that a hoop to jump through?
Hasn't the Toba theory been discredited?
Dissecting a spammer's spam script
That's an oversimplification of the story in relation to architecture.

A lot of modernist architects have espoused socialist views, but someone like Mies van der Rohe also built some work for the Nazi regime. The modernist architect Philip Johnson was a notorious Nazi sympathizer.

There's an article here that starts to unpick the architecture/politics relationship in relation to one architect's work: http://archinect.com/features/article/4618/peter-eisenman-li...

Since architecture requires significant wealth and organization, it's rarely, if ever, something that comes out of anarchism. So statism or philanthropy is often behind it.
> […] I look at the average comment there and I can get a feel for what moderating there must be like.
And I have to say, it looks like paradise compared to reddit.

Correct me if I'm wrong, but what you're seeing in the comment section of the Guardian is AFTER moderation has taken place – both longterm (blocking trolls) and short term (removing/blocking comments). So obviously it doesn't look as bad as what you're seeing WHILE moderating reddit comments and you can't really compare that.

It's like I'm saying "moderating reddit is easy, I barely see any spammers or trolls there" (as a user).
This is a refreshing alternative to existing tools like my long-time favourite pyhn [1] as well as the newly-announced go-hn [2].

[1] https://news.ycombinator.com/item?id=5013321

[2] https://news.ycombinator.com/item?id=11479014
Are Test Cases dead (yet)?  and if so, what do you do instead?
What's your reputation and what are you doing about it?
I am dumbfounded. This guy grossed 700Gs from a take on Cave (https://en.wikipedia.org/wiki/Colossal_Cave_Adventure)?
> When dealing with functional programming (e.g. pure functions, immutable data-structures, referential transparency), sooner or later you need to deal with recursive algorithms and data-structures. Usually tail-recursive, so they take constant stack space, but recursive nonetheless. And when dealing with recursive algorithms or data-structures, you end up wanting laziness, because otherwise you cannot express the algorithms that you want to express.

This might be tangential to your point, but tail recursion doesn't really work with laziness, e.g. foldl in Haskell takes linear space.
Dubious placement of Frankfurt on the included map.
Is the git binary where the vulnerability is... or is it in one of these:

$ ls $(git --exec-path)
I would bet the deadliness of Ebola has been overstated (at least by a little, probably by a lot). Like any infection, many people who get it are probably asymptomatic, and until recently the vast majority of people tested for it were most definitely symptomatic.
http://www.theguardian.com/world/2015/oct/15/ebola-study-fin...
> Also: I'd hate if I had to fiddle around with kernel parameters to get printing, sleeping, networking, waking, font-displaying, account-switching, video-playing, time-knowing or up-backing to work every time canonical decides it's time for a new <x>subsystem. I love linux on the server, but maintaining a function desktop system is simply a waste of time. A somewhat evil waste of productivity, actually, because it feels like work and at the same time provides those frequent little victories that can turn it into an obsession.

On the other hand. Once you master this (which is not such a huge intend), you know your system.

Which is a valuable "smart skill" when developing (even web apps). For example, knowing how to use awk and sed instead of having to start a node or ruby instance is a thing that shows a developer actually knows how to run linux and not only "how to run stuff on linux".

You'll also understand $PATH. Which apperently is a thing most MAC users do not understand. Having to start "docker-shell" because they don't know how to extens theyr $PATH is a freaking joke and a workflow killer.

I understand that MAC's are comfortable to use and maintain. But as developers we should embrace leaving the comfort zone and face the real deal. We shouln't be some bunch of kids who need mac because it's comfortable.

Lets grow from little kids that need "mama mac" to take care of our stuff and become grown up's that can handle a system, because they know the system.
You would think that all of that would be uncovered by the due diligence process performed by their investors or that the investors would have some kind of ongoing visibility of what the company was doing?
Sounds plausible, the whole article had a disconnected feel to it, possibly due to lack of narrative.
The main thing is that airfare is really cheap. Firstly, it's got cheaper because of efficiency savings and economies of scale.

Secondly, people's incomes have risen way quicker than the cost of airfare. It's reasonable for someone in the working class - making say $20/hr - to be able to afford a $400 round trip to another continent. Many destinations are really cheap when you get there, too.
Would much rather have a system that just worked but required a "hoop to jump through" in order to use git, vs the multitudes of hoops you have to jump to in order to get a Linux desktop system functional in a corporate environment.

At home when I'm futzing around I don't mind (and quite enjoy it). But at work I don't have time to diddle my device drivers and OMG the xorg.conf crap I had to deal with in the past that still give me nightmares...
In the Lisp World, Racket has a great JIT which is optional. https://docs.racket-lang.org/guide/performance.html

Racket is a beautiful thing.
Would this work to create games for android with OpenGL?
And if you read it to the very end, it leaves some doors opened (to the tree-hugging argument I mean):
"It’s the best one I’ve ever had."
We use a mac server as a build machine. It's pretty annoying; given that you need to graphically log in to accept a license every now and then to use lldb (a non-graphical debugger) among other things.

In our case I think rebooting the server works, but you can't be aware of all usecases.
Is it me or have they forgotten to mention how much they earn? How in the hell would they earn 18k a month?
So what should I do? My patents have limited geopolitical enforcement jurisdictions, whereas the Internet is global. Plus, I'm deemed evil, even though It's not easy to create something novel. MP3 patent https://www.google.com/patents/US5812672 was nice, and enforced time to time, but for a small startup the barrier between the abyss and land is just a step away.
That's funny because in my country the right won the elections and they shifted money from welfare programs to tax exemptions for big co and stimulus packages for companies that are still firing people anyway. All that with tax payer's money.

But I admit that slogan is a communication gem of the highest caliber.
Yes, but those only detect movement[1]. They cannot differentiate between a motionless person and the rest of the room. Hence my point about the problem with motion detectors in a house given that most people often spend periods of time largely motionless.

There is a workaround to this problem, but it requires adding a networked "intelligence" to the detectors. You'd a detector at every entrance and every exit of every room. Then you'd need to network them up to a server (which defeats the advantage of motion sensors over FIND) and that would log the movement in and out of each room, incrementing the occupancy of the room as it goes along to ensure that lights are not deactivated when two people are in the room but only one exits. By the time you've installed dozens of sensors across the house, networked them, and installed a server, you might as well have just gone with FIND. Not only does FIND require less hardware, it can identify the specific individuals and isn't triggered by family pets (I certainly don't want my cats turning lights on during the night!)

So while you are right that other, simpler, technologies have been around for years, they're simply not good enough for the average home (it still remains to be seen if FIND is, but it's definitely better than motion sensors)

[1] As per the article you cited, details about how the detection on works for objects in motion: https://en.wikipedia.org/wiki/Passive_infrared_sensor#Operat...
> I find these types of criticisms of photography just part of the hipster "backpacker mentality"

You should actually read the article because the author isn't one of those people.
“Instagram,” Suler said, “is therefore a tool for validating one’s life.”

I think this is the crux of the issue. You are right--photography has been part of vacations since cameras were generally available. But what's different is the real-time nature of sharing those images, and the real time acceptance (or rejection) of those images via likes and comments. If those are more important than the lived experience, then, I think we have a problem.

I'm a friendly critic of Instagram (it is the only social media outlet my wife and I use). It is perfect for sharing images while we travel. It is also easy, however, to get up checking if folks have liked our photos, or commented on them. That's not Instagram's fault, of course, but I wouldn't even worry about such things if we weren't sharing photos almost immediately.
There are PIR sensors that use no more than tens of microamps of power, and can send an interrupt signal to a microcontroller to wake it from deep sleep. An example is AMN41121 by Panasonic.
Has anyone read this book that proposes the "black death" was due to meteor/comet strikes? I have been interested in doing so but never got around to it.

http://www.amazon.com/Light-Black-Death-Mike-Baillie/dp/0752...
If that's the case, how can I plug the HTTP/2 and TLS 1.3 stack into Linux-PAM and use it to login to my remote servers instead of using ssh?

Or are they not suitable for that?
Python the second best option.

I love Python (despite the community). Sorry to be that guy but Python is always the second best and for me that usually means I end up using Python less and less. There isn't one area that Python is the best tool and sadly that is why it just isn't taking over the programming world.
It can be argued that comments that might be flagged as 'trolls' do exactly that. They point out inconsistencies in the writers opinion and present them for the world to see often along with links to the relevant information.
Space Invaders built with VisionMachine
> You can't seriously think that Republicans are the cause of the graft, waste, and mismanagement associated with government infrastructure projects.

Most people think that it's the folks on the other side of the political isle from them that cause the problems.

Infrastructure problem costs too much? Is it the union construction workers that are inflating costs or the under-budgeted maintenance? There are a dozen convenient excuses that people of either party can blame on people not in their tribe.

Rah rah rah go our team, it's the other guys that are the problem!
Objective truth, lol, good one.
They didn't change the user experience in any way - most updates do not require a reboot, the ones which do are fast - so I'm guessing that the kernel checks the code signature on the process doing the write when deciding what to block and possibly even requires a valid Apple signature on the new file.
Ask HN: Do you use either C# or Java in your professional work?
I am curious to know how many people are using Java (and C#) as their primary bread-maker.

I want to get a reality check because from what I see on here, it seems like only a handful languages are ever discussed. I don't work in either language professionally and I feel I'm missing out on major career opportunities.

I understand the reasons why Java/C# don't get discussed too much, I just want to know how many of us use it.

Thank you.

EDIT: Thank you for the responses so far, it seems that I am indeed throwing away a lot of career opportunities.

As an aside, for the Java stack, is learning Core Java , Servlets / JSP, Hibernate (or other ORM) enough to meet the basic skills required for most of these jobs?
Or links2.
It was interesting that in the announcement of this by Australia Post they cited the example of using drones for 'last mile' stuff in rural properties where the driver goes to the gate and then uses the drone to deliver to a property. Not sure if it was just to appeal to the outback romanticism considering I doubt most of those folks get mail delivered anyway.