Mozilla and Samsung Collaborate on Next Generation Web Browser Engine - <AUTHOR> https://blog.mozilla.org/blog/2013/04/03/mozilla-and-samsung-collaborate-on-next-generation-web-browser-engine/ <comment><USER2> To people wondering why Samsung would join this, I think Samsung is a big believer in the HSA Foundation [1] for heterogeneous computing, and they were one of the first partners in this along with AMD and ARM.

Samsung seems to believe in having the best performing devices and components, so it's not that surprising that they want to be at the forefront of the heterogeneous computing movement.

They also probably see themselves as a competitor against Intel, with both the ARM ISA that they support and the foundry that they own. In the next few years there will be a battle between HSA and Intel's Phi co-processor idea, and I think Samsung is one of the many who wants HSA to succeed (using computing power from all sorts of processors vs using only CPU's for everything).

<http://hsafoundation.com>

<comment><USER3> This is a great story, but probably not the case. I would be surprised if the part of Samsung responsible for HSA is even aware of Rust, let alone Samsung is working on Rust. The semiconductor division is pretty independent of other divisions.

<comment><USER4> In particular the System LSI group.

[http://www.samsung.com/global/business/semiconductor/aboutus...](http://www.samsung.com/global/business/semiconductor/aboutus/business/overview)

</comment></comment></comment><comment><USER5> This is a great announcement and adds some much needed support to Servo/Rust. I've been pretty impressed with Samsung too. Clearly they want to have their own seat at the table and they are executing quite well on that desire.

<comment><USER6> I'm not confident that Samsung is interested in developing the Android platform, though. They seem to be working on a proprietary ecosystem to separate themselves from the rest of the Android ecosystem. In fact, this is probably one of their motivations: to have control over a leading browser that isn't Chrome so that they can integrate it into their phones as default instead of Google's solution.

<comment><USER5> Actually if Samsung wants to be a player I really think they can't afford to be tied to Android long term. Too much control at Google and Google is another player and nominally an 'opponent' at some point. Of course their is "Android" and there is the stuff that Google puts around it. Watching the Chinese companies add value to the OS install has been instructive as well.

What Android has done has shown the component manufacturers some ways to expand their markets outside "known" players. Part of the challenge of making a phone is getting the chip vendors willing to sign off on giving you software to run their chips (weird I know).

<comment><USER7> That sounds interesting — what kind of value are the Chinese companies adding?

<comment><USER8> Check it out: <http://en.miui.com>

<comment><USER9> Didn't know this. Looks really really interesting. One feature I found especially nice was the text-message/phone-call spam-protection.

Looked for me to be something like an ignore-list. Something I wish I had here in Germany, when using feature-phones 16 years ago.

Why nobody ever invented a feature inside their phones, I do not know.

<comment><USER7> My guess is that carriers want to be able to advertise to a captive audience, and in the US and EU, they can largely choose which phones their users buy; so killfiles as a feature are verboten.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Servo is a "high-risk research project"[1], so I've been wondering what would happen if it doesn't pan out. Rust would still be interesting even without Servo, but would mozilla still invest in Rust if they stopped working on Servo?

So it's nice to see some non-mozilla involvement and momentum in Rust/Servo. Maybe that means that an investment in learning/using Rust is that much less risky :)

[1] [http://www.mail-archive.com/dev- email@example.com/msg0...](http://www.mail-archive.com/dev- firstname.lastname@example.com/msg00111.html)

<comment><USER11> "I think it's premature to start making a roadmap that makes Servo a competitive product in N years; apart from anything else, such a roadmap is going to be pure fantasy" -- also from that post, from just 6 weeks ago. Curious.

That said, having an ARM backend to Rust on Android phones means big things for the potential of mobile web performance. I'm hopeful!

<comment><USER12> A few things:

1) There is no uniform agreement about the state of Servo. Some are more optimistic than others.

2) There is a number of unknown unknowns here; that's what makes it a research project and makes it hard to roadmap. For example doing parallel layout of CSS involving floats is an actual research topic people are currently publishing papers on...

<comment><USER13> Does it even make sense to parallelize the layouting? When does it take longer than a few milliseconds?

I'd rather see DOM-updating (e.g. via Javascript) in parallel to the rendering. Although, that already leads to problems since rendering changes to DOM as well.

</comment></comment></comment></comment><comment><USER14> This is really exciting. I'm glad to see rust being used for serious apps. This is actually the first new browser engine that I know of being written in the past 10 years.

Good for Mozilla for attempting hard problems in innovative ways.

<comment><USER15> I am not well-versed in the browser designs, could you highlight what hard problems are you referring to?

<comment><USER16> Check out the high-level overview of Servo's design:

<https://github.com/mozilla/servo/wiki/Design>

The goal is extremely pervasive concurrency in aspects that no modern engine has yet begun to approach (and likely could not approach without enormous effort and/or a full-on rewrite).

<comment> shawn-butler >> Because C++ is poorly suited to preventing these problems,

It is really hard to take seriously any project that has this kind of nonsense in its introduction.

<comment><USER17> I think you're being downvoted because if anyone knows about the pain of using C++ to develop a browser engine, it's Mozilla. They have some pretty strong empirical evidence to back up their statement.

<comment> shawn-butler No, you don't bash a language for failures of the people using it. It is hyperbole unsupported by any evidence and it is precisely this mentality that keeps our profession on the Greatest New Thing(TM) every x years treadmill for better or worse.

Language bashing/trolling serves no purpose.

I am rather most likely being downvoted because HN in the past few months has taken an extreme downturn towards a slashdot/herd mentality, but that is just another pendulum swinging.

<comment><USER18> > I am rather most likely being downvoted because HN in the past few months > has taken an extreme downturn towards a slashdot/herd mentality

You're being downvoted because you clearly have no idea what you're talking about. It's entirely appropriate to criticize a language for being too hard to use correctly - your argument would apply equally well to saying that C++ should never have been created because it was simply the fault of people using earlier languages not using them sufficiently well.

This approaches dark comedy because you're also criticizing a company which maintains one of the largest and most important codebases in existence and has a huge list of bugs and security issues demonstrating that even in the hands of very experienced developers it's too easy to use C++ incorrectly.

<comment> shawn-butler Oh, so you think the statement that was quoted was that c++ was too hard to use? Because when you read what was actually quoted it says c++ is poorly suited to solve issues related to data races and parallelism which is a pretty false statement.

Are you able to see how that is different now with a little help? Or is it so insufficient to make up straw arguments and put words into my mouth that now you want to do the same for Mozilla foundation?

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER19> I am actually surprise this pieces was written by Brendan, given the way Mozilla has been moving lately with asm.js, PDF.js and Shumway which is like Flash.js; It wouldn't be surprise if their Next Goal were to built the Entire ( or Most of ) Browser with Javascript.

I am surprised that Samsung decide to help. Which basically reads to me as relationship with Google is going pretty bad or they are simply hedging their bet.

It was only earlier today I posted that Yahoo should also have a few engineers helping Mozilla to develop Servo.

And i really really hope Servo is licensed like Rust, Dual MIT + Apache 2.0

<comment><USER20> Google pays Mozilla to push Google Search, not to develop a browser (which Google can do just fine on their own). It doesn't really mean much that they're teaming with Samsung for Servo, other than Samsung's taken an interest in using Servo for their own products.

Note it's not mentioned exactly which division of Samsung they're working with; they may want Servo for Tizen, their Smart TVs, to ensure it plays nice with Exynos, or none of the above.

[EDIT: the post explicitly mentions porting Rust and Servo to Android and ARM; which rather strongly suggests the mobile group. Interesting, as FirefoxOS and Tizen are more or less aimed at the same markets]

<comment><USER3> I think it is "none of the above". Servo, right now, is cloudcuckooland stuff; this suggests it is a long bet research, not tied to any particular product division. Samsung probably has Tizen, Smart TV, Exynos in mind, so you could equall say "all of the above", but I think "none of the above" is more accurate description.

</comment></comment></comment><comment><AUTHOR> While this mentions Android, I think the biggest winners in this could be Mozilla and Samsung's own mobile OS's: Firefox OS and Tizen respectively. I'm hoping that if they're collaborating on Servo then the 2 platforms will hopefully become fairly interoperable (in terms of app portability).

Some further details about Servo and Rust can be found here: <http://www.mozilla.org/en-US/research/projects/>

<comment><USER21> A browser engine is an awfully portable thing. For a consumer, switching between them (e.g. from Firefox to Safari, whatever) is just a question of minor UI skinning. I don't see that it "benefits" any OS in particular. Assuming it's universally better, Android and Tizen would need to port from WebKit and Firefox from Gecko. If it confers a true competitive advantage, they'll all do it. If not, some probably won't.

For myself, I'm skeptical. There's really nothing "wrong enough" with Gecko or WebKit that I can see another option really being that much better. Developers _love_ to rewrite stuff (obviously both Gecko and WebKit are _already_ effectively rewrites of pre-existing technologies), but the market has a long history of not being nearly as enthused. But I'm willing to be proven wrong.

<comment><USER22> > _Developers love to rewrite stuff (obviously both Gecko and WebKit are > already effectively rewrites of pre-existing technologies), but the market > has a long history of not being nearly as enthused._

Actually your examples nullify your argument.

Mozilla would be dead today without Gecko, ie with the old Netscape code piled.

KHTML would have gone nowhere much if it wasn't for the Webkit rewrite.

So in both cases, it was the rewrites that made those engines break out.

<comment><USER23> And KHTML itself can be (and was, by many) regarded as a pointless rewrite of Gecko, which seems crazy now we're aware of its impact.

<comment><USER24> Surely the impact of Webkit has been greater than that of Gecko? Webkit made decent mobile browsing possible, and until recently Gecko wasn't available in mobile browsers.

Gecko did put a dent in desktop browser usage share early on (when Safari was Mac-only, and Safari for Windows has never caught on – for good reasons), but the desktop is quickly becoming the second screen. Nowadays, most sites are built for Webkit first.

<comment><USER25> You seem to have overlooked the whole "Firefox basically saved the world from an IE monoculture" thing that happened in the mid-2000s.

<comment><USER24> Safari was released in January of 2003. Soon after, Microsoft ceased developing Internet Explorer for Mac. Almost two years later, Firefox 1.0 was released, and it took quite some time after that for it to become a good browser. In the meanwhile, plenty of us had been using a Gecko based browser for years: Netscape.

</comment></comment></comment></comment></comment></comment></comment><comment><USER26> It's awesome that language design is being promoted as a significant part of this project. Good design from the ground up.

</comment><comment><USER27> Nice to see Rust gaining traction.

We need to have more safe alternatives for systems programming.

</comment><comment><USER28> Samsung is really making good use of the hacker community. They hired Cyanogenmod lead dev last year to collab on Android, too.

<comment><USER29> It was back in 2011. And he's already moved on: [http://www.theverge.com/2013/3/25/4144226/steve-cyanogen- kon...](http://www.theverge.com/2013/3/25/4144226/steve-cyanogen-kondik- departs-samsung)

<comment><USER28> wow, funny coincidence that news just broke a few days ago. good to know.

</comment></comment></comment><comment><USER30> "X is an attempt to rebuild the Web browser from the ground up on modern hardware, rethinking old assumptions along the way. This means addressing the causes of security vulnerabilities while designing a platform that can fully utilize the performance of tomorrow's massively parallel hardware to enable new and richer experiences on the Web."

Probably says more about how long I've been around but I think I've read a mostly similar paragraph 5 to 6 times over the last decade.

<comment><USER31> Mozilla, Firefox, Chrome, Safari, and I think one of the IE's too. And now this. So yeah, 5-6 is a good estimate.

Edit: Also the original Netscape.

<comment><USER32> None of those were from the ground up. Mozilla was based on the netscape codebase, firefox was based on the mozilla codebase, safari was based on the khtml codebase, and chrome was based on the webkit codebase. IE I'm not sure about, but it seems unlikely that they started from the ground up, surely newer ie uses code from older releases.

<comment><USER33> You're right. Internet Explorer was originally based on Spyglass Mosaic. [1]

[1] <http://en.wikipedia.org/wiki/History_of_Internet_Explorer>

</comment></comment></comment></comment><comment><USER34> This will be a big win for faster web apps. DOM performance is the biggest blocker to having a smooth experience in the browser nowadays, not JavaScript speed.

<comment><USER35> IMO not the performance of DOM but the DOM itself is the biggest blocker to a good experience (user and dev)

<comment><USER22> In what sense? And what do you propose replaces it?

<comment><USER36> The DOM should have been a cursor based or perhaps a pull-based API. Everything being an in-memory tree was OK a decade ago but not today the node count in the millions across browser tabs.

Dom funcions could have been generic ala C++ STL style for iteration restrictions

<comment><USER37> Your comment surprises me. Maybe I don't undertand the DOM as well as you?

I don't think a DOM tree is necessarily all in memory. For performance reasons you might cache the tree in memory, but that's not a requirement.

You have to query it, right? Of course you can query for the same element multiple times, so it's not cursor-based. But the engine can generate the tree in response to user queries instead of storing the entire tree in memory.

What do you mean by pull-based API?

<comment><USER36> All the DOM implementations I know store the DOM tree in memory. Because DOM allows unrestricted, write access to any portion of the tree at any time, a disk cache would work well for some access patterns and fail for others. Yes, you can point out that browser implementations don't hold heavy weight DOM node _content_ in memory. (Usually just a pointer), but that doesn't remove the fundamental problem that the API has mostly restricted the choice of data- structures and limited the set of performance optimizations.

I probably should have not used the term "pull based api", since that is just a fancy word for a cursor based api.

Example could be SQL - we get a result set after a query exection and can iterate over the elements of the result set. SQL databases can be implemented in a wide variety of ways. (Though best practice has condensed this to a few).

A browser api that had a query language to get different types of node cursors: read-only, appendable, live, etc and some well-defined, optimizable operations on such cursors would have allowed implementors to choose a wide variety of data-structures/algorithms for optimization.

</comment></comment></comment></comment></comment></comment><comment><USER38> If Google is paying Apple $1B/yr to be the default search engine on iOS, it stands to reason that Samsung could negotiate similar per device rates. That seems like enough potential upside for this to be a no-brainer to me.

</comment><comment><USER39> I'm no lover of C++, but I'm skeptical that it's really that much more difficult to achieve this design in C++. The parallelism shown is still fairly coarse grained and amenable to traditional techniques. It may be more convenient or less bug prone with Rust, but I read as more substantial, the redesign and rewrite from the ground up. If the redesign was using C/C++, they'd likely get the same benefits, just with uglier code.

Isn't it more likely that lessons learned in Servo will simply be back-ported to C++ in Firefox?

<comment><USER40> You can write equivalent programs in C++, but if you learned Rust well I am not sure you'd want to.

 _The parallelism shown is still fairly coarse grained and amenable to traditional techniques. [...] If the redesign was using C/C++, they'd likely get the same benefits, just with uglier code._

I should hope so, Rust's parallelism is nothing new after all! (Okay, I know, you probably mean by writing programs using explicit mutexes and all that.) I really want to talk about the second part of the quote: what exactly are those benefits? I think you've excluded safety for some reason.

If Servo offers competitive performance I think it's most likely the whole engine will simply replace Gecko. I mean why would you spend the time and money to go from the safer to the less-safe code when you can use what you've got?

<comment><USER39> There's obviously benefits in using better languages for safety and error checking, it's one of the reasons why I like Closure Annotations/GWT/Dart over raw Javascript because of my experience on large projects and relatively simplistic bugs silently propagating through.

The traditional response to these kind of language imperfections is "better tests, better practices". Otherwise as, Unit Tests solve all problems. For C++, someone would say to use some set of abstractions or static analysis tools that confers additional safety that isn't available in the out-of-the- box language.

Language level support tends to encourage more consistent usage of something than just depending on vigilance.

My metapoint though, is that large code bases are hard to displace, especially if the enduser benefits can be achieved through iteration. Rewriting Gecko from scratch in Rust is a tall order, considering how long it took Gecko and WebKit to get to where they are now. It seems much more likely that WebKit/Gecko can be refactored to get most of the benefits in a much shorter period of time than a rewrite.

<comment><USER41> "The traditional response to these kind of language imperfections is "better tests, better practices". Otherwise as, Unit Tests solve all problems."

The security vulnerabilities found in all browser engines stemming from things like use-after-free suggest otherwise.

"For C++, someone would say to use some set of abstractions or static analysis tools that confers additional safety that isn't available in the out-of-the- box language."

It's really, really hard. The language works against you at all levels. Type systems are much easier ways to achieve the same result.

</comment></comment></comment></comment><comment><USER42> What's in this madness for Samsung?

<comment><AUTHOR> My guess is it may reduce their dependence on WebKit, which is mostly "controlled" (for want of a better word) by Apple and Google, their main competitors.

<comment><USER43> "Driven" would be my choice of words there.

<comment><USER44> 'Controlled' is honestly pretty accurate. In principle anyone can fork WebKit; in practise it would take major investments on the three fronts of engineering effort, standards politics and mass user adoption to make a WebKit fork that "matters" - one that web designers would worry, and have to worry, about being compatible with. If you don't have both the resources and the desire to do that, then you have to play nice with Apple and Google - or with one of their two remaining competitors.

</comment></comment></comment></comment><comment><USER45> Any idea when Servo might make it into Firefox desktop builds?

<comment><USER46> A rough guesstimate would be five to ten years. Don't hold your breath either way. Right now Rust is not very optimized and still in flux, while Servo is pretty much a black box for me.</comment></comment>


The Entrepreneurial Engineer: Genetic algorithms pioneer David Golberg's blog on professional skills for engineers - <AUTHOR> http://entrepreneurialengineer.blogspot.com/ <comment><USER2> I really enjoyed the "Engineering for the 21st century" article. He has some good guidelines to think about (thought a lot of his stuff seems based on Mihalyi's Flow theory).

Some bits and pieces: engagement leads to wealth, write documents in a Background-Premise-Roadmap format, create first--critize later, be realistic in application of ideals, the obvious isn't easy, and practice practice practice.</comment>


New Year's Resolutions for Introverts - <AUTHOR> http://www.quietrev.com/12-new-years-resolutions-for-introverts/ <comment><USER2> 0\. Stop caring about binary labels that bin you in a category A or B, limiting how you perceive yourself.

5 years ago, I'd definitely have called myself an introvert- except I used it as a crutch to justify certain behaviors that were actually harming my broader self development. Just do what feels right for you- don't want to go to that party? Don't! But maybe interpret it more as "I'm not feeling it tonight" rather as a consequence of an eternal truth about yourself.

Avoid thought patterns of the form "well of course I can't do X/of course this would make me feel Y- I'm an introvert!". Sure, I'm still more on the quiet "stay at home alone" side of things than most people my age, but I still did a lot of work on getting out of my comfort zone and getting better at small talk, and other silly social interactions, etc, and while it was painful at first it made me a much more balanced, well rounded person. It led to meaningful connections and friendships I'd never have had otherwise.

EDIT: can't agree enough with laynnn's comment.

<comment><USER3> Alternatively,

0\. Stop letting people tell you that your personality and preferences are defective, and the only way to be a functioning human is to adopt theirs.

It's not more correct to be at home on the dance floor. Exhortations to "get out of your comfort zone" and adopt behaviors that are the most fun, natural thing in the world for the person making the exhortation are... unconvincing, at least. Over time I've come to believe that it's really all just preferences, with one side being at times obnoxiously preachy about theirs.

We are not lesser. The compulsively social have as much to learn from us as we do from them. I mean, sure, work to change your behaviors to the extent you feel is useful, but you don't have to start from the assumption that your current state is inferior.

<comment><USER4> Breaking out of your comfort zone isn't about addressing defects, it's about growing as a person.

If you are content staying in, great. Many people face paralyzing fear or anxiety and want to overcome it or maybe just aren't happy with 100% of who they are. If you are, great, I don't think you're the target audience.

<comment><USER5> > Breaking out of your comfort zone isn't about addressing defects, it's about > growing as a person.

Do you think it's the discomfort itself that helps you grow as a person, or something else? If not, what?

For myself, I think I've probably got about as good as I'm going to get at faking sociability. Sometimes that's useful, but I don't see much point in experiencing discomfort for discomfort's sake.

<comment><USER6> For me it's more that breaking out of that comfort zone will let me get more opportunities for myself and meet more interesting people.

<comment><USER7> Some things are not fun. Being in a room filled largely with strangers is Not Fun, if they're all drinking it's Double Plus Not Fun.

There is a chance that doing a not fun thing will result in longer term gains of fun via meeting people, but strangely when I'm miserable and uncomfortable it's unlikely I'll make friends and influence people. So I'll weight that with an appropriately small number and find that my overall happiness is higher by avoiding the above scenario.

I could of course start drinking to take the edge off but that doesn't seem like a great idea overall. I'll stick in my comfort zone for now, where it's comfy. And there's tea.

</comment></comment></comment></comment></comment></comment><comment><USER8> I don't believe neither in the existence of introversion or extraversion.

Articles like this reinforce a certain paradigm of behaviour as something inescapable or unchangeable, thus limiting one's ability to explore their environment in more productive ways. I believe it limits one's freedom and one's capacity to change.

Sure, you can take a bunch of people and according to any measure that you create, generate enough statistics that conform to the particular linguistic structure that is behind your hypothesis.

But that doesn't mean that the structure is really there.

If you change either your environment or your perception of it your behaviour will change accordingly. If you reinforce your baseline perceptions and avoid looking at them in a more distant way you will not change your behaviour.

I was very introverted as a child, due to some shattering events in my childhood and always assumed it was a part of me, it was my nature. As time has passed I've changed, not to say that I've become textbook extroverted, but I see my environment differently and I can embrace things in a more productive way. I can move between those definitions of interpersonal behaviour and be aware of what triggers certain patterns that I'm already aware of, and move into mental spaces that I don't feel can be described by this binary classification.

Language, as in your internal narrative, can become either your freedom or your prison. You can choose where you lay down your walls, or if you will lay them down at all.

<comment><USER9> I see where you're coming from -- its not a good thing to give excuses to people that hinder their growth. But...

Theres this notion of a "highly sensitive person". I hate describing a person as sensitive because it kind of implies a person that watches romantic comedies all day, but, if you take "sensitive" as a person with hightened awareness of subtle cues, theres a plausible basis to think that there are people that just are way more sensitive. Imagine if every sound you heard was twice as loud as what everyone else heard. On the one hand, you would have super hearing, but on the other hand, you would probably hate loud concerts.I'm not saying introverts ear better, but maybe they pick up on things you dont, and maybe every element costs a little bit more energy.

So like, yeah, some people use introversion as an excuse not to grow, but some other people pick up on 5x more detail than their more normal compatriots and find themselves thusly exhausted a lot quicker.

I'm kind of in your boat where I see facebook acquaintances sharing articles about introversion or aspergers and im like "maybe you just need some social skills" but I dont think the condition doesnt exist.

<comment><USER10> I would identify myself as an introvert, and I feel differently. I don't hear everything at twice the volume; I hear everything at half the volume, while loud background music plays. Every interaction, I'm having to watch for those cues more carefully, I'm having to strain to listen.

That's why I feel like an introvert; socializing with people is fun, but will eventually drain me.

</comment></comment></comment><comment><USER11> As an introvert, I found this to be an excellent article with excellent advice. The author did a great job of detailing what it means to be an introvert, and detailing the societal traps that introverts tend to fall into.

Growing up, I had a lot of people tell me that I needed to "Get outside [my] comfort zone," "socialize more," and "push [myself]." None of those things ever made me happy. They just drained me emotionally, and I couldn't wait to get home and read, write, or program something by myself.

As the author mentioned in resolution 1, introverts have limited energy for socializing. It drains us. It's not about being cowardly and shy, and having to muster up our courage and break through some social barrier that is holding us back. It is more like running on a treadmill at the gym. Eventually, you're going to get tired and worn out. It isn't like you can push through some invisible mental barrier and then run and run forever. Socializing is like running on a treadmill for introverts. It wears us out. I think a lot of people, even introverts, don't really understand this. Extroverts are charged emotionally by social activities. Introverts are drained. Therefore, it doesn't make sense for an introvert to just suck it up and act like an extrovert.

<comment><USER12> For an introverted it's really draining to always see the same pattern in threads about introversion: that it's mixed with shyness and social anxiety, and that all three are considered to be overcomable in the same way.

<comment><USER11> Agreed.

</comment></comment></comment><comment><USER13> >Say no to social events that promise little meaningful interaction.

That's a horrible one. Minor details are the bricks of a relationship, the closer you are the more bricks--in quantity or quality--you contribute. If you don't have any bricks to offer, it is difficult to establish or to sustain a relationship. For instance, small after work gatherings often seem a waste of time, especially to those who aren't innately fond of socializing or unable to proficiently judge the value of such, yet exactly these have a chance to provide a more intimate atmosphere. Also, even a single wasteful meet-up might count as a step and with some number of steps you'd also cover a bit of distance.

As such, it isn't that there aren't meaningless meetings but it's the recommendation to evaluate and avoid such that is misleading.

Instead, one should be aware that because one has to invest energy to socialize one automatically tends to avoid doing so at all, which again reduces the amount one can store. Hence, do not avoid spending your energy supply but learn to judge the highest and to improve your returns on investment. What good return supposed to be is subjective but one shouldn't forget that profound happiness and success is build not suddenly acquired.

>7\. Have more meaningful conversations and less small talk. Research suggests that the happiest people have twice as many meaningful conversations—and do less surface-level chitchat—than the unhappiest.

Avoiding small talk won't lead you to more meaningful discussions. It's common sense that people are happier if they found someone to converse with more in- depth but that doesn't reduce the value of small talk. You can't reach the station of happiness by skipping the traveling part, and traveling is often like long grinding work.

By the way, inversion isn't about the ability to socialize. The lack thereof is just a consequence of a more isolated course of life.

<comment><USER14> The kind of conversation is highly environmental: I'm about 100x as likely to have a serious conversation at a hacker meetup as a random night at the bar.

That doesn't mean there's no small talk at a hacker meetup, but rather, if I'm looking to optimize the number of deep conversations to chitchat, some social settings are better than others.

So avoiding "normal" bar chitchat to attend meet-ups focused on topics with deep potential _does_ lead to more meaningful discussions.

(And hacker meetups are fun in that sometimes, people _join_ on deep conversations and only then feel comfortable moving on to small talk, rather than the usual reverse.)

<comment><USER13> The nuanced difference between avoiding small talk and pursuing deeper conversations is quite significant since telling people to avoid superficial talk usually leads to the misunderstanding of the value of such.

Starting out with a topical interaction is often the easiest way to establish a relationship and one can become quite close despite restricting each other to serious topics. But, there will always be a serious limit to how far you can go with just that. It is quite difficult to call someone a friend if you never shared something personal and trivia, but it works well if your aim is to stop at a working relationship with that colleague.

And don't forget that the 7th point is about the general approach to socializing or life rather than specific gatherings only, hence my broad descriptions.

>I'm about 100x as likely to have a serious conversation at a hacker meetup as a random night at the bar.

That is actually not a valid comparison. If you meet with someone of some common interest in a bar there's little preventing you from having a serious debate. You just need to seek out a location that allows you to converse comfortably.

</comment></comment></comment><comment><USER15> What does introvert even mean? I've heard shy people who are energized by talking to others described as introverts, and I've heard outgoing people who have to be alone to energize described as introverts. These descriptions are the opposite, but they're given the same label. Then you have articles like this one, where some of the bullet points make sense for both types of people I describe, some make sense for only one, and some make sense for neither. Online discussions about introversion are usually just as confusing.

Then at some point the term "ambivert" became popularized, with claims the majority of people fall into a vague middle category ([http://www.today.com/health/winning-personality- advantages-b...](http://www.today.com/health/winning-personality-advantages- being-ambivert-t70236)). But this doesn't really clarify anything to me, from what I can tell it just adds another label onto a spectrum that isn't well- defined.

I'd love clarification on this, especially if anyone has a good authoritative source on it.

<comment><USER16> Summarized from Susan Cain's book "Quiet: The Power of Introverts in a World That Can't Stop Talking"

\---

A _very_ basic definition is that introverts have a preference for quiet, minimally stimulating environments.

This means that introverts tend to enjoy quiet concentration, listen more than talk and think before they speak. They tend think more and focus on quality over quantity in most things and tend to focus intently on a single project at a time (i.e. friendships and how they engage projects and hobbies at work/during free time).

Extroverts are energized by social situations and tend to be multi-taskers who think out loud and therefore need others' feedback to validate their ideas or nudge them in the right direction.

\---

I highly recommend the book, especially if you think you're an introvert or have difficulty accepting yourself as one. It really helped me see that it was OK being introverted and that there were certain advantages that extroverts don't have

<comment><USER17> I don't see how introversion and extroversion are mutually exclusive. Sometimes I prefer being alone and concentrating on something (eg. thinking, writing, coding, etc), other times I prefer socializing with other people.

What does that make me - someone who's sometimes introverted and sometimes extroverted? In that case these labels aren't very useful are they? Not to mention everything is relative. I'm more social than the average software engineer, but less social than the average salesperson.

<comment><USER18> This taxonomic question always comes up in HN discussions of personality type - see also, whenever Myers Briggs is discussed.

My take is that some people are well characterized by being on one side of a dichotomy - say, introvert/extrovert, or analytical/intuitive. They really get something out of discussions like in TFA, because they fit the class. And the fit can provide a powerful high-level diagnostic on a lot of otherwise inchoate feelings.

But, some folks are not well captured by the dichotomy - like yourself. These people tend to say that TFA is reductive and simplistic, and does not capture reality.

And both sets of people are right. For themselves.

<comment><USER19> Do you think it's possible that your (well-thought-out) post could replace "people are well characterized by being on one side of a dichotomy" with "people are _more comfortable thinking_ they are on one side of a dichotomy", without losing any resolution?

<comment><USER18> For me, that weakening seems inaccurate. And going further, I really do believe some people besides me are well-characterized, in part, by the introvert/extrovert divide.

</comment></comment></comment></comment></comment></comment><comment><USER20> So many comments here amounting basically to "don't pigeon hole yourself", "get outside your comfort zone", "there is no such thing as an introvert", etc. That's funny because really the whole reason this post exists is to help the author take a stand against exactly these kinds of denials of self (both internal and external). In the social spheres of life, extroverts are dominant, and, at least in the US, represent sort of the ideal temperament. They literally talk more, have more friend connections on average, are more likely to be in positions of group leadership, etc. Unfortunately this leads many introverts to feel marginalized, ashamed, self-hating, you name it. This post represents the rising tide of introverts waking up to the misunderstandings of our temperment and finding healthy ways to assert our differences from the traditionally valued extrovert ideal. Support and encouragement is really the best thing here I think.

Ask yourself, do you ever see blogs, articles, etc. extolling the virtues of being extroverted or making declarations like this article? No, it's just sort of taken for granted.

Heard many extroverts wishing they could be more introverted? I haven't but I do know most introverts struggle in the opposite direction.

It's definitely an asymmetric situation...

</comment><comment><USER21> This is extremely refreshing. I have a really hard time dealing with the social norm that is being forced on me.

I don't mind being social but no social gathering beats sitting home alone for me. I can do the thing I like the most for free but instead I spend money on things less enjoyable just because you're supposed to be social.

</comment><comment><USER22> My advice is simple : lists.

Write them. Read them. Live them.

If you see social interaction closely (but not too closely), you will notice it is best kept uncomplicated, low on substance and meaning with absolutely no expectations from others or from you and the attempt to finding a faint sense of connection.

With this in mind, you will realize, uncomplicated things are usually obvious and hence go unnoticed like what you wore to work on the last day of 2016. Thats a conversation starter right there.

When stereotyped, new years eve is about partying or just staying home or something else. Either can continue the conversation further for a couple more sentences.

And if all you care about is telling this to someone you bump into at the water cooler, you're likely to hear something similarly dumb and irrelevant to you.

But, lo and behold, you just had a social interaction. Uncomplicated, light, useless and just that.

Unfortunately, right now, you won't get things to talk about off the top of your mind. So making a list is a life saver.

Here are a few samples: TVs have gotten slimmer over the years. But not people. Being a traveller vs a tourist How your teacher from 4th grade looks so similar to someone you bumped into on your way here. Indian food.

Each can be connected to the next in more than 3 ways if you think :)

After 20 conversations like these, you'll just get good at them. And since you have a list of good conversations, you can always fall back to tried and tested ones. One misconception is that social interaction should just be natural. Puh-lease. Just do this, feel better and do what you really should be doing.

</comment><comment><USER23> I still see a lot of people describe introversion as "not wanting to do what extroverts do", as if being an introvert is defined by an absence of something.

But for me, time spent by myself isn't an empty expanse that I'm too scared to fill with socializing. It's absolutely vital to me, it's when I can really think, write, read, be creative, experience my emotions, etc.

I'm fine with socializing (preferably in a small group, with close friends -- I don't get much out of parties or big get-togethers) but I _need_ to make room in my schedule for solitude.

</comment><comment><USER24> Before reading this I was guessing from the title that it was a piece that essentially was going to say 'here is how you can be happier by being an extrovert!'.

After reading I was pleased to find out that was not the case.

<comment><USER21> Exactly. I'm sad to see that the comments here are trying to lead the discussion that way though.

<comment><USER25> I am not introverted by any stretch of the imagination, but some of the advice can be summarized as "do this to avoid people" yet in my experience, especially being a "child of the internet", the one's who complain about being alone the most are introverts. I am not saying the solution is to "be more extroverted" but at some point I started thinking, "what gives?"

</comment></comment></comment><comment><USER26> I don't agree with the "5\. Quit pretending to be an extrovert."

Sure, in the first stages you will feel uncomfortable, your heart rate will spike. But I think it's good to practice being more extrovert. I don't mean to change who you are, but leave your comfort zone more, learn new social skills. It's important.

<comment><USER9> I kinda hate this perspective that introverts have no social skills. Its lazy. So, im an introvert. I've never held it as a shield, its just one of those thing I apparently am. I went out with a girl recently. She was delightful, I was (I think) delightful, the entire thing was fine but after a couple hours I was like "so now I gotta go stare at the sky and not be around people". (I didnt say this of course). Like, I was just done, it wasnt shyness I just felt a strong urge to be alone.

<comment><USER27> Which is fine, but for the uninitiated they can translate this into disinterest. Make sure she's not confused. In some sense you're better off actually saying something along the lines of what you're thinking; quite literally "it's not you, it's me - I need to go recharge my batteries". It's also useful to figure out a way to be alone together. Instead of 2 hours expecting a conversation the whole time; structure it as maybe 4 hours with intermittent conversation, mostly doing your own thing, but in a shared space.

<comment><USER9> You're not wrong but I have 30 years of experience ducking out of situations, there was a natural break and it worked out fine

</comment></comment></comment></comment><comment><USER28> My mom always said "If something is worth doing, then do it today". That in the context of New Years Resolutions - which she thought are stupid. So while granted that we may pay more personal attention to desired changes at the end of the year, those are things to be mindful of all year.

</comment><comment><USER29> As I was binging on HN over the holidays, I came across this comment from estefan that might be of benefit to some of you who self-identify as introverts. In particular, those introverts who want to become more social (not necessarily extroverted). His realization touches on a pretty touchy subject amongst all of us - 'what does it mean to be happy?' or 'what makes you happy?' and looks at it from an interesting angle.

> Someone asked a few days ago what the best habit was that HNers developed > last year and what the health benefits were. I realised I shouldn't do > things because I thought they'd make me happy, and it has changed > everything. Put another way, I don't only do things I think I'm going to > enjoy any more.

It's an incredibly powerful mindset to not have an expectation of happiness or enjoyment as an outcome of an action. I used not to do a lot of things because I couldn't see the point or because I thought I wouldn't like them. Now I do those things anyway, more just to see what they're like rather than because I expect to enjoy them. I do things to see what actually happens instead of limiting myself to my own preconceptions. Most of the time, I'm right, and I don't enjoy those things, but that's OK. They're still showing me different aspects of life and allowing me to exercise arguably our most innate gift, the ability to experience. There have been a few surprises though. I've taken up sports I'd previously discounted, and now I've stuck with them long enough I can see the appeal. I'm learning a musical instrument and get much less frustrated because I see the learning process as just training my brain, a function of time and effort. There's no point in being frustrated.

Now I just view experiences as things to be experienced, without requiring anything more of them. This means there's less pressure on me and on them to give me anything. My attitude to them and awareness of them is more important than deriving happiness and enjoyment.

Now I've written that it reads like zen, but when I practiced zen it was because I wanted to be happy from it. The thing with learning is it's not enough to have the knowledge. You need the insight to really internalise something. It's that "A-ha!" moment. I guess I arrived at the same conclusion as the Zennists from a different direction. Only doing things you think will make you happy is just a way too limiting mindset. It really has been a complete revolution in my approach to life. I can't recommend it enough. And it looks like this attitude will keep my brain healthy too.

> This approach opens you up to far more opportunities. Say you have a spare > weekend and you aren't sure what to do with it, but feel like going out. You > could use the opportunity to try something you wouldn't normally do: go to > an event on something you know nothing about, or even on a subject you don't > really like. When you're there, find people who are really into the subject > and try to understand from them why they like it. Maybe you'll see what they > see, maybe you won't. But this curious mindset will pay dividends if you > need to be creative, or develop rapport with people, or just want to see > what's out there.

I'd had some things going on and wanted a holiday. So I went on my own. I went out to bars on my own, which I wouldn't have done before because I'd have thought I'd have a had a rubbish night. But I ended up meeting a few people, then a few more and had an amazing night. I realised that it was down to me to make the effort to have a good night, so I started speaking to the people around me.

There are so many opportunities every day just waiting to be taken. I used to close myself off from them because I wanted to somehow cherry-pick in advance only those that would make me happy, or lead to 'good' outcomes. When you remove that constraint, you become open to much more of life.

[https://news.ycombinator.com/item?id=13295213](https://news.ycombinator.com/item?id=13295213)

</comment><comment><USER30> I'm taking Vorinostat in order to help extinguish my social anxiety. It has always seemed that I get _more_ anxious after repeated exposure to certain stimuli. Eventually it'll be the point where I just throw up on the floor.

</comment><comment><USER31> Is this thing about social interaction draining an introvert's energy backed up by convincing research? I see it mentioned in articles all the time. It sets off my BS detector.

</comment><comment><USER32> I'm an introvert. I wish I had read this earlier in life: [https://www.amazon.com/Four-Agreements-Practical-Personal- Fr...](https://www.amazon.com/Four-Agreements-Practical-Personal- Freedom/dp/1878424319)

I don't think you should join a cult, but the four agreements have become a mantra for me in almost all the relationships I have. And it's a much shorter list than these 12 rules.

It definitely help me understand my interactions with people better:

1\. Be Impeccable with your Word 2\. Don't Take Anything Personally 3\. Don't Make Assumptions 4\. Always Do Your Best

</comment><comment><USER33> My advice is: learn howto interact with people. It is skill you must have, even if it is used rarely.

You should be introvert by choice, not for some crypling fear and stereotypes. There is nothing worse to discover late in life, that you are actually extrovert.

Social interactions are easy, but it is hard to see through smoke screen. There are books which deconstruct and explain interactions word by word. There are drugs which temporary bypass anxiety.

Do not listen to people who say it is cool to be introvert (and have even playlist for introverts).

Feynman bio is a good start

</comment><comment><USER34> Ah, I see the introvert-industrial complex is developing nicely.

</comment><comment><USER35> beautiful!</comment>


Ask HN: Can someone explain the tech bubble? - <AUTHOR> Everybody says we're in the middle of a tech bubble. Can someone explain in simple terms why we're in a bubble and the adverse effects we're going to have if the bubble bursts?
Specifically, I don't understand why a lot of startups being heavily funded will cause a bubble. When the bubble bursts what I imagine happening is that investors will probably stop funding starups.  So are startups who are looking for more money the only ones affected?
How will the bubble burst impact employees who are in a well funded startup? <comment><USER2> "How will the bubble burst impact employees who are in a well funded startup?"

I suppose the real question is how "well funded" are they? If they are positive cashflow, then they will be in a stronger position.

If, on the other hand, they have 12-24 months of runway, like most "well funded" startups, then they will be in real trouble.

Also, developer pay on average goes down in a number of ways.

1) Starting salaries are lower - mostly because of supply and demand. When quite a few very talented developers are actually available at the same time..that lowers overall packages.

2) bonuses are lower. Again, replacement cost is cheaper

3) Developers get let go. With every company that goes bust, owners/board members put more pressure on management to "to plan for the end game" or "pair down non-essential activities".

That's just a few.

</comment><comment><USER3> _How will the bubble burst impact employees who are in a well funded startup?_

Many of those companies are counting on being able to raise another round soon, perhaps within a year on average. If the bubble bursts and investors get shy, the companies will suddenly have to come up with strategies that avoid them going bankrupt without more investment.

The solutions will involve layoffs, panic mergers and wild pivots, all of which will depress the mood among tech workers. Previously free products will first become paid and then vanish completely, leaving many customers burned on "that cloud thing". This impact could be worse than the dot-com crash which affected relatively few consumers.

</comment><comment><USER4> One way to understand economic bubbles is to read about the two big ones that happened in the recent past:

\- The dot.com bubble of the late 20th century:

[https://en.wikipedia.org/wiki/Dot- com_bubble](https://en.wikipedia.org/wiki/Dot-com_bubble)

\- The housing bubble of the previous decade:

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

One major difference between the dot.com bubble and today's tech climate is that in the dot.com bubble, many more tech startups went public, exposing many more people to their equities (e.g., via the stock market, mutual funds, retirement funds, etc.). If there's a bubble in privately owned tech companies, the impact will probably not be nearly as severe - the people who'll be hurt are VCs, investors in VC funds and the founders and employees of startup companies. There will probably be a correction in larger tech stocks like Google, Facebook and Apple as well, but they'll probably recover once (1) the markets see that that the problems with startups don't affect these larger companies' earnings very much and (2) money that previously went into VC funds shifts into established tech companies.

 _" Specifically, I don't understand why a lot of startups being heavily funded will cause a bubble."_

The problem (according to the people who think there's a bubble) is that there's too much investor capital chasing too few high-quality startups, so low-quality startups (e.g., ones that have unrealistic business models that have little chance of ever becoming profitable) are getting a lot of money, and they'll eventually collapse and freak out potential investors. That could cause funding for all startups to suddenly get much harder to get. An analogy with the housing crisis is that once the investors ran out of prime mortgages to collateralize, they started putting money in sub-prime mortgages given to homeowners who had little chance of being able to pay them off in the long term.

 _" How will the bubble burst impact employees who are in a well funded startup?"_

Start-ups looking for additional rounds of funding could be hit by investors pulling out of VC funds, making additional funding hard to get. Companies that are still in a stage where they're not profitable could have difficulty staying afloat once they burn through their current round of funding.</comment>


Austrian Tor Exit Node Operator Found Guilty As An Accomplice - <AUTHOR> https://www.techdirt.com/articles/20140701/18013327753/tor-nodes-declared-illegal-austria.shtml <comment><USER2> He was not indicted because he was merely running a TOR exit node, he rather was indicted because chat protocols proved that he was aware of child porn being run over his server, and he even announced it to be better to run child porn over his server.

[http://m.futurezone.at/netzpolitik/tor-prozess-du-kannst- kin...](http://m.futurezone.at/netzpolitik/tor-prozess-du-kannst-kinderpornos- auf-unseren-servern-hosten/74.093.526)

he himself says in his blog that this protocol parts are out of context. he wanted to get access to certain botnets.</comment>


Ordnance Survey releases digital map of Mars surface - <AUTHOR> http://www.bbc.com/news/technology-35579849 <comment><USER2> That's awesome. And covers the area traveled by The Martian too. Just spent rather too much time zooming in and out of interesting features!</comment>


Ask HN: Where do you buy hosting space from ? - <AUTHOR>

I'm looking for a cheap hosting that would support PHP and MySQL, and unlimited add on multiple domains. <comment><USER2> Linode, currently, thinking about switching or augmenting it with WebFaction.

I've used WebFaction before, and they're really good. But they're geared a little more towards frameworks like Django and Rails (but naturally, they do PHP too). They're really quite good. Pretty solid email set up too (which is important to me).

</comment><comment><USER3> this is the the obligatory slicehost post

<comment><USER4> Ditto. 256mb Slice = $20/mo = :)

</comment></comment><comment><USER5> Softlayer, ThePlanet, Mediatemple

</comment><comment><USER6> Hostnexus.

</comment><comment><USER7> linode, frro.net</comment>


Flat UI Elements Attract Less Attention and Cause Uncertainty (2017) - <AUTHOR> https://www.nngroup.com/articles/flat-ui-less-attention-cause-uncertainty/ <comment><USER2> The example image included in the synopsis seems a bit strange to me. It's not like they are comparing apples to apples - what they've done is essentially made the control elements blend as much into the page as possible. I don't believe that UI elements have to be of the ghost variant in order to be considered flat. They've taken away the 3D effects but they've also inverted the color scheme. As a result the very noticeable purple button became a white button. This seems to me as an unfair comparison - just removing the 3D effects would still make the then purple button fall under "flat design", no?

EDIT: It seems like in most other examples they didn't do this: [https://www.nngroup.com/articles/heatmap-visualizations- sign...](https://www.nngroup.com/articles/heatmap-visualizations-signifiers/).

On the other hand however you can argue that just changing certain control elements and not the overall design as well will have an impact. It's possible that the control elements would have been more visible on a website where the rest of the aesthetic complements them.

<comment><USER3> The screenshots are reduced in size and barely readable. I found it took me a long time to even figure out the difference between them.</comment></comment>


Mike Judge's Silicon Valley show in production - <AUTHOR> http://www.paloaltoonline.com/news/show_story.php?id=28892

<comment><USER2> Reading this, I fear that Steven Blank is right on his _When SV Went Hollywood_ [1]:

[1] [https://www.dropbox.com/s/7hmjdkj3xn55bau/When%20SV%20Went%2...](https://www.dropbox.com/s/7hmjdkj3xn55bau/When%20SV%20Went%20Hollywood.pptx)

<comment><USER3> Yeah... However, Mike Judge gave us the cult classic "Office Space". Also Beavis & Butt-Head.</comment></comment>


Links to YouTube Recordings of AWS re:Invent Sessions - <AUTHOR> https://gist.github.com/stevenringo/5f0f9cc7b329dbaa76f495a6af8241e9 <comment><USER2> Any recommendations for sessions worth watching?

<comment><USER3> The keynote by James Hamilton[1] is absolutely awesome. You can genuinely tell that James finds all this technology fascinating. He talks about fiber, networking, power, redundancy, scale all with utter enthusiasm.

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

</comment></comment><comment><AUTHOR> I found the playlists on YouTube difficult to navigate. This this list should make it easier to find/sort sessions.

</comment><comment><USER4> Thanks for this! Much easier to go through than the YouTube pages.</comment>


Winning Solitaire - <AUTHOR> https://www.winningsolitaire.com/ <comment><USER2> Reminds me of that one time where everyone was told they were a winner.</comment>


Games and Graphics in Popup URL Bars - <AUTHOR> https://www.matthewrayfield.com/articles/games-and-graphics-in-popup-url-bars/ <comment><AUTHOR> Matthew has demonstrated other cool URL features previously: [https://news.ycombinator.com/item?id=19679890](https://news.ycombinator.com/item?id=19679890)

And I like his video style!</comment>


Help choose which Linux distro saves the earth from alien invasion. - <AUTHOR> This post is for something I have made.  So it is, by definition, self promoting.  But I know many of you will be interested.  So, with that in mind, I'm going to post it anyway.
I have almost finished a novel.  And I need help getting some dedicated writing time to get the last ~10k words down and final edits in place.
The book, "Steve's Laptop", is a Sci-Fi Comedy about a developer named Steve who, while working at "the world's largest software company" near Seattle, is trying to save the world from an alien invasion.  Primarily with his laptop.  Hence the title.
If I were forced to compare it to something I would call it: "They Live" + "Hitchhiker's Guide to the Galaxy" + "The IT Crowd".
I'm holding a "Help me finish this book" sale/fundraiser.  A pay-what-you-want deal where you get my existing books, and get a chance to take part in shaping a small part of the book itself.
Specifically, you get to vote on which Linux distro is used on "Steve's Laptop".  If you want to see Arch save the world from alien invasion... this is your chance.
More Info: http://lunduke.com/2013/12/10/the-help-bryan-finish-this-book-sale/ <comment><AUTHOR> Here's the link to additional info so it's more clickable :

[http://lunduke.com/2013/12/10/the-help-bryan-finish-this- boo...](http://lunduke.com/2013/12/10/the-help-bryan-finish-this-book-sale/)</comment>


Lion: Cocoa Autolayout Release Notes - <AUTHOR> http://developer.apple.com/library/mac/#releasenotes/UserExperience/RNAutomaticLayout/_index.html#//apple_ref/doc/uid/TP40010631 <comment><USER2> Some of that document is out of date - Interface Builder does have support for Auto Layout now. Auto Layout also has a space now. ;-) I like to spell it [Auto]-[Layout] (see the ASCII art programming language part of that document).

People may also be interested in the WWDC session on Auto Layout: <http://goo.gl/5sSgK> (requires free developer account).

Some interesting aspects of the system to me:

(1) The use of fairly simple but freeform constraints. The numerical solver is based on work in this paper, <http://goo.gl/6fHdd>. They end up covering really a lot of stuff you want to do in a natural way, and with a single constraint object with few properties.

(2) The emphasis on visualization. Most of the time constraints are created visually, in Interface Builder, by dragging objects around and snapping them together. When doing layout in source code, you use an ASCII art inspired format string that visually looks like the interface you're trying to create. When debugging at runtime, you can ask a window to draw constraints on screen, so that you can see what they are. (The debugging support itself is also interesting.)

(3) The reworking of how layout fits into Cocoa's model-view-controller design. Previously, too much was in the controller layer - to do layout you ended up having to say things that you didn't really know, because it was data intrinsically known by the view layer. By reworking the layering, the views can take responsibility for those aspects of layout that are intrinsically known to the view. This takes a lot of pressure off, because (a) you don't have to specify things you don't know, (b) there's less work to do because the views are doing some of it, (c) a lot of the time the views are coming out of AppKit, so you never have to write the view parts at all. It also aligns the easiest thing to do (don't mess with the views) with the right thing to do (use standard OS behavior). If you want to make it do something unusual, you can, but you have to say so. Your code records the places you intentionally deviated.

[Disclosure - I worked on this.]

<comment><USER3> _> When doing layout in source code, you use an ASCII art inspired format string that visually looks like the interface you're trying to create._

This is a cool idea. Instead of specifying layout inside strings, did you consider syntactic sugar or macros to do it in code?

<comment><USER2> Yes… let's talk macros first. Actually, first first you should look at multi- dimensional analog literals if you haven't seen it, <http://weegen.home.xs4all.nl/eelis/analogliterals.xhtml>. Awesome/yikes.

Okay, back. What are the reasons to consider macros? Probably, compile time checking and ability to directly use variables that are in scope (e.g., fooButton for some button).

The goal of compile time checking is really debugging, to make it easy to find and fix mistakes. Now, in a format string, we don't have compile time checking, but we can have really good, descriptive error messages. Our diagnostics were inspired by those in clang, [http://blog.llvm.org/2010/04/amazing-feats-of-clang-error- re...](http://blog.llvm.org/2010/04/amazing-feats-of-clang-error- recovery.html), right down to the carat pointing at the problem within the code. Maybe we could have done that with macros? I guess I didn't really try that hard, but usually if you mess up a macro, you're going to get something really cryptic from the compiler. Also, it's wayyyy easier for the client to grok and feel comfortable with a format string than with a crazy macro system. You know how we're parsing the string. You could implement it yourself if you had to. It's understandable, and you can see that there won't be side effects. Now consider that multi-dimensional analog literals link above. Does it work? Heck yeah! Do you want black magic like that in your code, with behavior you don't understand (at least without way more investment in understanding than we want to require)? Probably not! Plus, we're likely to have to compromise on the visual design of the language now and/or in the future to contort it into what's technically possible in macros over ObjC. This will also hurt debugging, in that you'll be less likely to quickly understand what your code says. So for debugging, I don't think macros are actually going to be a win, despite the compile time checking. And really, the above concerns are enough to kill macros for me.

Plus, we might be able to recover most of the compile time checking anyway. I'd love to see clang's __attribute__ format extended to do checking of Cocoa visual format strings. [http://gcc.gnu.org/onlinedocs/gcc/Function- Attributes.html#i...](http://gcc.gnu.org/onlinedocs/gcc/Function- Attributes.html#index-Wformat-2426). We have a bug tracking this.

Ability to directly use variables is a positive for macros. As is, we have to pass a dictionary on the side that maps identifiers to actual view objects. In python you could pass locals(), but ObjC doesn't maintain a symbol table at runtime. For this we actually do pull a skankier-than-usual macro trick to make things easier.

        id views = NSDictionaryOfVariableBindings(fooButton, barButton);

expands to something equivalent to

        id views = _NSDictionaryOfVariableBindings(@"fooButton, barButton", fooButton, barButton, nil);

and _NSDictionaryOfVariableBindings parses the comma separated string to make a dictionary mapping @"fooButton" -> fooButton.

        #define NSDictionaryOfVariableBindings(...) _NSDictionaryOfVariableBindings(@"" # __VA_ARGS__, __VA_ARGS__, nil)
        APPKIT_EXTERN NSDictionary *_NSDictionaryOfVariableBindings(NSString *commaSeparatedKeysString, id firstValue, ...); // not for direct use

Okay, last, why not make this an actual part of Objective-C, like regexes are in some languages or like LINQ is in C#.

I feel like the reasoning here is more wishy-washy, so I don't know, maybe it's wrong and we'll revisit it. Our system has a continuum from leaf code on which nothing else depends, like apps, down through AppKit, Foundation, and Objective-C. The continuum isn't really defined by what framework some code is in, it's defined by how much sits on top of it in the dependency stack. As you go down toward the deeper and more built-upon parts of the system, reliability becomes more and more important, and our ability to cheaply change our minds if an interface isn't working out goes down. The standards for simplicity and wide applicability go up and up. Objective-C's deep. You can literally learn _all_ of Obj-C in a weekend if you know C. We like that. In recent releases we have relayered things like memory management (GC, ARC) and properties from being framework conventions to being formal parts of the language. But that's where the language is right now. There's a pretty clear divide between language and framework, and the language doesn't reach up and violate the layering much. If we're thinking about moving something like these layout format strings into the language, we should also be thinking about printf- style format strings (or other templating), Core Data predicates, regular expressions and lots of other Cocoa-ness - basically obliterating the existence of any kind of layer boundary between ObjC and Cocoa. These would be extremely controversial changes, inside and outside of Apple. That doesn't necessarily make them wrong, but I'm not confident they're right. Anyway, it's something that could be considered in the future.

<comment><USER4> In my/the ideal world, clang would have some plugin feature where it knows that it must pass that string to some external DLL for validation. Ideally, that DLL should be able to generate code (just as the C preprocessor), but I fear that would require quite some interface between plug-ins and clang.

I think it already would be a big win if that DLL only could use the compiler state to issue error messages.

Open problem is how clang would know that a string needs external validation. I think a variant on the @"string" format might work:

        id myConstraint = @layout"[button]-[textField]";

        id myRegex = @regex"^[a-z]+$";

(I say might because the C++ grammar has some corners that may deliver surprises here; with (im)proper function overloading, the compiler might find a way to interpret @layout as taking the address of layout)

The link between prefix and DLL should be a command-line argument to clang. Problem, of course, is that you give up compatibility with other compilers. Also, this is more clunky than it needs to be; in a 'proper language' like Lisp the integration would be seamless.

</comment></comment></comment></comment><comment><USER5> The syntax is crazy, but brilliant. I would never have thought of it myself, but now that I've seen it it's obvious.

The main thing I wonder is whether the syntax is supported by vanilla objective c, or if Apple is cheating a little (i.e. building support for new hotness into the compiler).

<comment><USER6> I did this years ago, in a project called Claro, and then again in <http://ihate.rubyforge.org/profligacy/lel.html> and pretty much every GUI framework I've done. I got the idea from Wiki syntax and the Cassowary constraint solver as well as Knuth's algorithm.

Apple's done nothing original here.

<comment><USER7> This is awesome. This concept of building elastic layouts with ASCII code is new to me and I agree with @jamesaguilar that it's one of those obvious yet genius ideas.

Has anything been done towards this direction to generate CSS layouts? It seems like it could cure some headaches.

<comment><USER8> Yep: <http://www.w3.org/TR/css3-layout/>

</comment></comment></comment></comment><comment><USER9> Current documentation (as of 2011-07-06): [http://developer.apple.com/library/mac/#documentation/UserEx...](http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html)

Demos: [http://developer.apple.com/library/mac/#samplecode/Cocoa_Aut...](http://developer.apple.com/library/mac/#samplecode/Cocoa_Autolayout_Demos/Introduction/Intro.html)

</comment><comment><USER10> The first time I saw compiled constraint based mini-languages like this was in OpenLaszlo:

<http://www.openlaszlo.org/>

It's one of the most brilliant yet underappreciated bits of software I've come across. Are there others?

<comment><USER11> I love the constraint system in OpenLaszlo too, and I've used OpenLaszlo for many projects. The "Garnet" user interface system, developed in the 90's by Brad Meyers at CMU, also has constraints for laying out user interfaces. I worked on both Garnet at CMU and OpenLaszlo at Laszlo Systems. Here's a description and comparison of the two systems, that I wrote a while ago:

Constraints and Prototypes in Garnet and Laszlo: <http://www.donhopkins.com/drupal/node/69>

"Once you've tasted a programming language with constraints, you will not want to go back. Programming without constraints is like writing in machine language: error prone, low level, tedious, inefficient and mind numbing."

"Constraints are like structured programming for variables: In the same way that it's better to use loops and conditionals instead of gotos, it's also better to use declarative programming that says what you mean, instead of imperative peeks and pokes and side effects."

A description of OpenLaszlo:

What is OpenLaszlo, and what's it good for? <http://www.donhopkins.com/drupal/node/124>

I also worked briefly on a cross platform gui system called Galaxy, for a company called Visix, which had a constraint system called "springs and struts". But it turned out they were evil so I left. (The company, not the springs and struts. ;)

</comment></comment><comment><USER12> The whole boxes-and-glue model reminds of TeX. Sure, constraint-based layout models are nothing new, but here we've got some specific similarities: line- based processing, optional arguments (H|V) in front, and especially priorities. Assigning priorities to different constraints is what allows TeX to degrade gracefully... before manifesting myriads of hard-to-trace bugs.

</comment><comment><USER13> Is this really the first constraint-based layout system in OSX land?

<comment><USER2> No. The existing Cocoa system was constraint based too, just more restrictive constraints (view to superview only). CoreAnimation had a constraint based layout system, Carbon had a constraint-based system.. just "constraint-based" doesn't capture what's interesting.

</comment></comment><comment><USER14> Ok. Still miles away from what WPF proposes...

<comment><USER15> The WPF system is hierarchical rather than constraint-based. I've done a variety of complex (I mean really complex) WPF layouts that need to scale, and they're complex and fiddly. In many cases I would rather have had a constraint system. When you try to align things to a layout grid in any way, for example, it becomes very awkward.

But it's not clear to me constraint-based layout deals well with dynamic content; this may be a tradeoff.

<comment><USER16> I was told that WPF could produce "swastika" layouts. Ie, something along the lines:

            aaaaa bb
            aaaaa bb
                  bb
            dd    bb
            dd    bb
            dd
            dd ccccc
            dd ccccc

This is as tabular as "grid" from Tk. You can resize any of "a", "b", "c" or "d" widgets and everything will resize accordingly.

So I have an impression that WPF is constraint-based.

</comment></comment></comment><comment><USER17> This document is too long to read on a screen (yes, I'm old). I got it into Instapaper, but would prefer physical paper.

Is there a link to a pdf version or something, somewhere?</comment>


Gizmodo: Psystar's a Hoax - <AUTHOR> http://gizmodo.com/380488/psystar-exposed-looks-like-a-hoax

<comment><USER2> Wow, further evidence that the most important tech book I ever read was Maurer's _The Big Con_ :

[http://www.amazon.com/Big-Con-Story-Confidence- Man/dp/038549...](http://www.amazon.com/Big-Con-Story-Confidence- Man/dp/0385495382)

I keep waiting for an enterprising Nigerian journalist to write the 419-scammer version of this book.

</comment><comment><USER3> But...but...darn.</comment>