An interview with Leslie Lamport (creator of Latex, Paxos, etc.) - <AUTHOR> http://www.budiu.info/blog/2007/05/03/an-interview-with-leslie-lamport/ <comment><USER2> A bit old, but a nice catch! I liked this bit:

> Write a book based on a selection of distorted anecdotes showing that > instincts are superior to rational judgment and you get a best seller. > Imagine how popular a book would be that urged people to engage in difficult > study to develop their ability to think so they could rid themselves of the > irrational and often destructive beliefs they now cherish. So, trying to get > people to think is dangerous. Over the centuries, many have been killed in > the attempt. Fortunately, when applied to programming rather than more > sensitive subjects, preaching rational thought leads to polite indifference > rather than violence. However, the small number of programmers who are > willing to consider such a radical alternative to their current practice > will find that thinking offers great benefits. Spending a few hours thinking > before writing code can save days of debugging and rewriting.

I'm not sure I agree, though, ultimately. Sometimes too much up-front thinking about big huge complex systems is just not possible or productive. It's better to get in and start interacting the system, as that can also drive a more thorough _understanding_ of the system.

<comment><USER3> But he did say 'a few hours'. That sounds about right to me.

<comment><USER2> Ok, but he's talking about it in the context of attempting to write provably correct programs.

</comment></comment></comment><comment><USER4> Nice!

I particularly liked the bit about Butler Lampson being the first to understand Paxos, mostly because I'm current in his distributed and concurrent systems class. It turns out that when Lamport wrote the paper The Part-Time Parliament, Lampson told him that nobody actually understood it. To prove him wrong, Lamport called a few colleagues and asked them a few elementary questions about the algorithm. They all got it wrong. That prompted him to write Paxos Made Simple.

It's good to know that it's not always my fault when academic papers are entirely inscrutable.

<comment><USER5> Well, out of fairness, The Part-Time Parliament is a story about a fake Greek society, replete with "Greek"-style reinterpreted names for researchers Lamport wanted to name check. Extended metaphor is not the standard academic approach. Not to mention, the math behind the paper is kind of beyond the grasp of most on the first few readings.

[http://research.microsoft.com/en- us/um/people/lamport/pubs/l...](http://research.microsoft.com/en- us/um/people/lamport/pubs/lamport-paxos.pdf)

<comment><AUTHOR> "The Paxos algorithm, when presented in plain English, is very simple."

The abstract of 'Paxos Made Simple'. You have to appreciate the humor =)

</comment></comment></comment><comment><USER6> Lamport clocks is one topic that stood out most prominently in everything I took away from my excellent distributed systems class. I have no idea why, but the second I heard "Lamport clock," it got etched into my brain forever.

</comment><comment><USER7> My take away from the interview was

"You should comment code before you write it."

I am going to try it on my code and see how it works out.

<comment><USER3> Steve McConnell advocates a similar thing in Code Complete 2, which he calls Pseudocode Programming Process, PPP.

The idea is that when first creating a method or function, you write out in comments what you're going to do in a 'why' level (eg, 'keep track of resources') rather than a 'how' level (eg, 'increase cntFooBar by 1').

You then start 'filling out' the code to do what you 'designed' via the comments. Hopefully you end up with a better designed routine, and you get free comments to boot as they now explain what the code is doing.

When I first read Code Complete as an impressionable teenager I tried it out and liked it, but I have since had a change of heart on this issue and other Code Complete wisdom. I rarely comment inside methods anymore.

<comment><USER8> > You then start 'filling out' the code to do what you 'designed' via the > comments.

Another approach is to just drop the comment markers entirely, massage the pseudocode until it's valid syntax, and then write a DSL that does the right thing upon its execution. That way, all you ever really have is comments.

</comment></comment></comment><comment><USER9> I seem to recall from the Chubby lock paper the statement: "we have found Paxos behind everything". Of course they expressed it more eloquently.

I think the Paxos papers are among the most beautiful in computer science.</comment>


Survey: 83% of US teens have an iPhone, Android 9% - <AUTHOR> https://www.scribd.com/document/405454631/Taking-Stock-With-Teens-Spring-2019 <comment><USER2> As a student at a middle to upper class high school, I can say that it's definitely not about the actual features of iOS vs Android -- it's just a status symbol. People with iPhones are considered slightly "cooler", or at the very least it's more hip to have an iPhone than an Android. Apple's walled garden contributes to its dominance as well, if all your friends are using FaceTime and iMessage, there's not much that might influence someone to pick an Android phone than economic reasons. Speaking of which, the iPhone vs Android debate among teens really boils down to a thinly veiled version of classism (in my opinion). I heard a classmate respond to a question of what kind of phone she had with, "an iPhone, but it's a 6, so it's pretty much a Droid." (I'm not sure where the 2008 terminology came from, but still.)

<comment><USER3> Maybe these people just like iPhones and it's not some big cynical setup?

<comment><USER2> Perhaps, but somebody in one of my classes had jailbroken his iPhone and was showing off his fancy home screen, which would have been pretty par for the course for a custom Android home screen, and everybody was oohing and ahhing at how cool it was. Really just anecdotal, but I don't think iPhones are more popular purely because they've considered both options and chosen the one they liked more.

<comment><USER4> But the jailbroken phone comes with iOS and the custom Android home screen doesn't. I'm not seeing your argument here, unless it's "stock iOS isn't flashy" or "jailbreaking is cool".

<comment><USER2> > But the jailbroken phone comes with iOS and the custom Android home screen > doesn't.

Right, I'm saying that it's not as much about the actual features or capabilities of the phones, but just that iPhones are cooler.

</comment></comment></comment></comment></comment><comment><USER5> These types of surveys are at best directionally accurate, as I doubt their 8000 teens are a representative sample. Are we to believe that 20% of teens own an Apple Watch, as this survey suggests?

<comment><USER6> They admit to focusing on middle class to high income households, so they might not be far off in those groups. Definitely not representative of the whole country though.

<comment><USER5> Maybe it's a regional thing, as the South was oddly oversampled at 45% of the 8000. I don't hang around teens but do make a point of looking at what tech they're using when I see them, and I've never seen one wearing a smartwatch of any kind. Apple Watch is just getting to the hand-me-down stage so maybe that's it.

I totally buy that Apple has a very strong brand with teens, I just don't see smartwatches as being must-haves for teens. I'd guess more teens would want to put the extra $$ into a newer smartphone (faster & with a better camera) instead of a secondary device.

<comment><USER7> Apple has sort of a lock in for teens in the US because of its imessages app from what I understand. This is something unique in North America as rest of the counties use messaging apps like whatsapp

<comment><USER5> For sure iMessage is huge in the US, and teens are at a time in their lives when social inclusion is pretty much #1 on the list of priorities. I buy that argument. It's that Apple Watch is likely only third on the list of purchases after iOS device + wireless headphones, and has much less social inclusion value, and at that point you've spent many teenagers budgets.

</comment></comment></comment></comment></comment><comment><USER8> I swear my stepdaughter hates me because I gave her my old Nexus 6P. It's a sweet phone, I don't understand the issue.

I don't want to give in and buy her an iPhone, but she had tears in her eyes when I told her $800 wasn't the greatest use of funds.

<comment><USER9> Blue chat bubbles > green ones seems to be a big piece of it. You're not wrong.

<comment><USER10> As a current student this is a huge part of it.

People with androids (green messages) will not be added to group chats because it turns everyone else's messages green. When making plans they will usually get texted individually but it can unintentionally lead to exclusion.

Texting someone with an android is much less convenient than using an iPhone and anecdotally this is one reason kids choose iPhones over Android.

<comment><USER11> As a parent of teenager, it's exactly that. Android phone messes up the iMessage group chat. So kids with Android phone tend to get excluded. Apple is obviously in no hurry to fixed issue. iMessage turn out to be the stickiest social network for the next generation.

<comment><USER12> Apple can fix it but there is nothing stopping Android from implementing something that'll make things not change color.

<comment><USER9> How would they do this? iOS controls the colors on iOS, no?

</comment></comment></comment></comment></comment></comment><comment><USER13> blue bubbles vs green bubbles is a real thing

<comment><USER14> I do wonder what the impact of this is. I can't think of any good way you could study it other than surveying people. Does this have a discernible market effect under demographic most vulnerable to social pressure?

<comment><USER15> People just like to make it sound like it's a really big deal amongst young people. When in fact it's probably just one of dozens of reasons for which they phone they choose.

Treating young people like they are less savvy or reasoned about the decisions is always a mistake. Likewise you can't just treat hundreds of millions of people as thought they are one homogenous hivemind.

<comment><USER16> >Treating young people like they are less savvy or reasoned about the decisions is always a mistake.

I am not sure it is always a mistake. People have made billions of dollars by doing. Look at how sneakers are advertised and sold. On a more sinister note, take a look at the whole Joe Camel cigarette advertising campaign.

<comment><USER15> Most people who are buying expensive sneakers are not young. And it's nothing to do with advertising and everything to do with fashion, hobby, exclusivity etc.

Likewise bringing up cigarette is ridiculous since it ignores the fact that they are highly addictive.

<comment><USER17> > Likewise bringing up cigarette is ridiculous since it ignores the fact that > they are highly addictive.

To be addictive you need to _start_ , and the cigarette companies knew that if you made it out of your teenage years without smoking, there was almost no chance you would start smoking. All of that marketing worked on teenagers specifically due to peer pressure and desire to fit in/be cool. And it's repeating itself with Juul. Virtually no 20+ year old non-smokers wake up one day and think "I want to start a vaping habit."

</comment></comment></comment></comment></comment></comment><comment><USER18> Interesting to know if they were new or hand me downs. I'm a grown up with a job and I don't want to pay double for an iPhone.

</comment><comment><USER19> I'm curious how much is the longer product lifespan of iPhones resulting in parents passing their children hand me down iPhones when they upgrade. Androids don't seem to age as well (as an android user) so they're harder to convince a teen to accept one instead of purchasing something entirely new. Unfortunately the poll data here is very scant.

</comment><comment><USER20> While on vacation with my extended family I found myself somewhat socially excluded from everyone else as they could share photos via airdrop. I provided the group a shared Google Photos album and a few pictures were uploaded, but not as many as they shared directly. I also have trouble receiving SMS messages with Vcard attachments from iPhone users.

One other point, I ran a major outdoor event this weekend and rented iPads for square transactions. There was no question in my mind that we would rent iPads instead of Android tablets. Why? Because all of our ticketing people we're already familiar with the platform.

Android and iOS platforms are not yet interchangeable from a user experience perspective, and I think that's what drives the kids to the iPhone. It's what everyone else has and if I have one, I'm fully interoperable.

<comment><USER21> > It's what everyone else has

Only in the US.

</comment></comment><comment><USER22> As a parent of two teenagers in a relatively affluent part of France I can assure you they have zero interest whether this is Apple or Android. The thing with the bubbles color does not even register.

I would say that the importance of the model is much higher in poorer areas (I know very well a few parents from "the suburbs" (les banlieues), which in France mean unpriviledged zones).

The children of parents who are very well off would have an older phone, sometimes with a broken screen.

</comment><comment><USER23> As a parent, I bought my son an iPhone because of privacy/malware concerns (perceived or otherwise) in the Android world--but we're already an all-Apple household. I wonder if it's Apple's privacy _marketing_ that won the day here? (Green bubbles notwithstanding.)

</comment><comment><USER24> Interesting. How were geographically and socio-economically diverse were these surveys? Were they verified?

It's hard to assess these results without knowing: 1. how many of those teens had any choice; 2. how many teens had an informed choice; 3. how many teens reported having no phone.

<comment><USER25> With regards to "geographically and socio-economically diverse" \- those details are on page 2.

</comment></comment><comment><USER26> Fascinating and if you think about it, it's hardly a surprise.

Kids want to be cool in front of their peer groups (I think all of you have experienced that period in your lives, don't bring up yourself as an exception, it's not contributing to the discussion).

Kids want to be part of social clans and groups.

It's hard to dispute the above 2 statements, so the conclusion that iPhones are the preferred choice due to a. Coolness factor b. Everyone else is using it / walled garden / iMessage

is hardly a surprise.

I would love to see the discussion project onwards to the future -- what implications does this have for when these 13 somethings become 23 somethings with a job and have to buy a phone.

Are they going to switch to Android at some point?

Does majority of the growing population get used to iPhone at an early age, which means we will see an uptick in iPhone adoption in the coming decade?

I find these questions far more fascinating.

</comment><comment><USER27> Definitely not true here in Canada (Ontario). I'd say it's a around 50/50, maybe majority Android.

<comment><USER28> In vancouver, iphones are an overwhelming majority. I think I read somewhere that nationwide it's around 60-40 ios-android?

</comment></comment><comment><USER29> Wow.

</comment><comment><USER30> Sort of makes sense. Android is generally a mess and hasn't really added much of value over the last 4 years. Whereas iOS has had huge yearly updates with actual features.

Plus, iMessage is a huge draw. Android has what, 5 messaging apps?

<comment><USER31> I honestly can't understand why Google hasn't been able to replicate the success of iMessage. It can't be /that/ hard to figure out if the person on the other side is using an Android with a compatible Messaging app version and then switch over to an internet-handled chat.

<comment><USER32> Android has always been a stop-gap for Google. Fuchsia is going to be the first real competitor to iOS.

<comment><USER33> By the time Fuschia actually ships as a complete OS, perhaps the industry will have moved on to a new hardware form factor and smartphones will be considered a legacy product. Sort of like how Android was originally designed as an OS for compact cameras and then later pivoted to smartphones.

<comment><USER32> This is exactly why Fuchsia is a capabilities based OS, designed to run on any device.

[https://misterbugbuster.com/2018/04/19/fuchsia-os-a- modular-...](https://misterbugbuster.com/2018/04/19/fuchsia-os-a-modular-and- capability-based-os/)

<comment><USER33> Historically attempts to create a modular, universal OS that runs on any hardware haven't ended well. Such projects tend to collapse under their own weight due to scope creep and the resulting software is usually too poorly optimized for any particular hardware to make a compelling product.

<comment><USER21> Like Linux?</comment></comment></comment></comment></comment></comment></comment>


How bacteria are changing your mood - <AUTHOR> https://www.bbc.com/news/health-43815370 <comment><AUTHOR> The funniest fun fact: "You're more microbe than human - if you count all the cells in your body, only 43% are human"</comment>


Facebook Open Sources flint, a C++ linter written in D - <AUTHOR> https://code.facebook.com/posts/729709347050548/under-the-hood-building-and-open-sourcing-flint/ <comment><USER2> It amazes me how far out of their way many people will go to avoid using parsing tools.

He avoided using a lexer generator because "I'd figured using a lexer generator was more trouble than it was worth". To him it was more convenient to write a lexer manually (using macros) in C++, then later completely rewrite it in a different language (D) as a one-off trie matcher code generator.

I am amazed that this could be thought of as less work. How can writing two lexers from scratch manually be less trouble than writing a bunch of regexes in a Flex or Ragel file? Especially since the result was likely slower than using Flex or Ragel would have been?

To me the interesting question is: how much of this allergy to external tools is:

1\. the trouble of learning/maintaining something new/different (inherent tool overhead)

2\. design of the tool isn't as user-friendly as it could be (incidental tool overhead)

3\. irrational belief that the tool will be more work/trouble than it actually is (non-optimal decision making)

If part of the answer is (2), then improved tools will lead to greater adoption. And hopefully more convenient tools will lead to them being better known and more widely adopted, which should lessen (1) also.

Everyone uses regexes; using a lexer generator should (in my opinion) be as easy as using a one-off regex. I think the key is to make the lexer generator an embeddable library like regex libraries are.

<comment><USER3> Using third party lexer generators means your project is now dependent on that tool. This means:

1\. the tool must exist on every platform your project will ever be ported to

2\. the same version of that tool must exist on every such platform

3\. if the hosted compiler changes, the tool must be updated in sync with that compiler - out of sync means your project won't build

4\. if there are blocker bugs in the tool, you're not in a good position to fix it. You're stuck with developing workarounds.

5\. Everyone building your project has to get the tool successfully installed.

The current build of D's runtime library has a dependency on libcurl. Supposedly, since libcurl is ubiquitous, that shouldn't be any problem. But it has been an ongoing sore relentlessly sucking up multiple peoples' time, of the issues I outlined above.

<comment><USER4> > Using third party lexer generators means your project is now dependent on > that tool.

I would submit that porting D is signficantly harder than porting flex and/or ragel. Not to mention that the number of platforms that support C++ and D but not flex should be smaller than the number of platforms that support C++ and flex but not D?

<comment><USER3> It's easier to just write the lexer by hand than deal with those issues.

</comment></comment></comment></comment><comment><USER5> Once you get used to tools like `go fmt` or Perl::Tidy it feels barbaric not to be able to cleanly format all your code instantly. Read only linters are nice but something that can reformat code is much nicer.

<comment><USER6> Clang-format aims to provide this for C++.

[http://clang.llvm.org/docs/ClangFormat.html](http://clang.llvm.org/docs/ClangFormat.html) [http://www.irill.org/videos/euro-llvm-2013/jasper- hires.webm](http://www.irill.org/videos/euro-llvm-2013/jasper-hires.webm)

<comment><USER7> While reading the article, I also thought why they didn't at least mention it (and why they abandoned the idea).

It's powerful, fast and will most likely be the base for a lot of {h,l}inting in editors/IDE's moving forward.

edit: Somehow missed that they mentioned Clang not being mature enough when starting this project.

</comment></comment></comment><comment><USER8> Years ago I remember learning template metaprogramming in C++ from an amazing book [1] from the same author of this tool. Even if looking back, I now think template metaprogramming when over-used may be a little bit over the top, I nevertheless have no doubt judging by his author that this new tool must have some very good qualities.

[1] [http://en.wikipedia.org/wiki/Modern_C%2B%2B_Design](http://en.wikipedia.org/wiki/Modern_C%2B%2B_Design)

<comment><USER9> If you enjoyed that you should pick up The D Programming Language by Andrei. It's a good read. Metaprogramming with D is a dream compared to C++ so some of the techniques in Modern C++ Design aren't even necessary.

[http://www.amazon.com/D-Programming-Language-Andrei- Alexandr...](http://www.amazon.com/D-Programming-Language-Andrei- Alexandrescu/dp/0321635361/ref=sr_1_1?s=books&ie=UTF8&qid=1393281290&sr=1-1)

</comment></comment><comment><USER10> I'm a little skeptical that it doesn't use a standard parser like clang. My gut instinct, from experience with crappy c++ "parsers", would be that it works great 95% of the time, but fails the 5% of the time when it'd be most useful.

On the other hand, given the author, and the fact he explicitly mentions wanting to support C++11, I'm not sure my skepticism is warranted.

I wonder if anybody's tried it on a big C++ code base outside of Facebook?

<comment><USER11> It doesn't seem that flint parses at all – it only tokenizes, and then you write "rules" on "streams of tokens." It kinda sounds like a set of fancy regexes, but on tokens instead of characters.

<comment><USER12> That's exactly right. And tokenising C++ is infinitely easier than parsing it, though there are still the odd context-sensitive edge cases like "> >" versus ">>".

</comment></comment></comment><comment><USER13> I chuckled at this passage: "flint is written in the D language, making it the first D codebase open-sourced by Facebook. In fact, our initial version of flint was written in C++; the D rewrite started as an experiment. From the measurements and anecdotes we gathered, the translation turned out to be a win on all fronts: the D version of the linter turned out smaller, dramatically faster to build, significantly faster to run, and easier to contribute to."

Seems like the argument is stronger to rewrite the code being linted, than to use the linter itself ;-)

<comment><USER14> D is actually a pretty nice language. (The caveats are around the libraries, especially the standard libraries to choose from.) I can see D being a better C++, in that it better solves that problems that C++ is supposed to be good for.

<comment><USER15> > The caveats are around the libraries, especially the standard libraries to > choose from.

The old Tango/Phobos situation?

With the advent of D2, that's no longer a thing. Tango is now all but dead.

<comment><USER14> Thanks for the update! I haven't toyed around with D in a while---but it was a mostly pleasant experience the last time I did.

</comment></comment></comment></comment><comment><USER16> GitHub repo: [https://github.com/facebook/flint](https://github.com/facebook/flint)

</comment><comment><USER17> "Even now, clang cannot compile some of our C++ codebase."

Andrei, I'm a bit surprised by this statement. Could you give an example?

Otherwise great work.

<comment><USER18> Here's a gem that clang produces when compiling folly:

"clang-3.4: error: unable to execute command: Segmentation fault"

<comment><USER17> So we're not the only ones. We had to go back to Clang 3.3 because Clang 3.4 had issues with our meta-programming craziness.

But still, I submit a clang-based tool is a better bet in the long run.

</comment></comment></comment><comment><USER19> I am surprised how short the tokenizer is. The other thing is D looks surprisingly approachable coming from C++.

<comment><USER20> D is crazy good at boilerplate generation.

<comment><USER21> Exactly. The only thing I know to be more powerful are LISP macros.

<comment><USER14> Have you tried template Haskell?

</comment></comment></comment></comment><comment><USER7> To me, this is more a proof of concept implementation in D than a tool I'd consider having part of my workflow. The dependency chain and "exotic" language choice makes just having it available in your ecosystem a higher jump than what utilities like linters should require.

<comment><AUTHOR> Clearly that's something to worry about. What won our team over was the (sometimes spectacular) speed gains compared to the C++ linter.

<comment><USER22> Could you comment on why it is faster?

</comment></comment></comment><comment><USER23> This looks really good. Having checks like this integrated and automated is the big win. Like data backup, if it's not automated then it doesn't really count.

</comment><comment><USER24> > Marking namespace-level data as static inside a header is > almost always a > bad idea.

Can anybody explain this to me with some example?

<comment><USER25> Next sentences:

        Labeling the data as such potentially generates one instance of the
        static data inside each compilation unit, including that header. Fixing
        these issues has led to measurably smaller and faster executables.

When you include that header in two different .cpp files, which compile to two different .o files, you have that data twice, local to the .o file (compilation unit).

Now link them together and you have that data twice in the executable. You probably did not want that. (But -- as with some more of their examples -- maybe you did indeed want that?)

</comment></comment><comment><USER26> I'm going to the D conference!!! :-)</comment>


RIP Apache Harmony - <AUTHOR> http://www.infoq.com/news/2011/11/apache-harmony-finale/ <comment><USER2> Two large companies, Google and IBM, have invested a lot of money and have built multi-billion dollar businesses based on Java: Android and the Rational/Websphere Suite. They're probably losing a lot of sleep at night knowing another large and independent player like Oracle owns the thing. I would. IBM has even "joined" the new OpenJDK effort. But it's just a matter of time until they resign over some $$ or licensing dispute.

I wonder why they don't seriously team up and do something about this. Google has already many language and vm designers on board, with Python, V8 and Go all increasingly popular. IBM too is no stranger to building languages, runtimes and databases from the ground up.

Instead of setting up a true open standard for a cross-platform environment and language, they choose to spend billions on patents and legal fees to defend their status-quo.

</comment><comment><USER3> Interesting in that Android uses some code from the Harmony project: [http://en.wikipedia.org/wiki/Apache_Harmony#Use_in_Android_S...](http://en.wikipedia.org/wiki/Apache_Harmony#Use_in_Android_SDK)

<comment><USER4> As an android developer, this has me very concerned. I am worried that the subset of Java that Android comes with diverges more and more over time from the official implementation, and Android's subset becomes the new IE6.

Over time, i expect more and more libraries that I use which were not designed specifically for Android, but work fine nonetheless - to begin having issues with the java subset provided by Android unless Google works hard to keep their subset up to par.

Already, Android seems like its own little island without much of an ecosystem.

It seems both Mac and Windows' respective platforms are converging; this will make it easy to share code between respective variants of those operating systems, although there will be unique considerations to be made in terms of the UI for each form factor.

Google does not communicate future plans about these things, and I'm not convinced they have the resources and wherewithal to keep Android's Java subset on par with official Java. Especially without the java compatibility test tools. I feel as if Google has been limping along just barely enough with Android to keep up with iOS and and soon, WP7/8.

Part of me wishes Google would just work something out with Oracle so that we can use an official implementation of Java on Android … or just get rid of Java altogether and use another language.

</comment></comment><comment><USER5> RIP? WTF? Android recycled a large portion of the Harmony code base (this is why the Sun/Oracle Java case is both vs Google and Apache, even if not explicitly).

The only thing Android does thats new is the Dalvik VM. The rest is Harmony's classpath and friends.

<comment><USER6> Had they used OpenJDK, wouldn't they be Oracle-proof?

<comment><USER7> OpenJDK is GPL, that would force all apps on the Android market to be GPL too.

<comment><USER8> That's not likely. The apps don't extend the JVM in any way - they just use it. It's like eglibc and any app on the system. That specific libc is LGPL, but that doesn't mean any application using it has to be using the same license.

Edit: just realised it's not the best example because the apps are actually linking and that's allowed by LGPL. Better one would be probably mono which does use GPL.

<comment><USER9> Mono is multi-licensed, as shown here: <http://www.mono- project.com/FAQ:_Licensing>

* The C# compiler is dual-licensed as MIT and GPL. * The tools are GPL. * The runtime is LGPL. * A few more interesting parts from Microsoft are Microsoft Permissive, with some dual licensed as Apache.

</comment></comment></comment></comment></comment><comment><USER10> Too bad it's not "RIP ECMAScript Harmony"</comment>


Startup raised $7M, to authenticate people based on their typing style - <AUTHOR> https://techcrunch.com/2020/01/03/this-startup-is-raising-7-million-for-a-technology-that-can-authenticate-people-based-on-their-typing-style/ <comment><USER2> congrats!</comment>


The "Cobra Effect" that is disabling paste on password fields - <AUTHOR> http://www.troyhunt.com/2014/05/the-cobra-effect-that-is-disabling.html?m=1 <comment><USER2> If I encounter something like this - F12, find field add value="password", you could also run a script into console to "type the password". It is good we can trigger events in js.

The feature is absolutely pointless. And does nothing for security.

I just loved slack yesterday - it just sent me a magic login link to my email. Problem SOLVED. It would have been solved completely if we had working PKI infrastructure that secures everything in transit is encrypted and the message was signed with my public key, but baby steps.</comment>


Lifelong procrastinator tracks productivity for 14 days. - <AUTHOR> http://www.visakanv.com/blog/2013/10/0100-14-days-later/

<comment><AUTHOR> Okay, on hindsight 14 days is a really short time. It felt like a big deal for me because it's quite possibly the longest I've not-broken-the-chain, ever.

Typically I have some sort of minor screw-up somewhere. But I'm on track, and it feels great, and I hope this is useful to someone.</comment>


Mark Shuttleworth announces Ubuntu 11.04 will use desktop version Unity - <AUTHOR> http://www.omgubuntu.co.uk/2010/10/ubuntu-11-04-unity-default-desktop/

<comment><USER2> For better or worse, it becomes more and more sensible to think about Ubuntu as a separate operating system, built on top of technologies like Linux, Debian or GNOME. Sort of like Android is built on top of Linux and Java, except less extreme, or what HTC and other handset makers are doing on top of Android. And on the more extreme example, one could argue Apple did the same with BSD and Mach.

If the platform is commoditized, it's relatively "easy" for companies to build a new personality in the way they think will add value. Canonical's great push forward was and is realizing that one of the biggest problem with Linux desktop nowadays is UX, and they're trying hard to fix that.

Personally, I prefer GNOME Shell and I think it's going to rock, especially on tablets. I've tried Unity in Maverick on a few netbooks, just for a few minutes each, since it's default for live install image. I do think it lacks polish and stability and, compared to Moblin/Meego, it's still got a long way to go towards tablet friendlyness.

But I love the fact that there are options [0], and that Linux Desktop, aside from never having its year, is a viable platform on which people can experiment and build cool stuff, even if the end users never learn that under this Ubuntu (or Fedora, ...) operating system there's something geeks have holy wars about.

[0] Then there is, obviously, KDE, which a great many people use and love. But this is a comment about GNOME technologies :)

EDIT: markup

<comment><USER3> > But I love the fact that there are options.

In a year when we've seen iOS increasingly restrict its own ecosystem, limit options it doesn't like (see the current story about Jobs nixing the orientation lock on the iPad) ... and even start to take over The Mighty Desktop (see OS X Lion), that thought is a breath of fresh air.

Nuff said.

</comment></comment><comment><USER4> I think it's a great move. They were wasting time and energy in spats with Gnome. Now they can do what they want with the desktop without anyone getting upset that they are not trying hard enough to work their changes in upstream or adding features that aren't wanted upstream.

<comment><USER5> > They were wasting time and energy in spats with Gnome.

Gnome is much more than just metacity or gnome-shell. Even with Unity, Ubuntu will still depend on upstream gnome software for its desktop.

<comment><USER4> No one said they weren't going to include gnome software. This whole new ui issue stems from differences in opinion in UI/UX and there was a lot wasted going back and forth with Gnome about them.

<comment><USER6> Can you document or reference the _"lot wasted going back and forth"_? That sounds like a convenient rationale, but doesn't appear to reflect reality.

</comment></comment></comment></comment><comment><USER7> For those wondering what unity is, here is a great presentation about it by Mark Shuttleworth at DebConf10.

[ogv file]

[http://meetings-archive.debian.net/pub/debian- meetings/2010/...](http://meetings-archive.debian.net/pub/debian- meetings/2010/debconf10/high/1115_The_Unity_Desktop_Environment.ogv)

<comment><USER8> streaming version: [http://www.omgubuntu.co.uk/2010/08/mark-shuttleworth- talks-u...](http://www.omgubuntu.co.uk/2010/08/mark-shuttleworth-talks-unity- at-debconf-10/)

</comment></comment><comment><USER9> I haven't tried Unity yet because I heard to wasn't quite stable. But from what I saw of a friends laptop who had it installed, it looks PERFECT for netbooks, even tablets (now that we have multi-touch support built in). I think this makes sense seeing as the future of computers (desktops included) will probably be touchable interfaces that can use that kind of layout.

Sweet!

<comment><AUTHOR> I tried it, unfortunately doesn't seem to work on my laptop :/

I'm not sure what's the deal with it, seems to have some special hardware requirements. I can't fathom what these are, seeing as I have an ATI Radeon video card.

<comment><USER10> Atom processor?

<comment><AUTHOR> I was under the impression that Atom is weaker than Core-i7

<comment><USER10> I was under the impression that Ubuntu Netbook Remix only supports Atom. It's the only processor listed in the UNR System Requirements:

[https://help.ubuntu.com/community/Installation/SystemRequire...](https://help.ubuntu.com/community/Installation/SystemRequirements#Ubuntu%20Netbook%20Edition)

<comment><USER11> I don't know what range of processors it supports, but it does run in LiveUSB mode on my ThinkPad x60 (core2Duo) for what it's woth.

<comment><USER10> Atom is still x86, but UNR has made some Atom-specific optimizations to the kernel. I don't know the details, but there may be some partial incompatibilities that prevent it working on some non-atom x86 cpus but not others.

<comment><USER12> I installed 10.04 netbook edition on an old Dell inspiron, and it didn't grumble. Didn't do any subtle animation effects either, but that wasn't a biggie. Was a little slow flipping between the global menu and other apps which was a bit annoying for a 1.5ghz laptop with 512MB of ram! I was alarmed to see the omission of virtual desktops, and menu integration was a little odd. The person who received their updated laptop appears quite chuffed, given the choice again I would have used bog standard Ubuntu, but I was hoping the netbook edition might have some sensible power saving features.

</comment></comment></comment></comment></comment></comment></comment></comment><comment> Ocho-Bits On it's current state it's pretty slow and bloated. Let's hope that on six months they can fix the suck. Kudos for trying something new and not copying OSX or Windows 7.

<comment><USER13> Did you look at their Dock drawing and menu titles? Straight ripoff of the Mac OS X Dock and Dashboard dock.

<comment><USER14> In fairness, pretty much _every_ user interface feature that isn't a command line has been copied from the mac at some point in the last 26 years.

<comment><USER15> To be even more fair, Steve Jobs was so impressed by the innovative graphical user interface he had seen at Xerox PARC that he copied many of its features in the original Macintosh.

Don't get me wrong, this is a good thing. We all stand on the shoulders of giants.

</comment></comment></comment></comment><comment><USER16> Fingers crossed this encourages Parallels to improve their support of compositing in Ubuntu VMs (since, I assume from another article, Unity required compositing). I've still not yet had it working reliably. Any idea if Parallels 6 works any better?

<comment><USER17> VirtualBox too. I've never been able to make Unity on Maverick Netbook Edition work on VirtualBox 3.2.x.

<comment><USER16> I hear you! VMWare Fusion also has these issues for me.

I miss compiz (or whatever it's called these days) when devving under Ubuntu under OSX :/

</comment></comment></comment><comment><USER18> Cool. I always thought Unity looked awesome, I'll be happy to have it on my desktop.

</comment><comment><USER19> I've already completely removed gnome-panel in favor of just Gnome-Do and Docky. Don't see the appeal in Unity. Looks like my gnome-panel setup used to: skinny left bar with Talika window list plugin. I don't see the need to have panels to go all the way across a screen dimension anymore.

<comment><USER20> All I use gnome-panel for is the wifi applet and the the load monitor. I make it auto-hide and bind a key to show it in order to save screen space. But I don't see the appeal of Docky over gnome-panel--isn't it just for launching programs? xbindkeys is way better for that.

<comment><USER19> i use it just as a windowlist autohiding on bottom to show open programs. I like the UI\feel more than a panel extending across the whole screen. Also, the clock docklet is better than the default gnome-panel system clock. I also really enjoy the Timer docklet as well. I open new programs with Gnome DO by typing and do not pin stuff to it.

</comment></comment></comment><comment><USER21> Is this a new C api [competing with KDE / QT and GTK] ?

Why not use Javascript/SVG/HTML5 for Linux desktop UI ? It will happen eventually, anyway, Im not the only person saying this.

The browser stack is a better alternative to X-Windows protocol, on balance - you can keep the advantages of client/server separation by using ajax+websockets.

Or go the Node.js route and expose OS parts as Javascript API.

Either way you'll have an environment many more people will enjoy hacking UI on, and therefore better chance of improving Linux desktop.

Although its open source, its still another API that is used nowhere else.. so its expensive for a developer to jump in.

<comment><USER22> Unity is just a window manager - not a new toolkit (you still use GTK, Qt or whatever else).

But you're right to think web technologies could work elsewhere. Gnome Shell is being developed in JavaScript amd CSS. See also the Palm Pre.

<http://live.gnome.org/GnomeShell>

<comment><USER6> Unity (and GNOME Shell for that matter) is probably best described as a "shell" rather than a window manager.

Like the old school GNOME Panel (and taskbar in Windows, Dock in OS X), the shell is for launching things, the entry point to getting your computer to do things.

Both Unity and GNOME Shell rely on an external window manager, albeit in an interesting way: They are _plugins_ for mutter (a Clutter-based version of Metacity). When Unity switches to Compiz, it may be as a plugin or as a separate processs, not sure.

<comment><USER22> I thought I used the wrong term. Thanks for clarifying the differences.

</comment></comment></comment></comment><comment><USER23> Aaaand I just stopped using Ubuntu as my desktop distro.</comment>


The psychology of hate: How we deny human beings their humanity - <AUTHOR> http://www.salon.com/2014/03/02/the_psychology_of_hate_how_we_deny_human_beings_their_humanity/ <comment><USER2> While hate can be examined, analysis should also be made of the over- humanizing of certain peoples while blatantly ignoring others. While the proverbial fiddle plays during any Shoah reference, hardly anyone notices that Königsberg is not found on maps anymore and that its people have been scattered to the winds.

Many people suffer but scant few receive condolences. Rather than being blinded by preoccupation with historical "recognition" of hate, focus might instead be placed on justice in one's everyday life.

<comment><USER3> Agreed. If anything the rise of megacorporations and ever-more-powerful nation states necessitates denying the humanity of others on a regular basis.

The classical justification for why lying is unethical is that it deprives others of their humanity by denying them the chance to make their own decisions. That raises the question, is it unethical to lie to a machine? If machines aren't human to begin with, then the traditional ethical prohibitions against lying don't really hold up. Of course this applies to literal machines, like when a website asks you if you're 18. But what about machines that are made up of people? E.g. if the Nazis come to ask you if you have any jews in your attic, are you ethically obligated to tell the truth if it's reasonable to assume that what happens from there is determined entirely programmatically, even if those programs are executed by people? These questions are especially important given the massive power imbalances between ordinary people and machines, be they technological, corporate, or political.

I think the lesson for the modern world may be that perhaps we need to teach our kids both to recognize the humanity of others more, but paradoxically also to deny the humanity of other more.

<comment><USER4> > That raises the question, is it unethical to lie to a machine?

This is a fascinating question. I suppose many people would say that it is ok to lie to a machine because it is not sentient. Putting aside the possibility of sentient machines, someone still programmed the machine to ask the question. So by lying to the machine are you not lying to the person who programmed it?

<comment><USER3> > So by lying to the machine are you not lying to the person who programmed > it?

Sure. And this is a problem that has many layers of depth to it, each with many interesting ethical questions waiting to be explored. It would probably make a really good book for someone who wants to make a name for themselves in philosophy.

At the most basic (simplistic?) level though, the reason software exists is to create a mapping such that every valid set of unique inputs always produces the same output. The question is, does the programmer sacrifice their humanity in doing so?

The way a human makes decisions is by looking at all the relevant facts, and then making the best decision in each case based on the information available. Software differs from this in that:

\- You make a single decision, in advance, rather than a new decision for each case.

\- This decision is only based on what you thought would be important at the time the decision was made, without taking into account the unique situational factors 'at run time'.

\- You know in advance that there are going to be both false positives and false negatives, and determine the acceptable rate of each based on the economics of making hundreds or millions of these decisions in aggregate. Of course you also make mistakes when making one off decisions also, so the error rate of software can either be higher or lower than with human decision making. But even if the error rate is lower, the sorts of mistakes that are made aren't necessarily the same.

\- The assumptions made by any given algorithm may become increasingly outdated over time, and often stick around long after any given individual would have stopped making the same decisions.

There are more differences obviously. And of course there are different types of software; lying to someone over a phone on the basis that there is some software converting the conversation from analog to digital and back again is probably different than telling some porn site you're 18. But overall I do believe that this may be one of the most important ethical issues of our time in the coming century.

</comment></comment></comment></comment><comment><USER5> This reminds of a TED talk about the expansion of empathy throughout history and how the reduction in mass cruelty over the centuries correlates directly with our ability as humans to include others (other villages, cities, states, nations, ethnicities, religions) in the same sphere as themselves and are thus able to empathize.

<comment><USER6> I wonder about that. If anything, it seems more like we've been quite destructive this past 100 years, from Hitler to the Stalinist purges. I'd love to claim there's some modern age of enlightenment, but the fact that there are significant conflicts every few years makes me question that.

<comment><USER7> Here's the talk referenced by WalterSear - The Surprising Decline in Violence:

[http://www.ted.com/talks/steven_pinker_on_the_myth_of_violen...](http://www.ted.com/talks/steven_pinker_on_the_myth_of_violence.html)

Seems pretty persuasive.

<comment><USER6> Seems like a problem of measurement. Do we care about how many suffer or what percentage of the world population they represent?

</comment></comment></comment></comment><comment><USER8> If you are interested in history you might be interested in

[http://www.dancarlin.com/disp.php/hh](http://www.dancarlin.com/disp.php/hh)

He's got some very good audio episodes on ww1, ww2, the mongols. He gives a very good telling of the horrors of the conflicts and the passions that drove the wave of murders.

<comment><USER9> Just keep in mind that he gets away with lots of egregious mistakes about history in his podcasts by saying that he is not a historian but just an entertainer.

</comment></comment><comment><USER10> _This lesser minds effect has many manifestations, including what appears to be a universal tendency to assume that others' minds are less sophisticated and more superficial than one's own._

A lot of the stuff in this article runs rampant in various forums on the Internet and especially in interactions between programmers.

<comment><USER11> I think a simpler theory is that a lot of people in Internet societies like forums want to appear to be right above all else, even though they might intellectually realize that their "opponents" arguments are more solid.

But maybe that's just my own projection.

</comment></comment><comment><USER12> Why go so far? 1% of Americans are in prison or some form of detention. But yeah, they do no count.</comment>


Building an API with Go at Microco.sm - <AUTHOR> https://speakerdeck.com/mattcottingham/building-an-api-with-go-at-microco-dot-sm

<comment><USER2> My experience has been pretty similar: Go is perfect for building high performance APIs. A lot of the library infrastructure is still in early stages.

One suggestion: Don't bog down your application server with serving static files (Slide 7. favicon and robots.txt). I put all of my css, js and image files in a /static sub-directory and configured nginx to serve any URL starting with /static without hitting my go-server.

<comment><USER3> Thanks for pointing that out. The static routes in the talk are just for illustration -- we use nginx to serve them in production.

One thing I haven't touched on at all is html template rendering, something I'd like to take a look at in detail at some point.

Would like to hear more about your experience with Go -- is there a writeup somewhere?

</comment></comment><comment><USER4> Nice overview. Somewhat frustrating to see non-gofmt'd code examples. Fix that up :)

</comment><comment><USER5> Maybe I missed it - but it would be really cool to see a large fragment of working code for some of the apis.

</comment><comment><USER3> None of the links work in the embedded version, but if you download the PDF they're fine.

</comment><comment><USER6> As a member of LFGSS and HN, yes!

<comment><USER7> same :)

</comment></comment><comment><USER8> 18k lines? Does that seem high to anyone else? Or am I missing something important?

<comment><USER3> High compared to what?

It's just the output of

        wc -l `find microcosm/ -name *.go`

so is really just a rough indication of the size of the project.

<comment><USER8> Compared to the amount of work that needs to be done for this project to function.

<comment><USER3> In that case, I don't know a number that can be used for that comparison. 18k is the total number of lines in the source code files; the SLOC will be different.

In hindsight, I should've left this number out. It was intended to give background to the overall program size, but it's a small detail that shouldn't be the focus of this discussion.

<comment><USER9> Well, Go has been touted for lower lines of code.

</comment></comment></comment></comment></comment><comment><USER10> Please call them web services or REST API, just API is confusing.</comment>


Wireless charging is useless, until its essential - <AUTHOR> http://venturebeat.com/2012/09/28/wireless-charging-is-useless-until-its-essential/

<comment><USER2> Your title: "Wireless charging is useless, until its essential"

The article's title: "Wireless charging is useless — until it's essential"

See the difference? Please ... _please_ ... don't try to type titles, _copy them_. Don't contribute to illiteracy.</comment>


Sell the problem _and_ the solution... - <AUTHOR> http://www.badscience.net/2008/09/the-medicalisation-of-everyday-life/

<comment><USER2> _" ... alternative therapists, the media, and the drug industry all conspire to sell us reductionist, bio-medical explanations for problems that might more sensibly and constructively be thought of as social, political, or personal."_

 _< rant>_ Bingo. Unfortunately, I feel that most in our society will continue to have difficulty coming to this level of understanding until they can learn to see the purpose of their lives as more than the mere avoidance of death. A testament to the depravity of our destructive consumerist culture. _< /rant>_

Though a more appropriate takeaway in this context might be a recognition of the genius of the pharmaceutical industry in their ability to define(or invent) problems to create markets for their solution.

(no matter how grotesquely obvious, destructive and unintelligent) <http://abilify.com>

</comment><comment><USER3> 'Easy solutions' is such an easy target.

</comment><comment><USER4> Wanting to eat healthy food is the mark of a right-wing lunatic? Rrriiiigghtt...</comment>


Homepage Redesign for Startups: The Steps We Took Before Handing Off to Design - <AUTHOR> http://seatgeek.com/blog/product/homepage-redesign-for-startups-the-steps-we-took-before-handing-off-to-design

<comment><AUTHOR> Thanks we are pretty excited about the final product, which we are currently tweaking.

</comment><comment><USER2> looks great!</comment>


Super Bowl Delivers Thrills, but No Ratings Record - <AUTHOR> https://www.nytimes.com/2017/02/06/business/media/super-bowl-ratings.html?em_pos=small&emc=edit_dk_20170206&nl=dealbook&nl_art=6&nlid=65508833&ref=headline&te=1&_r=0 <comment><USER2> Anecdotally, I feel football is gradually losing ground among younger generations. My sports-watching-est friends seem to be less and less devoted to football in particular and more interested in other, more niche sports. Even those strongly allegiant to football are less insistent on catching many individual games real-time as they are staying informed about the league overall and watching highlights or stream or DVR when they can.

<comment> k-mcgrady Interested to know the niche sports you're finding people showing interest in.

<comment><USER3> soccer. no ads except for half time

<comment><USER4> I guess you consider it niche in the USA but soccer is the most popular game world wide[1].

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

<comment><USER5> It's definitely niche in the US.

<comment><USER6> As long as you define "US" as "white, male, >25".

It's popular with women. It's popular with kids (age 12-17, more popular than MLB). It's popular with the latino population.

<comment><USER5> Not really. They can't get people to watch it on TV, which is why it doesn't make any money.

<comment><USER7> [https://www.nytimes.com/2015/08/11/sports/soccer/nbc- retains...](https://www.nytimes.com/2015/08/11/sports/soccer/nbc-retains- rights-to-premier-league-in-six-year-deal.html)

Two years of success broadcasting England's Premier League proved a basic truth to NBC Sports: It would have to pay a lot more to keep carrying the league's games.

Now it will. Under a six-year agreement announced Monday that starts next season and is worth about $1 billion, NBC retained the rights to the Premier League through the 2021-22 season.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I watched online and the stream was excellent although it lacked commercials which would normally would be a plus but not for the superbowl (anyway I got a roundup of them elsewhere).

Just shows you how broken online advertising is when they don't even play the very best video commercials on offer to 2+ million people watching their stream.

<comment><USER9> I think Super Bowl commercials have jumped the shark. They used to be a fun interlude during timeouts. Now they are just over the top "who can cram the most CGI into 30 seconds of the most impossibly contrived scenario"

Maybe I'm just old. I didn't watch the commercials though.

I did think the halftime show was good. I appreciated the lack of overt political statements.

<comment><USER10> > _Now they are just over the top "who can cram the most CGI into 30 seconds > of the most impossibly contrived scenario"_

Isn't this a good thing though? They're like an art scene now. Fun for the viewers, (I'd guess) fun for the people making them. Just probably not good ROI for the advertisers, which I'd judge as a positive development.

</comment></comment></comment><comment> k-mcgrady >> high enough to tie it for fourth place among the most-viewed programs in TV history

So still huge ratings and only down 600k on last year, which isn't bad when there's over 110m viewers.

Secondly although it was a pretty thrilling final quarter and OT at the half it looked like it was all over so I wouldn't be surprised if a lot of people turned off (as it was nearly 2am for me I nearly did).

Finally, these are only ratings for Fox - I'd be interested to know how it did globally.

<comment><USER11> is the superbowl broadcast globally? I can't imagine it has a huge audience outside the US

<comment> k-mcgrady As at-fates-hands showed it is. In the UK it's on the BBC from about 10mins before the coin toss. We get US commentary but during your ad breaks it cuts to our presenter/pundit team which includes Osi Umenyiora. We also have a weekly NFL roundup show on the BBC and Sky (paid TV) shows live games during the season.

There's also Game Pass where you pay something like £150 a year to stream all games live (although they blackout the ones shown on Sky) and on demand which also gives condensed and highlights version of the games.

<comment><USER12> Wow, so you guys had to suffer through Joe Buck too?

</comment></comment></comment></comment><comment><USER13> There were numerous legal ways to stream the Super Bowl online and on mobile this year for free, it appears these numbers may not include those? I would be curious to see what percentage of viewers used an app or site to view the game this year, and if it makes up for the relatively small drop in TV viewers.

</comment><comment><USER14> I bought my milennial-border kids a box each in the pool. I texted them the pic

They said "we don't have cable" I totally forgot about that. They had NO PLANS to watch any way.

They will watch a replay if Gaga on their commute.

How times they are a changin'

</comment><comment><USER15> How do the ratings compare to the Champions League final?

<comment> k-mcgrady 180m in 2015 [1]

[1] [http://heavy.com/sports/2016/05/champions-league-final-tv- ra...](http://heavy.com/sports/2016/05/champions-league-final-tv-ratings- expected-viewers-audience-super-bowl/)

<comment><USER16> I have no data, but I find it hard to believe such measly numbers. The viewership in Asia itself would be upwards of 200 million (India, China, SE Asia, Middle East where football/soccer is popular).

<comment> k-mcgrady Those numbers are actually originally sourced from UEFA so I would expect them to be accurate. I know the World Cup Final has hugely larger ratings figures but Champions League being a European tournament maybe it isn't very popular outside Europe.</comment></comment></comment></comment>


Pingendo – Bootstrap 4 builder - <AUTHOR> http://pingendo.com/v4-beta/ <comment><AUTHOR> I somehow missed the earlier version of this when it was posted >1 year ago. I was creating some landing pages for a non-profit today, and hadn't done it for a while, so searched online to find a (hopefully free) tool that would output reasonably clean HTML, but provide a bit of help with drag/drop components.

Pingendo seems to do what I need for the moment, and was easy to install with brew cask.</comment>


Why Kakoune – The quest for a better code editor - <AUTHOR> http://kakoune.org/why-kakoune/why-kakoune.html <comment><USER3> Every time I see a new text editor announced for programming, I find that is just a rehash pf unstructured text editing functionality. Programming languages are heavily structured, and code transformations between text and syntax tree forms have been implememted numerous times. So why the focus on editing plain text instead of trying to create an editor that actually transforms the syntax tree directly? I don't know what the UI would look like, but an editor that is based on refactoring operations instead of direct text manipulation might end up being a very powerful tool.

<comment><USER4> Structural editors are great, and normal text-based programming editors should probably support the same kinds of transforms, both precisely and fuzzily.

But a typical editing session will go through a lot of "invalid" states _by design_. Trying to enforce that structure is preserved at all times is a hindrance in many scenarios.

And further, if you bake structure into your editor in that way, it's much harder for anyone to invent new structures. Having good tools for unstructured text editing is valuable as, if nothing else, a fallback for when your structured editor doesn't understand the language you're editing.

<comment><USER3> Invalid states should only need exist in terms of virtual placeholders for elements required by the grammar, but not filled in by the user. I have a (unsupported) suspicion that directly editing a syntax tree when gaps in its structure ate allowed is no more cumbersome than editing the textual representation.

My understanding is that tools like Eclipse and Resharper work on pretty similar models internally to prevent complete failure to understand a code file while it is being mangled by the user.

<comment><USER4> Yes, but that requires a lot of language-specific work and heuristics to make work, and there are still a lot of places where the approach falls down. (Source: I work on precisely that sort of tool for C++.)

So you need the text-based fallback here, and you still need it anyway for the case of editing something a structure the editor doesn't know.

<comment><USER3> C++ is the worst possible language in this case. Its complexity is immense and the C preprocessor layered on top makes a straight mapping between code and syntax tree impossible to achieve in general. Simpler languages like Java or C# (at least relative to C++) allow such syntax tree based tools to reach much, much further. I do believe that it should be possible to build an editor for "nice" languages of that kind that is entirely based on editing the syntax tree.

</comment></comment></comment></comment></comment><comment><USER5> All the biggest gains I've seen in editors are, in order of importance, inline doc lookups, easy local file search with file-customisable ignores, quick file opening with fuzzy search and Emmet abbreviations.

Does anyone know how Kakoune does in terms of these features? They're all much more important to me than say, syntax highlighting, which I find neither here nor there.

<comment><USER6> Kakoune doesn't come with any of these built in, however kak-lsp [1], the language server protocol client implementation, is fairly mature, and I wouldn't be surprised if it supported inline doc lookups. Certainly kakoune provides the facilities needed to implement that.

Cross-file grepping, and fancy fuzzy finders are considered beyond the scope of the editor, but the wiki has some tips for integrating a separate fuzzy finder program into kakoune [2].

Emmet would be super easy to implement but it just hasn't been yet to my knowledge.

[1] [https://github.com/ul/kak-lsp](https://github.com/ul/kak-lsp)

[2] [https://github.com/mawww/kakoune/wiki/Fuzzy- finder](https://github.com/mawww/kakoune/wiki/Fuzzy-finder)

</comment></comment><comment><USER7> I really like Kakoune and its ideas. But I've invested too much into vim to switch at this point :(

<comment><USER8> I have yet to "invest" in a terminal editor, so but I feel like it is impossible to choose.

They all have a steep learning curve and it seems like you need to climb pretty far up that curve before you can even judge if it is worth it to begin with.

<comment><USER9> It _is_ worth it, though not necessarily for improving the things you care about now.

</comment></comment></comment><comment><USER10> I tried this editor a while ago and immediately was able to understand their model for modal editing. Once you've gotten it, it's hard to not wish vim worked this way.

The problem is, vim is everywhere, and Kakoune isn't. :(

<comment><USER11> This is also my problem. Additionally I couldn't work out how to create language-specific rules in the config (tab width, spaces, indenting etc).

I want to switch but need to make the process a bit smoother.

</comment></comment><comment><USER12> I'm so excited about Kakoune! I hope it manages to achieve critical mass along with a booming plug-in ecosystem. As it is, things are pretty lonely.

</comment><comment><USER13> I've just played a bit with it, and it looks really good. What would rock is an Evil-like implementation on top of Emacs...

<comment><USER14> I recall someone in /r/Emacs pointing out that Emacs keybindings already implement Kakoune's "object then verb" philosophy. For instance, to delete text from current position until next occurrence of a letter z, you'd do C-SPC C-s z RET C-w [0]. C-SPC C-s z RET is the object part (C-SPC - start selection (but see [0]), C-s - start incremental search, z - find next z, RET - <USER2> you found what you were looking for). C-w is the verb part - cut region. If you want to cut until the n-th occurrence of z, just press C-s a few times after entering z.

\--

[0] - C-s z RET C-w, if you're not using transient-mark-mode, aka. a visually marked, explicit selection common to most editors. With transient-mark-mode disabled, there is always a region between mark and point, and after accepting a search with RET, C-s drops a mark at the place you were when you started the search. transient-mark-mode is active by default (probably to reduce learning curve); working without it is weird at first, but also rewarding in terms of efficiency.

<comment><USER15> Thank you for this!

</comment></comment></comment><comment><USER16> > Because of the verb followed by object grammar, vi changes are made in the > dark, we dont see their effect until the whole editing sentence is finished. > dtf will delete to next f, if you then realize that was one f before the one > you targeted, you need to undo, go back to your initial position, and try > again with d2tf.

Or just do . (full stop/period), which will repeat the last command, and in this case delete to the f you want.

<comment><USER17> Repeat will only fix this particular case. If you did "dtf" and wanted "dff", repetition won't help.

Kakoune is kinda like vim in visual mode (or block visual) with multiple cursors.

<comment><USER16> > Repeat will only fix this particular case. If you did "dtf" and wanted > "dff", repetition won't help.

My point wasn't that repetition is a panacea, but that the example in the article isn't a good one.

</comment></comment></comment><comment><USER18> Off Topic: None of the Video works on the site works in Safari as they are all webm.

<comment><USER19> I don't think it's a webm thing, they're broken for me in Chrome and FF as well.

</comment></comment><comment><USER20> I can't find any information about the keyboard issues vim has with eg. German layout. Does this editor suffers the same problems?

<comment><USER21> As kak has roughly the same key bindings as vim, if you found vim unbearable, you'll have problems with kak, too. However, I'm not sure what issues you think of, I've used vim/kak with a qwertz layout without problems. Just re- assign äöü.

</comment></comment><comment><USER15> Is there anything here for emacs users? ;) This is really an interesting thread.

</comment><comment><USER22> I love the ASCII arty Clippy for tool tips!

</comment><comment><USER23> Not for Windows.

"Modal editor · Faster as in less keystrokes · Multiple selections · Orthogonal design"

I love it when software developers assume everybody else knows what their software runs on. SMH.

<comment><USER24> The examples are obviously in a terminal so you should expect it to not work on Windows.

<comment><USER25> There are lots of screenshots of vim running in a terminal and yet it works fine on Windows.</comment></comment></comment>


TC Disrupt: Wificoin lets you buy hotspot access with cryptocurrency [video] - <AUTHOR> https://www.youtube.com/watch?v=-5UZUea8iy4 <comment><USER2> wonder if the coin is decentralized? also, what stops me from uninstalling and reinstalling?</comment>


The Gospel of Hard Work, According to Silicon Valley - <AUTHOR> https://www.wired.com/2017/06/silicon-valley-still-doesnt-care-work-life-balance/ <comment><USER2> There's a big element of "fallacy of the excluded middle" here. There's something of a continuum between "work yourself to death" and "goof off and do nothing", with "kinda hard work" somewhere in there. That is to say, you can advocate working hard while still allowing for work life balance. You can also advocate both working "hard" and working "smart". They are not mutually exclusive.</comment>


Ask HN: How Do You Focus? - <AUTHOR> I've always had difficulty focusing. I tend think about other things when I read and when someone is explaining something to me. Anyone ever have this and how did you correct it? <comment><USER2> Assuming that you're generally healthy, not deprived of sleep or otherwise dealing with fatigue, and you don't have sleep apnea, this sounds like a classic description of ADHD. I'm not a doctor though, so take it with a grain of salt; do your research and/or talk to a licensed professional if you have concerns.

My experience of ADHD feels like getting distracted by my own thoughts. Mind wandering at inopportune times, or random thoughts popping into my head. It tends to happen when I'm not effectively engaged by what I'm reading or who I'm listening to.

I generally try to be mindful and aware of my attention and thoughts, to refocus whenever I notice myself wandering off. I try this as frequently as possible, and try to build a habit out of it.

When listening to others explain things, I try to be an active listener. Rephrase what they just said in your own words, as best you can. Engage in discussion whenever possible/polite.

When reading, I like to Doodle, rewrite in my own words, or otherwise find ways to engage with what I'm reading.

Generally, improving one's focus takes time and practice, like any other skill.

</comment><comment><USER3> Maybe if you mention in the question that you've always found it hard, you might get more response. The explanation made it very different from what I expected the question was. That sounds terrible. Good luck!</comment>


Best mechanical keyboard in 2015? - <AUTHOR> I've been spending more time coding on my Macbook and the keys are nice but I wish for more feedback. I've tried few mechanical keyboards and I think I like that.
I don't know much about them but I'd like for the keyboard to be:
1/ illuminated with backlight 2/ standard layout like normal keyboards have 3/ usb 4/ classic look
I've seen Das Keyboard which doesn't look bad but it looks kinda glossy to me, I worry it'd look really dirty.
I really like the look of Happy Hacking keyboard but layout seems to be a bit strange - I don't mind the delete key and relocated backlash button but I worry I might miss ALT key. I'll be using this with OS X a lot so I don't want to relearn everything.
Any ideas? <comment><USER2> It's not mechanical, but the Microsoft Natural Ergonomic 4000 is worth trying because it sits comfortably in the lap. For me, this makes it better than any keyboard with a rectangular layout. No wrist arch. No "where do my elbows go?" In EMACS the symmetrical Alt and Ctrl keys are a huge advantage.

Like many Microsoft products, this is something that comes out of the fact that employees spend a lot of time typing at the computer. It's the kind of product that comes from dogfooding.

It's the AK-47 of keyboards.

<comment><USER3> I really like the Microsoft Natural Ergonomic 4000 but managed to kill two due exclusively to drink spillages. After my second then $40 keyboard went bye bye in a split second, I switched to the much more cost effective Microsoft Comfort Curve 3000 ($13/each).

The Comfort Curve 3000 isn't for everyone. It feels more likely a laptop keyboard and is definitely NOT what the OP is after (since it feels more like his Macbook Pro than the Ergonomic 4000).

<comment><USER4> I love the shape of the Comfort Curve, but the cheap rubbery keys played merry hell on my fingers. I eventually gave it up to the wife.

<comment><USER5> that seems to change over time. I just bought my fourth one, and comparing it to my third it's noticeably stiffer.

</comment></comment></comment></comment><comment><USER6> Matias! [http://matias.ca](http://matias.ca)

I use Mini as my daily keyboard ([http://matias.ca/minitactilepro/mac/](http://matias.ca/minitactilepro/mac/))

The upcoming Ergo Pro looks great (if pricy) [http://matias.ca/ergopro/pc/](http://matias.ca/ergopro/pc/)

<comment><USER2> Looks like it only has one Ctrl key. Not ideal for Emacs.

<comment><USER6> The mini has two:

[http://matias.ca/minitactilepro/mac/viewer/2.jpg](http://matias.ca/minitactilepro/mac/viewer/2.jpg)

</comment></comment></comment><comment><USER7> Buy a particular model for the form factor and any features you want or don't want. (I like tenkey-less without backlight)

But most important than anything is the switches. I have cherry MX greens, and I think they're great for typists.

[http://deskthority.net/wiki/Cherry_MX_Green](http://deskthority.net/wiki/Cherry_MX_Green)

PS: One think you might not like about the Das Keyboard is that their USB models use multiple USB ports for n-key rollover and a USB hub and backlight and stuff like that, or at least the model a friend had did.

<comment><USER8> I have a Das Keyboard Model S Ultimate and I can vouch for the excellent build quality. Cherry MX Blue switches are loud (and I wouldn't use them in an office), but the tactile experience is immensely satisfying.

At work I have a Leopold Tactile Touch "Otaku" Keyboard ([http://elitekeyboards.com/products.php?sub=leopold,fullsize&...](http://elitekeyboards.com/products.php?sub=leopold,fullsize&pid=fc500rtabn)). The switches are Cherry MX Brown, which are quieter but not as satisfying. The build quality on this keyboard isn't quite as solid either.

I don't think Das Keyboard Model S Ultimate had a Brown MX ultimate at the time I bought the Leopold or I probably would have bought that. If noise is an issue I also recommend keyboard landing pads ([https://elitekeyboards.com/products.php?sub=access,slpads&pi...](https://elitekeyboards.com/products.php?sub=access,slpads&pid=sl120_cs)).

Both keyboards are blank which has made me a better typist. I also enjoy the reaction it gets when people come to my desk.

</comment></comment><comment><USER9> I use a WASD keyboard with brown switches. Love it. You can customize your colors and layout too. I went with an all black with blank keys. Looks really nice.

[http://www.wasdkeyboards.com/](http://www.wasdkeyboards.com/)

</comment><comment><USER10> you might wanna take a look at codekeyboards.com seems like the type you are looking for.

<comment><USER11> I highly recommend them if you are looking for a basic and clean looking mechanical keyboard with a backlight. I own CODE 104-Key Cherry MX Green and love the key feedback on it. The only negative is the price but I feel it is worth for the durability. My cat knocked it off my desk and it left a small dent in the floor.

<comment><AUTHOR> Well i'll be buying the keyboard to last me for at least next 5 years. So far I like Code keyboards the best. Don't know much about switches though, I want something tactile but if it's super loud I don't know..

</comment></comment></comment><comment><USER12> I'm using a KUL ES-87 Tenkeyless keyboard with Cherry MX Blue switches. I don't use numpads like.. ever.. so the desk space I saved by ditching it is way more useful to me. No backlight, though.

</comment><comment><USER13> I love my unicomp ([http://pckeyboard.com](http://pckeyboard.com)). Some people know it as the IBM Model M. No backlight, though.

</comment><comment><USER14> Maybe the Corsair K70. It claims to be a gaming keyboard, but it is a fairly standard keyboard layout.

<comment><USER15> I have one - very happy with the quality and price</comment></comment>


Megan McArdle: The Cost Of Meth Prohibition - <AUTHOR> http://www.theatlantic.com/business/archive/2011/01/the-cost-of-meth-prohibition/70565/

<comment><USER2> I suspect that, as with last time, I'll get to meet some people who conflate criticism of an unreliable source with _ad hominem_ attacks, but this is your official reminder that:

1\. Megan McArdle has a pretty lengthy documented history of playing at least somewhat loosely with her facts (and, frequently, of just outright misrepresenting or getting them wrong).

2\. As such, it's probably a good idea to do some fact-checking as part of the process of evaluating her arguments, as the factual premises from which she reasons may not be sound.

Examples of McArdle's past factual issues:

* [http://www.salon.com/news/opinion/glenn_greenwald/2009/01/22...](http://www.salon.com/news/opinion/glenn_greenwald/2009/01/22/abject_ignorance/)

* [http://inversesquare.wordpress.com/2009/07/29/why-andrew-sul...](http://inversesquare.wordpress.com/2009/07/29/why-andrew-sullivan-is-right-about-megan-mcardle-but-not-in-the-way-he-thinks/)

More such can be located through your friendly local search engine.

<comment><USER3> This is a _completely_ content-free comment. Unlike lots of HN people, I think ad-hom has its place. But it only adds value when it's relevant to the article. It isn't here. McArdle isn't asking you to put faith in her meth suppression or pharma background to understand her argument. She could be a semifunctional psychotic and this article would still be solid, if a bit boring.

<comment><USER2> The last time there was a McArdle article posted, I did some research and found issues with it; I also found that this is not uncommon for McArdle. So I posted a comment mentioning this, and got jumped on by a bunch of people for going _ad hominem_.

So think of it as both public-service announcement (since it's still true that she's an unreliable source) and sociology experiment, to see how people react this time around.

<comment><USER3> Please don't make every article McArdle writes be about McArdle herself. That's boring.

</comment></comment></comment></comment><comment><USER4> Why is it important that Megan McArdle wrote this?

(Her name is in the title, should I know of her for some reason?)

<comment><USER3> She's The Atlantic's resident libertarian blogger.

</comment></comment><comment><USER5> Damn Lobbyists! It's a matter of public safety and agree it should be available only via prescription IMO.

<comment><USER3> Huh? Really?</comment></comment>


The Paradox of Choice Illustrated with Jam Tasting - <AUTHOR> http://blogs.intel.com/research/2007/10/parallel_programming_environme.html

<comment><USER2> It reminds me Fromm's Escape from Freedom.

</comment><comment><USER3> this reminds me of java web frameworks and one of the reasons why I left it... well hadoop brought me back =)</comment>


Ask HN: Is your Google CloudShell provisioned in Asia region? - <AUTHOR> I recently have started relying Google CloudShell as my remote development workspace. One thing I noticed is that all of my shells seem to come up in Google's Taiwan datacenter, so the latency to the US is horrible (100ms+ ping).<p>Are you also experiencing this? You can check by `curl http://checkip.amazonaws.com` and then looking up the IP in a geoip database. <comment><USER2> Looking into this now. These sorts of things do not just happen...</comment>


The US Air Force is turning old F-16s into pilotless AI-powered fighters UK - <AUTHOR> https://www.wired.co.uk/article/f-16-us-air-force-qf-16 <comment><USER2> related: [https://news.ycombinator.com/item?id=23461276](https://news.ycombinator.com/item?id=23461276) (no comments though) [https://www.engadget.com/the-air-force-will-pit-an- autonomou...](https://www.engadget.com/the-air-force-will-pit-an-autonomous- fighter-drone-against-a-pilot-121526011.html)</comment>


Ask HN: Why should one learn Go? - <AUTHOR>

<comment><USER2> Because the complexity of the game, emerging from such simple rules, is just stunning.

Because you can make new friends, on- and offline.

Because the handicap system ensures a fair and exciting game, even between players of wildly differing strength.

Because lots of the Go problems you can find in books (or online) are much more fun than Sudoku.

Because the social expectation that the opponents talk about and even partly replay the game and variations thereof (where the stronger player teaches the weaker player, but still learns a lot himself) is really, really great. Are ther other communities where this is widespread?

</comment><comment><USER3> You shouldn't ;-)

It's about being curious and learning new things. Go has kind of nice way of doing parallelism. It tries to support "all-batteries-included" philosophy, so many libs are standard and a lot is open source.

</comment><comment><USER4> I don't know much of Go, but from what I have heard, Go is a good language for backend system programming. It has concurrency built in with rich libraries. The supporting tools and test framework is pretty good. Etc..

</comment><comment><USER5> Knowing multiple languages and paradigms makes you a better programmer. If you're interested in Go, just do it.

</comment><comment><USER6> some people are talking about "go" \- oriental chess and other about golang - new google programming language. There is some confusion here... by the way they are both worth knowing IMO. Cheers

</comment><comment><USER7> no need a reason, just for fun!</comment>