Hacker Newsnew | past | comments | ask | show | jobs | submit | something123's commentslogin

Yikes.. I'm going to have to reread this later to grok it better. I think it's nice that the language has added all these new features (though the macros at the end tell me it's not enough..) - but I keep feeling like the direction of the language post-C++11 has been steered by library developers with these more and more difficult to digest features. Features that you don't end up using every day, and so they never really sink in.

There are plenty of simpler things I'd like them to tackle before. Just in the past week of work two examples come to mind (just to illustrate that there are still issues)

- I was trying to get some function calls to inline and had to fight the compiler for half the day to get it to inline them for me (I still don;t understand why it's okay that the compiler ignored the inline keyword. Can't we assume that I as the developer will know what's best if I explicitly put the keyword there?)

- Then the next day I had the opposite problem where a branch was being inlined even though I wanted a if(/rare event/){ jump to some method}. Again the language provides no tools for me to accomplish that

There are tons of issues with the standard library containers and data locality that have been ignored too.

C++ is THE high performance language - can we spend some time on performance and stop pretending that there isn't room for improvement on that front?


So is this a program that makes it easier for people to change jobs after coming to the US on an H1B? Doesn't sounds like they're gaming anything, but it does sound like something that's sorely needed.

As and aside, with all the offtopic comments going one: while the H1B program is definitely flawed I think it's amazing that no one stops to consider the ethics of draining the 3rd world of its talent.

If there are all these amazing talented programmers in India or wherever, then maybe YC should open an office there


The Asus Flip has very similar hardware (same chip) and it runs Arch ARM. http://kmkeen.com/c100p-tweaks/index.html

So almost definitely yes...


I'm gunna defend the otherside here. As a recent post on HN pointed out, when Google Maps happened people were outraged that you could look into their yards. Same thing with Street-View. Zuckerburg just understands that we're moving into a post-privacy world and they're really pushing the envelope here. For example I think people were outraged by Graph Search, but I think if they were to have released it in 2 years it would have been received differently. People were at first creeped out by Google Now and Amazon Echo, but now most people don't mind.

The thing they should worry about is pushing the envelope too far and too fast. I think for-instance WeChat would have totally destroy Facebook if it weren't for its Chinese-gov't tentacles. It has a much saner privacy model where you only see things from your friends ( not to mention it has a much simpler and nicer interface )


All of technology's history has recurring themes of distrust. The first Kodak cameras inspired mobs of angry Luddites who smashed people's cameras, especially if people are taking photos of them.

Would you mind terribly if someone snapped a shot of you on their phone without asking? It's for reasons like these that the Japanese government mandates phones sold there make a shutter click sound whenever a photo is taken.

So yes, we do get used to things, generally, but there will always be activities people find off-putting, or creepy.

However, and this could kill Facebook in enough time, people can go "backwards" as much as they can go what the tech industry considers "forward." It could simply come to be that people, enabled by technology that easily encrypts their communication and obscures their actions, get sick of being watched all the time and prefer social networking sites or means of communication that explicitly do not track their users. Right now the global perception of trust is declining in nearly every major institution, and in the eyes of many who do not live in code, Silicon Valley is just one more group of rich elites who claim to make the world a better place but in practice make it more rushed, monitored, and unpleasant, thanks to lauded businesses that sell people's data right back to them.

I'm reminded of the scene in Fight Club when they loot a liposuction clinic to make soap: "Selling those rich women's fat asses back to them."


Japan requires the shutter snap sound as a way to combat a specific kind of unlawful photograph. Specifically upskirt and peephole surreptitious photographs, not to combat photographs of strangers, etc. It addresses a specific problem in their (and in others) society.

Of course that doesn't stop the harcore ones who build homemade cams into their shoes, or people sabotaging the speaker - but if stops most garden variety ones.


> Right now the global perception of trust is declining in nearly every major institution, and in the eyes of many who do not live in code, Silicon Valley is just one more group of rich elites

I'd argue that people who are not intimately familiar with the tech world see the tech as just a set of products that does things for them, with the additional filter of the mainstream media and their friends/family on top of it.

Most people don't know what kind of data is being gathered about them, and they don't care about the implications of that data. To be fair, it is a difficult thing to conceptualize and quantify. Facebook provides a great service to connect with friends and family. The question is - what's the price?


> The question is - what's the price?

I am familiar with the tech world and I keep asking myself this question too. From what I see now, all the data that Facebook collects can hurt me in two ways: more insidious ads, and when used by a superhuman-level AI to infer pretty much anything about me. The AI doesn't seem on the horizon, and the ads don't seem to be that harmful, they're only annoying. There's of course an angle of a dystopian totalitarian government, but in that case we're all screwed anyway; data collected by Facebook or Google will make little difference.

Then there's an insurance angle, but here I have mixed feelings - it seems to me that it's better for an insurer to know more (I for one would like car insurance companies to have real-time centimeter precision location data about every driver, that could restore some sanity on the roads), but not too much. I don't know where I stand on this yet.

Anyway; the way I see it, this whole data-selling business model works mostly because advertisers are stupid enough (or rather, in so tight a competition) to pay for data that won't give them much edge anyway. In a way, it's not users that are the victims here, it's the advertisers.


The data-selling business model is just one aspect of what could be considered harmful, another aspect is the privacy aspect. For example, potential employers looking through your Facebook posts to see what your personal views and social life are like. It's possible to argue that it's possible to limit access to Facebook content, though there are often changes made to Facebook that make such privacy harder to obtain.

So when working out the price of a service like Facebook, it's important to include the cost of privacy (even if this is effectively impossible to put a numerical value on).


Right. I agree parts of this can be put on the "costs" side of Facebook use.

But this aspect isn't basically the issue of publishing? If you post your Facebook status/photos and mark them publicly visible, you're a publisher. Other people can see it. If, however, you limit it to your friends only, then if your non-friend boss sees them it means someone screwed up - which doesn't seem any different than someone gossiping about you in real life.

Anyway, this aspect is something where I think we need to grow up as a society. Your boss probably did (or still does) the same stupid shit that you do, so him making an issue out of that drunk photo of yours is utterly hypocritical. Looking at some things posted by people with status I'm beginning to believe that Facebook is actually helping here - people are getting used to the concept that they're no different than anyone else wrt. weirdness, and that they can be judged by others just like they themselves judge other people. In the face of this, I hope everyone will finally agree to chill out and stop judging one another entirely :).


> "But this aspect isn't basically the issue of publishing? If you post your Facebook status/photos and mark them publicly visible, you're a publisher."

Sure, that's part of it. However, the issue is that Facebook have tried to increase what constitutes public Facebook content over time.

Here are a couple of links about this:

http://mattmckeon.com/facebook-privacy/

https://www.eff.org/en-gb/deeplinks/2010/04/facebook-timelin...

You also have another group of privacy invasions enabled by the phone apps from Facebook:

https://en-gb.facebook.com/help/210676372433246

http://fortune.com/2015/11/09/facebook-photo-scanning/

I'm sure I could find other privacy issues with Facebook. Can you opt-out of all of this? Probably, but it certainly requires vigilance by its users, especially when new features are rolled out.


What does `post-privacy world` even mean? Who decided that that's where we're going and there's no alternative?


I think the assertion is that Joe Public doesn't really care about his/her privacy anymore provided they consent to it's initial release.

It seems to me that over a billion people are fine giving their privacy over to Twitter/Facebook/Instagram/<insert other company> but not necessarily the Government (of any country).


> "I think the assertion is that Joe Public doesn't really care about his/her privacy anymore provided they consent to it's initial release."

People do care about it, they just don't think about it that often, or only think about people seeing their tamest online behaviour. Here's one recent example of where a privacy policy did capture the public's attention:

http://www.marketwatch.com/story/snapchats-new-scary-privacy...


> People do care about it, they just don't think about it that often, or only think about people seeing their tamest online behaviour.

There's also a big difference between not caring and caring, but feeling powerless to actually do anything about it.

For any of these larger privacy issues, most people are powerless to make significant changes. I can't prevent Google from driving its Street View cars by my house. I can't prevent Facebook from making shadow profiles about me. I can't prevent the NSA from conducting mass surveillance, etc.


I'll reiterate a point I believe to be true.

I don't think it's a case of the public not really caring about their privacy, I think it's a case of them not fully understandind exactly what data is collected on them and how it can be used nefariously by companies and by their government.

We in the tech field tend to have an above average knowledge of these things but Joe Public is very ignorant of it.

I believe if people knew exactly what was being collected and how profiles of their entire lives, their thoughts, their actions and their potential thoughts and actions, they would be a lot less happy about it.

The problem is educating people who probably already have enough shit to think about in their own lives and convincing them that this isn't all conspiracy theory.

It's a monumental task.


What happens when people's contemporary attitude regarding privacy and government is applied to corporations? Silicon Valley is in a perception bubble: people won't likely be happy with privacy invasions forever.


Progress of technology decided. If you hurry up, you may start putting some social/legal fences but understand that privacy is becoming mostly about what one shouldn't do, and not about what one can't do.


It means that someone who wants to make money off your private information has decided that they are entitled to it.


It means a world where privacy is reserved only for the rich and the powerful.


> we're moving into a post-privacy world

We will never live in a post privacy world. I'm so fucking sick of seeing people say garbage like that.


Exactly. It's as if some are just wishing privacy away as an inconvenience getting in the way of tracking us for advertising revenue.

So what does a post privacy world look like? Should we do away with curtains in our bedrooms? Should we remove the doors from public restrooms?


Why is conflating these two issues defending the other side?


To the first point, I think this might be controversial... but try to avoid people you work with directly. It seems like it's better at first glance - b/c you interact with them more - but the reality is there are whole layers of professionalism and competing interests between you and them which actually kinda preclude you from building a system of mutual trust.

Maybe "trust" isn't quite the right word, but I'm struggling to find a better one. The difference between an acquaintance and a friend is that you can implicitly know they will help you and that you will help them. This involves being willing to do thing while expecting nothing in return. In a work setting that usually leads to bitterness

But that's just like my opinion man...


It's pretty situation dependant. Mostly depends on the corporate structure, culture and your positions relative to each other. I've been blessed to work at small companies where most of the people I rub shoulders with aren't in the same professional 'track' as me, so there's no real reason for anyone to use a friendship to jockey for position or something.


This seems right to me in general, although there has been exceptions in my case. I think for better or worse alcohol can be the social catalyst that knocks down those barriers. But yes in general there are competing interests and people have their guards up. I think ex-colleagues can become good friends more easily.


If it's only for education purposes, why C? Wouldn't you want to choose a more "clear" language to get the ideas across?


If my school had decided to teach operating systems using some non-C language because it's "more clear," I can only imagine that my development as a programmer would have been delayed by years.

Sometimes education is about pure theory, and sometimes it's about how people do things out in the world. I think this is a case where the second approach is much more valuable.


Because C is the de-facto standard for writing operating systems.

If you want to write an oh-cool blog piece for general programmer audiences about how OSes work, sure, go ahead and write it in Python (seen that done, and pretty well, in fact).

But if you want to prepare people to be able to work on real operating systems, they need to know how to do it in C.


I think an OS class isn't meant to prepare you for working on the operating system. The vast majority of people that take an OS class aren't going to work on OSs, but they should appreciate how everything works. Using a language optimized for communicating "how everything works" clearly should be a priority!


Yes, and that language is C. C is a very simple language, and it's very clear. If you're writing anything that interfaces directly with the OS, you'll need to know C.


Perhaps because operating systems are still largely written in C and if a student in the class later goes on to work on OS internals not knowing C would be a major handicap.


> Wouldn't you want to choose a more "clear" language

Are you implying that another language would be more clear?

Quite the opposite, C doesn't hide anything from you. When you want to understand what the computer is doing you can tell directly from the C code. Unlike other languages where you need to understand what the language is doing first, and only then can you understand the computer.

There are time where "hiding" the computer is useful, but not here.


> C doesn't hide anything from you.

Yes, it does.

C hides cache, SIMD, registers, the stack (no multiple return values for you!), the details of the heap (malloc() either succeeds or fails, and you can't know what it's going to do until you call it), SMP, instruction-level parallelism, and the details of atomicity, all of which are relevant to OS programming.

C is a nice language. Don't pretend it's how the hardware really works.


...and, particularly crucially if you want to work with numbers, it also hides overflow and floating point exception behaviour. Plenty of processors support trapping arithmetic which signals on overflow and underflow, but this is practically unusable in C.


There's a big difference to hiding and simply not knowing about. If you write a kernel you will need to write architecture-specific primitives (and some non-quite-primitive code, since you bring up SMP) to deal with all the categories you mentioned and some more. Regardless of the language. There is no magic language for writing kernels with a fat runtime to hide the gory details.

C is a nice wrapper around assembly. In a few cases, you wish it were a bit better specified to control the actual assembly/ABI binding a bit better. The problem I see is a lack of contract enforcement which makes introducing hard to diagnose bugs really easy. Maybe Rust will fill the gap.


C is about as "clear" as one can get, other than assembly.

Most other languages hide away implementation details that are critical to writing an operating system--how would you handle, say, interrupts?


In Ada you just annotate a procedure as being an interrupt handler and it Just Works.

In addition, you can annotate a protected object (essentially, a group of shared procedures protected by an implicit mutex) as being interrupt-safe, and then any access to that object will be automatically protected by the appropriate instructions.

Plus, if you're in a Posix environment, you can use the exact same mechanism for interrupt handling. It's all remarkably elegant.

Alas, like everything Ada, the documentation is opaque in the extreme, but:

https://www2.adacore.com/gap-static/GNAT_Book/html/aarm/AA-C...

Note that at the bottom they're defining a parameterised interrupt handler structure and then instantiating it multiple times on multiple IRQs, each of which is in its own isolation domain...


What language did you have in mind? It has to be suitable for writing an OS, so Java, python and what not are out. The project has been around for more than a decade so the language has to have had a stable v1 release more than 10 years ago. Also the original code you are working with is in C so you will need to translate it. C seems like a perfectly reasonable choice.


I think this is part of a larger issue of people making programming their lives. Our profession encourages obsessiveness more than most - and making your work your life is something people seek out! (just look at startup culture)

I find it makes finding professionalism a lot harder. Most companies expect you to be friends with your coworkers/boss/etc. and then leverage that to exploit their workforce.

I like the artist alternative he proposes. With github you can now take ownership of your work/contributions. You can go into an open source project and make a contribution and then never touch that software again - yet your accomplishment is something that's tracked and stays with you


I don't really like the fetishizing of Tuft's style.

If you actually read his books, what he actually does is present a mental model for what to take into account when designing. But his style isn't meant to be the end-all of typesetting or data presentation! The books aren't saying "see, I made this design for the following reasons. Now everyone should emulate me!" It's just one solution in the realm of all good design solutions.

One example I would immediately point to would be ggplot2. A wonderful library in a lot of respects, but the defaults are absolutely horrendous!! The default grey background with white lines was just pulled from one of Tufts's books without a second of thought b/c these grey backgrounds are horrible waste of ink when printing and are actually chart-junk b.c most of the time you have a white background - for-instance in a powerpoint (<- that was a funny b/c Tuft hates powerpoint)

Here too, the cream colored background looks gorgeous on paper and just weird and out of place on a webpage.


It's completely not true that ggplot2 defaults were copied without thought from Tufte.

A pale grey background is not chart junk because it does not distract the eye (and indeed it actually enhances colour). You are using Tufte's terms without really understanding them.


Sorry I misattributed that. I swore I saw the same style somewhere in his book. I still think it's horrible =) (sorry)

I remember one of the other preset themes was a lot better (though I have a lot of trouble trying to find a list of them)

I absolutely love your libraries and all that you've done with R. You've really transformed data analysis for me. Thank you.


>Here too, the cream colored background looks gorgeous on paper and just weird and out of place on a webpage.

Sounds like a case of habit. Or would you say Hacker News background color look weird and out of place too? To me it is easier on the eyes, but more importantly having white as an accent color is useful to emphasize or separate graphs and figures from the main text.

I can't agree more with your general point though. Mindless copycating is a plague.


I'm sceptical that ggplot's default was inspired by Tufte, it goes against almost every point he makes in 'The visual display of quantitative information' in terms of data to ink ratio. I have to disagree with yourself and Tufte in this case though, as I think it works really well.


> I don't really like the fetishizing of Tuft's style.

Just so we're clear, this isn't some fanboy trying to imitate Tufte, this project is partly by Tufte. Is someone creating something promoting their own work and style fetishizing themselves?


But the practical implementation of CSS that mimics the style of his books completely misses the lessons in the books whether it's an official Tufte project or not. It may be a useful tool but it does not help anyone understand what's important about Tufte's work.


Tufte evidently thought it would help people understand what's important about his work:

> the goal of Tufte CSS is not to say “websites should look like this interpretation of Tufte’s books” but rather “here are some techniques Tufte developed that we’ve found useful in print; maybe you can find a way to make them useful on the web”

It's really not just mimicry. For example, a distinctive design element is the cream colored background called out by the grandparent comment:

> Here too, the cream colored background looks gorgeous on paper and just weird and out of place on a webpage.

In fact, it was chosen deliberately to deviate from paper:

> Although paper handouts obviously have a pure white background, the web is better served by the use of slightly off-white and off-black colors.

Other examples include:

> Sidenotes are a great example of the web not being like print. [...] The goal is to present related but not necessary information such as asides or citations as close as possible to the text that references them.

> In print, this means [graphics] are not relegated to a separate page. On the web, that means readability of graphics and their accompanying text without extra clicks, tab-switching, or scrolling.


> The default grey background with white lines was just pulled from one of Tufts's books without a second of thought b/c these grey backgrounds are horrible waste of ink when printing

I don't follow. If it's a waste of ink, why were they in a book? And why is it bad to copy them to ggplot, which - well, I don't know whether print or screen or neither is considered its primary focus, but there's no denying that it's used a lot for screen graphics, and those don't need to worry about ink.



Thanks! I didn't realize that was the tool, I thought it was merely supporting libraries.


Just to be clear, [as far as I understand] it is a template library that does static analysis using the compiler. Kinda the best of both worlds...


You should watch the cppcon2015 keynotes

https://channel9.msdn.com/Events/CPP/CppCon-2015/Writing-Goo...

static checking of the core guidelines is the entire reason they are writing them. This isn't just a nice literary exercise

The static checker is found here (obviously still under development) https://github.com/Microsoft/GSL


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: