Microsoft open sources C++ REST SDK "Casablanca" - <AUTHOR> http://blogs.msdn.com/b/vcblog/archive/2013/02/26/the-c-rest-sdk-quot-casablanca-quot.aspx

<comment><USER2> Disappointed to see the continued use of wide strings in new projects.

<comment><USER3> As long as the Win32 API continues to not support UTF-8, using wide strings will remain the least bad option on Windows.

<comment><USER4> I don't know what you're talking about, Win32 supports UTF-8. I can pass CP_UTF8 into WideCharToMultiByte() just fine. :-)

Kidding aside, I don't really see the issue. Do you get upset about in-memory representation of strings often? How about when using Java or Python? Is this not why there is an entire programming practice called "serialization"? Windows started supporting UCS-2 before UTF-8 existed, and so the internal representation on Windows remains 16 bits per char.

<comment><USER5> Python supports full Unicode on all platforms now (x). Who cares about in- memory representation as long as the user doesn't have to suffer from surrogates and all that horror.

(x) pre-PEP393 there was a build option to use the limited 16-bit Unicode, was unfortunately popular on Windows

<comment><USER4> Hm. I picked Python because I knew it was an outlier, but I don't know all the details. Does Python still suffer from the horrors of comparison between diacritics made up of combining characters and the same glyph as a pre- composed character? Seems like even if you expose strings as UTF-32 you'd still have that issue.

<comment><USER5> Afaik the combining character problem hasn't changed, you still have to use unicodedata.normalize() for that. But at least you can pass through Unicode strings cleanly.

Are there other languages that handle this better?

<comment><USER4> It's not really clear to me what "handle better" would be, which is why I asked if Python did anything, as your post suggested it hides some ugliness of Unicode (a claim like this I am always skeptical of, although reading PEP393 it seems kind of clever in that "why don't more libraries do this" kind of way).

I suppose one form of "handle better" would be to always normalize all the time, but then, there are those times when you want payload to be bit- identical after a round-trip. I suspect it's just rooted in Unicode sucking (even if it sucks less than the encodings it replaced); it's funny how Unicode is supposed to make things simpler, but carries its own baggage and complexity and nonsense to worry about. Every time I read about these details in Unicode it seems to suck more than I remembered the last time.

<comment><USER3> Other than the great UCS-2 cockup most of the issues with Unicode are either due to that human languages are a pain or are unpleasant backwards compatiblity things. Only having the fully normalized forms would make things designed around Unicode a lot simpler, but the denormalized forms let things not designed for Unicode mostly work, which was key for getting people to actually use Unicode.

<comment><USER4> Oh, I totally understand the reasons. Doesn't mean it still doesn't suck. It's one of those "sucks less" type of scenarios.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> Completely off topic, but was anyone as disoriented as I was to realize they were browsing an Apache-licensed git archive on a Microsoft site? It wasn't even awful (not github, or really even gitorious, but not bad).

<comment><USER7> Microsoft has been supporting git on Codeplex (their Open Source hosting site) for a while and they announced git integration in Visual Studio last month.

I don't know what license they tend to use for Open Source stuff but Apache is a good choice (we don't need yet another license).

<comment><USER8> Microsoft has already given the world the "Microsoft Public License" and "Microsoft Reciprocal License".

</comment></comment></comment><comment><USER9> I really like that they used the new C++11 features like lambdas etc. Will download and dig through the source code, seems to be one of the first OS projects by a major company which feature C++11.

</comment><comment><USER7> From what I understand this is a REST client library for making HTTP requests and dealing with JSON. Can anyone recommend a good C++ framework for writing REST services and simple HTTP servers.

<comment><USER10> For HTTP clients and servers, I've not had too much trouble with cpp-netlib. It's heavily boost-based, and it uses Boost::Asio for concurrency and SSL handling, but if you're familiar with Boost, you can be up and running in no time. IIRC, this library is considered for official inclusion to Boost as well. I use cpp-netlib + RapidJSON for my REST API handling needs.

<http://cpp-netlib.org/0.9.4/index.html>

<https://code.google.com/p/rapidjson/>

I have no recommendations for writing REST services, however.

<comment><USER11> Looking at the source, it looks like this lib uses boost:asio on non windows platforms.

</comment></comment></comment><comment><USER12> What are some good web frameworks in C/C++ to implement REST API?

<comment><USER13> I currently use Fastcgi++ and manage the headers and JSON with some custom libraries. The resulting application just runs through any FastCGI compatible web server.

</comment></comment><comment><USER14> It's good to see the code using K&R naming convention (sans the class names starting with _).

On the other hand, it's written in a C++ dialect that's incompatible with the one we are using. It also has quite a few unnecessary tie-ins into the native API and MSVC compiler specifics (#pragma endregion), so as nice of a gesture this is, it's not fit well for inclusion into other projects.

</comment><comment><USER15>
      file_stream<unsignedchar>::open_istream(L"myfile.txt").then([](basic_istream<unsignedchar> fileStream)

I don't think I've ever seen this C++ idiom before (either the ".then" method or the use of anonymous brackets like that.) Is this common everywhere or just in Windows circles?

<comment><USER16> .then() is just a method. The "anonymous brackets" is a c++11 lambda function. I don't think chaining it like that is common anywhere, yet.

<comment><USER17> That looks like Microsoft's new "async everywhere" approach to API design. It's probably a pretty good idea in concept, but I hope they don't expect C++ developers to actually write those awful nested lambda .then() blocks for what are conceptually sequential actions.

<comment><USER18> I expect you can define named functions for your "conceptually sequential actions" if you prefer.

<comment><USER17> Sure, but is that much better? It reminds me of having to create named struct classes to simulate closures prior to C++11 lambdas. The language syntax just doesn't support that style of programming.

<comment><USER18> So how many languages actually do support this style directly?

The C# async keyword looks pretty clean, just give C++ a decade or so to catch up.

</comment></comment></comment></comment></comment></comment><comment><USER19> Back in the day (~4 yrs ago) there was a project called "Casablanca" at Microsoft which was supposed to be the native (C/C++) version of the Windows Communication Foundation. Is this the same "Casablanca"?

</comment><comment><USER20> Is this Windows/VisualC++ only or is it portable?

<comment><USER17> FTA: _We currently support Windows 7, Windows 8 (Windows store and desktop applications), and Linux._</comment></comment>


Announcing SecureNN in tf-encrypted - <AUTHOR> https://medium.com/dropoutlabs/announcing-securenn-in-tf-encrypted-9c9c3e8a5a52 <comment><AUTHOR> SecureNN gives efficient secure ReLU's and Maxpooling neural network layers. This is done using secure multiparty computation (MPC).

tf-encrypted is a project that aims to bring secure technologies into a place that feels familiar to practitioners.

You can read more about tf-encrypted here: [https://medium.com/dropoutlabs/experimenting-with-tf- encrypt...](https://medium.com/dropoutlabs/experimenting-with-tf-encrypted- fe37977ff03c)

and the project github here: [https://github.com/mortendahl/tf- encrypted](https://github.com/mortendahl/tf-encrypted)

<comment><USER2> with this enabled, will we still be able to use GPU? can GPU calculate encrypted data?</comment></comment>


Feds Remove from Plane, Detain Civil Rights Advocate for Possessing TSA Docs - <AUTHOR> https://professional-troublemaker.com/2016/09/10/detained-removed-from-airplane-by-feds-lax/ <comment><USER2> This kind of stuff does happen and really needs more attention.

<comment><AUTHOR> Perhaps the best example is this kid...

[http://www.cnn.com/2010/CRIME/02/10/arabic.flash.card.suit/](http://www.cnn.com/2010/CRIME/02/10/arabic.flash.card.suit/)

...who was arrested after the TSA called the cops because he was studying the Arabic language, and everyone knows that the terrorists speak Arabic. It was lucky for me that the cops they called during my ordeal in this story used their own judgment rather than that of the TSA.

</comment></comment><comment><USER3> I'm not condoning the TSAs behavior, but with the name calling, put downs, and nature of the writing, I wonder if the author's demeanor affected how the incident was handled.

Justice should be impartial to mood, but realistically people are people and don't respond well to the feeling they're being condescended upon.

<comment><AUTHOR> 1) I was admittedly non-cooperative when it came to answering questions that I had no obligation to answer, but always polite. When they asked me to explain myself, I declined their offer, but did not mock them as I do after the fact on my blog.

2) Will be submitting a FOIA request for checkpoint video so you can see for yourself. :)

3) Sad that this is your first thought. The government just detained someone illegally, then called them off a flight in front of a plane full of passengers for no lawful reason... whether or not I have an attitude problem is really not the newsworthy issue here. Reminds me of the people whose main take-away from the Eric Garner incident that resisting arrest is a bad thing.

<comment><USER3> >was admittedly non-cooperative when it came to answering questions that I had no obligation to answer, but always polite. When they asked me to explain myself, I declined their offer, but did not mock them as I do after the fact on my blog.

I wasn't implying you called them names there, I was implying you calling them names in the blog was a symptom that you were less than fully cooperative with them, and in fact in exactly the way that you describe, not doing anything more than the bare minimum required by law for them, because it's your right.

And it is your right.

But to me it's similar to people who start repeatedly asking if they're being detained as soon as an officer pulls then over, yes it's in their right, but it sets the tone for the interaction between them and the individual they're speaking with.

I don't believe that if you had explained yourself you would have had Feds coming down the jetway for you. You have the right not to explain yourself, and as human beings they have the right to respond to what they think is someone carrying classified documents with no offered explanation in the wrong way.

And I don't think you should compare this to Eric Garner, but if you insist, as a younger black man my main take away of Eric Garner is cops who think their job has become a war on poor people (not just us blacks). Eric Garner wasn't put in a chokehold because he moved his arm, he was put in a chokehold because Pantaleo hated him as a person, probably for no more reason for being a poor black male. He probably stopped him for the same reason.

I 100% think the attitude of parties involved in a confrontation is newsworthy. Part of what was so sad about Garners death was that moving his arm wasn't a violent gesture, so Pantaleo would likely have mishandled him regardless of it ( Pantaleo's record supports that reasoning as well)

But there is a difference between a person detained after not cooperating fully (which you don't have to) was then released after someone dug out the details that were needed to acess the situation and detaining someone who has fully cooperated and shown you that they're carrying documents which they're allowed to carry. The law says there shouldn't be, but the nature of people tasked to protect very similar looking documents will inevitably lead to situations like this.

I think you know that, and wanted the exact out come you got because it'd make an excellent case against the TSA. And I think that's totally fair, almost like a type of "freedom fighting" through legal disobedience. But I don't think that after the fact you should write a piece that focuses on that particular instance involving you, because your own case is atypical, and you did things that elevated a situation that might not need to have been elevated. I personally would have seen it better as a springboard to talk about the TSA's more general misgivings, but instead it read to me as a guy saying "look at me, I did absolutely nothing wrong and the dumb TSA picked on me" when it it really is "I did absolutely nothing illegal and the TSA picked on me". What wrong, and what's illegal, are often two separate things once you're dealing with imperfect human beings. It might not be illegal to flip off a cop, but I wouldn't recommend it if you have somewhere to be.

Likewise, it might not be illegal to decline some of the TSAs questions, but to the extent they need to ask questions about what appears to be classified information in the wrong hands, I would answer questions if I had a flight I wanted to get on. You can argue where that extent ends, and if to you it ends where they've asked a question that you aren't legally obligated you're free to, but to me going a few steps further and explaining why I have the documents, and that the ones I have are redacted anyways, would be a reasonable way to handle the situation maturely</comment></comment></comment>


Ask HN: Why does HN show total karma in the header bar? - <AUTHOR>

This just seems to encourage people to make a lot of low value posts. Surely there's some better statistic that could be put in such a prominent place, like average karma per post, that would encourage higher quality participation over quantity. <comment><USER2> I imagine it cuts down on people loading their user page to check for that stat.</comment>


Live Demo of the new geo queries in Mongo 2.4 - <AUTHOR> http://idbentley.com/blog/2013/01/28/live-demo-of-the-new-geo-features-in-mongo-2-dot-4-plus/

<comment><USER2> This is a great example. I tried running it myself locally.

The README.md doesn't explain how to create the mongodb indexes, and it doesn't work without them...

<comment><AUTHOR> Hi frumious.

Sorry that the readme is light in this area. Before loading the data, just start a connection to mongo, and `use geo` `db.ny.ensureIndex({"geo": "2dsphere"})`. And you'll have your index.

</comment></comment><comment><USER3> This is pretty boss but the $within query return values seem... random. It also doesn't return in the same order everytime (at least that's what it looks like).

<comment><USER4> Agreed, this is sweet. Can't wait for Mongo 2.4

</comment></comment><comment><USER5> those features look really good, very little code required.</comment>


The Decadent Society: How We Became the Victims of Our Own Success - <AUTHOR> https://claremontreviewofbooks.com/comfortably-numb/ <comment><USER2> I disagree with criticisms of current art or "pop" art like pop music, popular fiction books, etc. To become broadly popular you _must_ appeal to as many people as possible. This is a balancing act between mediocrity and edginess that pushes just the right amount of boundaries to feel "new" and "fresh" without turning off a lot of people. So by definition the most popular song in the world is going to usually be fairly non-offensive.

If you get very into a genre of art, like for me is horror movies and metal music, you quickly realize there is a super deep well of amazingly high quality content that pushes the boundaries of the art form. There are passionate community members and creators that are using all the latest and greatest technology to produce ever higher quality art at less cost, expanding the amount of art and the number of people with the funds to create it.

If you look at the top-40 music charts and cringe just find music you actually like because there is tons of it being made and a community behind it. All the criticism about "modern art sucks" is such snobbish and flippant bullshit.

<comment><USER3> >So by definition the most popular song in the world is going to usually be fairly non-offensive.

Number one song on Spotify as of this moment:

"If he ate my ass, he's a bottom feeder"

"Beat it up, n-word, catch a charge"

"Never lost a fight, but I'm looking for a beating"

"I wanna gag, I wanna choke"

"Pay my tuition just to kiss me on this wet ass pussy"

<comment><USER4> And your point is? Stodgy conservatives being shocked at the cultural shift in what is entertaining vs. out-of-bounds reflected by the younger generation popular art is...not a new phenomenon, nor is popular art deliberately and flagrantly violating the taboos of the stodgy conservative establishment.

</comment></comment></comment><comment><USER5> Well, there's something you don't see very often these days: conservative intellectuals. The old stalwarts of Ross Douthat and the AEI. The problem is though, if you skip ahead to the conclusion:

> [T]he only thing more frightening than the possibility of annihilation is > the possibility that our society could coast on forever as it is—like a Rome > without an Attila to sack its palaces, or a Nineveh without Yahweh to pass > judgment on its crimes

\- arguing, effectively, that America is _too comfortable_ and therefore must be destroyed? In some ways this feels like a quaint thing to worry about as a pandemic sweeps the US and police and demonstrators fight in the streets, but perhaps it explains the blase approach that has been taken to those events.

<comment><USER6> As a counterpoint to this entire line of thought, I'd recommend reading "The Fremen Mirage", a series of blog posts linked to below. It does a fantastic job of going through the history of the idea of "decadence" as what destroys society, and of the idea of "hard times" as the crucible to form strong fighters. The long and the short of it is that there is no historical evidence for this idea, that the "decadent" groups had massive advantages over everyone else, and that the original idea of "decadence" tended to be created for internal political reasons, rather than any true comparison with outside groups.

[https://acoup.blog/2020/01/17/collections-the-fremen- mirage-...](https://acoup.blog/2020/01/17/collections-the-fremen-mirage-part- i-war-at-the-dawn-of-civilization/)

(My description is summarizing to the point of uselessness, and I highly, highly recommend reading the series.)

<comment><USER7> A propos, there was a review on slatestarcodex for "Secular Cycles" effectively tracking the rise and fall of civilizations if I remember correctly. The argument is societies start to destabilize and stagnate once wealth concentrates to a certain point, after which war and strife levels the playing field once more. Except, we don't much expect that same sort of upheaval to happen today in Western society.

All of which to say, you could liken periods of high wealth concentration as lending to decadence, though I'm not sure how useful that would be as the same argument could be made of golden ages. Decadence itself doesn't seem suspect but I would expect it to be around before things go awry.

edit: here - [https://slatestarcodex.com/2019/08/12/book-review-secular- cy...](https://slatestarcodex.com/2019/08/12/book-review-secular-cycles/)

<comment><USER8> That correlation might be reversed, though. The author of The Great Leveler makes the argument that in peaceful times, inequality almost always rises to the maximum level that society can bear. It remains that way until a destabilizing event occurs (plagues, state collapse, destructive revolution, mass-mobilization warfare) which decreases inequality (mostly through wealth destruction - the wealthy have the most to lose).

So it's possible that rather than high inequality leading to destabilization, it's the opposite: destabilization leads to decreased inequality.

<comment><USER7> Why "rather"? They don't contradict each other. The aforementioned argument I linked to suggests it's both.

</comment></comment></comment></comment></comment><comment><USER9> This is a fascinating discussion because it hits directly at a topic that civilization-after-civilization has faced throughout history: are we able to reasonably assess whether we are continuing towards growth and progress or stagnation and extinction?

Frankly, the historical record is not encouraging. Usually, when this topic comes up people chime in with easy takeaways like "people have always complained about this, and it rarely amounted to anything", "look at this thing that happened recently that's never happened before. It's proof that we're doing better than any other civilization ever has", or "things have not been going according to my value system, therefore doom is approaching!"

It's possible to cite example-after-example of these phrases coming up when the conversation happens in the historical record. And yet. And yet at times civilizations _do_ die, and there was plenty of warning while it was happening. The problem is that denial and complaceny is tough to fight. When the Emperors took over Rome, it kept the Senate around. They gradually stopped having power, but by keeping them around, it was possible for the _illusion_ of things staying the same to remain. People, with the very smallest prodding, are more than happy to believe that everything is as good as it used to be, plus there's all this new cool stuff we've never seen before!

Hell, ask a few people when the Western Roman Empire ended. Good luck with that. There are folks who will tell you it never did end. If you're that far in denial, how could you ever reason from your current historical position to the long run?

Many times I think conversations like this are much more interesting by the types of responses you get than the actual merits of the case presented.

If our civilization is entering the great 1984/Brave New World Fizzle, I _can_ tell you with certainty that there will be fierce denial that such a thing is occurring. Just like always.

<comment><USER10> It is interesting to note that if you read Roman generals' letters from the fourth/fifth centuries AD, they seem like they have no idea that their civilization is in the late stages of decline, something totally easy for us to recognize millennia later. It's weird and uncanny, and kind of concerning given contemporary circumstances

<comment><USER11> Actually, that's reassuring. Virtually everyone agrees we are in a state of decline right now.

<comment><USER12> Strongly disagree we're (the US) in decline at all.

If you think we are, you'd have to agree that the EU is post-decline. The UK, France (the list goes on) are all countries that are past their peak of power, influence and prestige.

But I would argue those EU countries haven't declined in a negative sense. They've just evolved into something other than a global superpower.

<comment><USER13> Strongly, why? The us is declining in lifespan, people's happiness, education, govt and this was all before covid. Cv19 failures have revealed the problems more than ever.

Europe has some issues too but they don't have the same systemic failures we have. Also, Europe can be independently successful or failing from the us.

</comment></comment></comment></comment></comment><comment><USER14> While I don't necessarily disagree with his thesis, I think the author cherry picks points and creates a narrative where there isn't one. He mentions the last "shared cultural moment" was Buzz Aldrin landing on the moon. Personally after watching it live, I'd argue Space X launching humans into space is one of those "moments". This all comes down to your own interpretation of the events and there's so many other examples in the piece. Narrative fallacy at best, but mostly pseudoscience in my opinion - world progress can't be binned into a coherent storyline.

<comment><USER15> I don't disagree with: >world progress can't be binned into a coherent storyline

But if you think SpaceX has anywhere close to the cultural impact of the moon landing, you really need to get out of your bubble.

<comment><USER16> Yeah, it's obviously all anecdata here but I don't run in tech circles outside of work, and genuinely can't remember a single post, tweet, or meme about Space X that didn't come from my coworkers or few tech friends.

Tiger King though, whew. Even my grandmother tried out her new Netflix subscription with that.

<comment><USER15> Yeah I think it's pretty heavily a tech thing. Even in the (biomedical) sciences, I think people are only vaguely aware of what SpaceX is.

</comment></comment></comment></comment><comment><USER17> "A state that cannot attain its ultimate goal usually swells to an unnaturally large size. The world-wide empire of the Romans is nothing sublime compared to Athens. The strength that really should go into the flower here remains in the leaves and stem, which flourish."

\- Friedrich Nietzsche

The root issue here seems to be the focus on material prosperity as indicative of success. That strikes me as a very 20th century idea, one from before the "Information Overload" age. The cultural-philosophical problem of the future is figuring out how to prioritize in a land of abundance.

</comment><comment><USER18> > What's the difference, really, between the music of the 1990s and the > 2010s—between the music of Madonna and Lady Gaga, of Mariah Carey and Adele? > Between the heavy metal or rock or rap of the 1980s and those genres now? > Nuances distinguish them. You don't need to resort to nuances to tell the > difference between the music of the 1970s and 1950s or the 1950s and 1930s.

I find this comparison completely ridiculous. It is not just that I can tell difference between Madonna and Lady Gaga or 1980 metal against todays one. It is also that the actual difference between 1970s and 1950s music is that they changed genre. Metal must be metal, if it was different then metal if would not be metal. It just so happens that new genres did appeared between 1980 and now. Contemporary techno progressive music is incomparable to anything in 1980. Also, 1980 music is ridiculously easy to distinguish as 1980 music. And not just that new genres appeared, the music in 1980 was not consumed the way it is consumed now - all the time for free huge selection by own personal choice. Back then, you had either to pay or listen to one of radio stations. So the people moved more in lockstep.

> Renaissance linear perspective for the visual arts ... By mid-century, with > a few admirable exceptions, the modern art world seemed determined to make > itself the butt of jokes, as Tom Wolfe memorably described in The Painted > Word (1975).

I personally like modern art more then renaissance, but that is personal taste - what I find fun.

The big reason for abstraction being the thing in art is that realism is largely figured out. People can do hyper realistic drawings today, the ones that are hard to distinguish from photography. They are stunning pieces of craft. But, at this point, it is craft that you can learn if you study enough and have talent. You are not discovering something new when you do it - but if they are your thing there are artists focusing on this particular thing. There are books you can read that teach you how to render, analyze and draw.

</comment><comment><USER19> To me, the decadence observed seems like the result of a decline in regard for and contributions to the welfare of others. Conservative activists have successfully enshrined shareholder primacy in corporate decision making and hostility to public goods and social programs in our politics.

<comment><USER20> > To me, the decadence observed seems like the result of a decline in regard > for and contributions to the welfare of others.

When did the peak in regard for, and contribution to the welfare of, others occur, in your opinion? Looking back through history, I struggle to find a time where it was greater other than perhaps in hunter-gather societies.

</comment></comment><comment><USER21> Ezra Klein had Ross Douthat (the author) on his podcast to discuss the book and it's a great conversation. Highly recommend. It's billed as a debate but it's not at all contentious, at least I didn't get that impression.

[https://www.vox.com/podcasts/2020/6/17/21293202/ross- douthat...](https://www.vox.com/podcasts/2020/6/17/21293202/ross-douthat- debate-american-decadence-the-ezra-klein-show)

<comment><USER22> came here to post this.

> . It's billed as a debate but it's not at all contentious,

Does Erza ever debate though?( not counting sam harris episode). He seem to invite ppl who already kind of agree with his worldview and amplifies their thoughts.

He was on IQsuared debates but it wasn't a debate, he was just reading excerpts out of his book.

<comment><USER21> Eh, I haven't run the numbers or anything but, he has a fair number of people he strongly disagrees w/ on (Grover Norquist, Yuval Levin) mostly just to talk. He definitely doesn't observe the fairness doctrine, but it's questionable whether that's even possible these days. But regardless I don't think he's under any obligation here.

I would agree his podcast... well excepting Sam Harris I've never heard what I would call a debate on there. But I will say in listening to people on there I don't agree with, I've learned a lot and gained a lot of insight. I think it's been good bubble popping, if not like jumping totally into the pool.

For more bubble popping I'd recommend The Flip Side [1]. You get an email every day or two with Red/Blue takes on issues. They do a good job being faithful to both sides (at least, IMO), plus it's free.

[1]: [https://www.theflipside.io/](https://www.theflipside.io/)

</comment></comment></comment><comment><USER23> I've felt the "technological sublime" that the article mentions many times when contemplating the internet. Perhaps the only difference is that there wasn't a precise moment to focus attention (e.g. moon landing) and there aren't big fanfare events when new internet infrastructure is created (e.g. a politician nailing a golden spike to complete a railroad).

</comment><comment><USER24> > But there is also the possibility of a worst case that he describes in a > chapter titled "Catastrophe." Suppose that climate change has created an > uninhabitable equator. The aging advanced nations cannot sustain their > deficit-financed prosperity. The population of Africa continues its rapid > growth, resulting in a mass migration into Europe that meets increasing > resistance.

Reading this reminded me a bit of reading the WHO and our own leaders (I'm Danish, we handled the pandemic decently) not to worry about Covid back in January.

Heh.

> In the past, each decadent civilization has eventually given way to a > dynamic competitor. In our case, might it be Islam? China? Russia? An > America led by a more capable populist president?

This also reads a little weird. The author is obviously well versed in history and the progression of civilisation, and as such, must be aware that we've always moved in a progressive direction. Sure it sometimes takes a few life times, but we've never moved permanently backwards before, so it would be rather strange if we started doing that now.

<comment><USER25> > Sure it sometimes takes a few life times, but we've never moved permanently > backwards before

Playing devil's advocate here: perhaps that's because we always think of things that we're doing now as "right"? For instance there are societies in history that were open to some sexual relationships that we are not (mainly the ones involving minors or incest). At times in european history, animals were tried for crimes similarly to people. Are we more or less progressive than they are?

<comment><USER24> Well, your example kind of proves my point as society has improved by not thinking incest is great.

</comment></comment></comment><comment><USER26> Eh, I grew up with the faces on TV constantly blabbering about the "decadent West" and yet my country and most of the ex-USSR has deteriorated worse than any western one.

My eyes kind of roll every time someone says decadent society as it reminds me of communist propaganda.

Not seeing much of those four horsemen, either.

<comment><USER27> It's an ongoing rhetoric in Russia and much of Eastern Europe. Western issues like gay marriage, feminism, overconsumption, politically-correct language and identity politics are skillfully used by nationalistically-oriented populists to paint a decadent image of the West.

<comment><USER28> Feminism is a western issue?

Do Russians not believe in things like equal pay, all jobs being open to women, fair divorce settlements, protection from physical abuse, access to family planning? (Honest question).

<comment><USER18> Yes and no. Theoretically domestic violence is bad. Practically, it is more prevalent then in west and often seen as dirty familly issue. Local preacher and familly will focus on forgiving, make familly together and that kids need dad.

Likewise, equal pay sure, but dont you dare to point out when it is not. Naturally woman is the one expected to primart focus on kids and home, guy is more likely to be promoted of course. It is not seen as "not a woman place" to be leader - but it is happening less then incapable guy being promoted. Basically, there is more sexism but less hostility.

Jobs are not closed to women, but people perceive you weird putside of proper gender bounds and talk about it openly. The different expectations of boys and girls are in the open too. You wont find male teachers much, super rare.

Divorces seem fair money wise, except really guy will get less access to kids. But no alimony, she is expected to work. Access to familly planning is good.

</comment></comment></comment></comment><comment><USER29> I realise this is a review, not the actual text. But still. This is utter bollocks.

It's typical of non-technical "intellectuals" to completely ignore the main areas of modern human progress, simply because they don't understand them.

e.g. the whole discussion on Art completely ignores Video Games, which are undoubtedly Art, and also an area of rapid innovation and development. Yet they're usually dismissed out of hand because no-one who takes "Art" seriously plays them or understands them.

The whole "we went to the moon and never went back" completely ignores the argument that the moon landing was, right from the start, an uneconomical publicity stunt. The exciting time is now, when space is starting to become economically viable and we have organisations making viable plans to colonise Mars.

The Internet is taken for granted as a method of "chatting", and smartphones as a method of "taking selfies". Again, because the author doesn't understand what vast and wide-reaching achievements these are. Watching a Cambodian tuk- tuk driver watch a YouTube English lesson while parked up waiting for a fare is a modern marvel. Bringing communication and the spread of knowledge to anyone who wants it, wherever they are, is the most important thing to happen to humanity since the invention of agriculture. And yes, it's as disruptive to human societies as agriculture: we should expect our societies to be disturbed by it.

The economic malaise is mostly a result of WW2. Europe was economically destroyed, and the US changed its entire economy to meet the demand (and the USSR moved its entire manufacturing base a thousand miles east in a year, an astounding thing to do). Recovering from that meant that growth was easy because it was coming from such a low base. We've hit the final point of that recovery, and growth isn't so easy any more.

Not everything is perfect. There are some changes we need to make. But please let's not throw the baby out with the bathwater. And to anyone writing about modern society: if you don't understand technology, please stop fucking writing about it.

<comment><USER10> Video games are indeed a form of media, but I think it is misleading to say they are art in the same sense as this author intends. Art and mass entertainment are only superficially similar, and most video games are made to entertain. Video games are (generally) consumable goods created to provide an amount of temporary pleasure.

Good art is recognized not just by beauty or the skill required to create it, but by its ability to engage with some aspect of what it means to be human, in a way that is coherent, mature, and thought-provoking. There are no video game equivalents (yet, one would hope) of, say, Bach, Rembrandt, or Bernini.

Maybe someday there will be, but not today.

edit: To the downvoters, I'm saying all this as a pretty avid gamer. video games are a very young medium and a hopefully in a few centuries I will be wrong.

<comment><USER30> You were downvoted, but I think you're right.

I love video games. I spend a great deal of time playing them and I think they have a lot of oppurtunities other mediums can't match. But they don't move me the way even a mediocre novel or movie can.

Video games are terrible at interpersonal relationships, for example. I find the more "interactive" relationships with NPCs the more shallow the relationshop, while "railroad" games tend to be better at it.

Maybe it's that AAA titles mostly focus on the adolescent male demographic. But we've yet to find our Tolstoy.

<comment><USER31> I have given up on getting a good story out of emergent gameplay and sandbox-y games. Bioshock 1 & 2 is about as good as it's going to get with regards to producing a good story that can go multiple ways. Those games moved me like very few songs or books ever did.

<comment><USER10> Dwarf fortress is a pretty good stochastic story generator, it's head and shoulders above anything else in that vein. But yeah, those kinds of stories will never really be quite as focused or meaningful as human-crafted narrative

<comment><USER29> I've read some terrible narratives written by humans, too ;)

</comment></comment></comment></comment></comment></comment><comment><USER32> Isn't this the narrative that MAGA/ Proud boys and the KKK (I wont mention NAZIS) before them have always used

<comment><USER33> Well, yes, of course, it's Charles Murray. He shares many of the beliefs of those groups.

</comment></comment><comment><USER11> The problem with this "conversation intellectualism" it's all 30,000 feat drab cultural analysis of symptoms and no rigor to actually dissect causes. A good materialist approach might not charm at the moody cocktail party, but actually has explanatory power and proposes remedies.

If Ross Douthat thinks we've slowed technologically and modern technological gimmicks are trivial, well hahahaha, I agree, and he's just betrayed every conservative tenant.

\- Space race was classic post-war consensus big goverment spending, _and planning_.

\- Modern technologies, whether it's startups focusing on trains not plains, small powerplants not big ones, phones satellites and not wires in the ground, is entirely tech hacking around coordination failure. We've lost the ability to collaborate on the big stuff, and a lot of that is due precisely to conservationism weaponizing exiting structural failures in our governance model.

Art stagnation: well actually the popular art has been getting a lot better. Look at old music videos vs new ones, for example. Also R&B triumphing over rock as the foundation of pop means we get better rhythm and harmony, the twin pillars of syncretic music. But if high art is stagnent, well, that's clearly got to do with a the stagnation of the people on the top of the economic period with the leisure time. Nothing promotes changing tastes like changing audiences. Or blame underfunded schools and increasing in working hours for the non-rich.

Economic stagnation. Obviously wage growth decline is a proximate cause, not just a symptom (i.e. other factors might cause it or make it hard to fix, but if we could fix it it would help with the rest).

I could go on, but basically Douthat is just talking about symptoms to get along with the more literary coastal elites. It's shambolic. I'll take it more serious if he learns macroeconomics and becomes some sort of libertarian UBI- er.

</comment><comment><USER34> > little or no growth in working-class wages, lower social mobility

Murray, and the AEI he works for, have fought against higher wages for workers and social mobility for decades. I don't take seriously him bemoaning the results of what he has helped do.

<comment><USER35> Fighting against a policy is not the same as fighting against it's intended outcome. Me fighting for 2nd amendment rights is not the same as me fighting against lowering the murder rate.

</comment></comment><comment><USER36> Life is a lot easier these days, thanks in no small part to advances in cars. As an American, cars are a central feature of your life. I feel like a large part of my "character building" years was spent struggling with unreliable, old, leaky, carbureted cars. All the energies I spent keeping that thing running could have better spent working or socializing. And yet I have a deep appreciation for what it takes to make a car go and keep it going.

<comment><USER25> > As an American, cars are a central feature of your life.

Unfortunately true and frankly one of my least favorite features of American life.

<comment><USER37> I may take a century to realized it, but I think you are right. Historians will look back and see America's car-centric culture as its height of extreme decadence and the pivotal point to its eventual decline. When you think about the trucks and SUVs that people drive around everywhere, the entire infrastructure dedicated to it, the health outcomes, etc.

<comment><USER38> I disagree. Cars are freedom. Freedom has upsides as well as downsides. Technological advances will continue to reduce the downsides, but the upsides are genuine and should not be thrown away. There's a reason why electric _cars_ are a thing, as opposed to Americans just giving up cars and everyone using public transportation.

<comment><USER37> America should not give entirely up on cars, but reduce to a more balanced level where cars are not a necessity to live. Americans engineered many places to be car dependent when it didn't have to. Once something changes from a nice to have to a requirement, it becomes more like a drug, and the freedom is lost.

<comment><USER38> _> Americans engineered many places to be car dependent when it didn't have to._

No, Americans responded to the preference of many of us for more freedom and less crowded places to live, by producing them. You don't get to decide for other people what a proper "balance" is or for whom cars are a "necessity".

<comment><USER37> That is my point. Civic leaders DID decide how Americans would live for the next few generations. It is hard to undo even if our children want to go back to the traditional village which had worked for centuries.

<comment><USER38> If you think the living arrangements of everyone in America were decided by "civic leaders", you need to get around more.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER39> There's a lot of talk about how civilisation lifecycles lately, and articles, books coming out, and yet one of the best works in this space goes completely unnoticed and unread, it seems, at least in anglosphere: Lev Gumilyov's Ethnogenesis. May be it's because he worked in Soviet Union, where there were not much interaction between historians on different sides of the Iron Curtain, or may be there's still no good translation to English; anyway, if you're interested in these matters, I highly recommend his books and theories.

I'm absolutely not saying that he's right in everything he says, of course — there's plenty of backwards or outright bigoted opinions in his works — but his theory is so unorthodox and interesting that it should at least be an important part of the conversation.

<comment><USER40> Could you please summarise "passionarnost, ethnos, and phases of ethnogenesis" for those of us who might be willing to read more if we were convinced there was a there, there?

<comment><USER39> I'll try, although I don't think I'm qualified enough.

First of all, what he's talking about is usually described as different stages of _civilisations_ in english literature. However, he goes into much length to explain why he talks about ethnoses instead: in sub sense, it's a different definition, and a group which is smaller than what you usually call a "civilisation", so this distinction is important. It's derived from the word "ethnic", but again, he's very particular that it's not exactly the same as ethnical group in a genetical sense, although one usually correlates to another.

In general, it's very hard to summarise his work, because he goes into a lot of details that are really important to understand his ideas correctly. Unfortunately, it's very easy to misunderstand them, and sometimes in some very awful ways, if you just assume that the words he uses have meanings that you usually ascribe to them.

Then, he describes different stages of lifecycle of ethnos. Once again, there are stages that you would expect, from birth to death, but he adds a lot of detail, describing how an ethnos can be both in a dynamic arc going from beginning to an end, but also in a static, balanced state that can continue, without outside interference, for an eternity. He's a historian with a deep knowledge of very wide array of different human eras and places, and draws a lot of examples to make his point from all over the human history.

After that, he tries to describe the underlying forces that influence this process. He goes through all possible theories and finally arrives at his concept of "passionarnost" (derived from passion) to describe the cultural energy that drives these transformations.

After reading other contemporary books on the matter, such as Guns, Germs and Steel, and Neil Ferguson's Civilization, as well as dozens of articles and blog posts discussing these things, I think that his analysis and thoughts are one of the most interesting and engaging ideas about it.

</comment></comment></comment><comment><USER41> Unfortunately this site has received the hug of death however anyone that finds such a headline interesting may also find this interesting:

"Industrial Society and Its Future"

[https://www.washingtonpost.com/wp- srv/national/longterm/unab...](https://www.washingtonpost.com/wp- srv/national/longterm/unabomber/manifesto.text.htm)

An excerpt from the introduction:

> The Industrial Revolution and its consequences have been a disaster for the > human race. They have greatly increased the life-expectancy of those of us > who live in "advanced" countries, but they have destabilized society, have > made life unfulfilling, have subjected human beings to indignities, have led > to widespread psychological suffering (in the Third World to physical > suffering as well) and have inflicted severe damage on the natural world. > The continued development of technology will worsen the situation. It will > certainly subject human beings to greater indignities and inflict greater > damage on the natural world, it will probably lead to greater social > disruption and psychological suffering, and it may lead to increased > physical suffering even in "advanced" countries.

<comment><USER42> Do you think the starving medieval peasant had time to worry about "psychological suffering"?

<comment><USER41> I think you would be very interested in the rest of the document. That is very similar to the point that the author makes throughout. He suggests that spending more time on fulfilling our primitive needs of food water and shelter would result in a much more satisfying lifestyle and much higher quality of life.

<comment><USER42> Oh possibly, but it sounds too much like "keep the plebs busy so they don't have time to develop independent thinking".</comment></comment></comment></comment>


Launch HN: PostHog (YC W20) – open-source product analytics - <AUTHOR> James, Tim and Aaron here - we are building a self-hosted, open source Mixpanel/Amplitude style product. The repo is at https://github.com/posthog/posthog and our home page is https://posthog.com/.
After four years of working together, we originally quit our jobs to set up a company focused on tech debt. We didn't manage to solve that problem, but we learned how important product analytics were in finding users, getting them to try it out, and in understanding which features we needed to focus on to impact users.
However, when we installed product analytics, it bothered us how we needed to send our users' data to 3rd parties. Exporting data from these tools costs $manyK a month, and it felt wrong from a privacy perspective. We designed PostHog to solve these problems.
We made PostHog to automatically capture every front-end click, removing the need to add track('event') - it has a toolbar to label important events after they're captured. That means you're spending less time fixing your tracking. You can also push events too.
You can have API/SQL access to the underlying data, and it has analytics - funnels and event trends with segmentation based on event properties (like UTM tags). That means we've got the best parts of the 3rd party analytics providers but are more privacy and developer friendly.
We're thinking of adding features around paths/retention/pushing events to other tools (ie slack/your CRM). We'd love to hear your feature requests.
We are platform and language agnostic, with a very simple setup. If you want Python/Ruby/Node, we give you a library. For anything else, there's an API. The repo has instructions for Heroku (1 click!), Docker or deploy from source.
We've launched this repo under MIT license so any developer can use the tool. The goal is to not charge individual developers. We make money by charging a license fee for things like multiple users, user permissions, integrations with other databases, providing a hosted version and support.
Give it a spin: https://github.com/posthog/posthog. Let us know what you think! <comment><USER3> Dalton mentions in another comment on this thread that posthog was originally a different idea and so I'm super interested in knowing if you guys really started building this on Jan 23rd [0] and got the backend, frontend, integrations, docs, sdks ready for not a soft-launch but a _Launch HN_ in 4 weeks? That is nuts. Congratulations, either way.

I am glad someone is tackling this problem.

A feature request (or perhaps an architectural direction) would be if you could accommodate the backend behind graphql instead of Django+MySql, there's a potential for it go full Serverless (frontend and backend) with JAM-stack frameworks like redwood.js [1] (backed by apollo-graphql) or using Cloudflare Workers [2].

Edit: Another question I have is, is posthog at 80% feature parity with mixpanel / amplitude / heap already? If not, what do the timelines look like (asking since you're OSS, though, it is understandable if you can't reveal just yet). May be there needs to be a page on competitor-matrix on the website?

[0] [https://github.com/PostHog/posthog/commits/master?after=9ae6...](https://github.com/PostHog/posthog/commits/master?after=9ae6854254085bbe10cc4f9c98820d9efed52424+306)

[1] [https://redwoodjs.com/](https://redwoodjs.com/)

[2] [https://blog.cloudflare.com/jamstack-at-the-edge-how-we- buil...](https://blog.cloudflare.com/jamstack-at-the-edge-how-we-built-built- with-workers-on-workers/)

<comment><AUTHOR> \- We had a good view of what to do product-wise - the key thing that is different for us is the open source model.

\- I'd stress how important it was feeling inspired by the idea. Ian from Mattermost was really helpful, as were Dalton and the YC partners. Enjoying what we were working on probably tripled our speed.

\- I'm meh technically, so we focussed on making sure Tim (CTO) could focus on exclusively the development. We split it up pretty clearly to create the right environment. I did the design, product, website (Elementor/WP) and docs, Aaron focussed on getting user feedback.

\- We spent $1k on marketing, to speed up user engagement early on, so that helped get some bugs out.

Will do a blog post if there's more interest in the journey.

<comment><USER4> Would love to hear more about this and would definitely like to read a post launch blog post.

<comment><AUTHOR> In case you missed it: [https://posthog.com/blog/pivot-to- posthog/](https://posthog.com/blog/pivot-to-posthog/)

</comment></comment></comment></comment><comment><USER5> It's cool to see an open-source product analytics tool in YC!

I'm the co-founder of a company that had a similar value proposition back in 2017. We got invited to the interview at the YC office but couldn't convince people because of a number of reasons:

1\. GDPR was not huge back in 2017 so the idea of creating an open-source alternative was not attractive enough.

2\. We were targeting the companies that want to build their own data pipeline on cloud and the cloud providers such as AWS were claiming that their products (specifically Kinesis & Redshift) make it dead-easy to create such a data pipeline. At first, we thought that we were doing something complementary to cloud providers but soon we realized that we were competing with them. Our potential customers were trying to create such a data pipeline in AWS thinking that it will be simple and AWS actually made it easy to start in the beginning. However; data enrichments and the cost optimizations are really tricky when your data grows and our product was optimized for these workloads. AWS doesn't really need partners like us, we're saving costs from the customers but make AWS lose money in the long run because of these cost optimizations. The switching cost becomes more than just increasing the Redshift capacity by 2x as you store all the data in Redshift.

3\. We're not native speakers so we probably couldn't express ourselves back then.

Time flies. We got into 500Startups Batch 21 that year but had to pivot last year since we couldn't make money to create a sustainable business.

Shameless plug: Right now, we provide the same feature-set (segmentation, funnel, retention, and SQL) for different CDPs such as Segment, Snowplow, Firebase, and in-house solutions. You can think of it Amplitude or Mixpanel but on top of your data warehouse. We generate SQL queries and run them on your data-warehouse just like a BI tool.

I would love to collaborate if you're open to partnerships since we're now complementary to each other. :) You can see how the product looks like from here: [https://rakam.io/product](https://rakam.io/product)

<comment><USER6> This is really interesting, I might give this a try over the weekend!

</comment></comment><comment><USER7> This is awesome and long overdue. We (I'm the Metabase founder) have been working on the Business Intelligence side of things, but have always struggled in our own usage with the ubiquity of closed source solutions for event collection (read: Google Analytics) and the relative lack of attention on this problem on the open source side.

<comment><USER8> Is metabase similar to statsbot? I just googled metabase, am I looking at the right one?

<comment><USER3> That is Sameer Al-Sakran, CEO of [https://www.metabase.com](https://www.metabase.com).

And here is a recently show-hn'd OSS metabase alternative: [https://news.ycombinator.com/item?id=22347516](https://news.ycombinator.com/item?id=22347516)

You might also like reading a recent news.yc discussion on BI tools: [https://news.ycombinator.com/item?id=21513566](https://news.ycombinator.com/item?id=21513566)

</comment></comment></comment><comment><USER9> I love the idea of capturing all events and providing the user with an option to label "useful" events. Similarly, I'd like to capture API calls. In a typical modern SPA + REST api setup, calls to the REST api often correspond to events. An analytics integrations that captures all api calls and provides tools to label/transform these api calls as events would prove similarly useful.

<comment><AUTHOR> We were debating applying it at a framework or query level but were nervous about this being harder to "clean up" conceptually - what would the equivalent of the "PostHog UX toolbar" need to look like to make that possible do you think?

<comment><USER9> Api calls could be treated as events. Furthermore, match groups should be more powerful allowing any query of the form [field] [operator] [value] (e.g. Text equals {value} or URL contains "/checkout"). However, the challenges that come to my mind are:

\- (i) How to handle the request/response being essentially two events

\- Should they be merged into one event?

\- (ii) How to handle request/response bodies and http headers?

\- Passing the bodies as event properties does not seems intuitive and it would be valuable to query them with XPath / JSONPath.

\- Http headers could be passed as event properties

</comment></comment></comment><comment><USER10> It is encouraging to see YC accepting Open Source products. It is generally difficult to monetize OSS and will be interesting to see how a collaboration with YC helps a startup like this.

<comment><USER11> Hi, I am the partner at YC who funded PostHog, though originally for a different idea.

I think this can be a _great_ business, we have funded startups following similar models like Gitlab, Mattermost, etc. Excited to keep funding more :)

<comment><USER12> Given what you do, do you think open-source projects ran "on premise" (i.e. with your cloud provider of choice) paying a licence to use has a future beyond the enterprise scale?

</comment></comment></comment><comment><USER13> maybe not the best choice of name

[https://www.google.com/search?q=post+hog](https://www.google.com/search?q=post+hog)

<comment><USER14> Actually I love the name. Seems tongue in cheek, a small criticism to "extreme" data-driven decision making that makes unfounded assumptions and oftentimes mistakes the forest for the trees, or over-optimizes the short term to a detriment of the long term.

<comment><USER15> Yes but post hog is also internet slang that means post a picture of your penis

</comment></comment></comment><comment><USER16> Just yesterday I discussed a blog post that I have on my mind, with somebody from dbt, on the rise of the open source analytics stack.

there's a bunch of great hosted tools out there, across ETL, workflows, dashboards, etc. Think Fivetran, Segment, Matillion, Periscope, etc. And then of course the warehouses like Snowflake, Redshift, etc.

But I think there are three issues with that stack, roughly like this (I've got to do some more thinking, would appreciate your input):

\- Privacy: you have your customer data flying around in all these different tools. it's hard to impossible to track your compliance

\- cost: all these vendors charge in some way by data volume, MAUs, etc. - <USER2> get taxed multiple times for the same data stream. It all adds up.

\- control: your data is subject to pre-determined schemas, proprietary formats, black boxes, etc. - mismatch for the same metric across different tools, less flexibility to manipulate your data and pack up and go elsewhere.

I think there's a valid open source alternative for every layer of the stack:

Segment --> Rudder Labs, Snowplow

Matillion --> Airflow, dbt

Fivetran --> Stitch / Singer

Periscope, Looker, Tableau, etc. --> Metabase, Superset

Warehouses --> just yesterday I learned about materialize.io here on HN

And then add open source products like PostHog, that add additional value for very specific use cases (in this case product analytics).

Not arguing the value of the hosted products. They are amazing to use if you just get started. But there's a great open source "stack" available that long term likely will be more transparent, more flexible, and cheaper.

Would love your thoughts!

<comment><USER17> Founder of RudderLabs (RudderStack now) here. You nailed it - Control, Cost & Privacy (Data-Ownership) are the main drivers we have seen in people adopting us. Kind of related to Control is the whole drive to adopting open-Source technologies. We engineers always wanted open-source but increasingly larger enterprises are interested too - maybe to avoid vendor locking or maybe just because cool engineers (who grew up adopting open-source stuff) are finally getting into decision making positions.

Shameless plug - we wrote a blog on setting up an Open Source Analytics Stack with one of our deployments highlighting these issues.

[https://dev.to/rudderstack/how-to-build-an-open-source- analy...](https://dev.to/rudderstack/how-to-build-an-open-source-analytics- stack-using-rudderstack-and-apache-superset-14h2)

PostHog looks awesome!! Congrats on your launch. Would love to collaborate and share notes.

<comment><USER18> It's really unfortunate how HN culture (awesome in most respects) forces you to use defensive phrases like "shameless plug" for sharing work that you are really proud of and the community is proud of as well

<comment><USER19> That's not an HN thing so much as an internet thing: [https://www.google.com/search?ei=95VPXs6rG8_4-gSVzZuIBw&q=%2...](https://www.google.com/search?ei=95VPXs6rG8_4-gSVzZuIBw&q=%22shameless+plug%22).

I wouldn't take the self-deprecating language literally. It's probably a useful signal. It communicates "I'm a genuine community member sharing my work with the community" in a way that is hard for spammers to replicate.

</comment></comment></comment></comment><comment><USER20> Congrats on launch!

What are some of the selling points compared to more mature OS solutions like Matomo? Also, isn't the enterprise version the opposite of your thesis? I.e. "it bothered us how we needed to send our users' data to 3rd parties", but then provide a hosted version which would do the same thing? How do you think about that?

<comment><AUTHOR> Whilst Matomo and PostHog both provide analytics, Matomo are more focussed on session-tracking, rather than user/event-tracking. That means they're better at things like analytics for traffic sources.

The things you can do with PostHog that you can't easily do with Matomo, are things like pulling up identifiable user event histories, or plotting trends in product usage over time.

The enterprise version is just a private repo we'd give you access to that's still self hosted. We can also provide hosted deployments of any version, but that's really just for people that can't set it up themselves... hosting it isn't our core focus.

</comment></comment><comment><USER21> Oh man, good luck with social media. The Chapo Trap House community uses "post hog" as a memetic insult.

</comment><comment><USER22> Hey - congrats on launching! I'm adding Posthog to my list of codebases to check out.

Can you talk more about your tech stack?

As an aside - it seems like most of the analytics companies I've heard of went through YC: MixPanel, Heap, Amplitude!

<comment><USER23> Thanks so much! It's built on pretty simple/proven technologies: Postgres, Django and React. We've already seen this scale to millions of daily events on basic Heroku dynos. We can swap in other databases if you end up going beyond that.

<comment><USER22> Got it! And how do you identify users of your open source version who you can upsell your paid version to, since there's no sign up needed to start using PostHog?

Or is this something you don't do?

<comment><USER23> We thought long and hard about this. We spoke to founders of other big OS projects - we think if developers at big companies want to use it, they'll want to use some of the enterprise features and reach out. We've already seen that start happening :-)

</comment></comment></comment></comment><comment><USER24> Congratulations, looks great. Im building something similar, except on a smaller scale: [https://reactric.netlify.com](https://reactric.netlify.com)

</comment><comment><USER25> I would just like to say THANK YOU! I can't believe it has taken this long for someone to solve this problem in this way

</comment><comment><USER26> Great concept! Just one small issue: to "post hog" is internet slang for publishing pictures of one's penis. I am not kidding.

<comment><USER27> Given the logo, I'm assuming this is intentional?

</comment></comment><comment><USER28> Very cool - congrats on the launch! I like the docker deploy command that you posted on your landing page. Tried that out and it is super easy to get up and running.

Do you have a sample dataset to feed into our local environment or demo environment to test out the UI? Id love to poke around a bit before deploying to Heroku and setting it up on a site.

<comment><USER23> Thanks! There's a hidden 'demo' page [0] that you can click around that will create some events. You can also add that URL when you create an action to test out the editor.

[0] [https://127.0.0.1:8000/demo](https://127.0.0.1:8000/demo)

</comment></comment><comment><USER18> Great idea to be compatible with Mixpanel libraries! Makes switching over really easy

</comment><comment><USER29> Looks cool :)

Curious as to how deep you plan to go on the peripherals to product analytics - attaching additional attributes to users to group them (eg. Subscription level), getting a view into attribution channels for marketing strategy etc.

<comment><AUTHOR> We have got the ability to do grouping in the backend at the moment, but the UI isn't quite there yet - we definitely want "team" level analytics as a good starting point as we've already had this question several times. We know that's important for B2B SAAS, a world we have come from before.

We don't aim to go "data science" deep with analytics, as we suspect you'd rather just integrate Metabase/Tableau/etc. We can see some cool ways to use it for attribution though - as you can host it we don't need to charge you enormous fees if your MTUs are very big... we see lots of B2C companies using product analytics on the product, but not the website, and struggling with tracking say UTM tags the whole way through.

There are two "out there" areas that we're really interested in right now...

1) We're thinking of focussing more on precisely what a developer (not product, not marketing) needs, as we think there is an underserved and enormous group here. Imagine when you're building something being able to run a command in your CLI, then being able to open a browser with a good understanding of which pages/features are being used as you work. The point being - give developers user data so they know how to build for impact.

2) We also want to explore integrations with other platforms to push stuff to them. I can't stop refreshing our own product, so I think pushing an Action to Slack, for example, would be helpful and would get it into everyday workflows a bit more easily. We don't want to do too much here and kind of hope the community spot these kinds of things and run with them :)

What's your reaction to the above? I'd love to know if you had a specific pain point in mind

</comment></comment><comment><USER30> I'm curious as to how you plan to scale PostHog to larger users. As the person who scaled Heap, here is my honest opinion of this. I think there is going to be a huge challenge ahead in scaling query performance. This was perpetually a challenge at Heap and was for a long time the main limitation on Heap's growth.

The challenge was tough enough for Heap and PostHog is going to be at a huge disadvantage due to the lack of multi-tenancy. When you use Heap, your data is stored across Heap's entire cluster of machines. When you run a query, that query is ran simultaneously against every single machine in Heap's cluster. Even though your data may be taking up something like .1% of the total disk space, when you run a query, 100% of the disk throughput of Heap's cluster will go to processing your query. It's not an overstatement to say this alone results in a >50x improvement to query performance.

I honestly think Heap wouldn't be possible without multi-tenancy. It's hard enough as is to get queries that process multiple terabytes of data to return in seconds when you have a fleet of dozens of i3s available. I'm not sure how you would do that with a fleet a tiny fraction of that size. If you're curious about Heap's infrastructure, Heap's CTO, Dan Robinson, has given a number of talks on how it works[0][1].

That's not to say that PostHog won't work for anyone. I previously tried (and failed) to start a company based on optimizing people's Postgres instances. One of the big takeaways I had was that no matter how you use it, Postgres will work completely fine as long as you have <5GB of data. I think if you have a modest amount of data, something like PostHog would work perfectly fine for you. Since the Postgres optimization business didn't work out, I wound up pivoting to freshpaint.io which eliminates the need to setup event tracking for your analytics and marketing tools by automatically instrumenting your entire site. Since I started working on it, things have been going a lot better.

[0] [https://www.youtube.com/watch?v=NVl9_6J1G60](https://www.youtube.com/watch?v=NVl9_6J1G60)

[1] [https://www.youtube.com/watch?v=iJLq3GV1Dyk](https://www.youtube.com/watch?v=iJLq3GV1Dyk)

<comment><USER23> For larger volumes of events, we wouldn't recommend using Postgres.

The nice thing about single-tenancy is that in reality lots of users have small enough datasets that scaling isn't a problem. Heap et al have to scale to all of their users combined (as you said, terabytes), we just have to scale to the biggest user. Postgres also allows you to get started very quickly and do lots of queries yourself.

In our docs we explain our thinking more. Postgres is great for the vast majority of use-cases, and we're working hard to optimise those queries. Once users get beyond Postgres, we have integrations with databases that can scale well across many hosts, and we provide services around this to help people size their servers correctly.

<comment><USER30> > Heap et al have to scale to all of their users combined.

The hard part wasn't scaling the system to handle all users combined. The hard part was designing the system such that when an individual user runs a query, they would get their results back in a reasonable amount of time.

Having every user in a single cluster made this easier because an individual customer could make use of the computer power of a cluster that was sized to fit the data for everyone in it. In other words, if Heap doubled the number of customers, Heap would get twice as fast for everyone. That's not true for PostHog.

> Heap et al have to scale to all of their users combined (as you said, > terabytes), we just have to scale to the biggest user.

A decent sized Heap customer had multiple terabytes of data with the largest being well beyond that. You're going to have to figure out how to scale PostHog to that point without the benefits of multi-tenancy.

> Once users get beyond Postgres, we have integrations with databases that can > scale well across many hosts, and we provide services around this to help > people size their servers correctly.

I think a cluster of servers that could churn through terabytes of data in seconds would be prohibitively expensive for any individual customer to purchase.

</comment></comment></comment><comment><USER31> You should mention on the README that the production dockerfile (and posthog/posthog:latest) are busted, they do not create any database. Spent last hour debugging it :) Otherwise, looking really good!

<comment><USER23> Apologies! We've made that clearer now.

</comment></comment><comment><USER32> Congrats on the launch!

I've been using PostHog with my app for about a week now, and so far the results have been good. Pretty straightforward to integrate with a Swift iOS app too!

</comment><comment><USER33> This looks great but was there a reason for going with Postgres over something purpose built for analytics like Clickhouse? I am seriously considering building a similar tool for our platform as the cost of Mixpanel/Amplitude is cost prohibitive at our scale. We had to move off Google Analytics and run our own Matomo server, and it brings MariaDB to a grinding halt.

In any case, will be looking closer at this. Looks very interesting. Thanks.

<comment><AUTHOR> We have actually integrated Clickhouse already for this reason. We started with Postgres as it works well for smaller volumes, but we have this integration in a paid version.

<comment><USER33> Thanks James. I'll keep this in mind and might shoot you guys an email. Cheers and good luck!

</comment></comment></comment><comment><USER34> Your sign-up page seems broken [1] on my Firefox.

[1] [https://imgur.com/a/wYxbKj4](https://imgur.com/a/wYxbKj4)

<comment><USER23> Fixed :)

</comment></comment><comment><USER35> Congrats on launch - a quick demo video would be wonderful to go with this.

</comment><comment><USER36> It would be interesting to see quick deploy to firebase, aws (lambda??) or other services.

Any idea what a moderate size website (10k users per day,500k events) would cost to run on Heroku?

<comment><USER23> We'd love to do more quick deploy buttons.

We've seen 500k events work with the hobby dev dyno and database which is $14/month. Depending on how much data history you want to keep you could upgrade to standard-0 on Heroku or spin up an RDS instance which is cheaper.

</comment></comment><comment><USER35> Could you please point where is backend code in your github ?

<comment><USER23> Hi! If you mean the PostHog code itself, most of it is in the PostHog folder.

If you want to send events from your own backend to PostHog, there's instructions for Ruby/Python/Node/API in the docs[0]

[0] [https://github.com/PostHog/posthog/wiki](https://github.com/PostHog/posthog/wiki)

<comment><USER35> Thank you.

actual link : [https://github.com/PostHog/posthog/tree/master/posthog](https://github.com/PostHog/posthog/tree/master/posthog)

</comment></comment></comment><comment><USER37> Congrats on the launch!

Will have to see where I can fit this in to a project.

</comment><comment><USER38> Looks pretty sweet. I like the UI for adding event captures.

</comment><comment><USER39> Very nice, I'll use this on my next project for sure.

</comment><comment><USER40> Amazing, going to give it a try. How are you going to monetize? Like Metabase?

Edit: Nevermind, just read your last paragraph :-)

</comment><comment><USER41> Thank you! This is much needed!

</comment><comment><USER42> Exactly what I need right now. Trying it out (and congrats!) :)

</comment><comment><USER43> Looks great!

</comment><comment><USER44> Great!

</comment><comment><USER45> How do you plan on monetizing?

edit: whoops didn't read.

<comment><USER46> That's up there.</comment></comment>


SEC Fines Yahoo $35M for Data Breach That Affected 500M Users - <AUTHOR> https://www.bleepingcomputer.com/news/business/sec-fines-yahoo-35-million-for-data-breach-that-affected-500-million-users/ <comment><USER2> So a user's data is worth $0.07 according to the SEC.</comment>


Show HN: Instaparser – An API for Instapaper's parser - <AUTHOR> https://www.instaparser.com <comment><AUTHOR> Brian Donohue from Instapaper here. Over the past few years we've gotten a significant number of requests from developers to have access to Instapaper's parser. Today we launched Instaparser, an API to access Instapaper's parser.

Instaparser is a paid service, but there's a free tier under [https://www.instaparser.com/signup/trial](https://www.instaparser.com/signup/trial) that can be used for testing or just quick weekend hacks.

Personally, this is the first developer-focused product I've launched, and I'm very excited to get it out into the community and see what people will do with it.

</comment><comment><USER2> This is cool. Fivefilters does something similar with their fulltextrss product. Despite the name, it also works for single pages, e.g. [http://ftr.fivefilters.org/makefulltextfeed.php?url=http%3A%...](http://ftr.fivefilters.org/makefulltextfeed.php?url=http%3A%2F%2Fblog.instapaper.com%2Fpost%2F137288701461&max=3)

I haven't compared parsing quality.

</comment><comment><USER3> Some time ago I would be madly looking for this. The prices are much much better than [https://www.diffbot.com/pricing/](https://www.diffbot.com/pricing/)

<comment><AUTHOR> It's also a lot faster than Diffbot. We were using Diffbot at Instapaper before launching the new parser, and our total parsing time dropped an order of magnitude: [https://s3-us- west-2.amazonaws.com/staticinstapaper/blog/par...](https://s3-us- west-2.amazonaws.com/staticinstapaper/blog/parsing_time.png)</comment></comment>


Rate my startup: www.askforadeal.com - <AUTHOR>

Put two developers @ Mahalo on this domain name I bought after interviewing Andrew Mason of Groupon. Concept is simple: socially shame/inspire companies into giving you a deal.<p>Please give brutal honest feedback. <comment><USER2> Interesting idea. Great name. Okay logo. Decent site design (I'd strip all the unnecessary stuff though.)

The first thing I asked myself when visiting the site was: do these companies notice? My gut reaction is: probably not.

You will want to positively answer that question with some testimonials, or an overview of "granted deals", etc. Currently it just feels like a site with a bunch of people asking for free stuff.

Also, you could go even more Groupon-like by having people join in on an "Ask For A Deal" so it's not just one person asking, but a group of people. This will be a lot more interesting for companies as well and incentivizes users to spread the word about the deal they are asking for.

A company could respond: if you get 100 people to enter the deal I'll make it happen. Essentially you would be creating a self-service version of Groupon where the users are in control of what deals will be up there. Groupon meets Digg?

Marc Köhlbrugge

<comment><USER3> Agree this makes the most sense. However, I would argue there is some social value for each company each time a person says they are interesting in spending XX at a certain company.

Ultimately, they should place some value on that (perhaps, not a 25% discount though)

</comment></comment><comment><USER4> Possible game changer: Instead of guessing at the cross hairs of price to volume, vendors can actually hear the consumer's opinion real time (not after a month of testing). Instead of running a/b testing, they can begin to see outliers and future trends. They can learn consumer behavior by responding to back channel offers from consumers and then roll out appropriately with sales according to offers received. The nice thing is the control instead of turning over your inventory to a third party liquidation specialist that is going to make a margin on all the down channel overstock. It allows all vendors to have a certain outlet/flash possibility and increases engagement and page views. This isn't a site though, it's a button or meebo like bar that you can send data back when you're on the product page to the vendor letting them know you'll buy at $x price. The key would be the right amount of engagement and feedback from the vendor. If nothing happens after the offer is made (ie counter offers, other similar offers, something) then I think users don't engage.

</comment><comment><USER5> I think this concept could work best if you created a list of companies (Best Buy, Starbucks, Barnes & Noble) who are willing to look at submitted deals. Put up 5-10 companies who agree to be listed and say the following companies are accepting "pitches" for deals and will select the best suggested deal as they see fit. (could have voting of some sort as well).

User chooses "Best Buy" and submits the following deal suggestion: "$5 dollar gift card with $20 purchase." If Best Buy accepts the Suggested Deal it will occur the following week. (a week of hype could help spread the word that a deal is coming) If Best Buy reject the Suggested Deal then they keep receiving new ones. The good thing is that most big companies have a dept thinking up promo deals for the weekly circulars.

Ironic... I am suggesting a biz model for a suggest a deal concept site. I'd like 5% of the company if you go with this "suggestion." ;) Accept my idea. Best of luck.

<comment><USER6> Partners willing to listen AND listing deals granted will prove how useful this service is. Add both now.

</comment></comment><comment><USER7> Design could definitely use some work before I'd use it. But I really dig the concept. Might be more effective with a more focused selection to help get traction... such as - this (week/day/month) most users wanted a deal from X - and that's all the site focuses on. Where the same company can't be chosen more than once every few months.

</comment><comment><USER8> I doubt it'll work very successfully. Who knows, maybe the response from retailers will work...

1\. Stores will have to be proactive and look and monitor these deals on a daily basis. This is your biggest risk factor. The reason why Groupon/Social Buy works is the ability to create deals for users instead of the other way around.

2\. Quality of the deal is dependent on the user and their desire to get the highest percentage off. Most users are going to optimize for their own best outcome and thus be disappointed when their 80% off coupon does not get through.

3\. Once a retailer does a deal at 50% off or higher, it's going to set the bar at that level for other consumers expecting the same or better deal the next time it comes around.

<comment><USER9> Thanks for the great feedback. You make some good points. We have some tricks up our sleeves to deal with some of what you bring up. Current version is what we consider a minimum viable product. Thanks for the response. We are listening carefully.

</comment></comment><comment><USER10> I think that while the concept is interesting, and there are a few competitors that exist already such as groupon that give discounts through large purchase, I wonder if the companies will notice. To me, it feels like many people sending a lot of noise to the seller asking for really unrealistic demands, and sets an expectation with the user that the site will be able to somehow ' get that deal '. While there is value with a name up on a social platform spurring others to get interested, really, I doubt until I see some actual results, that companies will take much notice and provide discounts. Good idea though!

<comment><USER10> Also, it'd be great to see latest deals that were accepted by companies in a ticker scroll or something. Otherwise, it feels like a shot in the dark.

</comment></comment><comment><USER11> "Over Half off huh? Why not! Anythings possible."

Should be Anything's.

Like the idea but strikes me it will be hard for a lot of companies to give custom deals without rewriting their backend. And even if you do give custom deals - how do you align the deal asker's twitter account to their account on your site (assuming not everyone has super zeitgeisty social logins)?

</comment><comment><USER3> Seems like a cool app. For such a nice looking UI the company logos on the bottom look awful.

<comment><USER12> It's because they are pulling in the small image and than scaling it up instead of using the bigger one and scaling it down.

One they use: [http://a3.twimg.com/profile_images/1181691748/vs_black_logo_...](http://a3.twimg.com/profile_images/1181691748/vs_black_logo_normal.jpg)

One they should use: [http://a3.twimg.com/profile_images/1181691748/vs_black_logo....](http://a3.twimg.com/profile_images/1181691748/vs_black_logo.jpg)

</comment></comment><comment><USER13> Clickable link: <http://askforadeal.com/>

</comment><comment><USER14> I don't think its a good idea. If you have enough people asking for a deal, it probably means the offering from that merchant is already in demand, thus no incentive for them to offer a significant discount on their services or product.

<comment><USER15> I disagree--and think that merchants can actually make themselves more in demand by couponing. Look at Bed, Bath and Beyond. Hugely popular, in-demand merchant that coupons the hell out of their customer base, which has only had the effect of earning them serious loyalty. Solid discounts on top of great customer service helped them stay afloat even as Linens n' Things (their one- time major competitor) was folding during the height of the recession. They've also established themselves as the go-to store for registries (61% of couples who created wedding registries in 2010 signed up at BB&B). I think they'll keep couponing, keep growing and start to take more of the market share from coupon-shy Target in the kitchen and bedding categories.

</comment></comment><comment><USER16> You need to hire a sales team to contact the companies and inform them 500 or 1000 people would like a deal. Sell the companies on the deals.

</comment><comment><USER17> Did you get any responses from the companies? It would be interesting to see their reaction to people asking for coupons.

</comment><comment><USER18> like the concept a lot.

<comment><USER19> good concept, agree the logos at the bottom cheapen the site. Perhaps have them in greyscale as well, most would recognise those logos without the colours</comment></comment>


Talk Coffee – A Slack Community for Coffee - <AUTHOR> http://talk.coffee

<comment><AUTHOR> I remember visiting the #coffee IRC channel years ago, and really enjoying being able to converse with people real-time on roasting, espresso, and everything coffee (or off-topic stuff). While the IRC channel still exists, I sort of figured that a Slack community for coffee was inevitable, and was a bit surprised that there wasn't one already. Anyways, I hope that some of you will come join me there.</comment>


Bill Gates calls for higher capital gains taxes - <AUTHOR> http://www.cnbc.com/2016/05/02/bill-gates-calls-for-higher-capital-gains-taxes.html <comment><USER3> He can safely call for higher capital gains taxes - since most of his money is hidden offshore and away from US accounting. My boss used Bill's accountants, as did many Silicon Valley executives, and described to me some of Bill's tricks for hiding money using offshores. US profits are completely hidden from US accounting. The .1% have already taken all the wealth and hidden it - <USER2> taxing the income of the .1% and taxing capital gains isn't enough. And when the rich tell us that they are "giving it all away" we should more than skeptical.</comment>