How Smart Speakers Are Changing the Way We Listen to Music - <AUTHOR> https://pitchfork.com/features/article/how-smart-speakers-are-changing-the-way-we-listen-to-music/ <comment><USER2> Smart speakers feel like tablets: an initial burst of sales, followed by years of decline as the devices sit in drawers. They're priced right for gifts and impulse buys (especially with the heavy discounts), but they're in practice less useful than they seem, and their actual utility is vulnerable to being eaten by smartphones.

However they will endure as ad-ons. The latest Bose headphones have Google Assistant built in, Sonos soundbars have Alexa, etc. Just like TVs became "smart" (i.e. equipped with ads and analytics) we will see more and more "smart" devices with this stuff integrated. It's a checkmark in the feature list, and a revenue source for the tech titans. Hug your dumb devices tightly!

<comment><USER3> I don't think so.

I'm using our echos every day for time keeping, weather, music and lights.

My tablet (Nexus) I played with it way shorter.

Also I miss Alexa when I'm in a hotel.

What? No music? No timer? No quick weather report? No alarm clock and for the lights I have to use a switch?...

It's not just a gadget it is a very convenient input method.

And it is already super useful but still basically the first generation of devices.

<comment><USER4> > Also I miss Alexa when I'm in a hotel.

> What? No music? No timer? No quick weather report? No alarm clock and for > the lights I have to use a switch?...

There is now an Alexa app that provides the same functionality on smartphones.

</comment></comment></comment><comment><USER5> Regardless of device or media used, my personal experience has been that while the level of new music discovery has increased by a lot, I found myself much less engaged/immersed when everything is served to you by an algorithm. Compared to decisively picking an album and even with just teasing through the tracks in the order the artist composed it, I'm getting the reminiscent feeling that this is not the best development for either the producer, consumer and media culture in general. In other words, I can't even remember the last time I just sat there and did nothing but _listening_ to music.

<comment><USER6> That's quite interesting. My experience has been the exact opposite. I tend to be far more likely to listen to my Discover Weekly than any other playlist, and I totally love listening to those songs both as their own thing as well as when I'm working. It's just a lot more satisfying to find new songs/artists/albums every week than not. It's just like radio, in a sense, except it's curated using an algorithm and closer to my taste than a lot of traditional radio. The algorithmic part doesn't bother me: I don't really care if the being at the other end of the radio is an algorithm or a person.

Mind you, this is my experience with Spotify: one of the reasons I'm nearly religious in my choice of streaming services. I tried Apple Music for nearly a year when it launched but found little to like there.

<comment><USER7> Spotify is indeed like radio - but without ads and other chatter, and with info about the song name and artist.

</comment></comment></comment><comment><USER8> Somewhat interesting, but this really comes off as a Luddite attempting to explain smart speakers to people who've never heard of them.

He's not ready to talk to a plastic puck? His friend 'taught' her echo to play ambient music? Honestly this sounds like it should have been written in 2015.

<comment> a-dub _shrug_ he's writing about the impact of these things on the music industry in a music publication. It's not going to be as fawning as one of those absurd go-go-gadget-fanboy websites, but it seemed like a perfectly reasonable exposition of what they are, specifically for providing context for how they might impact the music world.

and tbh I'm not really ready to talk to a plastic puck either. It's pretty weird, not to mention the uneasiness of having some poorly secured hacked up version of Android running 24/7 in my house with a big fat microphone attached designed to pick up as much as possible.

...and who knows, maybe his friend did tech it about ambient by writing an Alexa skill to organize her ambient playlists.

<comment><USER9> Voice control of lights, AC, music is great when doing things that involve using both hands (cooking, baking, maintenance work), as is note taking.

It's not about talking to, it's about proper hands free control.

95% of things are better controlled with hands, but there is a significant set of things where voice control is superiour (usually due to your hands being otherwise occupied).

</comment></comment></comment><comment><USER10> Question to HN community: How much would you really like to see a company that purposely doesn't focus on any of the "smart technology" BS, but just on delivering pure, faithful audio. In other words, a "dumb" speaker company.

Because, I think speaker is one of the few industries where you can still add layers of smartness to an existing "dumb" speaker box simply by just connecting it to such a device.

With the gradual shift in strategies of companies like Bose and Sonos, to focus more on smart technologies, I think there is a void created which audio companies were originally known for - good, faithful audio without the buzz words.

As a personal disclosure, I'm interested in this because building loudspeakers is my passion and I would be more than delighted to get my feet wet.

<comment><USER11> I just buy studio monitors and be done with it.

Can speakers possibly sound any better than appropriately sized studio monitors plus maybe a sub?

<comment><USER12> Emphasis on appropriately sized as near field monitors might be inadequate for a large room.

However, there is anyway no rigid line between studio monitors and regular speakers. Plenty of hifi firms try to optimize for a true representation of the music. Hence, you might actually overpay because you pay for studio "extras" that you might not need at home (e.g., an extra solid build)

</comment></comment></comment><comment><USER13> For some reason I find the 'full range' bluetooth speakers (Tronsmart T6) are better for background music while doing stuff than a more immersive 2.1 system, maybe because the sound is from a single point source so less distracting?

Also I like to record favourite radio shows using curl then play them back, makes it easy to repeat tracks or skip overly intrusive ads, though I find the non-targeted advertising quaint these days. :)

</comment><comment><USER14> My HomePods + Apple Music are extraordinary. "Hey Siri, play Delta Blues." Bam. Play music I would like. Bam. Play Kind of Blue in the Living Room, play the Harry Potter Soundtrack in the kid's room. Bam.

HomePod and Siri may not order pizza yet, but it does what it does incredibly well. I even replaced a sound bar for the TV with a stereo pair with a minimal footprint. There was a lot of lamenting Apple Music's not being Spotify, but now, it's pretty clear that in my house, Spotify fails to compare — especially when you use Apple Music with CarPlay. The next five years is going to be really fun I think!

<comment><USER15> I hate being spied on. I don't even use music streaming services. Maybe if I could manage it all anonymously, I suppose.

But damn, the possibility that I could say "Play that song that goes like this [hums a few bars]" would be very cool. Or "Play that song with [some lyrics]." Or "I liked that, but wasn't there an older version?"

<comment><USER14> HomePod doesn't "spy." The Siri stuff is anonymous. Apple doesn't know that you asked Siri for directions to a porn shop: unlike Google and Alexa where their business model is based on "spying."

You can actually use Siri to identify songs (thanks to the Shazam acquisition.) "Hey Siri, what's this song.." it then listens and identifies the song.

<comment><USER15> That's good news. I've been coming around to Apple, I admit. They've given me no hassle about having a pseudonymous Apple Store account, funded from Bitcoin via giftcards.

I was blown away when I discovered Shazam. Waiting in line, I heard a song that I vaguely remembered. So I asked this guy if he knew it. He pulled out his iPhone, waited a minute, and then told me. Very cool! Although also a little frightening ;)

</comment></comment></comment></comment><comment><USER16> I am not interested in "smart" speakers or televisions. Like my refrigerator and toaster, I prefer these devices to be "dumb".

</comment><comment><USER17> I listened to Sirius XM's U2 channel today and it was so much better than an algorithmic run through their library.

</comment><comment><USER18> Echo/Home/Alexa devices are the modern day equivalent of winXP systray icons ... their number is inversely correlated to the intelligence of the user.

<comment><USER19> These are two of the most idiotic biases I've ever seen on this site, and that's saying something.

As someone writing software on my family's PC 15 years ago, I tended to add 5+ systray icons over the standard ones my parents had. If only I'd known how stupid they made me...

Regarding speakers, you're likely referring to the privacy tradeoff. People could say the same about someone using a credit card, grocery loyalty program, or any wireless carrier. We all make privacy tradeoffs on a daily basis as a cost for having a modern, convenient life in a capitalist society.

<comment><USER20> Do you really believe that having an always on Internet uploading microphone in your private domicile is equivalent to using a grocery loyalty card? Also phone carriers have well established restrictions on lawful intercepts.

<comment><USER3> Your smartphone is easier to hack as the isolated Hardwarechip in a smart speaker which listens to you.

<comment><USER20> No doubt phone can be compromised, but listening to everything one says isn't its designed purpose. It's the intended use of the "smart" microphone that's fundamentally untrustworthy. Even if everything works exactly as intended, recordings are available on the owning company's servers and they are subject to discovery, lawful or otherwise.</comment></comment></comment></comment></comment>


A Pressing Business: Inside a Czech Vinyl Plant - <AUTHOR> http://thequietus.com/articles/17670-gz-vinyl-pressing-plant-record-store-day

<comment><USER2> > Why the disparity between wages, if each worker operates the same presses > for similar hours? It's down to individual productivity, Pelc says. The more > records they press in each shift, the more money they take home at the end > of the month.

I find this interesting. I've had my share of jobs where it seems that there's no point in doing beyond the minimum required because there's no reward and often not even recognition for the extra productivity. The only thing that really comes close is sales jobs where commission can stack up, but that's not necessarily comparable.

<comment><USER3> There is a long tradition of this sort of payment. [1] I have run across it in industrial settings, particularly where the industry or its management were strongly influenced by Taylorism. [2] However, if quality standards aren't easily achieved by standard work, it can be highly dysfunctional.

[1] [https://en.wikipedia.org/wiki/Piece_work](https://en.wikipedia.org/wiki/Piece_work)

[2] [https://en.wikipedia.org/wiki/Scientific_management](https://en.wikipedia.org/wiki/Scientific_management)</comment></comment>


Study Claims 60 Percent Of Facebook Users Considering Quitting - <AUTHOR> http://www.allfacebook.com/2010/05/study-claims-60-percent-of-facebook-users-considering-quitting/ <comment><USER2> Considering quitting != quitting.

95% of smokers consider giving up smoking and 99% of heroine or crack users consider giving up their dope.

But they'll all be back for another fix tomorrow.

<comment><USER3> And because of that, there is a healthy market for products and services dedicated to people who want to stop smoking.

The door is opening for some form of competition and a possible segmentation of the market.

</comment></comment><comment><USER4> Facebook is really innovating here. They figured out how to get their users to leave, without even threatening to charge them money. Impressive.

</comment><comment><USER5> I'm not considering leaving.

Every day, we post things on the internet that are completely within public view. I simply don't post things that I don't want strangers to see.

To me, Facebook embodies the opposite of privacy. It's a site for sharing your life. What's the difference between the people on your friend list who you haven't talked to in five/ten/fifteen years and a complete stranger? I just don't care all that much.

<comment><USER4> I agree with you. I enjoy having people peer into my private life, which is why I have an online presence under my real name. But most people don't want this, for whatever reason, and it's not Facebook's place to decide for them.

Nobody should see anything you post to Facebook until you explicitly allow it. It's the only reasonable default.

</comment></comment><comment><USER6> I don't know what the numbers were, and they kept changing, but in the lead up to the recent UK election over 30% of people were saying that they were intending to vote LibDem. In the end it was far fewer, around 22% or 23%.

People when polled give answers they think make them look good, or intelligent, or logical, or attractive, or something, but aren't necessarily truthful.

Of _course_ if someone is asked in the current climate they will claim that they are considering quitting Facebook.

But it won't happen.</comment>


How to Become a Good Manager Using OKRs Methodology - <AUTHOR> https://www.happierco.com/blog/how-to-become-a-good-manager-with-okrs-methodology/ <comment><USER2> I've seen the application OKRs lead to positive results. But this article is very cargo-culty and makes me think OKRs are becoming the new Scrum, a hype for selling consulting and certification.

In the article, there's no evidence, just a bunch of statements like a "A good manager is <insert a few arbitrary qualities here>". Looking it what Happierco is selling, this article is just SEO strategy</comment>


Ask HN: Which books would you recommend to expand networking knowledge? - <AUTHOR>

I am a college student who just finished CCNA course and is going to take CCNP as well. While enjoying these courses a lot, sometimes I feel I am not having enough time to understand everything and would like to. What book(s) would you recommend to further expand my knowledge? <comment><USER2> Routing TCP/IP, Volumes 1 and 2.

</comment><comment><USER3> all of the richard stevens books.</comment>


Masonry, infinite scrolling and Django - <AUTHOR> http://brack3t.com/masonry-infinite-scrolling-and-django.html

<comment><USER2> One of the things i've recently built has an infinite scrolly feed of items, and <http://airbnb.github.com/infinity/> is what I ended up using after using Masonry for a long time.

Edit: along with Scroll Events <http://james.padolsey.com/demos/scrollevents/>

</comment><comment><USER3> The example page (Tindie) is slow and chunky-scrolling on latest Firefox with my machine (16 gigs of RAM and quad Xeon)... It eats CPU. Something wrong with it. Doesn't happen in Chrome.

I like the typography on the blog, though.

</comment><comment><USER4> Maybe add some sort of visual hint on Tindie to show that new content is being loaded. It takes sometime to load the new chunk and someone might think there's nothing more to see down there.

</comment><comment><USER5> Did I miss the link to the example showing it in action? Or is that left as an exercise for the student?

<comment><USER6> \---There's no demo because it behaves exactly like the Masonry example for infinite scrolling and Pinterest.---

Screw it, I added a link to the example. It's on tindie.com.

<comment><USER7> I'm looking at tindie.com and I see the inifinite scroll but I don't get the need for masonry. All The blocks appear to be the same width and height.

<comment><USER6> You're right. We had a staggered layout, a la Pinterest, until last week. Now that we've evened up everything, I'm sure we could remove Masonry. It's currently still using it, though.

</comment></comment></comment></comment><comment><USER8> This is awesome read! Thanks

</comment><comment><USER9> Oh nice, the best takeaway from this (for me) was that desandro apparently has created a hack to deal with the whole is-an-image-in-cache-or-isn't-it problem:

<https://github.com/desandro/imagesloaded>

<comment><USER10> The best way to avoid this altogether is to set the image width and height in the img tag. That way, content can be shown right away, even before the images are loaded.

Another thing to be careful with are social buttons, whose height may change after the initial item is rendered. That's easily avoided with a fixed CSS height, though.

<comment><USER6> Yes. We specify a height and width in the HTML and the CSS, but it's still nice to pay attention to the images' loaded status.</comment></comment></comment>


Ask HN: Which has more job openings RoR or Django? - <AUTHOR>

I know that Python is very popular for data and scientific stuff so there is probably more job openings for Python than there are Ruby. But what about Ruby on Rails vs Django as far as how many companies are using them and which is a student more likely to get a job in? <comment><USER2> It depends on the territory in my opinion and what your personal goals are.

For example, in the Midwest USA, there isn't much for Django jobs, but I see Django job posting fairly often in the US for the west-ish jobs. Like Silicon Valley and all.

Here is a dirty secret, though: If you want a well-paying, salaried job without risk, you want to look at .NET jobs in the Midwest. For example, Union Pacific pays well for .NET devs in places where the cost of living is much lower. Senior devs in some companies here (when you account for cost of living being much lowe) pay the Silicon Valley equivalent of $500K. It just isn't sexy to talk about .NET railroad infrastructure apps when NPM and Ruby are the hot topics on Hacker News.

</comment><comment><USER3> Django: 331

Ruby on rails: 904

C#: 8357

Sources:

[http://www.dice.com/job/results?caller=basic&q=django&x=all&...](http://www.dice.com/job/results?caller=basic&q=django&x=all&p=)

[http://www.dice.com/job/results?caller=searchagain&q=ruby+on...](http://www.dice.com/job/results?caller=searchagain&q=ruby+on+rails&x=all&p=)

[http://www.dice.com/job/results?caller=searchagain&q=C%23&x=...](http://www.dice.com/job/results?caller=searchagain&q=C%23&x=all&p=)

</comment><comment><USER4> The answer may depend on geographic location and market (Oil & Gas, Medical, Manufacturing). Some cities (within the USA) have great paying opportunities with open source languages (such as Python, Ruby, Java), while other cities generally hire Microsoft programming skills (C#, asp.net, vb.net).

<comment><USER2> Wow I was typing my response so I didn't see yours, but yes, the geography plays a surprisingly big role.

</comment></comment><comment><USER5> Not super scientific:

698 Jobs with Django in the description

[https://jobs.ziprecruiter.com/candidate/search?search=Django...](https://jobs.ziprecruiter.com/candidate/search?search=Django&location=&radius=50)

4576 Jobs with Ruby on Rails in the description

[https://jobs.ziprecruiter.com/candidate/search?search=Ruby+o...](https://jobs.ziprecruiter.com/candidate/search?search=Ruby+on+Rails&location=&radius=50)

I think the real question is how many quality jobs are in those results, which is hard to answer.</comment>


Google sees jump in government 'takedown' requests - <AUTHOR> http://news.yahoo.com/google-sees-jump-government-39-takedown-39-requests-174602077.html

<comment><USER2> I wish every one of these requests was available to be seen, neatly organized by countries etc. Nothing like public shame to bring back to reason power- abusing government agents.

<comment><USER3> Google does actually, here: [http://www.chillingeffects.org/search.cgi](http://www.chillingeffects.org/search.cgi)

You'll have to search under court orders to get those.

</comment></comment><comment><USER4> Requests are going up, and compliance is going down.

<comment><USER5> Now it would be interesting to see the request to compliance ratio as a function of time.... would be kinda cool if it stayed constant.</comment></comment>


The product qualified lead - <AUTHOR> http://tomtunguz.com/the-new-sales-hotness-the-product-qualified-lead-pql

<comment><USER2> I'm a bit put off to notice that the default action they discuss for PQLs is "call the customer" to convert them.

If I'm interacting with your business in some way, and I hit a threshold that causes a salesperson to ring my phone number, I'm going to think really hard about whether I can drop your service completely.

My reactions are probably stronger than the average, but who out there feels that a phone call from a salesperson is a _pleasant_ event?

I don't care how polite the person is; they're interrupting my life, asking that I stop whatever I was doing -- they can't know, of course -- and pay attention to them while they try to convince me I'm _wrong_ about something (that is, not yet converting to a paying customer of their service).

Trigger an email from a real person, if you like, that I can read at my leisure (or simply delete, without feeling impolite like I would hanging up on someone).

But think carefully before you start triggering unsolicited sales calls to the people you want most to think favorably of you.

</comment><comment><USER3> I read somewhere that for a certain product (salesforce maybe?) that they discovered if a user uploads their own data they were 2x to 3x more likely to convert.

The first step is always identifying the actually qualification event. The problem is they are not always obvious. I see in a few years big data companies helping to find these patterns in data and identify a few high correlation metrics with ease.

<comment><USER4> I'd wager that's why tools like Mailchimp try to get you to send out that first newsletter - even a test - as soon as possible.

</comment></comment><comment><USER5> It would be hard to not "buzz" about PQLs, but they are by no means "free" even if you didn't pay for lists of PQL's, and gathered the data for yourself. They take time and effort to develop.

<comment><USER6> They're "free" at the margin if you have enough budget/customers to justify writing the code to collect the write metrics in the first place. You might well be able to use metrics from your existing analytics package

Salespersons' time, of course isn't free, but it might be more efficiently convert to revenue by up/cross-selling to existing customers than trying to find new ones.</comment></comment>


Ask HN: Facebook's Open Source Policy - <AUTHOR> From the talented folks here. I want help in understanding and testing out Facebook's open source policy.
First the understanding part. The Facebook's patent grant seems worse than GPL (because you can't even link to it and they can revoke it retroactively by forcing you into a lawsuit). Facebook as a company has no qualms in blatantly copying anyone they like. Facebook has the resources to enter any software market. They have been creating more and more infrastructural open source pieces (we always need to double check if the node module we use hasn't been tainted by a facebook dependency).Very few people seem to question the intents. Why is world not paranoid? Yarn seems like Embrace, Extend, Extinguish. Can folks explain why this is not? I have seen lots of M$ haters but haven't seen many F? haters.
For the testing part. Can someone create a versioned list of FB projects with no patents in them or help create patent free forks. They have made it difficult to know if a project actually has a patent. They can't revoke a patent right if there is no patent to revoke. I would love if HN could discuss and email the authorities the prior art in all these patents when they are filed and cleanup the garbage before it gets thrown into open source. I don't know how this would work if say a project that FB depends on creates a licensing argument like this(open it up for all lawsuits against the present and future sponsors of the open source project). It would be great to know whether facebook is willing to bite what it wants us to chew. <comment><USER2> FB hater here.

I can't help with your request, sorry. But I do hate the FB.</comment>


Apple 7 Pre-orders - <AUTHOR> http://apple.com/iPhone7preorder <comment><USER2> What is this supposed to link to? This pages displays: "The page you're looking for can't be found".</comment>


Beautiful Racket - <AUTHOR> https://www.beautifulracket.com/ <comment><USER2> I really like this book and highly recommend it.

My only complaint is that because it is so directed (you're writing a programming language and it wants to get you there very quickly) it abstracts a lot of stuff that you'll need to know if you're doing anything other than following this book. For instance, a lot of the code you write will start with

        #lang br

Instead of the usual Racket

        #lang racket

That's using some support from Racket where you say "I'm writing the `br` language" and Racket goes and runs your code in that language instead of Racket. That "language" is really just Racket with some libraries pre-included ([https://beautifulracket.com/appendix/from-br-to-racket- base....](https://beautifulracket.com/appendix/from-br-to-racket-base.html)) and some of those libraries are specific to the book (e.g. [https://docs.racket-lang.org/br/index.html?q=br#%28mod- path....](https://docs.racket-lang.org/br/index.html?q=br#%28mod- path._br%2Fsyntax%29)).

So if you're following along the book, the upside is that that he can skip explaining a bunch of stuff about Racket packaging and libraries. But the downside is that he skips explaining a bunch of stuff about Racket packaging and libraries. If you want to take what you've learnt here and go write a programming language in Racket, you're going to have to go and learn all of that stuff anyway. You're going to have to take apart `br` and figure out how to map its parsing stuff to Racket's and you'll find that almost none of the scaffolding from the book can be copy-pasted without including the book's libraries, and many of the concepts aren't even reuseable if you want to use Racket's parsing tools instead of the book's largely bespoke tools. (Just including the book's libraries themselves can be difficult because of how Racket's packaging works. In the New World of Racket packaging, you install a library _on your machine_, not as a dependency of your project. So if you want to run your code on another machine, you first have to manually install the library on that machine before your code can run, and Racket's tooling around this is currently very sub-par.)

But I'll say again that it's a great book and if you're interested in Lisp and Scheme in particular, you should buy it and you should read it. It's great. Just know that you'll have to read the book _and also learn Racket_.

<comment><USER3> On the matter of learning Racket, I've heard some good things about How to Design Programs (2nd Edition): [http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html](http://www.ccs.neu.edu/home/matthias/HtDP2e/index.html).

<comment><USER4> I'd say HtDP is a good book for learning programming, but I don't think it's the best introduction to Racket. It also uses a specially crafted languages (a series of them) and focuses on the process of coming up and implementing the design, while removing most of the usual problems (cryptic error messages, too complex docs, too advanced techniques) which the beginners encounter. It's great as an introduction to programming, and it's even worthwhile a quick read for more experienced programmers (esp. self-taught), but it's definitely not about learning Racket, at all. The Little Schemer may be slightly better, but on its own, it too is not about learning Racket. Actually, I guess there's no book about Racket itself (EDIT: other than this one to some extent (in "explainers")) - existing books either focus on the basics of programming (HtDP, Realm of Racket) or on specific algorithmic problems and techniques (The X Schemer, SICP). Which is kind of natural given the educational background, but it makes it harder for already established programmers to learn Racket to get the job done.

<comment><USER5> After you have read HtDP2e, I found that racket-lang.org has all you need.

 _The Little Schemer may be slightly better, but on its own, it too is not about learning Racket._

Although they overlap on some topics, comparing little schemer to htdp is comparing apples to oranges.

Also, htdp is just racket in my opinion, it differs very little from the students languages, I did the whole thing using just plain racket and didn't have any problems that couldn't be solved in two minutes visiting docs.racket- lang.org (and they were rare), but sure, you won't get to know all of racket because that's not the point of the book.

</comment></comment></comment></comment><comment><USER6> This is a very interesting case where the author claims the book is not free, provides it on a public webpage, and does not want to provide a PDF or ePub. I would gladly be willing to pay for content, but I like to do most of my reading on a kindle. I am not willing to pay for a book if the author is trying to make it as difficult as possible to view his book (but at least the fonts are beautiful).

<comment><USER7> Butterick has Strong Opinions™ about Kindle typography that led him to that position. I largely share those opinions, to be fair, although I think it's a bit of a quixotic enterprise for many books; offline is more important than beauty. (And, really, the Kindle _could_ do most of these tricks if Amazon gave a rat's ass; Apple's iBooks can do nearly everything that any other WebKit browser can with regards to typography.)

Having said that, though, this is a book that I'd argue is better in the browser than on the Kindle or as a PDF. I want to be able to read this with a code editor open, and the book side-by-side in a separate window. PDF books don't reflow, and in my experience Kindle just isn't particularly good for tech books.

<comment><USER8> > I want to be able to read this with a code editor open, and the book side- > by-side in a separate window.

Like this?

[https://xkcd.com/1988/](https://xkcd.com/1988/)

<comment><USER9> I do it with two monitors like this:

[https://i.imgur.com/QZWIvNq.jpg](https://i.imgur.com/QZWIvNq.jpg)

<comment><USER10> I'm a big fan of rotatable monitors. A 4x3 display rotated to portrait is fantastic for reading most PDFs, if you set Acrobat to Fullscreen and Single Page View.

As a bonus, lots of offices have a closet full of old 4x3 Dell flat-panels somewhere, so there's no hassle with procurement.

</comment></comment></comment></comment></comment><comment><USER11> Practical Typography (written by the same author) has been a wonderful resource for me. Sometime I'll get around to working through this book as well. My high school is actually one of the last places to teach Racket/Scheme as an introductory language. Personally I find it a wonderful way of teaching the basics of computation and recursion. I wish more schools still taught it.

<comment><USER12> Several universities still teach racket as an intro language. Ex: Brown, Northeastern, Northwestern, etc.

The authors of Racket specially avoid arguments about teaching language X in introductory CS. The pedagogy and curriculum are significantly more factors in effectively teaching CS [1]. The design of Racket with its restricted languages reflects that.

[1] [https://www.janestreet.com/tech-talks/curriculum- design/](https://www.janestreet.com/tech-talks/curriculum-design/)

<comment><USER13> This is an essay by the creator/author of How To Design Programs (currently at Northeastern) that lays out the pedagogy well:

[http://www.ccs.neu.edu/home/matthias/Thoughts/Developing_Dev...](http://www.ccs.neu.edu/home/matthias/Thoughts/Developing_Developers.html)

The speaker in the talk linked is a previous Ph.D. student of the author above.

Northeastern, Brown, Northwestern, and Waterloo all use the approach in HTDP as far as I'm aware, even if they don't use the book itself. Racket just happens to be the language of choice (or rather X Student Languages are, not even Racket) because they fit the pedagogy well.

</comment></comment></comment><comment><USER13> This is a great introduction to Racket as a language for building languages.

For those interested further, there is a lot of work with Racket in this respect. A recent paper previously hit the front page of HN on "Domain Specific Languages" (DSL's), which is basically the idea that you should write a programming language for each problem to make it easier to write programs in that domain rather than writing complex spaghetti code in a general-purpose language or writing a library that badly ports to the general purpose language. I'm a bit biased here, but I think this could be the next big step in programming in the next few decades as we see people not writing libraries but writing DSL's to make for easy writing of programs.

HN Discussion: [https://news.ycombinator.com/item?id=16454854](https://news.ycombinator.com/item?id=16454854)

The authors of the paper are mentioned in the acknowledgments of this book as well!

<comment><USER14> Here's a cache of A Programmable Programming Language since it's down for me atm

[https://webcache.googleusercontent.com/search?q=cache:ATgZRm...](https://webcache.googleusercontent.com/search?q=cache:ATgZRmeSNKAJ:https://cacm.acm.org/magazines/2018/3/225475-a-programmable- programming-language/fulltext+&cd=1&hl=en&ct=clnk&gl=us)

</comment></comment><comment><USER15> Other fantastic projects by the same author:

"Typography for Lawyers" [https://typographyforlawyers.com/](https://typographyforlawyers.com/)

"The Book is a Program" [https://docs.racket- lang.org/pollen/](https://docs.racket-lang.org/pollen/)

</comment><comment><USER16> Looks like it's being hugged to death.

<comment><USER17> Archive link: [https://web.archive.org/web/20180509201622/https://beautiful...](https://web.archive.org/web/20180509201622/https://beautifulracket.com/)

</comment></comment><comment><USER18> I have little knowledge of lisps, but I'd like to implement a new language in one of them. What would be a better choice, racket or clojure?

<comment><USER19> One of Racket's is explicit design goals is to be a toolkit for designing and implementing new languages, so I would say it is the better choice.

<comment><USER18> Yes I know, but I've heard some clojurists criticizing racket because of its data structures. So perhaps that would outweigh its benefits. Thanks for your opinion

</comment></comment></comment><comment><USER20> How useful is this book for a Clojure programmer? I always wonder if there is cross-over in practices between the Lisps.

</comment><comment><USER21> what a beautiful book.</comment>


The place on the web where comments don't suck - <AUTHOR> http://www.theverge.com/2014/8/8/5982039/theres-a-place-on-the-web-where-the-comments-dont-suck <comment><USER2> Soundcloud comments seem more like Twitter-style one-liners than an actual discussion with replies etc. I actually find some of the youtube comments amusing; for example, the comments following the Russian dash cam videos and other such weird-but-true slices of life.

Internet communities are a work in progress. Reader comment/talkback/forum plugins are considered a necessity, and yet much of their content is pointless and trivial.

Hacker News does a pretty good job, for some reason, maybe mostly because of the ferocious moderation of anyone who strays from factual and reasonable sorts of statements into ad hominem or pointless sorts of space wasting.

But most sites are terrible. I guess the only solution is heavy moderation and a core of reasonable folks.

</comment><comment><USER3> I would pay for a a news / discussion service that let me go to the post office and show my driver's license before I could join. (the payment could also be used to pay for writers and content creation)

That way the people who want to hide behind anonymous accounts can keep doing what they're best at and I can enjoy discussion and news in a community that understands responsibility.

It might slowly educate people and whilst it's a shame to have to pay for a respecting community, the systems required to maintain it and the content it would provide are not free.

I quite like having my real name as my account name. Maybe I'll look back and regret what I've said, but I'd like to think I won't.

</comment><comment><AUTHOR> Why is it so difficult to build a community on the web where people stay reasonable in their comment ?

<comment><USER4> Maybe people aren't reasonable.

<comment><AUTHOR> It's probable, but in real life people, most of them at least, stay reasonable. Why is it so different on the Internet? Is it only because of the social rules that we are gentle IRL?

<comment><USER4> Maybe it's because it's not face to face. Think of how awful people are in traffic, and many of those same people would never say or act that way in a movie line or a meeting.</comment></comment></comment></comment>


Macro Perspective: Is This America's Great Decline?  - <AUTHOR> http://www.bubblegeneration.com/2010/11/macro-perspective-is-america-in-great.html

<comment><USER2> It's refreshing to see some left-wing economic nonsense on HN instead of the right-wing economic nonsense that usually makes the front page (where's the hyper-inflation you promised me? oh, you meant _next_ year. of course. of course.)

Anyway, arguments aside (I'm not convinced he truly understands comparative advantage), isn't the relative decline of America something we want? I can't be the only one who wants to live in a world where wealth is distributed more equally among nations.

55 million people in China make less than $125 a year (the official "low income" line). How about we let them get to $125 a month before we start worrying about the rise of China and the decline of America?

I'm assuming he means relative decline and not absolute decline. To posit absolute decline would be just bonkers.

<comment><USER3> Out of interest, why do you interpret it as "left-wing" - is anything that is critical of the current state of the US economy automatically "left-wing"?

<comment><USER2> As a rule of thumb I'd say that pretty much any essay that contains the word "structure" is written by a leftist, no matter what the subject. Macroeconomics as a concept is basically leftist, as is focus on/awareness of society, social issues, systems based thinking, promotion of rationality or rational order, and suspicion of trade and natural order.

Most of the right-wing crank economics that gets written (and sadly shows up on the HN front page) consists of direct attacks on macro policy and/or fiat currency (i.e. social money, not "hard" money). Rule of thumb: if you're reading a sky-is-falling essay and it contains the words "fed", "federal reserve", "gold", or "inflation" the author is a right-wing nutjob. Macro/social thinking and policy is either dangerous or immoral. Or useless and ineffective. Because, you know, "there's no such thing as society."

<comment><USER3> "there's no such thing as society."

I'd forgotten that Thatcher quote. However, when you see it in context it really doesn't look _that_ bad:

<http://briandeer.com/social/thatcher-society.htm>

</comment></comment></comment></comment><comment><USER4> I'm living in an era where the US dominance is at its highest. May be I'm alone.

Let's look around. My computer, my phone, websites and services I use, the cars (we used to buy French ones, now as Ford and other alternatives are available, we and the whole Tunisian population are somehow diversifying)....

Everything you can think of, from food to Energy or wars, if you make a deeper look and analysis, you'll notice a dependency to Europe, but more increasingly to the USA in that last decade.

China? They produce huge amounts of goods. Think of the $99 Android Tablet quality. They are quite popular, yes, but I don't think they match the Americans in term of profitability.

I really wonder how is this America big decline? They have better education, stronger army, more resources and lot of smart people.

<comment><USER5> >> I really wonder how is this America big decline? They have better education, stronger army, more resources and lot of smart people.

Your argument along with your evidence is the state of things as they are today; decline is the trend (the derivative if you may). Just because we're at our peak, doesn't mean we're still growing.

<comment> m-photonic >Just because we're at our peak, doesn't mean we're still growing.

In fact it would mean we're NOT still growing. The "peak," strictly speaking, would be the point where a function ceases increasing and begins to decrease.

</comment></comment></comment><comment><USER6> This is all topical economics. Example:

 _The result is a heavy dose of heavily concentrated industries--and while that's good for beancounters, it's terrible for innovation, basic quality standards, customer service, and, of course, investors._

Wait. So large companies like Apple, GE, GM, Google, and Boeing aren't developing new and exciting technology? Also, if something is good for "beancounters" (like, say, an increase in the company's book value or cash flow), well, isn't that good for investors too?

More: he reads the NY Times, sees that Chinese IPOs > US IPOs, and concludes America is broken? China's GDP is growing 3-4 times as fast as ours, so 3-4 times as many IPOs seems about right. He also misunderstands how savings flow through our economy. We don't need to "shift savings into investments." The moment banks receive consumer savings, they're lent out to small businesses so they can purchase equipment. That's investment.

He also trots out the "oh woe is our net trade situation" without mentioning that any trade rebalancing will decrease China's GDP by billions. So there's that.

He's complicating our economic problems. The bottom line: we were overleveraged as a country. Now our economy is (drastically) adjusting. We'll be fine.

</comment><comment><USER7> It didn't take too long before it was time to stop reading this article. After two paragraphs of this kind of stuff its easy to fill in the blanks.

America will do fine in the future. It is easy to lose site of this when looking at things on the surface such as imports vs. exports in the US and emerging markets vs the stale US economy.

America has the best univerities in the world, and the largest amount of highly educated workforce and entrepreneurs. This IS earning power for the 21st century. With declining traditional labor forces, markets in the future will be based more around innovation and knowledge management. The US will be well positioned for this in the future even with all it's current troubles.

With the recent saving of our financial systems with the bailouts, the US government done the nation great service by ensuring the low cost of capital in the future. This is another reason America's future looks very bright.

We are also very well positioned geographically to optimize trade by sea and land to the US.

<comment><USER8> The people I worry about in the U.S. are the ones who will not be equipped to be entrepreneurs, innovators, or knowledge management types. Only about 30% of Americans earn a college degree. We university types tend to forget they exist, just as most of us forget that the Earth is 70% ocean. They are just off our cognitive rader screens, not part of our universe.

I'm wondering if those of us who dream about creating companies and changing the world can start to envision a future that provides opportunities for a broad swath of working class Americans.

<comment><USER9> Why should we? Honestly they live better than the bottom 70% has ever done, they have access to fresh fruit and healthy meat even in the middle of winter, they have heated houses, indoor bathrooms with flushing toilets, roofs that doesn't leak and better medical-care than in any other period in history.

There may be bigger differences between the classes than there were 40 year ago, but thats a strawman - progress is measured in whether or not you advance, and doesn't depend on whether or not your neighbor advances more.

<comment><USER10> I agree with the truth that this comment expresses, but I hope for different things.

I really mean to blog on this subject, in fact, as it's one that inspires me.

Due to a curious combination of circumstances, I work 3 months each year in a factory (likely representing the bottom 10% of the labor pool), and the system that we have works way worse than it could for all parties involved. I'm very interested in thinking about where it could go with the proper application of technology.

</comment></comment></comment></comment><comment><USER11> The funny thing is China isn't an imperialist country. They're primarily concerned with their internal affairs and with the rest of the world insofar as they need their raw materials and advanced technology. They're not very interested in leading and controlling the world like the west seems to be so obssessed with.

<comment><USER12> First of all, you seem to be ignoring China's wars with India and Vietnam, the Chinese attempt to overthrow the government of Malaysia, territorial claims to Taiwan (and a dozen smaller chunks of land), their continuing support of North Korea, as well as their explicit program of population dilution going on in Tibet and Xinjiang.

Anyhow, imperial ambitions grow with capacity. For now, China asserts itself in its "backyard" (and Africa -- check out the Forum on China–Africa Cooperation). Chinese reach will almost certainly extend if their military competition dwindles.

<comment><USER2> _As an aside on Mugabe, he makes one of those observations that are so precisely to the point that you wonder why so few other commentators ever get round to coming to it. "Darfur, Zimbabwe, Burma, North Korea, anywhere that the concept of human rights doesn't exist, it's always the Chinese at backstop. And always for reasons that you could write down in three words: blood for oil."_

\-- [http://www.guardian.co.uk/books/2010/nov/14/christopher- hitc...](http://www.guardian.co.uk/books/2010/nov/14/christopher-hitchens- cancer-interview)

It would be tragic if China were to actually become the dominant power in the world. But that's a long long way from where we are now. And I personally can't see any path from here to there.

</comment></comment></comment><comment><USER13> > The MegaJobs are more like lottery tickets, than prizes in a meritocracy > (think landing a spot at a top law firm, or investment bank--it's more about > who you know and where you studied, than what you can do).

I could not disagree more. All people I know with what the author calls MegaJobs have them because they considerably smarter and are prepared to work harder than most. These are the guys that worked 16 hours a day at university and are now doing the same the at their jobs. To suggest that it was due to connections is frankly naive. Connections can definitely help you get in, but they are never a substitute for above qualities.

</comment><comment><USER5> Someone needs to write an article that says "America will be okay." There are a lot of things we're doing wrong, but at the same time, a lot of things we're doing right. We want to make sure we stop the bad things from getting too bad, and the good things from turning bad. And sometimes (oftentimes), we're completely wrong about what was good or bad for us in the first place but things have been working out for hundreds of years anyway. So as long as we keep trying our hardest to do what's right, things will probably be okay.

But then of course everyone would just nod their heads and we wouldn't have all this interesting discussion.

</comment><comment><USER14> Yes, just like England lost the power to America, and Spain lost the power to England, so will US lose the power to China. Precisely because of the reasons author listed.

<comment><USER15> I don't think that's a given. China is _big_ , but that doesnt necessarily equate to power. Besides that, who says America's decline has to come right now? It's easy to be all doom and gloom in economic times like these, but the grass isn't greener on the other side. Other countries are in this as deep if not deeper than we are.

<comment><USER14> An aging US population, massive growing debt, shrinking dollar and shrinking manufacturing says America's decline is now.

<comment><USER15> China's population is aging much faster than ours due to their one child policy. Our debt isn't really a whole lot worse than it was after World War II, and that preceded pretty good growth for us. Lastly, the effect of the value of the dollar going down and manufacturing jobs going elsewhere is of debatable importance.

<comment><USER16> Yes but after World War II we had thousands of working age men return home to start careers and family. Also the pre-WWII centers of finance, industry, and everything important had been bombed to smithereens, so a lot of that moved to America. None of these affects are applicable today.

<comment><USER15> You're right. All of those things are already here. We're even better off than we were then.</comment></comment></comment></comment></comment></comment>


A lightweight paste service with a Snap Feature (like Snapchat) - <AUTHOR> https://github.com/KennyShields/LightPaste

<comment><USER2> Quick feedback: Nice, lightweight! The theme selector deletes the text input. The Submit button works in FF but not in IE11. Please explain then "snap" setting.

Sample paste: [http://lightpaste.com/paste/dA1gg8lB](http://lightpaste.com/paste/dA1gg8lB) (first it worked, now I get a 404)

<comment><USER3> A paste with snap=Yes can be viewed twice before it is deleted. It is viewed once when it is created and twice when it is viewed by the other person.

<comment><USER2> Okay, then it worked correctly. But the "404" would be a bit confusing for normal users.</comment></comment></comment>


Ask HN: Any tips on project/software task estimation? - <AUTHOR> This has been an issue and I would like to know what other people/teams have done to solve this. <comment><USER2> I suspect that you, like most others, are asking for quick ways to be able to estimate times and schedules accurately _without doing any work._

That won't happen.

Here are a few previous discussions:

[https://hn.algolia.com/?query=software%20estimation&sort=byD...](https://hn.algolia.com/?query=software%20estimation&sort=byDate&dateRange=all&type=story&storyText=true&prefix&page=0)

If you're serious, start by reading some of those articles, especially the ones that HN contributors have said are valuable, useful, accurate, or otherwise "good."

Then summarise what you've done, and come back to let us know. People here will then add their experience and expertise.

Don't expect a quick fix - there isn't one. Accurate estimation can be done, but it's hard work.</comment>


Making Postgres Bloom - usman-m http://www.pipelinedb.com/blog/making-postgres-bloom <comment><AUTHOR> The example doesn't quite make sense:

      SELECT user_id IN (SELECT DISTINCT user_id FROM user_actions);

is not valid SQL. You may mean something like:

      SELECT 123 IN (SELECT DISTINCT user_id FROM user_actions);

which is a strange query, as it's equivalent to:

      SELECT 123 IN (SELECT user_id FROM user_actions);

<comment> usman-m Oops, it was meant to be:

      SELECT <user_id> FROM (SELECT DISTINCT user_id FROM user_actions);

You're absolutely right that both those queries will give the same result. I guess I was trying to motivate the basic problem of finding whether some user exists in a _set_ of users, and `SELECT DISTINCT` is the SQL way of representing a set.

Fixed the post, thanks!

<comment><AUTHOR> I'd put more effort into setting up a believable problem in these kind of posts, before presenting a solution. Much like in a company pitch, it's hard to understand the value of product if you don't understand what problem it is trying to solve.

It doesn't help that using unnecessary DISTINCTs is subqueries is a common performance problem in novice SQL. Why people do that I don't really understand, but they do.

That's the thing about probabilistic data structures - I've never seen a real- world performance problem in SQL where they would have been helpful. I really would like to have an "aha" moment where somebody shows me one.

Probabilistic data structures do seem like a natural match for streaming databases, but that's different.

</comment></comment></comment><comment><USER2> When you say adding more online algorithms, is that mostly going to be limited to adding more probabilistic data structures?

<comment> usman-m Mostly that. I've also been thinking about how we could incorporate some machine learning algorithms, like online perceptrons.

</comment></comment><comment><USER3> Don't get me wrong, I love Postgres and use it in pretty much all of my projects... but for this kind of application it's not very well suited. Leave your relational data for the database and use something more efficient!

Redis comes with both bitfields (see [http://redis.io/commands/bitcount](http://redis.io/commands/bitcount)) and hyperloglog counters (see [http://redis.io/commands/pfcount](http://redis.io/commands/pfcount)), requires almost no setup and has very minimal overhead.

<comment><USER4> Classic premature optimization.

"Just add another database!"

<comment><USER5> From the article:

> Some of you, who have ventured deep into the bowels of databases, will > probably point out that doing something like this in a real setup is > committing concurrency suicide. All updates to the same row will essentially > be executed serially which is no bueno if you're trying to build a > performant data pipeline.

</comment></comment></comment><comment><USER6> Semi-related in the land of Postgres and probabilistic data structures -- Redshift supports APPROXIMATE COUNT. Much, much faster than a raw COUNT, and their stated error is +-2%

[http://docs.aws.amazon.com/redshift/latest/dg/r_COUNT.html](http://docs.aws.amazon.com/redshift/latest/dg/r_COUNT.html)

<comment><USER7> I'd eat my hat if it didn't use a Bloom filter in some way.

<comment> usman-m It probably uses a HyperLogLog--the 2% error rate kind of gives it away. Bloom filters approximate set membership queries, HyperLogLogs approximate set cardinality queries. COUNT DISTINCT is a set cardinality query.

We actually support a HyperLogLog backed COUNT DISTINCT aggregate too: [http://docs.pipelinedb.com/aggregates.html#general- aggregate...](http://docs.pipelinedb.com/aggregates.html#general-aggregates)

<comment><USER7> Consider my metaphorical hat eaten. Thanks for the cool tools! I'm currently working with Postgres and this looks like a great thing to add to the mix.

<comment><USER8> There's a postgres extension that implements hll for postgres. Rather useful: [https://github.com/aggregateknowledge/postgresql- hll](https://github.com/aggregateknowledge/postgresql-hll)

</comment></comment></comment></comment></comment><comment><USER9> Internally using hashtext(), which is not a good idea for a bloom filter for a few reasons, one of which is [http://www.postgresql.org/message- id/CABUevExTx2whgSpKaoMVow...](http://www.postgresql.org/message- email@example.com)

<comment> usman-m Our native implementations of all probabilistic data structures use MurmurHash3, so this isn't a problem. The dumbloom implementation is in no way a _good_ Bloom filter, as the name suggests :)

</comment></comment><comment><USER10> The idea of using probabilistic data structures instead of counting every point of data (for things like customer analytics) is pretty significant -- getting caught in the weeds of managing every data point is error-prone and inefficient.

</comment><comment><USER11> usman-m, the approach of PipelineDB seems really interesting. However, I'd like to understand how in your opinion it compares with processing the stream of data changes accessed over PostgreSQL's logical decoding ([http://www.postgresql.org/docs/9.4/static/logicaldecoding.ht...](http://www.postgresql.org/docs/9.4/static/logicaldecoding.html)) interface. Thank you

<comment> usman-m ahachete, I'm not sure if I totally understand your question.

Continuous views are consumers for streams. You can think of them as high throughput real-time materialized views. The source of data for the stream can be practically anything. Logical decoding on the other hand is a producer of streaming data--it's basically a human readable replication log. So you could potentially stream the logically decoded log into PipelineDB and build some continuous views in front of it.

<comment><USER11> I was thinking of a system where data is extracted from the source database and then the (changes) data are processed real-time by a software that consumes this stream. So other than the obvious differences (need to write the software, SQL support) what would be the real advantage of using PipelineDB over a system with PostgreSQL+logical decoding+stream processing of that data?

Thanks!</comment></comment></comment>


Greenpeace Co-Founder Declares Himself a Climate Change Skeptic - <AUTHOR> http://science.slashdot.org/story/15/03/21/2132254/greenpeace-co-founder-declares-himself-a-climate-change-skeptic

<comment><USER2> This isn't new, or perhaps I should say, it isn't surprising. He's being saying such things for at least a decade. See [http://www.theguardian.com/politics/2007/feb/16/1](http://www.theguardian.com/politics/2007/feb/16/1) :

> Yesterday's Independent devoted half a page to an article entitled Nuclear > Energy? Yes Please, by Canadian Dr Patrick Moore, billed as "a former leader > of Greenpeace, and chair of Greenspirit Strategies". And therefore, > presumably, a man well placed to question British environmentalists' > misguided suspicions about nuclear power. Might it have helped the paper's > readers to understand his stance had they known that his last involvement > with Greenpeace was 21 years ago; that he currently heads something called > the Clean & Safe Energy Coalition, which is reportedly wholly funded by the > US Nuclear Energy Institute; that he wrote last year to the Royal Society > arguing there was "no scientific proof" that mankind was causing global > warming; and that he is on record advocating the felling of tropical > rainforests and the planting of genetically engineered crops? Guess we'll > never know.

</comment><comment><USER3> Does it really matter if humans are the main cause or not? If it is happening, it is bad for humans and we have to figure out some way to stop it. That's all that truly matters.

<comment><USER4> Global warming has become a religion so it's difficult talk about.

He also makes the point he's a sceptic on

"and that it will be catastrophic in the near future"

And even though I, also a sceptic, agree with him, it's not for the reasons he gives which I find a little crazy. (Plus I'm happy to say it's caused by humans)

So no, I and he wouldn't agree with the statement

> We have to figure out some way to stop it.

(Yet)

<comment><USER5> I am a bit confused how you could say that you are both a sceptic and "happy to say it's caused by humans". Or are you saying you're a sceptic about the catastrophic potential?</comment></comment></comment>


Libnop: C++ Native Object Protocols - <AUTHOR> https://github.com/google/libnop <comment><USER2> These things (Protobufs, Flatbuffers, Cereal, Cap'n Proto, Bond, Apache Avro, Thrift, MessagePack etc etc) are now a dime a dozen. In fact, even if you want a C++-only solution like this, you're still spoiled for choice (any of Boost.Hana, Boost.Fusion, Cereal, or Boost.Serialization for reflection + a little code for binding to your choice of codec). Hopefully one day we'll get standardized compile-time reflection as a language feature.

Imho, code generators and schema files are a feature. If you don't care about forward or backward compatibility, or portability to other languages, then just avoid pointers and memcpy your structs to disk. There are even libraries like Boost.Interprocess that will help you do just that... even with complex multi-indexed data structures like hash tables and maps inside mmap()'d blocks.

That all said, these days I use Flatbuffers, because it's super efficient, header-only, round-trips to JSON, the code gen is tolerable, and it doesn't lead to executable size bloat.

<comment><USER3> Code generators and schema files are not a _good_ feature, IMO. One shouldn't have to duplicate everything in yet another "neutral" language and then maintain two copies of definitions.

The header-only libraries are good. Less dependency is good. No need for build system is good. Many of the existing solutions you mentioned have tons of dependencies. When code needs to be built reliably on 3 different OS and interfaced with arcane twisted build systems, dependencies become nightmare. Boost is great overall but I rather avoid this monster if I can.

<comment><USER4> You're using them wrong if you duplicate everything and maintain two copies. You should have one copy of the objects in the "neutral" language (protobuf or whatever) and compile the language-specific files out of that - but you don't maintain those any more than you maintain any other build output.

</comment></comment></comment><comment><USER5> In general this looks great!

I assume the reason why many functions take non-const pointers as arguments (rather than non-const references) is because it follows the google style guide? [https://google.github.io/styleguide/cppguide.html#Reference_...](https://google.github.io/styleguide/cppguide.html#Reference_Arguments)

Cheeky question: have you Googlers thought about revising this guideline? It seemed weird to me when I read it years ago and it seems to be getting more and more unconventional. When I see a pointer argument in most C++ code now I would assume that passing a null ptr is not an error, but I see quite a lot of the code in this library doesn't check for null pointers inside the function body and would explode if you passed one in.

This doesn't mean I don't sympathize with the justification in the style guide: "References can be confusing, as they have value syntax but pointer semantics". If C++ had a non-null, non-reassignable pointer it might do a lot of what references do and be clearer, particularly for generic code. I don't really know, but references are what we have, they suit indicating the expectation of non-nullity, and it seems to me that the benefit of clearly communicating that expectation gets you more of a benefit than the confusion around semantics takes away.

<comment><USER6> This argument comes up a lot within Google. The style guide is revisited frequently (for example =delete in the public section is now the standard for disabling copy and/or move/assignment vs. the old macros in the private section).

Non-nullable types are helpful for implying pre-conditions. However, readability at the call site (e.g. Foo(&bar) might mutate bar, whereas Foo(bar) should not) is still considered more valuable in a large scale codebase. Passing nullptr as a pointer argument is generally assumed to _not_ be okay unless explicitly documented as permitted -- this is opposite the assumption that you stated.

There are places exceptions are made, where the use of pointers is deemed more confusing than non-const references (e.g. move-maybe semantics in very specific cases). Ultimately, most code follows the default style guide.

Besides, nullptr dereferences are pretty easy to diagnose in a library like this. And more often than not everywhere else too.

<comment><USER7> > However, readability at the call site (e.g. Foo(&bar) might mutate bar, > whereas Foo(bar) should not) is still considered more valuable in a large > scale codebase

but does it make it any more readable ? if you use the pointer anywhere else and have it as a variable then suddenly you don't distinguish anymore between a pointer and a reference. It would frankly make more sense to have empty `#define in` and `#define out` macros and make a small clang plug-in that checks correct usage in your codebase - e.g.

        int foo(int x, const foobar& my_foobar, boo& my_boo);
        foo(x, in fb, out b); // ok
        foo(x, out fb, out b); // compile error

<comment><USER6> In most cases the context provides enough information:

      void Baz(Bar*);
      void Baz(const Bar&);

      void Foo(Bar* mutable_bar) {
        Baz(*mutable_bar); // Not mutated.
      }

      void Foo(Bar* mutable_bar) {
        Baz(mutable_bar); // Possibly mutated.
      }

      void Foo(const Bar& bar) {
        Baz(bar); // Not mutated.
      }

      void Foo(const Bar& bar) {
        Baz(&bar); // Compiler error.
      }

The rule doesn't perfectly eliminate ambiguity, but it does a pretty good job overall. The point is to address the general use cases with familiar constructs that work across multiple toolchains.

</comment></comment></comment></comment><comment><USER6> Primary author and maintainer here! Happy to answer any questions anyone has.

<comment><AUTHOR> I'm considering using the library for an embedded project that communicates with a Linux host and I have some questions.

\- Does serialization/de-serialization require dynamic memory allocation? From what I've seen it looks like it doesn't.

\- How are you handling endianness? floating point numbers?

\- How complete/tested is the library? Are you aware of projects using it?

<comment><USER6> Thanks for considering using libnop!

This library works well in an embedded context. I've personally used it on Cortex-M class micro controller firmware.

The serializer/deserializer does not require dynamic memory allocation. Whether or not dynamic allocation happens depends on how you use the library. If you avoid using data types that perform dynamic allocation (e.g. std::vector) and use (or write) Reader/Writer types that use static memory (e.g. nop::BufferReader/nop::BufferWriter) then you should be fine.

There are some nice tricks you can use to permit protocols that have convenient dynamic containers on the host and static versions on the embedded device:

[https://github.com/google/libnop/blob/master/docs/getting- st...](https://github.com/google/libnop/blob/master/docs/getting- started.md#logical-buffers) [https://github.com/google/libnop/blob/master/docs/getting- st...](https://github.com/google/libnop/blob/master/docs/getting- started.md#fungibility) [https://github.com/google/libnop/blob/master/examples/shared...](https://github.com/google/libnop/blob/master/examples/shared.cpp#L59)

Endianness is assumed to be little because the vast majority of hardware is little endian. There are utilities to convert here:

[https://github.com/google/libnop/blob/master/include/nop/uti...](https://github.com/google/libnop/blob/master/include/nop/utility/endian.h)

These are not currently used by the Reader and Writer types included with libnop for efficiency, but are available for you to use in your own Reader and Writer types if you really need it.

Floating point is a much stickier problem due to lack of standardization across hardware. The library does not address this automatically and just packs floating point types in machine order. However, the library provides tools to help address the issue. One approach that works well is to use a fixed point representation for the wire type -- a value wrapper type is convenient for automating this:

[https://github.com/google/libnop/blob/master/docs/getting- st...](https://github.com/google/libnop/blob/master/docs/getting- started.md#user-defined-value-wrappers)

See the Fixed template in the example. This is especially handy if you have a micro controller without floating point support or you want to minimize the size of the payload at the cost of range and/or precision.

The library has a complete suite of tests and 97.9% line coverage according to GCOV, with particular attention to conditional and error paths.

We use the library for a few internal embedded prototypes. I have not tracked its usage outside of Google since its recent release.

Best, C

<comment><USER8> > Endianness is assumed to be little because the vast majority of hardware is > little endian ... libnop for efficiency

Do you have any evidence of this? I would be flabbergasted if a modern compiler couldn't optimize out a no-op endiannes conversion.

<comment><USER6> For the most part the optimization works well. The more subtle issue is that the union trick used by the endian utilities is not compatible with constexpr expressions. There are some interesting use cases for constexpr serialization that fail if the conversions are interposed in the Reader/Writer types. The alternative is to use reinterpret_cast, which is also incompatible with constexpr expressions.

Moreover, endian conversion templates are unusually frustrating in the current C++ standard. I wish there were a better way, but one does not currently exist.

</comment></comment></comment></comment></comment><comment><USER9> How is this better than cereal, which is already mature and very easy.

[https://uscilab.github.io/cereal/](https://uscilab.github.io/cereal/)

<comment><USER10> I'm familiar with capnproto [0], which claims something like zero overhead.

Personally, I just write serialization functions using fwrite/fread/write/read, but I've used projects which depend on it.

[0] [https://capnproto.org/](https://capnproto.org/)

<comment><USER9> I've done that, but it can be very error prone and therefore time consuming.

Instead of relying on serialization of existing data structures I actually try to use more general data structures that already exist in a single span of memory.

Then serialization is just a matter of writing them out from start to finish, or allocating them in a memory mapped file.

</comment></comment></comment><comment><USER11> How does it compare to serde in rust?

</comment><comment><USER12> I had to pause to think of a reason to use a whole library for a "no-op", thinking this might be some left_pad shenanigans infiltrating the c++ world.

</comment><comment><USER13> > _Note: This is not an officially supported Google product at this time._

Why is that? Is it kind of like the other project that was here recently, where it was created at FB but now independently maintained and not a corporate sponsored project (anymore)? Or is it deprecated and no longer recommended?

<comment><USER14> It usually means this is an experimental side project of some Google employee, and not an official part of any Google product strategy. Google likes for its employees' side projects to be released under Google's GitHub org, which you can variously interpret as good (Google wants to promote and support open source experimentation) or evil (Google wants to assert ownership of its employee's side projects) depending on how you feel about Google.

(I used to work at Google and had a lot of side projects. That was before Google moved everything to GitHub, but they liked for me to mark the code as copyright Google but "not an official Google product". I was fine with this arrangement.)

<comment><USER15> _or evil (Google wants to assert ownership of its employee 's side projects)_

I believe these are still worked on company time, in which case it is absolutely normal for Google to claim ownership.

<comment><USER14> Some are, some aren't. Google wanted me to assign copyright even for projects that I worked on entirely at home. There's an additional process you have to go through if you don't want to assign copyright. Personally I didn't care since it's under an unencumbered open source license anyway, so it hardly makes a difference.

(To be clear, I meant the good/evil thing to be tongue-in-cheek...)

<comment><USER15> _for projects that I worked on entirely at home_

That's... disturbing, and all the more reason to keep your work and private life strongly isolated. Suppose outside of work you write scripts for various things and distribute them online to friends and so forth, or blog posts, etc. Your employer should never be able to claim ownership of that.

</comment></comment></comment></comment></comment><comment><USER16> Looks great. The interface and markup macros looks very similar to MessagePack's C++ interface (which is a great and useful library BTW).

<comment><USER6> Thanks! MessagePack is one of the influences.

</comment></comment><comment><USER17> User coreytabaka is providing answers here, but for some reason his comments are marked [dead].

<comment><USER18> Thanks! We've recused them from the spam filter. It's best to email us at email@example.com when this happens so we'll be sure to see it.</comment></comment>


Evolocumab and Clinical Outcomes in Patients with Cardiovascular Disease - <AUTHOR> http://www.nejm.org/doi/full/10.1056/NEJMoa1615664 <comment><AUTHOR> "RESULTS At 48 weeks, the least-squares mean percentage reduction in LDL cholesterol levels with evolocumab, as compared with placebo, was 59% [...]"</comment>


redditAll: Python valentine ("Paul is still giving us hell for not writing it in Lisp") - <AUTHOR> http://reddit.blogspot.com/2008/01/python-valentine-program-for-your-day.html <comment><USER2> I thought the funniest part was the Sleep(86400) call.

</comment><comment><USER3>
      else:
           pass

Why is that there (and a 5-space indent to boot)? Also, there were bugs in that you could go on a date if you had < 0 money, and even if you had money, you could spend more than you had. Finally, what's the point of setting all these variables?

Sure, I'm being cynical, but I just didn't find it that funny, and it's not because I don't know Python.

<comment><USER4> I think someone needs a valentine...

</comment></comment><comment><USER5> Pretty good</comment>


Trends shaping the emerging "superfluid" economy - <AUTHOR> http://globalpublicsquare.blogs.cnn.com/2011/04/29/4-trends-shaping-the-emerging-superfluid-economy/

<comment><USER2> What use does knowing bitcoin was mentioned on CNN do HN except for the repetitive promotion angle? The story doesn't come close to covering any new ground, and if you're truly interested in every press hit about bitcoin it seems like visiting www.bitcoin.org/smf/ would be your best bet.

<comment><AUTHOR> Theres this huge anti-... everything crowd in HN that thinks nothing will ever take off. Its nice to prove them wrong periodically.</comment></comment>


Anonymous Attacks Child Porn Websites and Publish User Names - <AUTHOR> http://www.zdnet.com/blog/violetblue/anonymous-attacks-child-porn-websites-and-publish-user-names/757 <comment><USER2> I find this a bit hypocritical considering Anonymous was born from 4chan, the largest repository of child porn and scum on the net.

<comment><USER3> Nothing worse than hypocrisy.

Except maybe child pornography, I guess.</comment></comment>


Ask HN: Looking for best practices on how to execute at a high level - <AUTHOR> We are a 25 person tech startup in the wellness space and while our culture is amazing; really good execution is an ongoing struggle for us.<p>Can anyone share practical advice or direction about how to be incredible at execution. <comment><USER2> Well, then the culture is not so amazing. Your execution struggles are due to poor strategy. Go read this book:[0].

Feel free to email me (email in profile) if you want to discuss in more detail. But read the first chapter of the book first.

[0] [https://medium.com/wardleymaps/on-being- lost-2ef5f05eb1ec](https://medium.com/wardleymaps/on-being-lost-2ef5f05eb1ec)

<comment><AUTHOR> Good point! That was a very fascinating read. I've never heard of Wardley Maps before. I really liked this quote:

> Most companies aren't playing chess when it comes to strategy (despite what > you read). At best, most are simply meme copying others or running on gut > feel and highest paid person's opinion.

<comment><USER2> It was an eye opener for me as well. Ive adopted wardley mapping as part of my business and engineering processes. The results have been really good.

I also help people get started with it because is still rather unknown. Reach out and I can help you out. No strings or BS. Just paying forward.

</comment></comment></comment><comment><USER3> I agree with @pryelluw's comments about strategy. Developing a clear strategy that maps to current market conditions, competencies and is defensible is hard. I haven't read Art of War yet, but plan to now.

Regarding advice on successful execution, I recommend hbr.org. It has lots of business advice, how-to's, case studies and even document templates. Although there much of their content is free, some require purchase. A quick search for "successful execution" ([https://hbr.org/search?search_type=&term=successful+executio...](https://hbr.org/search?search_type=&term=successful+execution&loaded=1)) has a few intriguing results:

* [https://hbr.org/2017/11/how-the-most-successful-teams-bridge...](https://hbr.org/2017/11/how-the-most-successful-teams-bridge-the-strategy-execution-gap) * [https://hbr.org/product/crossing-the-chasm-leadership-nudges...](https://hbr.org/product/crossing-the-chasm-leadership-nudges-to-help-transition-from-strategy-formulation-to-strategy-implementation/BH970-PDF-ENG)

Please update us if know if you find other resources that help.

<comment><AUTHOR> I have learned a lot from HBR, but i also find it's skewed, rightfully so, to larger corporations.

I enjoy [https://firstround.com/review/](https://firstround.com/review/) quite a bit. Excellent quality articles.

</comment></comment><comment><USER4> Read or listen to audio book The One True Thing by founder of Keller Williams. The idea is extreme Pareto principle.

Also staying really good at communication and explaining the why to the team helps. If they don't understand the mission, they won't know what to do under stress.</comment>