skysight-inc/HackerNews huggingface dataset:
I used to have a static website, before I wised up and moved to Wordpress like everyone else.

I found that, once I restricted myself to the features of static pages, the security risks of Wordpress were a lot less scary:

- You can't hack form submissions if the site doesn't have any forms on it.

- If you're going to require SSH to publish new pages, you can require SSH tunnels to log in to Wordpress or access any admin pages. (I should write up my nginx config for this.)

- If you were prepared to make every site update require a Git push, you can surely afford to disable WP's very scary self-update-in-place feature and perform WP updates from a development server instead.

- A WP site that could be usefully replaced by a static site is vulnerable... how, exactly? Static sites don't accept credit card numbers. Customers can't even log in, so they won't type in their darkest secrets even if they wanted to. Employees can be told to follow rules like "don't use your Gmail password for the corporate WP site" and "don't type anything into the public publishing engine that would cause an emergency if it were published to the public."

The biggest risk is denial-of-service and defacement. Restore from your tamper-proof offline backups, which you need to have anyway. There are probably fifteen different services you could use to be alerted when the website changes unexpectedly or starts serving up malware.

Of course, static websites are faster. Until you turn on Cloudflare's free plan, which makes everything faster still.
A C++ program that copies arounds lots of temporary std::strings is an example of unnecessary allocations.

The thing about optimizing allocators is that you very quickly run out of ways to make them faster without a space tradeoff. Notice the first optimizations detailed in the article was to retain a 'free page' instead of returning it to the kernel: this speeds up allocation and deallocation, but increases memory usage. And if one makes it faster, why not two, or three, or fifty?

The same is true for that slab-style allocator. The basic idea is to separate memory into separate pools of different sizes, and only allocate from the pool for the given size. If that pool is full, enlarge it, even if other pools have enough space to satisfy the allocation. That's wasted memory!

So we have to balance speed against memory usage. The right balance is domain-specific: that Java app running on a monster server can afford to waste lots of memory to speed up allocations, while the allocator on my iPhone needs to be much more mindful of its space overhead.
I thought the best way to use singletons in Java these days was via enums, e.g. as http://codereview.stackexchange.com/a/27298 describes it - can anyone elaborate on why that's not even mentioned in the article?
Gccgo Leaks More Than 60k of Memory Compiling Hello World
Just some simple game
Who's the guy at the end saying "let's forget where I work and where you work", asking the "hard" question?
> So, on the one hand, I think that it should be obvious that all officers on duty should have cameras running all the time--there should be no reason to ever need manual on/off of cameras

How about when talking to a witness who could get into trouble for talking to the police? It's already very hard to get people who witness things like gang-related killings to say anything to investigators. They will be even more reluctant to do so if it is being recorded.
condone means to allow; I think you meant condemn
Jesus, what is it with this place and any source control system that isn't onboard with the git circlejerk?
truly the most hipster art project of all time. I'd back it!
I like the movie, it deserves its fame, but there are some errors in the script that could have been easily avoided. For example, at one point a character says something to the effect of, "Surely they've printed out every 216-digit number?" No, not likely. :)
What "stunt"? Why is this such a big deal to people? I've never found a login to be a particularly onerous thing.
Excerpts from Kevin Flynn's fictional books
It's a pun on asp/viper OH MY GOD YOU'RE ONE OF THEM
Followed immediately by the question being flattened by administration as "not a good fit" despite the previous existence of these types of questions producing excellent discussion and answers.

I think SE is awesome in spite of its rules, not because of them. The whole "discussion is bad mmkay" thing seems to be cargo-culted by the staff of these sites despite many examples to the contrary.
By convention, the package and repo name should be the same. In this case, that means your repo should be called logger.
Then you ignored all the inaccuracies before that sentence, and all of the insights after it.
Nice! Exciting to see these communities being built.

But I still want a Rap Genius for source code ;)
Presumably they kept it out of the press releases. What's "in the open"?
Each officer (I guess, it's true in England) has some discretion.

Allowing officers to make it up as they go along does seem like a really bad idea. Evidence-based guidelines about when to arrest and when to have a discussion should be welcomed and would be one consequence of the situation you're describing. Rather than just arresting everyone because the camera shows evidence the officer can point to their guidelines when they don't arrest.
Conspiracy theorists wouldn't take statistics into account, unless those statistics could be interpreted in their favor. They would insist the video we can't see is clear evidence of a cover-up, while the video we can see has probably been doctored or manufactured.
Quote: "Our product, Acme, is different. We're designed to help improve your'e [sic] company's performance ..."

What? This is the winning email, written by a borderline illiterate? But maybe I'm thinking about this all wrong -- maybe people who don't cringe at this level of literacy are the target audience.
Laughing at cyberbullying because it happens online is as dumb as laughing about school bullying because it happens in school, an environment which most adults will agree is ridiculous.

That doesn't mean there aren't a few good points in there, but for someone who claims to abhor narcissism, this person sure likes to talk about themselves and their achievements a lot.
Everything I said was factual. If I made any errors, feel free to correct me rather than downvoting.
Data is god
There was a team at Hack The North that accomplished this similar thing but with using Facebook's Events API and NFC.

This sounds like a fun experiment to try out. Cheers!
South China Morning Post Live Blog of Hong Kong Protests
For Android development, I like the lesser-known Kotlin language (from JetBrains)
I don't know about Canadian tax law, but in the US there is no benefit to earned revenue over contributed revenue, and often having a high number of individual donors can be advantageous for granting reasons.
This looks interesting - I'll take a closer look.

You might want to check out the logrus package - which I'm using and pretty happy with. https://github.com/sirupsen/logrus

Logrus lets you add structured k,v fields so you do have to mess around with fmt and also has hooks to support things like sending logs to syslog or remote exception handling services.
I did not regret the time that I spent reading this book. I thought it was very well laid out. He starts with some core ideas which I would say are relatively "contrarian." These ideas come together very well at the end to build an interesting model from which you can perceive the world through.

I'll definitely be reading it again.
Most cities, including virtually all the widely-admired European cities (with Paris being notable more as an exception than the rule).
Previous discussion: https://news.ycombinator.com/item?id=8357207 (219 points, 5 days ago, 73 comments)
It's great but all that content was available for years right? Are people just now finding out about the Stanford 101 Blake Masters notes?
Sounds like the definition of political dissident to me. Not that political dissident is something to aspire to ... I think it is, but just like, my opinion, man ...

I am not sure what you are really trying to say Gabriel?
I'd say the best idea is to port a lot of these code bases to languages like Go or Rust maybe

So your answer to to the criticism of "this code is ancient" for core utils is "let's port them to languages that haven't finished maturing yet"? Rust in particular is only two years old, and the recommended version is "the nightly build". That sounds super-stable for core utils...
Easy to answer -- a website that doesn't require a login (for casual reads) hopes to attract visitors. A website that does require a login hopes to control and exploit visitors.
The definition of "Conspiracy Theorist" changes to suit the person who imposes that label on someone else. It's a flexible & emotionally appealing ad hominem strategy. Marketers love it because it makes their position appear "realistic" and "normal" while those who oppose their position are "fringe" and "kooky".

And maybe I'm lucky, but I've never had a camera malfunction on me.
And it makes me happy for ditching Scala in favor of Java some years ago after realizing that if you're writing a 2MLOC software that your organization is going to depend on for the next decade, backwards compatibility is so much more important than any language feature (even if that feature is an extremely clever type system that extremely clever developers who like that sort of thing can use to statically prove that their function's argument is always prime).
reddit.com/r/beermoney - made over $1,000 in the last 4 months in amazon gift cards.
I'm also 100% confident that rabite eats babies, rapes children, and tips waiters below 10%.
Rosneft and Exxon discover Arctic oil
Some might, but common paper is mostly just cellulose.
I see a lot of this in the web development oriented areas. So mainly in the CSS/JS areas.
Professor Astro Cat's Frontiers of Space: Children's Book
the atlantic seems to like the book, but fails to sell it to the reader (NOTE: I have not read the book, so this is taken with a grain of salt)

"The biggest secret in venture capital is that the best investment in a successful fund equals or outperforms the entire rest of the fund combined," he writes. This power law distribution of VC investments means that a few bets will get fabulously unequal returns and it's almost impossible to predict which ones those will be. In a winner-take-all world where even the experts running VC firms don't know which company will win,..."

-- This says nothing more than the winning numbers on the back of paper stuffed into my fortune cookie

Remember that your founders are your family, give great employees limited tasks, start with ambitious yet small products that dominate a narrow market, stop hating on salespeople, and focus on a corporate thesis statement, or "secret," that distinguishes you from your rivals.

-- So build a base and grow? What's new here?

It's refreshing to hear a techie extol the virtue of sales, and Thiel is good at explaining both why nerds hate marketers, and why the nerds are wrong.

-- Who cares? If i need Peter Thiel to convince me that sales is important then i need to reconsider being a founder. But wait, didn't he previously say 4) Focus on product, not sales...

"The perfect target market for a start-up is a small group of particular people concentrated in a group but served by few or no competitors," Thiel writes.

-- Any more common sense you wanna drop?

Pardon my language but, this book sounds like a massive circle-jerk of standard business practices. Maybe i'll download it on kindle and give it a chapter or two to change my mind, but right now it sounds like a total bore.
I've read all of the Stanford 183 notes that Blake Masters took, but not the book that just came out. Have any of you read both? Did you think the book was worth it if you already have the notes?
This is a really neat idea. I had hoped that they owned the dam and the power generation too which would have upped the awesome factor considerably. They're "only" just doing most things right rather than everything conceivable. Oh well!

I think this is a great hack in the bitcoin world. Bitcoins don't care where they're mined so might as well mine them in places which minimize costs. Arbitrage!
IMO, there is a lot more you can do when designing infrastructure from the ground up. Near me there is an underground mall connecting around 30 buildings. While limited, the advantage of separating foot traffic from road traffic is huge. It's all built down one street, but expand that in two directions and you can easily have a few hundred buildings within walking distance of each other. Which is not only efficient, but actually promotes walking around. No need to worry about heat or inclement weather. Add a subway for longer distance trips and cars become far more optional.

Baltimore has a raise sidewalk covering a few blocks which also provides significant benefits as it's a high foot traffic area. However as it's exposed to the elements and does not add space for shops. So, I suspect it's going to be more costly to maintain long term.

Other options: Moving sidewalks are unfortunately energy hogs and limited to fairly low speeds. But, I suspect some raised bike lanes separated from foot and road traffic could move a lot of people at fairly low costs. The advantage over bike lanes is safety and they don't reduce density. Which of course opens the door to other forms of personal rapid transit. The important bit IMO is even 20 MPH can cover a lot of ground if your not stuck in stop and go or deal with pedestrians.
I'm only on chapter 8 but it is a very good book so far.

The thoughts conveyed in the book are clear and integrate well into a larger world view.

Even if you don't agree with Peter, at least you'll get a well articulated view of the world and one that'll make you question some of your beliefs.
I'm glad that, whether by better design, or lucky happenstance, C# managed to avoid bumping into these issues.

(It still has the problems, of course, that WinForms was written back in 2002 and doesn't even use Generics, which would make the API a lot cleaner.)
hey ben - david from dolores labs here

I've wanted to build something kind of similar to this - evented simulation of "soundscapes" (coffeeshops, train stations, etc) programmable using a similar graph formalism to yours, except with a bunch of concurrent loops running that probabalistically trigger one or more downstream audio samples. Goal would be to create an audible environment that "sounds like" many of the places I sit, but with enough variance that it doesn't sound like a loop. I estimate it would take a few hundred samples to do this.

Let me know if you want to sit around and hack someday, maybe I'll open a PR.
Everyone did it! This is a standard assignment project in CS 101.
The problem with AI, if you don't have visual/immediately verifiable results, you fail. You could make great progress and have a partial solution needing polishing, and it won't be good enough if your professor is not a smart man.

A website or some graphics tool kit, well, it might not be done, but the partial solution could be seen and you get good grades. I say go for the easy stuff, take your good grades and graduate. I believe that If you were really serious and had the chops you would have had a bunch of problems that interest you and you won't be asking us.
thats a good point in the short term sense.

but what about the long term procrastinators? how does your theory fit into the aspect of long term goals? Say I want to switch careers and become an actor or something. Obviously I'd want to begin as early as possible and not wait until "there's optimal time you know you need left" because you obviously don't know the optimal time to begin a long term goal.

Just a thought.
I think the definition of 'conspiracy theorist' is pretty generally held - someone who holds to their belief in a conspiracy regardless of evidence to the contrary, or who dismisses such evidence as being, itself, part of the conspiracy.

Although you're right that the label is used to malign and dismiss people who believe in conspiracies which actually exist, that doesn't mean trying to examine such things objectively isn't justified, or warranted.
[live] Occupy Central Hong Kong Blog
What's so surprising? OpenBSD folks don't fall for the next new shiny thing. 10 years from now, something else might take over git, and everyone will jump to it. OpenBSD folks don't care, if what they have works, they stick to it.
I _think_ that implementation is non-lazy? The OP is not interested in that case.

> 3. It is lazy. One can argue about this, but non-lazy factories are not interesting for our discussion. Singleton initialization should happen with the first request for a Singleton, not when Singleton class is initialized. If no one wants a Singleton instance, we should not instantiate it.
I strongly recommend the book "Seven Databases in Seven Weeks" if you want to understand a bit of "theory" around databases. The first chapter focuses on a relational database, PostgreSQL, but by learning about the other types (columnar, document-store, graph, etc) you also learn more about relational databases by learning what choices they make and how they could have gone otherwise.
Hey, Twitter, here’s this one thing you should fix (2012)
New York City has the highest percentage of green space of any city in the US? That has to be a misleading metric, including less inhabited areas way out of the city proper. If you're in Manhattan, the only green spaces are little square parks, tiny alley parks accessible only to people with children (lame!), and central park. The city does not feel "green" at all.

If you go to DC, on the other hand, all sidewalks are thoroughly planted with trees and shrubs and such, and there are many buildings with big lawns and gardens. DC feels much greener than NYC.
BeOS http://en.m.wikipedia.org/wiki/BeOS

Haiku https://www.haiku-os.org/

Haiku http://en.m.wikipedia.org/wiki/Haiku_(operating_system)

Windows NT Kernel http://en.m.wikipedia.org/wiki/Architecture_of_Windows_NT

Windows NT Kernel http://blog.zorinaq.com/?e=74 (which references back to HN)

L4 microkernels http://en.m.wikipedia.org/wiki/L4_microkernel_family

SEL4 http://sel4.systems/
That Kim Dotcom's business model, for instance, does not turn him into a modern-day Andrei Sakharov.
this is hackerold not hacker news
A Promising Step Toward Round-the-Clock Solar Power
>Operators are fundamentally unreadable

I would suggest that is obviously false. Most languages have operators. Is 4+5 really less readable than plus(4,5)? Haskell does not have very many operators. The fact that people see 3 operators they are not familiar with and decide "this is unreadable because of so many operators" speaks rather poorly of people's desire to learn.
Yes you can, someone close to me has a TS/SCI clearance and in their past they have smoked a lot of weed. It's all about how you act recently when it comes to drugs AFAIK.
I really don't think there's any place on earth that's not planned, to be quite honest. I think we're using the wrong word here.

If you look at a city like Paris for example, Haussmann's plan, in my opinion at least, has created an absolutely stunning and unique city. But within it, there's been a lot of room for organic development.

But if you look at a city like Detroit, you get the developer-dictated sprawl you mentioned. But that, too, is planned. If you create building permits for block after block after block of single-family detached home, you get detroit's urban sprawl where you'll figuratively die of hunger in the unfortunate case your car is out of fuel and you need to walk to the nearest mall haha.

Anyway, I think in general European cities have gotten it right quite often. Lots of open spaces, green spaces, make cities walkable, good public transportation, mix housing with light commercial areas, keep heavy industry outside of the city, mix housing catering to various socioeconomic classes, create a good amount of density so you don't get sprawl, but so you don't get overcrowding either, and focus (public) transport on connecting residential and office/commercial areas. You usually get a great quality of life, little polution, social cohesion, affordability, little social tension, and create an impression that it's unplanned and organic (i.e. don't use graph paper to model a city)
It's also worth noting that 0->1 makes claims about the sort of vision that founders have that are directly at odds with all accounts (including his own) of how Thiel's own successes actually occurred. Not slightly misaligned, but directly 100% contradictory.

It's not a terrible book; it's mediocre. It's a mix of the obvious (perfect competition destroys profit), the confusingly expressed (the bit on secrets sounds "deep" until you realize he's expressing something obvious using confusing language), and noise.

If somebody wants to read a good new business book, I'd recommend Creativity Inc, How Google Works, and The Hard Thing about Hard Things long before I'd recommend 0->1.
This is a good start but where Chef ends up sucking a bit is when you want to deploy a bunch of different apps in a SOA type of arrangement and don't want to duplicate code. I.e to deploy another ruby app you have to basically copy and paste this cookbook or you can try to switch to the 'application' cookbook which is chock full of magic and wonder and doesn't really look like any other chef code.

Chef really needs some dependency injection type stuff like what juju has going on. So something can provide a 'load balancer' and your app can optionally use a 'load balancer' but your app doesn't need to hardcode that it's using nginx, or ha proxy, or elb, or whatever in it's cookbook.
I also said it's a problem we have to tackle in the next couple of years. You don't have to start porting today. I write command line tools (and that kind of thing) in Go and it's a great experience. Go shines once you come back to an old code base, or have to review code you didn't write. Rust made the list because somebody already ported the GNU core utils to Rust (https://github.com/uutils/coreutils). Feel free to use C++11/14, OCaml, D or what have you. I hope we agree that C isn't the best choice.
Had he not gone to Stanford then would he have gotten the same network and met the same role models? Was this addressed?
Understanding the 12 principles of animation
The most upvoted post on reddit every day
I rather use Java, as I like to take vacations and for the majority of traditional enterprises, JVM == Java and .NET == C# | VB.NET.

So I am not the one bringing new technologies into the project, if the customer didn't explicitly ask for them, even if I enjoy playing around with them.
Wow. That's interesting, I really did not find asynchronous programming easy, with basic things like hooking up to database requiring you to go deeper into a chain of callbacks, forcing you to rely on duct tape solutions like futures or whatever they use now to work around the limits of Javascript, or having to write stuff in Coffeescript.

But some devs swear by it, I just fail to see what the advantages are.
I read it both. If you enjoy notes a lot, reading book might sense, but don't except tons of new stuff.

It is mostly written in a bit better structure and targets more general audience than class notes.
You are absolutely right. ESPN comments are pretty bad. :)
I like it a lot. Quite controversial and a bit on too high-level for me, but it was fun and informative to read.
May also be useful:

http://www.cs.bham.ac.uk/~exr/lectures/opsys/13_14/lectures....
I didn't know about that, neat! In fact I'm rather proud to say I couldn't have known about it at the time, because it was... hmm... I'm gonna say 1993, give or take a year.

My version had considerably lower resolution, though, since I used quarter-inch grid paper at 8.5x11", so it was 0.125 units per square. :)

Meanwhile, look what I just found while verifying my memory that the core set fits in y = +/- 2.0:

http://www.wikihow.com/Plot-the-Mandelbrot-Set-By-Hand