More than 1/3 of all access to Google is now over IPv6 - <AUTHOR> https://www.google.com/intl/en/ipv6/statistics.html#onethird <comment><USER2> The graph is interesting when you zoom in, much more IPv6 use over the holiday period and also recently during the period of lockdown measures. I would guess the majority of IPv6 traffic comes from devices on 4G networks. More devices are on 4G when visiting family and friends over the Christmas period and when working remotely.

<comment><USER3> It's not just 4G. It's consumer networking in general, which isn't held back by legacy enterprise networking equipment. When your residential ISP turns on IPv6 for their network, they also tend to turn on IPv6 for the modem+router combo devices they lease to run your LAN. Or if you're the kind of power user that buys your own router, it's almost certainly new enough to support IPv6.

<comment><USER4> Does IPv6 on an internal network offer any benefit to enterprises (not talking about ISPs here), who may view NAT as a form of defence in depth?

<comment><USER5> Yes, tonnes of benefits. If you've ever been through a merger, you'll know the pain of dealing with getting the everything working when merging networks. That issue doesn't exist with IPv6 to anywhere near the degree because you don't have overlapping RFC1918 space to deal with. IPAM with IPv4 is a massive pain in the backside once you get up to a certain scale, even if you're allocating from 10/8\. If you have multiple DCs, you're in for a world of pain. $WORK is having to use internal NATting for some stuff due to us running low on RFC1918 space, but guess what: even that doesn't quite work because there's a lot of software used in DCs that doesn't play at all nice with NAT.

<comment><USER6> Well - you may have overlapping RFC 4193, but if your network engineers have done their job well, you are randomly choosing from a big honking FD/8 address space, and the odds of a collision are statistically very unlikely.

<comment><USER7> FD/8 space? You mean 10.0.0.0/8? No the odds of a collision on 10.0.0.0/8 are high because:

\- Both corporations probably started allocating from the top

\- Both corporations probably allocated huge subnets.

<comment><USER8> No, FD00::/8\. Read RFC 4193. He's talking about the IPv6 solution, not the IPv4 problem.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> And yet, when I beg my google cloud rep for IPv6 addresses on instances (or on anything that isn't the load balancer) I get told that it is not on the immediate roadmap.

The cloud providers have pushed back ipv6 adoption so hard imo. At least native ipv6 access.

I know they've thrown in some token support and you /can/ make something work; but compared to VPS providers which consistently deliver machines with IPv6 addresses by default- it's a huge barrier to adoption. You have to really /want/ it, and most people don't see the value. Unless it's a backend for an iOS App.

It really frustrates me.

<comment><USER10> Azure's IPv6 "support" _saddens_ me. It's just painful how minimal their support is.

For one, they NAT all IPv6 traffic.

Let that sink in. Let it percolate. Mull over the fact that the entire purpose of IPv6 is to eliminate NAT, and that it's practically impossible to get an IPv6 NAT-ing network device.

Microsoft must have had to write their own, custom network load balancers to NAT IPv6. It's _madness_.

Oh, if that's not bad enough, they also hand out ludicrously small /124 ranges of just 16 addresses. Sixteen! Not sixteen trillion or some crazy huge number like that, which is what I've got on my home internet. Sixteen. Six and ten.

But no worries, right? Just allocate more blocks! Bzzt... that would run up against the subscription IP limits with just 100 addresses.

Okay, fine, just because my _lab environment_ needed more than a couple of addresses doesn't mean that everybody is so _wasteful_ with the precious IPv6 address pool. Some people can constrain themselves to just a handful of addresses, and don't have a problem with any of the above.

Except that when Azure finally adds proper, native IPv6 support, whatever work their early adopter customers have done will have to be thrown out and redone. Subnets. DNS addresses. Load balancer rules. NAT rules. Security Groups. Everything will have to be revisited.

So why would you bother?

[https://docs.microsoft.com/en-us/azure/virtual- network/ipv6-...](https://docs.microsoft.com/en-us/azure/virtual- network/ipv6-public-ip-address-prefix#ipv6-prefix-sizes)

<comment><USER11> We've been experimenting with Azure's IPv6 support at work recently. The fact it uses NAT is insane - though we could tolerate that. Even worse is that the NAT is broken - it doesn't update the ICMPv6 checksum when it rewrites the source/destination address, so the machines on both ends drop all ICMPv6 traffic that passes through Azure.

This is rather bad considering the importance of ICMPv6 in IPv6 (for Path MTU Discovery, for example).

Their support is being rather useless, despite us having to pay for the privilege of reporting a bug in their own infrastructure to them!

<comment><USER10> Path MTU Discovery is broken in Azure's IPv4 stack as well, which is even more sad. Similarly to you, I had to report to them that their VPN tunnels only send PMTUD in one direction, so you get this wonderful experience where TCP streams with big packets work in one direction, but not the other! With most ACK packets being small, this can take a surprising amount of time to discover and troubleshoot.

</comment></comment></comment></comment><comment><USER12> My ISP supports IPv6, and while I can understand why a large organisation would want to use it (especially given the increasing cost and scarcity of IPv4 blocks), I'm still yet to be persuaded of its benefits for home users. I admit that I only have a very cursory understanding of how it works, and perhaps I'm just stuck in my ways, but the scale and complexity seems so extreme compared to IPv4, with no compensating advantages that I can see. So all my devices become globally routable. And? I can already do everything I want and need to do with a single IPv4 address and NAT.

Even just working out what IPv6 devices are on my network and who they're communicating with seems very difficult given the giant address space. I'm slightly ashamed to admit this (feels very anti progress!), but I've blocked all the IPv6 traffic on my home LAN. Devices can still talk to each other, but no IPv6 packets are allowed out to the internet. Everything still works fine. My firewall blocks a few hundred MB per day of IPv6 traffic, and I have no idea what any of it is.

Very happy to be told why I shouldn't do this though.

<comment><USER13> What complexity? Devices being autoconfigurable without DHCP is less complex. Having no NAT is less complex. Having a public IP is less complex. You just got used to the complexity of IPv4.

Why the hell would you block IPv6. You ARE stuck in your ways. OS vendors consider it necessary on LAN for various functionality.

<comment><USER14> > What complexity?

1\. What the hell is DHCP-PD and is it better on or off?

2\. What are 6to4, 6in4, 6rd, etc. and should the user care?

3\. When should autoconf be stateless vs. stateful? I thought the point of IPv6 was to allow things to be stateless?

4\. When should DHCPv6 be enabled vs. disabled? Why the hell is this even a question on some routers if devices are supposed to be "autoconfigurable without DHCP"?

5\. What are the more subtle implications of all of the above that are not necessarily mentioned?

6\. Give one good reason why in the world _every single one of every user 's devices_ should be reachable _from anywhere_ on the internet for even a single moment in time? Why exactly do you feel you should even have a reachable path to my computer, and everyone else's too? Common sense precautions would suggest this shouldn't be possible by default.

Note: I _personally_ don't need responses to all of these. I'm just listing some examples of questions that come up for people configuring it to illustrate why the choice to use IPv6 is hardly as simple as you depict it to be.

<comment><USER15> These are valid questions regarding complexity, but I also think you're ignoring the complexity of v4. Here are v4 questions for home modems/routers you're just used to: What's bridged mode? What's upnp? What's dmz? What are static IP assignments, wasn't dhcp supposed to manage IP addresses? What's port forwarding? Should I enable "telephony support" and "legacy game support"? What's SIP-ALG?

In both cases for residential use: you're most likely ok with the defaults. And if you want to change something, you have to learn about the tech.

<comment><USER14> I'm not ignoring the complexity of v4. I'm responding to "What complexity?"

But even if I was, "it only doubles the complexity" is not exactly a compelling response to "why should I switch to IPv6?"

<comment><USER15> It doesn't double the complexity. Most of the questions above don't exist in ipv4. My point is that it's different complexity, not more complexity.

And for basic usage people can ignore that the same way they ignore it now.

<comment><USER14> I meant "doubling" the complexity as in IPv6 + IPv4 vs. just IPv4.

If your argument is users can ignore IPv6 complexities as they already do with IPv4, then you've just established the IPv4 complexities can be disregarded by the user... which means you just destroyed your own argument...

I'm not interested in endless debates here though; I feel like I've made my point sufficiently well. If this is an attempt to change _my_ view on the matter I think you're misunderstanding the purpose of the discussion.

</comment></comment></comment></comment></comment></comment></comment><comment><USER16> Can someone let AWS know? I was annoyed to find out that lightsail does not support IPv6, in 2020...

<comment><USER17> And Google's own cloud servers

<comment><USER18> Coming in 2021 though.

<comment><USER10> Don't hold your breath.

Azure officially has IPv6 support, but like every other cloud vendor, they are 100% native IPv4 with IPv6 bolted on as an afterthought.

For example, it's impossible to create an IPv6-only Azure vNet.

The metadata API endpoint is IPv4-only (169.254.169.254).

So on, and so forth...

<comment><USER19> Interestingly enough, you can now access Google services over v6 from inside GCP, but only them for now.

</comment></comment></comment></comment></comment><comment><USER20> A large part of the problem with IPv6 is that most developers and SA's don't have a lot of knowledge about it. This is why everything new is still built with IPv4 in mind, instead of thinking forward to IPv6. I think we could easily blame lack of IPv6 support at cloud providers to lack of knowledge with the developers and SA's they attract.

If more developers and SA's would have access to IPv6 at home, the practical knowledge of how to work with IPv6 would build up more quickly. I would experiment with it more, and build up more knowledge.

Unfortunately, my ISP does not support IPv6. This severely limits experimentation with it, since all experimentation is locked behind my home network.

<comment><USER21> > Unfortunately, my ISP does not support IPv6. This severely limits > experimentation with it, since all experimentation is locked behind my home > network.

You probably know about this already, but there are free IPv6 tunnel brokers you can use to experiment. I previously used Hurricane Electric's tunnel, back before Comcast had native IPv6 support: [https://www.tunnelbroker.net/](https://www.tunnelbroker.net/)

<comment><USER22> I previously used Hurricane Electric, too, but Netflix blocked it.

A more practical challenge, Hurricane Electric is a 6in4 tunnel, not layered over TCP nor UDP. Some ISP-provided residential gateway devices (AT&T) don't support 6in4, not even if you configure your device as a "DMZ" with a public IP address. Also, I frequently find myself in situations with IPv4 NAT and no public IPv4 addresses at all.

The only free IPv6 tunnel service that supported UDP was SixXS, which shut down in 2017.

Nowadays, AT&T supports IPv6 natively, and I went through an annoying amount of effort to bypass their gateway device and control the entire /60 instead of being limited to a /64 and being limited by their NAT. [https://github.com/jaysoffian/eap_proxy](https://github.com/jaysoffian/eap_proxy)

</comment></comment></comment><comment><USER23> In Japan, consumer Internet is generally IPv6 first since years. For my ISP, I get IPv6 directly but have to configure a provided ipip6 tunnel (or set up my own) to get external IPv4 connectivity.

</comment><comment><USER24> It took decades to reach 5% in 2015, but now we're moving. 50% looks to be 2 years away.

It's surprising that China doesn't show as dark green on the world map. China was into IPv6 early; the address space was needed.

<comment><USER25> Google's data is biased since the service virtually doesn't exist there.

This one better describes the situation: [https://blog.apnic.net/2019/01/03/ipv6-in- china/](https://blog.apnic.net/2019/01/03/ipv6-in-china/)

</comment></comment><comment><USER26> I host some services at home, mainly targeted at friends and family.

Some are IPv6-only, because it's much easier to manage from my side. I whish I could add an A record for these that pointed to a reserved IP address that would inform clients the service is IPv6-only.

For now, I just don't put any, and browsers just display a generic error. Since some DNS don't answer with IPv6 addresses, the browser couldn't even provide a meaningful error message if it tried to.

Would that be worth an RFC? What IP address should be used?

<comment><USER27> You might be interested in this service: [https://no- ipv4-here.ungleich.ch/](https://no-ipv4-here.ungleich.ch/)

<comment><USER26> Ah, thank you, that's quite close to what I wanted. Ideally, it would be ran by a CA to work flawlessly with web browsers.

Even better if web browsers could display a message of their own, recognizing this IP address.

</comment></comment></comment><comment><USER28> Still waiting on Bell Canada to let me be part of the next third.

</comment><comment><USER29> Meanwhile, Verizon FIOS here still doesn't offer IPv6.

<comment><USER30> Coming soon! [https://www.verizon.com/support/residential/internet/getting...](https://www.verizon.com/support/residential/internet/getting- started/learn-about-ipv6)

How long have they been saying that now? Five years? Ten years? Probably about ten years.

<comment><USER31> They've been saying that since I signed up for FIOS, around 2011. I've heard that some FIOS deployments/cities have IPv6, but I don't know which, and it's not mine (Pittsburgh).

</comment></comment></comment><comment><USER32> Just turn off ipv4 for one minute every day. Next month, increase it to 2 minutes. A minor inconvenience, but a major motivator.

<comment><USER33> Punish people that don't care and have no control over whether or not their ISP supports IPv6?

IPv6 affects everyday internet users exactly 0%. It's rational for them not to care about it.

<comment><USER34> To me that's more of an argument for GP's idea. Make it rational for them to care about it. Display a big "You can't visit this website because <ISP name> won't let you. Here's their email:"

Obviously it's not worth it for any website that matters to actually do this, but it's fun to think about.

</comment></comment></comment><comment><USER35> Why so low an adoption in China? Is it because Google in not widely used there so it not captured by Google data?

<comment><USER36> Pure conjecture as I don't know how they're collecting the location data, but I imagine all Google traffic from China is going through a VPN. So maybe the vast majority of VPNs used by Chinese users are IPv4 only?

</comment></comment><comment><USER37> I often wonder if we improve the usability of IPv6, like a subset of Ipv6, would it help adoption?

Things like using only numbers and not issuing address with letters. We would still get larger than 64bit of address space, but we dont have to work with the gibberish address.

<comment><USER22> No. There's no way around IPv6 addresses being 4 times as long as IPv4 addresses.

I mean, Google DNS is 2001:4860:4860::8888, and in the IPv4 style it would have been: 188.8.131.52.188.8.131.52.0.0.0.0.0.0.136.136 I'm sure if IPv6 were formatted like IPv4, Google would have formatted the address differently, like, 184.108.40.206.22.214.171.124.0.0.0.0.184.108.40.206

The point is there is no way around the address being uncomfortably long, and doing it in a new style with hexadecimal allows both easier manual calculation of the address and an opportunity to truncate all those 0s in manually allocated addresses.

<comment><USER37> >2001:4860:4860::8888

That is exactly what I meant. Instead of 20FA:FF00 etc.... the sets should use Numbers only. It is still within IPv6 spec, we just dont user letters ( Yet )

</comment></comment></comment><comment><USER38> On a phone this graph looks really great until you see the scale is 10 years. At this rate we should see full adoption sometime in 2040. Swell.

</comment><comment><USER39> China is aiming for 100% in 2025 according to APNIC, so they've got some ways to go from the 0.53% seen by Google.

Is the great firewall ipv4 only perhaps?

<comment><USER40> Google is blocked in China. So I guess not a lot of traffic is coming from Chinese IPs.

<comment><USER41> Where is the Chinese traffic Google is seeing coming from then?

I wonder if anyone is exempt from the Great Firewall? What about senior officials including Xi himself? I'm sure if he asked for unfiltered Internet he'd get it.

<comment> _-___________-_ Some Google properties work in China, and some blocked properties do work very occasionally.

</comment></comment></comment></comment><comment><USER42> I think it depends on ISP adoption AND the IoT devices spread.

<comment><USER43> Sad that some IoT frameworks (ie Particle) do not (yet) support IPv6.

</comment></comment><comment><USER44> Why are is there such a difference between countries?

<comment><USER45> Could be ISP adoption. Some ISPs have been more progressive in ipv6 than others.

<comment><USER46> My ISP in the Netherlands (Ziggo) provides me with native IPv6 if I use their supplied router, but forces me onto IPv4 when I use theirs in bridge mode in conjunction with my own router.

Still not sure why they do that.

<comment><USER47> These ISPs are using DS-Lite, Dual-Stack Lite.

[https://www.juniper.net/documentation/en_US/junos/topics/top...](https://www.juniper.net/documentation/en_US/junos/topics/topic- map/security-ipv6-dual-stack-lite.html) (this isn't a purely Juniper thing, but they have nice diagrams on their documentation)

It's a kind of carrier grade NAT with 4over6 baked in.

Depending on the version of this they are relying on your modem to perform encap/decap of 4to6, hence when you switch to modem mode or your own router you fall back to what the network truly is... v4.

This is what the knuckle draggers at Virgin Media are contemplating apparently.

In the UK the best option for IPv6 is [https://www.aa.net.uk/](https://www.aa.net.uk/) but unfortunately for me the DSL speed in my area is pretty bad due to being a few KMs from the exchange.

The alternatives to all of this is to run your own Wireguard instance elsewhere on a v6 network, and tunnel the entire home network to it.

<comment><USER48> DS-lite gives you a v6-only internet connection. v4 is provisioned as a service over the top of that, using a tunnel between your router and a server inside the ISP. The underlying network is v6, so a router without DS-lite support will only get v6 (which will generate support calls because "your router must support DS-lite" is too complicated for many people to understand).

My guess is that turning on bridge mode also migrates you from the ISP's newer DS-lite service to their older v4-only one. This is unfortunately common in DS-lite deployments; ideally the old service would also have v6 so that you aren't forced to choose between v6 and non-CGNATed v4.

</comment></comment></comment></comment></comment><comment><USER49> It's a perquisite for tagging individuals.

IPv4 not having enough addresses is a good thing.

With IPv6 identification (and therefore control) can be down to the person globally, but IPv4 forces NAT's. The inability to label all the things is a feature. NAT's are borders; they prevent fine grained censorship without larger consequences.

      $ zcat /proc/config.gz | grep -i ipv6
      # CONFIG_IPV6 is not set

<comment><USER50> Nearly all modern operating systems use the IPv6 privacy extension, which creates random addresses periodically. Thus the tracking is randomized to the /64 (which is an end customer). This is more or less the same as with IPv4 (without CGNAT)

<comment><USER49> Irrelevant. It's within your subnet, and it's nowhere near 32b.

[https://www.transtutors.com/questions/how-many-bits-are- need...](https://www.transtutors.com/questions/how-many-bits-are-needed-- 674414.htm)

<comment><USER50> yeah, like when you have a /32 IPv4 dedicated to your private subnet; it's the same.

<comment><USER49> Why use IPv6 if you are going to hand out IPv4 addresses?

People know why. Even if a few really get 32's, it's PR. The endgame is the same.

This is a critical path item for removing the ability to have 2 party value transfers. The power at stake is incalculably valuable.

<comment><USER51> What do you mean by " Even if a few really get 32's, it's PR."?

The vast majority of IPv4 connections get an IPv4 IP (= a /32), CGNAT is pretty much only used by providers that don't have another choice and has various downsides for users too.

<comment><USER49> Obviously, it's temporary. Handing every possible IPv4 user 2^32 IPv6 addresses is a worse than pointless gesture. It's an 10^9 scale changing of the subject.

IPv4 not having enough addresses is why it's valuable. It's impossible to arm band every human with 32b.

EDIT: I'm comment limited for the night. @efzx: Seeing "google" in the same sentience with "does not have anything with tracking" is pretty good stuff.</comment></comment></comment></comment></comment></comment></comment>


Brief Glimpse Inside Expedia's SEO Machine - <AUTHOR> http://travelblogsuccess.com/brief-glimpse-inside-expedias-seo-machine/

<comment><USER2> This is interesting but most likely a consequence of their affiliate program, which like any affiliate program rewards traffic and thus tends to spawn a lot of referral volume at the expense of authenticity.</comment>


Untrusted – a user JavaScript adventure game - <AUTHOR> http://alexnisnevich.github.io/untrusted/

<comment><USER2> At first it reminded me of [http://codecombat.com/](http://codecombat.com/) but it really has a different feel, and is very addictive.</comment>


Graphics That Make You Realize You Don't Know How Big Anything Actually Is - <AUTHOR> http://blogs.smithsonianmag.com/smartnews/2012/10/the-best-graphics-that-make-you-realize-you-dont-know-how-big-anything-actually-is/

<comment><USER2> Kudos to xkcd.

</comment><comment><USER3> Title of s nonensical but aggregated content images/videos are nifty.</comment>


A visual history of the future (2014) [pdf] - <AUTHOR> https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/360814/14-814-future-cities-visual-history.pdf <comment><USER2> I found this really interesting. It's about how different artists across the 20th century tried to visualise the future of cities as they saw them, obviously influenced by their own cultural perspectives and beliefs.

It has some great art, and could for example be a superb resource for game designers looking for novel visual concepts.

This doesn't come across in the title, I'd have to say.

<comment><USER3> Dang! - it really is cool - especially the variety of styles and detail in the images.</comment></comment>


Why More U.S. Expatriates Are Turning In Their Passports - <AUTHOR> http://www.time.com/time/world/article/0,8599,1983238,00.html

<comment><USER2> Many Americans living abroad are ignorant of the duty to still file federal taxes while residing abroad. It gets fairly complicated fast and mistakes can have huge ramifications for those that ever intend to move back. If you haven't filed you can go back and file them late. So long as you live in a country with a double taxation treaty with the US (most countries do, google it) and your local taxes are more than the fed wants you won't owe anything.

It gets worse if you work for yourself, i.e. I'm a freelancer, and so I get to pay social security and medicare no matter what. Also recent law changes have meant that you have to report any bank account with more than $10,000 in it. As to services of the embassy they charge for everything I've used them for, and it's not cheap, more annoying cause at least the Stockholm embassy won't take a US check or bill pay from Swedish internet banking, instead you have to get the equivalent of a cashiers check which is all but obsolete in Sweden.

I'm going to go dual citizenship this summer. I want to be able to vote in national elections and it will allow me to live and work anywhere in the EU, plus sometimes it's easier to travel on an EU passport. Sometimes I want to toss aside the US citizenship cause of the headache and expense of filing my taxes properly, but I wouldn't want to close the door on being able to return to the US easily either.

The whole tax citizens abroad is mostly based in a bygone era when rich people went abroad to avoid taxes. These days the world is a lot smaller and it's biting regular folk in the ass.

</comment><comment><USER3> Strange world where family and friends consider you a traitor for giving up your nationality.

Words like that shouldn't be used lightly.

<comment><USER4> A traitor is someone who committed treason. In the US, treason is defined in the Constitution [http://en.wikipedia.org/wiki/Article_Three_of_the_United_Sta...](http://en.wikipedia.org/wiki/Article_Three_of_the_United_States_Constitution#Section_3:_Treason)

So "traitor" doesn't hold up. But since he pledged allegiance to the US, and then renounced the country they can certainly call him an oathbreaker, liar, false witness, or perjurer.

Not that I care personally. I'd do it myself if I were in his position.

<comment><USER5> If you are born a US citizen, you don't have to pledge anything to stay a US citizen. It's a birthright. You don't have to pledge anything to get a passport.

So you can't call him an oathbreaker, liar, false witness, or perjurer.

He's just a man who gave up his citizenship because it was undesirable.

<comment><USER4> You only have to speak an oath once for it to be morally binding.

The guy went out and got citizenship in another country and renounced the US. Did he ever pledge Allegiance to the flag of the United States (and the Republic)?

If so, then I consider that a broken promise.

<comment><USER6> Since when are the citizens property of the state?

<comment><USER4> I never claimed that they are.

From the upvotes on your comment and the downvotes on mine it's clear that you're not the only one who mistakenly thinks I did.

<comment><USER3> If that oath is so 'binding' on first saying how come people are asked to repeat it all the time?

Oaths to flags and countries are pretty meaningless, unless taken by an adult that has a viable option to pledge allegiance to some other entity (say in immigrant).

What if every country should ask for a pledge of allegiance from its citizens, would that mean that any immigrants are to be refused on the grounds that they're oath breakers?

If the Netherlands (where I was born) would ask me to pledge allegiance I'd hand in my passport instantly because I think that is not something a country should ask of its citizens. Especially not a country that has 'freedom' high in it's list of standards.

It's more of a symbolic device than a pledge that you can hold people to or call them an oathbreaker if they don't. Most kids don't even realize the meaning of all those words, just say them to avoid being an outsider.

Get them while they're young...

<comment><USER5> As a rule, Americans have no idea how much they are indoctrinated.

I tell my European friends about how I know 3 different songs about the flag, and 3-5 additional songs about how awesome America is, and were made to sing them in school, and they are aghast.

When I tell them about the mandatory daily Pledge of Allegiance, and that book by Avi about the "rogue" kid who refuses to say it (based on true stories), they about shit their pants.

Then I tell them about Cuba, and they die.

Land of the Free, my ass!

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> I'm a U.S. Citizen and next month I'll be giving up my passport to be a citizen of the Czech Republic.

Normally I would keep both passports, but the way the U.S. taxes its citizens abroad pretty much precludes that.

<comment><USER8> Any idea why the US objects to people having dual nationality?

<comment><USER7> They don't object. (The Czech Republic does.) And the reason they don't object is that they're getting tax revenues from you but you're not consuming services.

<comment><USER9> They do object - if I were to apply for US citizenship I would have to renounce my British citizenship.

<comment><USER7> Sorry for the confusion. They don't object to me having a US passport and adding Czech citizenship. In the same way, I'm sure Britain doesn't mind you adding US citizenship. But the countries, in my case Czech, in yours the US, that are being applied for, do mind.

The US Embassy hinted that I can sign saying that I've renounced my citizenship, even though I haven't actually renounced it. I don't know if that works in your case, however.

</comment></comment></comment></comment></comment><comment><USER10> I've been living abroad for 12 years and wasn't even aware that I was expected to pay taxes in the states. Presumably if I ever move back to the US to work this is going to bite me in the proverbial...

<comment><USER11> As David927 mentions you probably don't owe anything. But you still need to file 1040's and 2555 for every year. So few Americans actually do it, you get the feeling that they are so happy to just receive them. Before returning to the US I did a batch of 5 tax returns with no tax liability.

The other thing to note is that if you are married even to a foreign spouse without green card you can file jointly and you now get a full $182,800 exclusion. There are also rules where you can deduct further for housing expenses as well as tax paid locally.

This is the IRS guide you should read. <http://www.irs.gov/publications/p54/index.html>

The bad news though is that for entrepreneurs, consultants etc. If you are self employed, in a partnership (including LLC's) you are not exempt from paying self employment tax (15.3% of the first $106,000 earned.

This is likely the biggest issue for some of the people renouncing citizenship.

The second issue also mentioned in the article is reporting of bank accounts containing more than $10k.

Final bad news for US entrepreneurs abroad is that your startup might be classified as a Controlled Foreign Corporation, which in theory could lead to it being taxed in the US. These rules are so complex they make my head hurt just thinking of them. This PDF seems to explain it fairly well:

<http://www.avcadvisory.com/documents/pdf/CFC.pdf>

<comment><USER12> As a US expat, I setup an S-corp for 2009 and it is VERY beneficial for consultants who live abroad and can setup their own US company: because it allows me to pay myself a reasonable salary underneath the Foreign Earned Income Exclusion; to take business expenses against the remainder, and most importantly, NO self-employment tax.

<comment><USER11> I hadn't thought about that. Very good idea. The only issue is that cofounders have to be US citizens/residents. But it sounds like it would work well if you don't need that.

</comment></comment></comment></comment><comment><USER13> If you dislike the idea of being taxed while residing abroad, how about the idea of being "exit taxed" for the right to stop being taxed:

"Relinquishing U.S. citizenship is a fairly simple process: after filling in a few forms, and in some cases, paying an exit tax (based on the applicant's worldwide income and assets)..."

Wonder how much that amounts to?

<comment><AUTHOR> Exactly my sentiments. However, since it says "in some cases", maybe this refers to paying the regular taxes due before relinquishing.

<comment><USER14> No, the exit tax can be pretty bad:

"The so-called 'mark-to-market' tax will apply to the net unrealized gain on the expatriate's worldwide assets as if such property were sold (the 'deemed sale') for its fair market value on the day before the expatriation date."[1]

[1] [http://www.withersworldwide.com/news- publications/324/exit-t...](http://www.withersworldwide.com/news- publications/324/exit-tax-u-s-expatriates-to-become-law.aspx)

</comment></comment></comment><comment><USER15> It would be better if there were some way to suspend US citizenship. That said, you shouldn't be allowed to vote while not being subject to the tax code. It's the flip side of "no taxation without representation," and it's equally important.

<comment><USER5> It's extremely difficult to vote from outside the US, anyway, because you cannot vote in a "nationwide" sense -- you must vote as a citizen of a state.

Which, since you don't live in the US and ergo don't live in a state, is tricky. Typically you can vote in your state of last residence, however...

...voting in your state of last residence can cause you to be liable for income taxes to the state.

Land of the free, says I.

<comment><USER16> Live in New Hampshire: no state income taxes.

<comment><USER17> New Hampshire has residency requirements which make this impractical. South Dakota is the easiest place to establish "residency" for expat purposes.

</comment></comment></comment></comment><comment><USER18> It gets even worse if you try to incorporate a business abroad and own more than 50% of it. Form 5471 and 8832. Wrangling with the definition of a CFC, qualified dividends, etc. Subpart F (the rules for when the U.S. government considers your company's income as if it was just plain old personal income). Etc.

All these laws were designed to catch rich U.S.-resident tax evaders, but they have the side effect of making life miserable for U.S. expatriates. And probably it won't change, because no one in the U.S. really thinks about expatriates anyway ... maybe because of the ingrained mental image that the U.S. is supposed to be a sink, not a source, of migrants.

And for everyone else, it makes for a very strong incentive NOT to partner with an American when you start a company, because of all the accountants' fees you'll need to keep up with the paperwork, or worse, the danger that you simply don't know about any of these draconian requirements and it hits you like a truck years later when you have some serious income.

Another really perverse incentive created by U.S. taxes on expats is the housing exemption. Basically, if you have a dollar, you can either spend that whole dollar on renting a nicer apartment, or pay 35 cents to the U.S. government and be left with 65 cents to save or spend. Hence lots of American expats keep spending more and more on housing, up until the point where the marginal utility of $1 more square footage or $1 swankier address drops below 65 cents ... and of course, driving up prices for everyone else.

</comment><comment><USER19> It's now becoming so popular that the Department of State is introducing a fee to renounce - $450. See DOS-2010-0035-0001 on regulations.gov.

</comment><comment><USER20> (different comment, different question)

It sounds like renouncing your citizenship is somewhat permanent. If you ever wanted to come back for an extended period of time, can you re-apply for Permanent Residency?

I was a citizen of China (now a US citizen). It took years for my green card to be processed, and a good amount of time for citizenship.

<comment><USER7> I don't understand the question. You mean, if you give up your US passport, can you get a green card later? I think you can but you wouldn't receive any special treatment from having had the passport earlier.

<comment><USER21> I think in some cases you can skip and they let you pretend you never left. However, you will need to pay taxes on the missing years etc.

</comment></comment></comment><comment><USER22> We have several trends happening all at once. Entitlement programs are going broke -- the U.S. government has promised more than it can deliver. More places abroad, with low costs of living, are becoming very amenable to U.S. citizens. Finally the U.S. is reaching out for incomes and bank accounts above certain amounts -- and those amounts are subject to change.

Seems to me (without doing the math) that there is already an income amount somewhere around 10K a month or so where it might be better to be a citizen of a different country. You could take the tax money and pay for the services yourself. If this trend continues, it's possible that we could see an exodus of folks from the U.S. Kind of like white flight but on a global scale.

</comment><comment><USER20> Can an expat/tax guru shed some light onto how that whole tax thing works? Do you pay local tax + US federal tax, or something?

<comment><USER5> Living in Austria, I have to pay the total of my Austrian taxes... but the US gets first cut. So if I theoretically owe $25,000 to Austria total, but $20,000 to the US, I pay the US the $20k and Austria gets $5k.

Even though I get awesome healthcare and other social services from Austria.

Basically, it's the world's shittiest deal.

<comment><USER17> This sounds deeply wrong, unless Austria has an odd arrangement with the USA. It is not like this in Japan or Australia. In many countries, taxes are automatically deducted and it would be impractical if not impossible to give the USA first cut. Also, if you get residency in a state with no income tax and form a corporation in the USA you can pay yourself below the foreign earned income exclusion and for most practical purposes owe the USA nothing. I would get a second opinion from a different tax specialist.

</comment></comment></comment><comment><USER5> I plan to give up my US Citizenship as soon as possible. Unfortunately, it'll be another 4 years' wait for me.</comment>


The Threat Posed by Technological Disruption (World Economic Forum) - <AUTHOR> https://www.weforum.org/agenda/2020/01/yuval-hararis-warning-davos-speech-future-predications/ <comment><AUTHOR> Yuval Harari at Davos 2020. Key points:

\- Humanity faces three existential threats this century: nuclear war, ecological collapse and technological disruption.

\- Technology risks dividing the world into wealthy elites and exploited "data colonies," he explained.

\- "If you like the World Cup - you are already a globalist," he said, making the case for better cooperation to tackle the challenges.</comment>


Make your STDERR red - <AUTHOR> https://github.com/sickill/stderred

<comment><USER4> On OS X:

        gcc stderred.c -D_GNU_SOURCE -Wall -ldl -fPIC -shared -o lib/stderred.dyld
        alias stderred='DYLD_INSERT_LIBRARIES=$PWD/lib/stderred.dyld DYLD_FORCE_FLAT_NAMESPACE=1'
        stderred python -c 'import os; print "Yo!"; os.write(2, "Jola\n\r")'

(replace $PWD with the absolute path if you're adding this to your shell config, of course)

<comment><AUTHOR> Cool, looks like the same gcc flags works for OSX.

</comment></comment><comment><USER4> Nice hack. Ideally it would just be a feature of the shell. At least it does a isatty check though.

Is there a reason you allocate a bunch of memory and copy the strings rather than just doing multiple writes?

        (*lol_write)(fd, STDERR_COLOR, STDERR_COLOR_SIZE);
        (*lol_write)(fd, buf, count);
        (*lol_write)(fd, COL_RESET, COL_RESET_SIZE);

<comment><USER5> Or use writev for that matter.

Note that using ordinary write multiple times has atomicity implications - <USER2> you have multiple processes writing to STDERR, you might find their output interleaved in unfortunate ways. Using a single write with a temporary buffer or writev avoids this (provided you're not writing more than PIPE_BUF bytes total)

<comment><USER6> Indeed: <https://github.com/sickill/stderred/pull/1>

<comment><USER7> I agree that writev is a better approach. But your patch doesn't look thread- safe because it uses that static iovec struct.

<comment><USER6> You are right, and there are other issues: \- I don't return the proper return value (should not return the number of bytes from the color strings) \- I don't handle the case where writev() returns a number of bytes between 0 and count (e.g. You are writing 10Mb of data, a signal arrives, and you only wrote 5Mb -- the color thing will get all confused)

</comment></comment></comment></comment></comment><comment><USER8> Why override write() when you can just use pipes?

<http://distfiles.exherbo.org/distfiles/hilite-1.5.c>

<comment><USER9> One problem is stdio buffering. By default the C stdio functions will flush buffers after every line for file descriptors that are connected to terminals, but only every now and then for file descriptors connected to disk files or pipes. So if a program outputs messages on both stdout and stderr (like a compiler), then after filtering one of the streams through a pipe, the messages are not interleaved properly.

<comment><USER10> One way is to wrap the program with a parent process that can handle the colourising. Here's a version I've been using for 6 years or so;

<http://people.apache.org/~colm/utils/sexec.c>

it uses regular select semantics and a trivial state machine to pick the active fd, and has an XML mode - which is convenient for colourising in XHTML (if you want to record an automated process say).

<comment><USER9> Here is an example illustrating what I mean:

        #include <stdio.h>
        int main() {
           while (1) {
               fprintf(stdout, "Hi.\n");
               fprintf(stderr, "Hello.\n");
           }
           return 0;
        }

If you run this program directly from the shell, every odd line says Hi and every even line says Hello. But if you run it through sexec (on a Linux machine at least), you get a large block of lines saying Hi, followed by a large block saying Hello, etc. Whether this is a problem or not of course depends on the use case. But to avoid it you need something more sophisticated than just pipes, e.g. the LD_PRELOAD hack in the original post.

<comment><USER11> Or you could just disable buffering, for instance with the unbuffer tool that comes with Expect:

        ./mytest | tee out.txt # blocks of Hello. and Hi.
        unbuffer ./mytest | tee out.txt # expected result

<comment><USER12> Without looking at it's source, what 'unbuffer' does is likely allocate a PTY for the things under it. That's how the rest of Expect works after all ;)

</comment></comment></comment></comment></comment></comment><comment><USER13> I may be wrong, but I always thought stderr was for diagnostic messages as well as errors, in which case red wouldn't really be appropriate.

I almost think we need another output stream for something that's neither an error nor output of the program.

<comment><USER14> I don't know, I kind of have mixed feelings about adding another stream. I'd probably find stdinfo and stdwarn useful. But it's a slippery slope to duplicating the features of a full logging system; you might add stdinfo, stdwarn, stdfine, stdfiner, stdfinest, stdconfig, std$custom, etc. etc.

One nice thing about having only stdout and stderr is it pushes you to ask: "Is this piece of information actually necessary to display to the user or should it just be logged to a file somewhere?" I'm not sure everyone really asks that though. Every time someone shoves a bunch of needless information to stderr "just in case" is a time I have to 2> /dev/null. (At least the useless stuff is often in stderr so I don't have to grep it out of stdout.)

</comment></comment><comment><USER15> Or, add this to .zshrc:

# colorize all stderr red exec 2>>(while read line; do print '\e[91m'${(q)line}'\e[0m' > /dev/tty; print -n $'\0'; done &)

works like a charm.

<comment><USER16> Though I'm not a zsh user, my first reaction was likewise "meh, my shell can do that", and so I whipped up a pretty much identical command (only using sed). However, when it didn't behave quite as I expected, I dug a little deeper and ended up with (what was to me) a curious discovery: bash prints its prompt to stderr rather than stdout (see <http://git.savannah.gnu.org/cgit/bash.git/tree/parse.y#n5013>).

Anyone know why it does that?

<comment><USER12> That's a great question. Zsh and tcsh both use stdout for their prompt, ksh and dash use stderr for the prompt itself but stdout for whatever the user is typing into the prompt. Bash, at least as it's configured on my system, seems to use stderr for the prompt _and_ whatever the user types on it.

I really can't think of a reason that the way tcsh and zsh handle this isn't the proper way. Surely the principle of least surprise applies here.

</comment></comment></comment><comment><USER17> On OSX, you might be able to do something similar using dyld's interposing feature ([http://opensource.apple.com/source/dyld/dyld-132.13/include/...](http://opensource.apple.com/source/dyld/dyld-132.13/include/mach-o/dyld- interposing.h)) to replace write() and the dyld equivalent to LD_PRELOAD, DYLD_INSERT_LIBRARIES.

</comment><comment><USER18> The alloca usage here terrifies me.

<comment><USER12> That is a good point. I don't know if write has a limit on 'count' (I can't find anything saying that it does), but if it's simply "whatever you can fit in size_t" then you certainly want to be careful about putting that on your stack. Failed alloca's don't really give you any indication, though you might sigsegv later.

<comment><AUTHOR> What would you suggest instead then? I'm not C programmer.

<comment><USER12> Avoid the allocation entirely. Use writev for example (or just use multiple 'write's, if you don't care about it being atomic).

<comment><AUTHOR> Thx. Improved version in master: <https://github.com/sickill/stderred/blob/master/stderred.c>

</comment></comment></comment></comment></comment><comment><USER5> This actually doesn't work for processes using stderr on eglibc 2.13 - <USER3> internally outputs via a different path that can't be hooked in this manner. On x86, you could try overwriting the system call gate pointer to a hook function, but on x86_64 you're basically stuck, unless you attach a debugger or something.

Also, the write prototype is incorrect (using int instead of size_t) and could break on 64-bit machines.

<comment><AUTHOR> Thx, will fix int -> size_t.

</comment></comment><comment><USER19> While it might not be relevant in practice, there's the possibility of data corruption if someone closes all filedescriptors (for whatever reason) and then operates on the newly generated ones. This implementation just checks for filedescriptor number 2, a more sensible implementation for sure should hook the stdio FILE or iostream mechanisms to restrict colorization only to the "standard error" case.

for(i=0;i<1024;i++) close(i); /* close a lot of fd _/

/_ open will yield the lowest free fds, here it's 0,1,2 _/

f=open("inputfile",O_RDONLY);

g=open("outputfile1",O_RDWR|O_CREAT,0666);

h=open("outputfile2",O_RDWR|O_CREAT,0666);

read(f,buf,1024);

write(g,buf,1024);

write(h,buf,1024); /_ <\-- data is colorized! */

<comment><AUTHOR> Thx for catching this. Interesting in making pull request? ;)

<comment><AUTHOR> Btw, as kelnos said, isatty() check "should" prevent all bad scenarios.

</comment></comment></comment><comment><USER20> The concept may be useful for someone, but the implementation is just slow, naive and definitely not something you want to interpose your libc write function with. If the author is reading this; 'man (2) writev' for a quick code and efficiency improvement.

<comment><AUTHOR> I am _not_ C programmer. Actually this piece of code is my first C code since over 10 years. I might have forgotten about all good practices and stuff. But it works for me so I shared. Would you like to contact me and point slow, naive points or even better improve it and send pull request?

<comment><USER20> The slow point mainly refers to allocating and copy into a new buffer. The naive points refers to that you use 1) alloca to allocate an unknown amount of memory on the stack and 2) assume that write is atomic, never fails and will write the whole buffer (you return count). Instead you should return what write actually wrote or not. There are also a whole can of worms with regards to what happens during (signal) interrupt or if write failed to write the whole buffer. In which case the reset color code may not be sent etc etc. Solutions to this require some fine-thinking, but for the slow stuff, you can simply replace all the allocation and copy with something like this

      struct iovec iov[3] = {{STDERR_COLOR, STDERR_COLOR_SIZE},{buf, count},{COL_RESET, COL_RESET_SIZE}};
      ssize_t n = 0;
      do { n = writev(2, iov, 3);} while (n == -1 && errno == EINTR);
      return n;

</comment></comment></comment><comment><USER21> Well, I suppose it's one step up from embedding ANSI escape sequences in your output. Various crappy Ruby tools do this and it makes Windows development SUCH a joy.

Free clue: the world is not a 1960s UNIX terminal. If you don't want to support Windows, that's fine - don't. I'll use something else or write my own. If you DO claim to "work" on Windows, read the goddamn docs and don't just blindly emit escape sequences on std(out|err) because it DOES NOT WORK.

It's not that hard to support Windows console IO, and it's well documented. I've previously written a (commercial) Java native library to provide curses- style character-at-a-time support for Java running in a terminal, using curses on UNIXalikes and a choice of Win32 console or Cygwin curses on Windows, although Cygwin curses at the time didn't correctly recognise Ctrl-Space (makes supporting Emacs keybindings a non-starter). Win32 has a considerably saner console implementation IMO.

<comment><USER22> What a bizarre rant.

This is a libc/LD_PRELOAD hack, so it's clearly a Unix-only solution. Where did all these "you'll break my Windows console" tears come from??

<comment><USER21> What's bizarre about it? Clearly this library isn't the problem. What'd be even better would be a sane console standard that isn't stuck with being backwards compatible with a 7 bit everything-is-a-character protocol. The acoustic coupler is dead people, get over it! Relegate termcap / terminfo / curses / getty to the same bin we dumped Gandalf serial line multiplexors in, and move forward!

<comment><USER12> UTF-8 works quite nicely across terminals you know.

Anyway, if you want to discard the classical model terminal stack, invent something better first. You can't just declare that we should bin it without providing a viable alternative.

<comment><USER21> What has UTF-8 got to do with anything? I'm talking about 7 bit VT100 escape sequences for single keys (which in turn require millisecond-accurate timing code in e.g. curses to distinguish from just pressing the same keys.) UTF-8 is beautiful by comparison.

As for an API, see ([http://msdn.microsoft.com/en- us/library/windows/desktop/ms68...](http://msdn.microsoft.com/en- us/library/windows/desktop/ms682073.aspx)). Java even uses the exact same virtual key codes for AWT KeyEvent. I suspect at some point they were just included from the equivalent Windows header but it's been a while since I looked at the Sun JVM source code.

<comment><USER12> Strictly speaking, "characters" in UTF-8 are not all 7 bits or 1 byte long, and they can be dumped across terminals. So my point is that another solution is technically possible without changing anything else.

Anyway, if the windows terminal stuff works for you, then right on. It is not adequate for many of us however. And for that matter, I agree with roel_v that the windows method is much more cumbersome for evenly moderately complicated things.

Edit: Also, delayed interpretation is a fairly common alternative to timing.

<comment><USER21> Thank you, I'm well aware of how Unicode in general and UTF-8 in particular work.

While it would be possible to extend Unicode to carry terminal control sequences (or invent yet another standard to do so) my opinion is that having an out-of-band API is better than in-band sequences - most real terminals of the VT100 vintage had BOTH. This is no longer true, and the support for in- band control sequences is a source of much incompatibility. Remember when we replaced termcap with terminfo? Oh how we laughed.

What do you think is missing from the Win32 Console API, out of interest? I ask because I've written cross platform terminal components and ended up using curses on UNIX because that is the only sane way to interact with terminals; hardly a lightweight or even very portable solution, and that's before we start talking about licensing issues.

<comment><USER12> I won't argue that out of band communication has advantages, because it does. However, if you want the windows method to have the same functionality as the traditional method, you are eventually going to have to send those things down the wire. (I don't know if it is already capable of doing this).

So really all it gets you boils down (as far as I can tell) to out of band control sequences^. At this point it hardly matters what exactly your control sequence specification is, and the windows Console API essentially becomes the new curses (while inheriting many of the problems of the traditional system, unless you can magically keep everybody in sync).

This simply is not all worth replacing _everything_ to achieve.

And to be blunt, the advantages that out of band control provide quite likely do not outweigh the benefits afforded by in band control for most of us. For example, observe the triviality of the subject of this discussion. Unless you are on the receiving end, I would say it really does make everything easier.

PS: If you use PDCurses then you shouldn't have GPL issues. Sticking to (at least the features provided by) PDCurses will also clear up most portability issues.

^ As an example of what I mean, IIRC you can check out what ssh does when you give it the -t flag. There _is_ some out of band communication in the traditional system after all.

<comment><USER21> I don't think we'd reinvent or replace all of curses, as it does more than raw terminal handling (e.g. logical windowing). In my mind it's a layer on top of an area of displayed text. Win32 console doesn't implement any of that either.

I'm talking about the layer that interprets the in-band escape sequences of actual type-able characters into logical functions (e.g. ESC[4D into "cursor back 4 spaces"), and the databases of long-obsolete hardware quirks that go with it. Replacing that with something closer to the actual keyboards people use (e.g. vt100 didn't HAVE F1-F4 keys, the codes for them are another non- standard area) shouldn't be so dramatic a change, especially when what we think of as remote text terminals these days are typically two fully featured computers running SSH. Perhaps a remote terminal API should just be an SSH protocol extension?

<comment><USER12> Hmmm. Interesting idea. OpenSSH's X forwarding is probably is at least idealogical precedent for doing something like that with SSH.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER23> This is my python version (for logger)

<https://gist.github.com/1474991>

</comment><comment><USER24> Why did you truncate a size_t to an int?

<comment><AUTHOR> Will fix that, thx.

</comment></comment><comment><USER25> thank you. this is probably the cleanest way to do this i've seen, and i've seen a LOT of ways to do this.

<comment><USER26> How the hell is this even remotely clean?

<comment><USER12> Yeah, this is a tad hackish for my tastes honestly, makes to many assumptions.

The way I came up with while brainstorming a while ago (never got around to fully implementing it) is to create a PTY wrapper that you can fire off a program with.

Basically it creates a new PTY and wires it up to it's own controlling PTY, and forks of a child under the new one. You can then trivially do a lot of things transparently, like separating stdout and stderr (normally both stdout and stderr would be attached to the slave side of the PTY (/dev/tty), but if you attach them to a different fd then the select on the master/parent side can do things like color them).

EDIT: if it helps you picture it, this is basically doing userland STREAMS ;)

I'd estimate you could do this for around 250 lines of C. Maybe I'll see what I can do after dinner.

<comment><USER12> Ok, banged this together: <https://gist.github.com/1474748>

Based off jgreco's 'vindication': <https://github.com/jgreco/vindication>

Usage:

      `./redwrapper python -c 'import os; print "Yo!"; os.write(2, "Jola\n\r");'`
      `./redwrapper zsh`

(zsh works with it, but bash doesn't currently for some stupid reason. something about what it expecting stderr to be /dev/tty or something I believe).

This is rough code, if you want to use regularly/seriously I suggest reviewing the code. I didn't pay attention much to standards compliance, I've only tested on Linux right now. I know that PTY stuff can get hairy on different *nix's, so beware of that.

EDIT: whoops, remove that '-g -lefence' from the Makefile too before you use this.

<comment><USER27> You'd have to modify every script you ever run on a machine, and modify every command you ever type in, to make this work. Any serious solution to this problem needs to be 100% transparent to the user - i.e., wrapper programs are not an option.

<comment><USER28> Or you can just modify screen(1)

</comment></comment></comment></comment></comment></comment><comment><USER29> with the stderred LD_PRELOAD alias this works for me: stderred python -c 'import os; print "Yo!"; os.write(2, "Jola\n\r")' but this doesn't; stderred ruby -e 'puts "Yo!";STDERR.write "Jola\n\r"'

if i do an strace the writes are going to the same file descriptors.. any ideas?

<comment><AUTHOR> Maybe ruby's write() is not using write() from libc but other function like fprintf?

</comment></comment><comment><USER30> I like command lines, but often make fun of people that prefer them over well- produced GUIs. I suppose the reason is that well-produced GUIs are rare.

That being said: turning text red is notable? In 2011?

(Will accept downvotes with dignity.)

<comment><USER31> It's less of a unique idea, and more of a why-didn't-I-think-of-that sort of thing, in my opinion.

</comment></comment><comment><USER32> Er, why would you want all the text to be red?

<comment><USER12> Not all of it, just stderr (so not stdout). This is useful because many things use stdout for regular output and stderr for error output (some things just use stdout for both, but that's not very nice as it disables doing things like this).

<comment><USER33> I think they're suggesting just styling "Error:" in red and then using normal text for the actual message.

npm does something like that: <http://i.imgur.com/7oBLP.png>

<comment><USER12> Well you can do that with a standard unix filter. This does all of stderr.

<comment><USER33> Whoops. I thought this was a tool for script authors, not the end user. Now I get it, and I think it's way cool. And I think J_Darnley doesn't like red.

</comment></comment></comment></comment></comment><comment><USER34> can it somehow incorporate the blink tag as well?

<comment><USER12> (Unfortunately) yes, only some terminal emulators support it though.

</comment></comment><comment><USER35> Ubuntu does indeed allow multi-arch distros. I've run 32-bit Firefox on 64-bit Ubuntu for years; in fact, I'm doing so now.

<comment><AUTHOR> Allright, maybe. But it still has DST ($LIB token) disabled in LD_PRELOAD.

<comment><USER35> Maybe? What's maybe about it? I can build (using -m32) and run 32-bit x86 binaries on an x86-64 platform.

<comment><AUTHOR> I didn't mean that you can't _run_ 32-bit binaries on 64-bit OS, what I meant was that AFAIK you can't install 32-bit deb packages together with 64-bit ones on 64-bit Ubuntu. Correct me if I'm wrong.

<comment><USER36> You can install both. The new multiarch support builds blahblah:i386 and blahblah (implicitly blahblah:amd64) debs for source packages that have it enabled. Before that, packages that wanted to provide i386 binaries on amd64 wrote their own extra build support, and added a suffix to the binary package names to avoid collisions.

Here's what I found on how to support LD_PRELOAD without a $LIB dynamic string token:

Looking at this: <http://lists.debian.org/debian-devel/2011/12/msg00300.html> it seems you could put a relative path in LD_PRELOAD and count on the linker to use architecture-dependent search paths. I'll also link these two threads for context, though they didn't provide answers: <http://comments.gmane.org/gmane.comp.lib.glibc.user/974> (chatting) <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=372626> (concatenating the two libs in LD_PRELOAD works, but is noisy).</comment></comment></comment></comment></comment>


Finnish Education Chief: 'We Created a School System Based on Equality' (2014) - <AUTHOR> https://www.theatlantic.com/education/archive/2014/03/finnish-education-chief-we-created-a-school-system-based-on-equality/284427/ <comment><USER2> Finland's successful education reforms are especially interesting because they went from below-average to the top. They did it without gimmicks, just continuous improvement and sustained attention and investment.</comment>


Parachute use to prevent death jumping from aircraft: random controlled trial (2018) - <AUTHOR> https://www.bmj.com/content/363/bmj.k5094 <comment><USER2> [https://news.ycombinator.com/item?id=18677508](https://news.ycombinator.com/item?id=18677508)

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

<comment><USER3> Why is this marked as a dupe now? It doesn't appear to have made the front page since December 2018.

<comment><USER2> The rule is "the last year or so": [https://news.ycombinator.com/newsfaq.html](https://news.ycombinator.com/newsfaq.html). The "or so" is there to stretch the dupe window for fluffier, more predictable articles, particularly anything memey.

Conversely, we shrink it for particularly substantive and unpredictable submissions, especially if they didn't get huge attention in the past, which is partly what keeps them unpredictable.

Edit: here's a great example of that:

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

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

</comment></comment></comment><comment><USER4> Reminds me of the recent interview of Pr Raoult who's been using chloroquine to treat covid-19 in France. Here's a google translated extract:

To those who say that we need thirty multicenter studies and a thousand patients included, I answer that if we were to apply the rules of current methodologists, we would have to redo a study on the interest of the parachute. Take 100 people, half with parachutes and the other without and count the dead at the end to see what is most effective. When you have a treatment that works against zero other treatment available, this treatment should become the benchmark. And it's my freedom to prescribe as a doctor. We don't have to obey government orders to treat the sick. The recommendations of the High Health Authority are an indication, but it does not oblige you. Since Hippocrates, the doctor has done for the best, in the state of his knowledge and in the state of science.

[https://translate.google.com/translate?sl=fr&tl=en&u=https%3...](https://translate.google.com/translate?sl=fr&tl=en&u=https%3A%2F%2Fwww.upr.fr%2Factualite%2Fpour- comprendre-les-enjeux-du-traitement-du-coronavirus-par-la-chloroquine-nous- vous-conseillons-de-lire-lentretien-du-professeur-raoult-dans-le-parisien- du-22-mars-2020%2F)

<comment><AUTHOR> There's reason to be skeptical of him.

[https://en.wikipedia.org/wiki/Didier_Raoult#Ban_from_publish...](https://en.wikipedia.org/wiki/Didier_Raoult#Ban_from_publishing_in_the_American_Society_for_Microbiology)

> In 2006, Raoult and four other co-authors were banned for one year from > publishing in the journals of the American Society for Microbiology, after a > reviewer for Infection and Immunity discovered that two images in a figure > from the revised manuscript of a paper about mouse modelling for typhus were > identical to figures from the originally submitted manuscript, even though > they were supposed to represent a different experiment.

<comment><USER4> There are reasons to be skeptical of everyone!

<comment><USER3> The reasons are particularly relevant in this case.

[https://blogs.sciencemag.org/pipeline/archives/2020/03/29/mo...](https://blogs.sciencemag.org/pipeline/archives/2020/03/29/more- on-cloroquine-azithromycin-and-on-dr-raoult)

[https://science.sciencemag.org/content/335/6072/1033](https://science.sciencemag.org/content/335/6072/1033)

<comment><USER4> Again people not on the front line criticise those who are.

If you get infected, would you take it, or would you wait and see the result of the full study?

Now imagine having to take that decision not just for your life, but for your patients, and all the 200 staff that work in your hospital.

Another way to view the situation: you are a policeman stopping an ambulance not respecting the driving code and driving too fast, and then learn there is a dying patient in the back, what do you do?

<comment><USER5> > Another way to view the situation: you are a policeman stopping an ambulance > not respecting the driving code and driving too fast, and then learn there > is a dying patient in the back, what do you do?

Tell the ambulance driver to turn on the siren and party lights and have a nice day.

Like, there are already exemptions for ambulances driving "recklessly" as long as they're indicating (via siren and lights) that they're doing so in an emergency situation.

On that note, though, if the ambulance is driving _too_ recklessly it might do more harm than good to the patient. It wouldn't necessarily be the police officer's place to make that determination, but it could certainly be a contributing factor for reprimanding the ambulance driver should the patient end up more injuries coming out of the ambulance than one did getting in.

Overall, a pretty poor analogy IMO, even if I do (to an extent) agree with your point.

</comment></comment></comment></comment></comment></comment><comment><USER6> Haha, I love this. Here's the real point of the paper IMO:

> Conclusions Parachute use did not reduce death or major traumatic injury > when jumping from aircraft in the first randomized evaluation of this > intervention. However, the trial was only able to enroll participants on > small stationary aircraft on the ground, suggesting cautious extrapolation > to high altitude jumps. _When beliefs regarding the effectiveness of an > intervention exist in the community, randomized trials might selectively > enroll individuals with a lower perceived likelihood of benefit, thus > diminishing the applicability of the results to clinical practice._

I wonder what else that's applicable to?

</comment><comment><USER3> This article about the paper is likely to be more informative than the paper itself. ([https://blogs.bmj.com/bmj/2018/12/13/we-jumped-from- planes-w...](https://blogs.bmj.com/bmj/2018/12/13/we-jumped-from-planes- without-parachutes-and-lived-to-tell-the-tale/))

The study is an absolutely ingenious way of simultaneously illustrating multiple different challenges that can frustrate randomized controlled clinical trials. Some highlights:

> We believe that randomisation is critical to evaluating the benefits and > harms of the vast majority of modern therapies, most of which are unlikely > to be nearly as effective at achieving their end goal as parachutes are at > preventing injury among people jumping from aircraft.

> RCTs are vulnerable to pre-existing beliefs about standard of care, whether > or not these beliefs are justified

> When strong beliefs about the standard of care exist in the community, often > only low risk patients are enrolled in a trial, which can unsalvageably bias > the results, akin to jumping from an aircraft without a parachute.

> even a well conducted RCT can provide misleading results

</comment><comment><USER7> It appears to be a reply to this 2003 paper in the same journal:

> Parachute use to prevent death and major trauma related to gravitational > challenge: systematic review of randomised controlled trials [1]

[1] [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC300808/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC300808/)

</comment><comment><USER8> The problem with most commercial aircraft is you can't reach the door in time.

Hence I use an airbag suit.

</comment><comment><USER9> Alternatively you can put the parachute on the aircraft:

* [https://en.wikipedia.org/wiki/Cirrus_Airframe_Parachute_Syst...](https://en.wikipedia.org/wiki/Cirrus_Airframe_Parachute_System)

</comment><comment><USER10> Man, I'd hate to get the placebo.

<comment><USER11> > _Compared with individuals screened but not enrolled, participants included > in the study were on aircraft at significantly lower altitude (mean of 0.6 m > for participants v mean of 9146 m for non-participants; P <0.001) and lower > velocity (mean of 0 km/h v mean of 800 km/h; P<0.001)._

You'd be fine ;)

<comment><USER12> Every year lots of airline and airport workers get injured or die falling from a stationary aircraft when mobile stairs fail or are retracted too early. On the other hand parachute wouldn't help them either

<comment><USER11> that's also slightly different than jumping down 2 feet.

</comment></comment></comment></comment><comment><USER13> This study seems like a waste of time. People jumped from a stationary aircraft on the ground.

<comment><USER11> That's the point: [https://blogs.bmj.com/bmj/2018/12/13/we-jumped-from- planes-w...](https://blogs.bmj.com/bmj/2018/12/13/we-jumped-from-planes- without-parachutes-and-lived-to-tell-the-tale/)

</comment></comment><comment><USER14> I kept looking at the site to find some indication that this is satire. As near as I can tell, this was a legit study. I'm genuinely perplexed.

Edit: Silly me. It turns out that while BMJ is a legit journal, the study itself is satire and does identify itself as such near the end and via a linked opinion.

<comment><USER15> The best kind of satire is the kind that goes all the way. This is what you get if nobody tries to accept new information without a "double blind randomly controlled trial" for it.

<comment><USER16> If this is meant to be salient to the current situation e.g. with hydroxychloroquine, I'm afraid it has missed the mark by a long distance. In Bayesian terms, the prior for parachutes helping when falling from great heights is extremely strong. It would take extraordinarily strong evidence to dissuade us from the idea that they are effective, given our prior knowledge of physics and the effect of high velocity collisions on the human body. The priors for a particular immunosuppressant being effective against a particular virus are not nearly so strong.

Fortunately, some folks are doing actually high quality research on this right now, so we should have more solid evidence on this topic soon.

<comment><AUTHOR> > Published 13 December 2018

It probably has nothing to do with the current situation, barring a time machine, which should probably get its _own_ article.

<comment><USER16> I know the published study has nothing to do with the current situation. I'm referring to the motivation for posting/upvoting/commenting on it right now. For context, there is a significant push in the online COVID discussion space for discarding rational methods when evaluating potential COVID treatments. I've seen comments in this direction both here and on Reddit. That's the only reason I brought it up.

For anyone just upvoting or discussing this because they thought it was funny or interesting, more power to them.

<comment><AUTHOR> My motivation in posting it was that I stumbled across it and found it funny.

<comment><USER16> Awesome! Again, my comment is not directed at any particular person. It's directed at a particular motive. If you don't have that motive, my comment isn't talking about you and you can feel free to ignore it if it doesn't bring value into your life. :)</comment></comment></comment></comment></comment></comment></comment>


VR Will Revolutionize Education - <AUTHOR> http://uploadvr.com/vr-will-revolutionize-education/ <comment><USER2> I'd like to see a human programming language, the VR headset is placed on humans and the human is programmed by the computer to learn certain things, to produce certain outputs based upon certain inputs, like the Vulcan learning school [https://www.youtube.com/watch?v=KvMxLpce3Xw](https://www.youtube.com/watch?v=KvMxLpce3Xw)

Then we have lots of programmed humans. Actually, its a very bad idea.</comment>


Primary care-led weight management for remission of type 2 diabetes (abstract) - <AUTHOR> http://www.thelancet.com/journals/lancet/article/PIIS0140-6736(17)33102-1/fulltext?elsca1=tlpr <comment><AUTHOR> > Interpretation

> Our findings show that, at 12 months, almost half of participants achieved > remission to a non-diabetic state and off antidiabetic drugs. Remission of > type 2 diabetes is a practical target for primary care.</comment>


More Bandwidth Doesn't Matter (Much) - <AUTHOR> http://docs.google.com/a/chromium.org/viewer?a=v&pid=sites&srcid=Y2hyb21pdW0ub3JnfGRldnxneDoxMzcyOWI1N2I4YzI3NzE2 Important to keep in mind with respect to http://news.ycombinator.com/item?id=2521231 <comment><AUTHOR> Important to keep in mind in regards to <http://news.ycombinator.com/item?id=2521231>

<comment><USER2> The results from speedtest.net shown in that article indicate a ping time of 3ms. So Google's internet is still really really fast.</comment></comment>


Show HN: OneForty – Ask anyone anything  - <AUTHOR> https://oneforty.co/

<comment><AUTHOR> Now featuring

Marc Randolph - Netflix Co-Founder. Ron Lieboitz - Prez Middlebruy College. Three Y-Combinator Co-founders. And Air BNB Special Agent.</comment>