skysight-inc/HackerNews huggingface dataset:
Ask HN: What's the best way to start with C++?
Hey HN, I've been programming for about 10 years now and I decided that it's finally time. I've always wanted to learn C and C++ but never got around to it.

I've worked in Java, C#, Ruby, Python, JavaScript, the usual suspects on the web. So I'm happy to invest time in learning a language.

My main question is two-fold:
* what are the best resources (books, tutorials) out there?
* if you are currently working in C++, what do I absolutely have to know that might not be obvious?

Thanks so much!
> While its not the full thing, its the exact thing developers want.

Ha. maybe it's what dotNET developers want.
Thanks for clarification. I thought the capture list was required for this. I suppose the capture list is for capturing variables that are local to the scope of the lambda's definition.
Well you have the mainframes model that used kernel JITs for all their official languages, like the OS/400 nowadays IBM i.

On IBM i the language surface is RPG, Cobol, C, C++ and Java.

On other ones you could eventually consider the micro-coded CPUs as a kind of cross language VMs.
You can also look up the assessed value of any building in NYC. If you doubt the numbers, go and look: http://webapps.nyc.gov:8084/CICS/fin1/find001i
Just the opposite -- they cost more in absolute terms, but dense urban infra costs less per person or per square mile and should only weakly increase with the property values (due to the labor costs increasing slightly with costs of living).

Imagine:

- The cost of running a pipe to 200 families in one building vs to 200 detached homes

- The cost of hauling away 200 people's trash from one building vs to each of 200 buildings.

- Having a dedicated full time road repair crew vs hiring out a contractor sporadically.

- Dispatching enough patrol officers to have line-of-sight to every outside public place in a 200-home person neighborhood, vs the block outside the 200-person building.

And so on. That's why legit environmentalists (like the national Sierra Club) strongly favor urban over suburban growth.
The option of USB ports on the trains is likely such a small percentage of the overall cost, but it likely gets enough people thinking "The MTA is thinking about things that matter to me."
At the very bottom of every Hacker News page, there is a contact link: hn@ycombinator.com
Scala inspired gem that brings Trys to Ruby aiming for an idiomatic API
I don't think the average person should be giving well more than 50% of their paycheck to Uncle Sam. Which a typical worker in Manhattan easily can be. (rental property tax + federal income + state income + city income + sales tax easily tops 50% for someone making median NYC income).

It's not actually criminal, obviously. But it should be. Local politicians stealing from their constituents.
I'm in a very similar position to the poster, perhaps even at the same company >.>

In very large organizations, a lot of things just suck. My cube-mate told me "csours, we have some problems around here" and I just laughed for 5 minutes. Yes we have some problems around here. I can think of 10 major things we are doing wrong at any one time...

But yea, you can just coast for a very long time in the enterprise; it doesn't make you feel good though.
You don't need to for most open-source software. You are free to take any GPLv2 software, modify it and host it on your own servers and charge a usage fee, all without publicly releasing your changes - it's an unforeseen catch in certain open-source licenses that only requires source release if the customer can get their hands on the binaries - if it's accessed through a browser or over the network then they lose that privilege.
My rental agreement (in a 4-storey apartment building) in SF forbids me from subletting (without consent), or from having overnight guests for more than N days a year. Are most other rental agreements more lax or do many Airbnb hosts operate in violation of their contracts?
> In all honesty, I find that when people working full-time jobs look for side projects, either their not happy with the job they have or their job underpays them.

Or they just don't get fulfilled spending all day making someone else rich?
I don't really get why the range is this low. I can see flashes of light from a signal mirror from a place more than 10km away (and there were signal mirror links of ~100km in very good weather). In these systems, the noise should be way lower (there are many sources of relatively-low-frequency visual noise that I know of and I know of none that would generate at least hundreds of MHz frequency noise) and attenuation should be similar. Signal mirrors are eyesafe, so similar signal levels should be possible.

What am I wrong about or missing?
IMHO This should be more highly rated. It seems that we write code to understand the problem domain, and only by writing code do we truly understand the problem. This is - again IMHO - why iterative techniques work so much better than waterfall-style techniques.
I agree with your entire comment. However, I also agree the point the op authors make about tooling being reimplemented time and time again, taking years to get anywhere near the point represented by the 1st 9-point wishlist. What the programming field could do, which would be awesome, would be to implement language category backends that follow your "mostly like" categorization. These backends would be engineered to satisfy the wish lists, but be tailored to certain specific domains. (System programming, hard real-time, soft-real-time, high level dynamic programming...) From what I can see, we're a good part of the way there already. (Graal and Truffle, LLVM, GUILE)

"Little languages" can have significant advantages over APIs in terms of flexibility, optimization, and conceptual fit with specific domains. Why not create infrastructure to not only de-duplicate work creating tooling for languages while ensuring everyone always had 1st-class tooling and making "little languages" as easy to create as APIs?
Hypermedia APIs
I saw the response that they wouldn't be a guarantee that foreign citizens currently living in the UK could stay there.

Though I was happy that the reason was that EU countries would have to guarantee the same for British citizens living in other EU countries. It actually seemed fairly sensible when that reason was given.
Imo they are ideologically strengthened for historical reasons. You can't grab pieces of the world for two centuries and subvert democratically elected governments with military dictatorships that are favorable to you and then once a strong contender appears tell them its the 21st century now and not how things are done anymore. They aren't stupid and they know that might makes right.

China is on an upswing trajectory and their people know it from increases in real income for vast majority of the population. It was the strongest country in the world for centuries, and they'll regain that title again, eventually.

Russia lost too much brainpower in the past 25 years. Too many Russians and Russian Jews emigrated to US to use their PhDs to make money on Wall St. They're not coming back, and it will take another 25 years to grow a new generation of minds to lead Russia. Yes, Chinese students go to foreign universities but in general China doesn't have a brain drain problem, and thats why they'll win.
That might be true if they weren't distortionary. But because they are dramatically different for renters and owners they distort behavior and so would be expected to affect rental prices.
Could you re-implement a language such as C as a macro?

You can do that pretty quickly in IO language (admittedly, that's not Java)
Author here. There is indeed a supply and demand equation here, because demand is not constant. Market forces would drop rents if taxes dropped.
Could you recommend a good book about design and construction aspect of NMR, like design of coils, magnets? Thanks!
Black Lives Matter Accuse Pokemon Go of Inherent Racism
I'm no international law lawyer, and didn't really look too much into the details of the "ruling", which I think, as any law, would be pointless unless there's enforcement (by whom?). It just baffles me that an article about the "history" of something didn't mention one of the first questions regarding the history of anything: where does it come from? It's not that hard to look up, it's right there in the first sentence on wikipedia....
That's the theory. I'm not sure a look at per capita cost in city budgets supports the claim.

But cities also provide an multiplier to GDP per capita. Which makes it a tricky equation to balance.
I'm quite surprised that you only average 80k uniques/month. With how much I see this tool being recommended throughout the SEO community, I thought it would've been a lot more.

Have other similar tools cut into your traffic?
Instead of AC, I always thought it would be fun to use the heat to do something productive (like make electricity), even if not effect, it could consume the heat?
It's easy enough to make the machines open source. And anyway, I can't imagine there is any incentive for there to be some kind of mass conspiracy involved here.
And make sure you have clearly and favorably defined in your terms, in the contract, what "publish", and "in print" mean, so there's no wiggling out of the obligation by the publisher to return the book rights to you. That, and only license the right to the publisher. You hold the ownership of the copyright.
> It's a great tool if you work in the JVM ecosystem and want to play around as a language designer.

Except that it's not really exposing much of the JVM from what the article mentions, it just uses the JVM as a base. That is, Truffle languages can talk to other truffle languages, but I'm not sure how easy it is for a truffle language to talk to a JVM language.

From everything I read, it seems like people thought Parrot was a good idea so decided to rewrite/reimagine it using the JVM instead of C as a base.
The key is selling it.
The best way to understand REST is by example. First check out the blog post by Roy Fielding mentioned in this thread which summarizes the constraints [1]. Then let's examine how several popular restful services work versus those constraints.

Here are some popular well-known services to use as examples: Google.com Amazon.com Facebook.com News.ycombinator.com.

- You enter these services through the site root with no prior knowledge about the services aside from standard media types (HTML/CSS/JS)

- Hypermedia is the engine of application state – meaning that you load a webpage a.k.a. resource that contains hypermedia links to other resources, and you navigate between states in the application by following those hypermedia links. For example, the hacker news homepage contains links to news articles and comment threads about them, which contains links to reply to those comments, and so on.

- The application describes how to compose requests using standard media types such as web forms and JavaScript. Because the pages instruct the client about what requests to compose and to which URL, the services have control over their own name spaces which have no fixed resource names or hierarchy.

I consider REST to be most easily understood as a departure to application protocol design prior to the Web, where each application and service had a unique and custom binary protocol, and a client for these services had to be reprogrammed to interact with it. REST is a set of constraints for designing services that run at Internet scale and that highly decouples clients and servers. Fielding's thesis on REST has more detail on the principles by which the REST architectural style was derived.

[1] http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hyperte...
I have edited my comment per your advice. The intent was to clarify that the property in question does not have any abatements in place.
I wonder what their detector's dark count rate and activation threshold is. If both are low enough, this is precisely the sort of detector people doing free space quantum crypto need.
Especially if you want to talk about ruby as a language with a simple parse tree.
This doesn't seem right to me. I own an apartment in a six story co-op in NYC and pay < 1% of the market value in property tax every year.

Not sure where the discrepancy comes in though. According to this site, the effective property tax rate in NYC is much lower than listed in the article:
https://smartasset.com/taxes/new-york-property-tax-calculato...

There are also a lot of tax credit programs that the article does not mention:
https://www.tax.ny.gov/pit/property/exemption/index.htm

My property is my primary residence, I don't rent it out, so maybe that explains the discrepancy? But I find it difficult to believe that if there is that much of a difference that landlords are making any profit at all, and I'm quite certain they're not doing it out of the kindness of their hearts :)
F# isn't much like C#, and in fact it does suffer a bit for it, as some of the back end causes compromises in the F# language. Mutable fields in records have secret baggage, functions with arithmetic operators can't be automatically genericized unless you mark them inline, etc
Pagination is one of those things I feel like so many of these things get wrong. LIMIT/OFFSET (or as MS likes to call it, TOP/SEEK) style results in O(n²) operations; an automated tool trying to pull the entirety of a large collection in such a scenario is not good. I have to again recommend the excellent "Pagination done the Right Way" presentation[1] from Use the Index, Luke (an equally excellent site).

Just return a link to the "next page" (make the next page opaque); while this removes the ability to of the client to go to an arbitrary page on its own, in practice, I've never seen that matter, and the generalized URL format allows you to seek instead of by LIMIT/OFFSET by something indexable by the DB; HTTP even includes a standardized header for just this purpose[2].

I also think the generalized URL is more in line with Fielding's definition of REST, in that the response links to another resource. (I don't know if being in the header invalidates this; to me, it does not.)

If you get the metadata out of the data section of your response, and move it to the headers, where it belongs, this usually then lets you keep the "collection" of items you are return as an array (because if you need to put metadata along side it, you need:

{
"the_data_you_really_want": [1, 2, 3],
"metadata, e.g., pagination": {}
}

vs.

["the", "data", "you", "wanted", "in a sensible format"]

)

(I've seen metadata-pushed-into-the-body turn API endpoints that literally need to return no more than "true" or "false" into object that then force a client to know and look up the correct key in an object… sigh.)

[1]: http://use-the-index-luke.com/no-offset

[2]: https://tools.ietf.org/html/rfc5988
Certainly is amazing!

I want to know the secrets to being such a good company and/or manager that you can keep someone earning 1.1m on your staff!
There are other things, yes. My area (Seattle) is more of a "beer && code" scene; the tendencies for meetups are excessive bro (or marketing), not enough hacker, IMO. Ce la vie.

Twitter is a hard medium for long-form thought, and, frankly, when I post thoughts there, they go to /dev/null unless it's a reply to a popular person. So... meh?

I keep ruminating on the idea of working on a "cyberhackerspace", dedicated to the sort of thing Recurse Center channels, but 100% online. Dedicated cluster, domain name, irc channel, forums, etc. But I can't do it alone - I have that pesky Responsibilities monkey on my back.

Ah well. Back to working on some Java.
I'm running a website called Narrow (http://narrow.io) on the side. It's a Twitter marketing automation company that was started not for the love of Twitter but the desire to get the benefits of Twitter without having to do a lot of work. Lazy, I know, but I'm a programmer after all. Let the computer do the work.
We've banned this account for serial trolling. Whether you intend your comments that way or not, HN needs less of this, not more.
searching for "flipkart app only strategy responsible" showed this result http://www.businessinsider.com/flipkart-punil-soni-explains-...

on the first page as the 4rth result for me.
One thing to point out is most solders arrested for taking part in the coup didn't know they were part of a coup. They were drilling responses to wide scale terrorist attacks.

Both the AP's story and RT corroborate that many troops didn't know they were involved in a coup.
This question has come up so often in last few weeks that we gathered some reading and tooling to help pragmatic post-Brexit decision making, here: https://teleport.org/brexit
I didn't see anything that makes it unique to recaptcha. Any fingerprint able traffic pattern that can be observed coming and going will work.

I could make a website that adds random(1, 64) one pixel images to each page. As you browse the site, you'll be broadcasting 6 bits of identifier with every click.
Ifdef Considered Harmful, or Portability Experience with C News
Wow, they REALLY LIKE TO SHOUT THEIR HEADINGS.

Otherwise, what I've read so far looks like a really good start. Say what one will about Microsoft's products, but there are a lot of smart folks there.
Brian Hook wrote about Carmack's productivity here: http://bookofhook.blogspot.ca/2013/03/smart-guy-productivity...

It's an interesting read. Previous HN discussion: https://news.ycombinator.com/item?id=5383650
Care to recommend somewhere better? I'm a US based person, but travel to Berlin fairly often and have interacted with several tech friends there in the local scene. It is a surprisingly vibrant and friendly community. Coworking also seems to be a really big thing there.

So, price aside, it is still cheaper than any major US city (especially with the current USD <--> EUR exchange rate), London, and anything else I personally am aware of.
> are not astronomical if you drive.

driving in the city adds an enormous cost to the city overall. road wear, traffic signals, air and noise pollution, decreased mobility of cabs, trucks, and emergency vehicles due to traffic jams, crashes and bike/pedestrian injuries, etc. I drive as well but it's entirely fair that drivers should have an increased tax burden in dense urban areas.

> It truly begs the question: what are we getting for our taxes?

thankfully you don't need to beg at all, a complete and accurate answer to this question is available to you: http://www1.nyc.gov/site/omb/publications/finplan06-16.page
^ This one trillion times.

Make the general experience better rather than lipstick on a pig.
You cannot. Because Lisp is homoiconic, you don't code in (what I personally believe to be) reasonable syntax, you code in abstract syntax trees. Lisp is so easy to metaprogram because everything is parentheses and the burden is on the user, not the parser, to determine the program's abstract syntactic structure. So, Lisp can only metaprogram its own syntax, you can't introduce a C-like syntax.
I built http://www.whatsmyua.com/ for myself back in college, it reports and breaks down browser's User Agent strings. It now brings in $20-30/month via adsense.

I also built https://github.com/nfriedly/node-unblocker around the same time, it's a web proxy for evading government/corporate/school/etc. filters. When I had a copy of it online, it got a lot of traffic from around the world, and used to earn anywhere from $10 to $100/month from adsense, depending on the month. However, it wasn't worth the effort of keeping it online due to abuse + clueless sysadmins.

Unblocker also earned me a consulting fee a couple of times from folks who wanted help integrating it into their project, and I ended up converting it from a standalone site to an Express middleware to make that easier.
I built my first SaaS app http://sharpplm.com, Quote Management for manufacturing companies. It has been pretty much autopilot and is still making $2k per year.

I am currently working on http://gemssports.com. It is activity, payments, member management for sports companies. Think sports trainers, tournaments, softball teams, etc. We are just getting rolling but having some good success.
unfortunately. I see PLs as mere material

That's only part of their point. It's as if we were in the building industry, and we needed new tooling for each specific material. When I'm at a hackspace, the same chop saw will let me cut wood, delrin rod stock, steel linear rails, and aluminum extrusion. The same drill press and bits will operate just fine on most of the above as well. What we have in the programming world is a situation where I'd need a different toolset for every material I'd listed above.
Funny thing: I've been thinking a bit about API versioning quite a bit lately, and the best solution I've come up with is the ONE thing not at all covered in this: put an `api-version` header into the request. I've seen both of the schemes recommended here, and I like neither very much. So what's wrong with my (header) solution?
Designing Safe Software Systems Part 2 (2009)
> What else is good about Perl

He answers that question in the interview, 'What do you think about Python'.

Short summary: closures (no, python lambdas are not the same), the kind of FP that having real closures allows, a real meta-object model, concurrency without a GIL
I like this a lot! Well done. Some * symbols for eaten by HN though, you can put spaces around them.
> the poorest people in the city live in big apartment buildings

The poorest people live in rent regulated or subsidized housing so this discussion is not relevant to their situation.

> Which doesn't make a whole lot of sense, because the poorest people in the city live in big apartment buildings and many of the wealthiest people in the city live in single family town homes.

My experience is that the wealthy in NY prefer apartment buildings to townhouses.
It's much the same in Smalltalk. Often, one could create a domain-specific superset of Smalltalk, complete with its own control structures.
There is a contact link at the bottom of the page : hn@ycombinator.com
It is thought that the coup was planned for few or several weeks later. They learn that the prosecuter is close to the end. Coup members immediatly come to their work, leaving their holiday or annual leaves. They start to prepare for the coup. At 15:00 or 16:00 central inntelligence learns that something is going on due to a leaker. At 18:00 military meeting and intelligance agree to close the airspace. At 21:00 or 22:00 coup starts beacause they are known. The actual plan was for 3:00 or 4:00 in the morning. And you know the rest, FaceTime, insider (pro-government) military members, starting too early due to a leak etc made it uncessfull coup.

The coup members execute the constitional military idioligy/law of the Turkish military, that is to prevent both ousider and insider enemies. Here insiders are islamic nuts. Take control, establish Ataturk's 6 (iirc) main points; united republic, secularism, Turkish state, etc. Then they leave. Thece principle are almost same as modern western priciples in ethnic countries like Spain or France, but not like Switzerland or UK.

Sadly Turkey is not only geographically between Europe and Middle East but also idiologically. Ataturk was from Europe. AKP supporters are from eastern parts of the country.

http://theataturksocietyofcanada.ca/mka/revolutions/ataturks...
Doesn't RPython do all the same things? Also there are language workbenches (http://www.languageworkbenches.net/) that allow one to get a bunch of things like IDE support and even basic compilers by properly expressing the language syntax and semantics.

I agree there is a lot of interesting stuff going on here but lets not forget the prior art. Even OMeta I think already did a lot of these things way back when. Going further back there's META II (https://en.wikipedia.org/wiki/META_II).

I think building self-specializing interpreters is the main trick. If that becomes easy then a whole bunch of other magic is also possible. But I'm just an amateur so all of this is still very impressive.