FreeBSD: the next 10 years - <AUTHOR> http://www.slideshare.net/iXsystems/jordan-hubbard-free-bsd-the-next-10-years <comment><USER2> The most intriguing part of FreeBSD (any BSD really) from an outsider's perspective I find the fact that "the FreeBSD project" has a bigger, more directed scope than "the Linux project" or "the GNU project". It's a kernel and userland all in one, and they can actually _decide_ to focus more on unity of configuration files and mobility. I get the impression that you cannot decide that as efficiently on Linux at all.

People often say "Linux is all about choice" as if it's a good thing [1]. I think this overwhelming focus on choice really is what's so frustrating about Linux and its community. If needs aren't being catered to, or if there are disagreements, the amount of vitriol that gets thrown around is despicable. The systemd controversy is so terribly shameful, but lo and behold: FreeBSD now seems to be envious of it (or at least some of its aspects). Gnome 3 is widely regarded [2] as the best, well-integrated desktop environment Linux has ever had, and look at the amount of vitriol _that_ got for having a direction and making choices for the user. I personally think that the level of integration systemd and Gnome 3 are attempting to pioneer make Linux far more attractive than ever, but the Linux community really alienates me with its attitude towards that. With this attitude, desktop Linux mostly remains a patched together collection of software. The rough edges of this patchwork are still far more apparent on even the best regarded distros when compared to OS X or Windows or even Android.

It's a shame FreeBSD doesn't maintain an integrated or official graphical interface. Since it uses the same not-so-well integrated desktops as Linux does, it unfortunately means that using FreeBSD is only a minor improvement over Linux for me in daily use [3]. That means I'll just leave it to Apple to build me a well-working and well-integrated operating system. If an operating system project or vendor makes choices for me, I consider that a big advantage most of the time. If a project can actually take on a proper direction like this presentation suggests, that is a big selling point to me.

[1]: I know what the good things about choice are, I'm trying to make a point.

[2]: Widely regarded does not mean "universally regarded" or even "regarded as such by the majority".

[3]: Ignoring the problem that FreeBSD doesn't have the level of driver or application support that Linux has.

<comment><USER3> That's why Ubuntu became so popular, and Mint after it. There was a cohesive vision that a Linux OS can be more than a collection of text processing utilities. That's also why Ubuntu is so reviled in some Linux circles, because they dared to make a choice for their users, dared to try something new, dared to implement something that wasn't a direct continuation of decades-old software. Once they proved it was possible, others started jumping on board, giving Linux the freshest coat of paint it had ever seen. It was a serious contender for the year of the Linux desktop, especially with the rise of netbooks.

But then politics happened. If it doesn't work the same way it did in 1968, it's not allowed in the OS that was the child of the 90's. Pulse Audio, Unity, Gnome 3, systemd (along with anything else Poettering has touched) are evil because they're new. Unix never did it, so Linux can't.

GNU's Not Unix (yet... we'll get there someday though!).

<comment><USER4> > Pulse Audio, Unity, Gnome 3, systemd (along with anything else Poettering > has touched) are evil because they're new.

At least for Unity and Gnome 3 (including GTK3) I'd rather say: Great ideas but they're evil because they are badly designed, full of bugs that don't get fixed due to complexity, constant API changes, almost no documentation or only wrong and outdated documentation and a lack of flexibility that annoys even the casual Desktop user.

Nobody is against progress - most people love to use OS X as a UNIX GUI these days... it's not perfect but it's not that bug ridden mess GNOME became.

<comment><USER5> > _Nobody is against progress_

You'd be surprised. Just listen to the arguments against giving Linux a more logical directory setup (somewhat like OS X's).

<comment><USER6> Change is not the same as progress. A lot of people are against change, for reasons both good and bad. I'm not familiar with the arguments over directory setup, but I'd almost bet money on them centering around tradition.

Personally, I think the various flavors of directory setup are already so divergent that tradition no longer holds massive value, but that's not something to be proud of.

</comment></comment></comment></comment></comment><comment><USER7> Choosing a unified format for configurations is an interesting task, because they all suck a lot (hehe). XML is too verbose to be nice to work with. Plain text files with config flags delimited by newlines lead to the program in the end implementing a small scripting language for config files.

JSON is pretty nice, but also a bit clunky. A lot of {:} all the time.

Personally, I think the nicest and most expressive way is S-expressions. I'm no lisper, but you have to admit sexprs are expressive, easy to read, and can be run as functions if the program knows lisp.

        {
        "configFiles": "in JSON",
        "wouldLook": {"like":"this"}
        }

        (while sexpr
          (could look)
          (even nicer))

<comment><USER8> Regarding the configuration formats, I would recommend TOML.

In fact, I hated it because it seemed to be just "another standard" that unnecessarily adds dependency.

But after using Rust, whose package manager forces me to write the package configuration in TOML, I found the format is more like "JSON designed for configuration file." As you said, JSON is full of ':', '{' and '}'. And it is natural because it started from data interchange format, not for handwriting. TOML solves this problem very well IMHO.

Also, unlike XML that requires an external structure to validate the types of the values, TOML values have types, just like JSON.

<comment><USER9> Link for the lazy [https://github.com/toml-lang/toml](https://github.com/toml- lang/toml)

</comment></comment></comment><comment><USER10> Audio from the talk:

[https://archive.org/download/bsdtalk247/bsdtalk247.ogg](https://archive.org/download/bsdtalk247/bsdtalk247.ogg)

<comment><USER11> Video from the talk: [http://youtu.be/Mri66Uz6-8Y](http://youtu.be/Mri66Uz6-8Y)

<comment><USER12> 3D virtual-something from the talk, anyone? ;)

</comment></comment></comment><comment><USER13> I find it irritating to see cheap jabs at Linux/GNU/GPL in most BSD presentation I check out. It doesn't prevent me from using it, but it's just childish. Focus on your strength, not what you perceive as weakness elsewhere.

<comment><USER14> Linux and OS X do the same thing to Windows (xbill, Micro$oft, PC vs Mac commercials, etc.) It is kind of sad, but it's how underdogs always work. Selling yourself as an underdog means not only pointing out what you do well, but how you do things better than others, and that always ruffles feathers.

Just saying what you do well will result in your competitors saying, "we do that well too", and won't win you any market share. You have to demonstrate that, "no, they really don't do that well." So it's a real balancing act between promoting yourself and not being a dick to your competitors. In my own personal case, I screwed that balance up royally, and it's a problem that has followed me around for the last decade.

Similarly, look how hostile OpenBSD is toward FreeBSD about security designs (watch any Theo de Raadt presentation.) I almost never see any FreeBSD users taking pot shots at OpenBSD like that. Then look at the market share of both, and it makes more sense.

<comment> vezzy-fnord _I almost never see any FreeBSD users taking pot shots at OpenBSD like that. Then look at the market share of both, and it makes more sense._

Then the more logical explanation is that FreeBSD is lagging behind exploit mitigations.

Keep in mind that Theo actually praises Windows and says that they're second after OpenBSD. If this was about being envious over market share, then that wouldn't make much sense.

<comment><USER15> It makes plenty of sense when you consider who OpenBSD's actual competition is. Hint: They aren't trying to target the desktop market.

</comment></comment></comment></comment><comment><USER16> I didnt find this talk very visionary (I saw the similar one at EuroBSDcon). Power management needs to be better, add something like systemd thats not like that. Vision in (existing) operating system development in terms of ten year projects is actually quite rare, mostly there are incremental changes. OSX is maybe an example, go for usability, and ZFS is another, make a radically different file system. Windows NT perhaps as well.

</comment><comment><USER17> This may be a stupid question, but what's wrong with shell scripts as config? Yeah, they're Turing-complete, but they're necessarily trusted, and a lot of times you end up wanting that anyway. But in the simplest case, they're almost the platonic ideal of a config language: name=value, repeat. If your objection is that shell languages have lots of nasty warts, then I'd agree, but you should be fixing that separately anyway. I sort of encountered this idea in FreeBSD init scripts, so I don't see why they don't just run with that.

<comment><USER18> The problem with a Turing-complete configuration format is that pretty much the only thing you can do with it is preserve it verbatim, or execute it to see what config it produces. You can't, for example, write a tool to safely update a config file to work with a new version of the software, or to apply some specific update across a bunch of machines, or to catalogue the configurations each machine has.

<comment><USER17> Yeah, but that's more of problem with shell than Turing-completeness in general. You just need to design a language with a usable T-incomplete subset, like maybe name assignments and conditionals. The only problem is that it's tricky to enforce that sort of sunsetting on sh. But I don't see why your migration script couldn't just say, "sorry, your config is too weird to automatically migrate" when it sees a loop or external callout.

</comment></comment></comment><comment><USER19> "All OS and app configuration data in OS X and iOS are XML plist files, even GNU emacs and X11.org's preferences!"

Naming correctness aside (it's X.org), can this be backed somehow? I remember using Emacs on OS X and I very much was storing my configuration in ~/.emacs.d/, the way it should be. The idea to have a unified configuration format for the entire system is glorious in theory, but with a system as heterogeneous as FreeBSD (and Linux even more so), it seems next to impossible in practice.

<comment><AUTHOR> I assume he is speaking of the base system. Though I wonder how good an idea it is in practice. E.g. I cannot really imagine configuring, say mutt, via JSON, XML, or whatever. The power of such configuration files is that they are often domain-specific and allowing a custom format makes them compact.

Of course, for automation or writing user-friendly interfaces, a unified format is better.

</comment></comment><comment><USER5> For those that don't know it (there are some comments here but not very clear): the writer of this presentation, Jordan Hubbard was a head FreeBSD developer for many years, who then become a head developer of OS X at Apple. He left Apple last year, and is back into FreeBSD work.

</comment><comment><USER20> I have to admit that I came to this thread to see if anyone accused Jordan Hubbard of not understanding the "Unix Way" when he mentioned that they need a subsystem like the one that must go unnamed on this and every other forum.

Gosh, I remember when you could get FreeBSD on floppies. I've always had a great deal of respect for the work that they do. 10.0 was awesome, but I have to admit that I don't use *NIX everyday anymore.

<comment><USER21> Oh my gosh yes. I can't imagine anyone with JKH's particular type of cred in the Unix arena, who could more convincingly sell me on such a service. He cofounded such an iconic traditional *nix environment, and then spent years presiding over the technical direction of the internals for OSX.

I like to think JKH has already seen the future at Apple in terms of what worked, and what could have been improved. That JKH is back to working more closely on FreeBSD is exciting.

</comment></comment><comment><USER22> Can someone explain bit about "trying really hard not to suggest launchd?" He's right, it does seem like an obvious fit, but he takes it as obvious FreeBSD wouldn't use it. What am I missing?

<comment><USER23> Jordan Hubbard only recently left Apple. I suspect he is trying to avoid suggesting only Apple solutions for FreeBSD problems.

</comment></comment><comment><USER24> I must admit I like some of what I see, but I'm not sure the people currently ditching Debian for FreeBSD is.

Hopefully FreeBSD's _execution_ will better than Debian's, but given their long standing track record I have little doubt they'll be able to make a future transition a million times smoother.

I'm still not sure I agree that all configuration has to be stored/processed in the same format (ref Apple plists).

I know this is the way things are done on some embedded platforms like OpenWRT and once you get used to it, it's _OK_ , but it always means a feature needs to be doubly supported: first in the original service and its config-file and then in the translation layer between the config-file translated by the init- script into the "real" deal.

And will they be doing this for the 70k+ ports, or just for core services provided by the base OS?

</comment><comment><USER25> Let's hope they take these pointers to heart, discuss and move forward. It'd be great to have an even stronger FreeBSD in 10 years' time.

</comment><comment><USER26> Regarding "A centralized event notification system", I predict that D-Bus will soon have this position in Linux, certainly when kdbus lands.

<comment><USER27> D-Bus is an amazingly crap implementation of this idea.

<comment><USER26> Your comment is an amazingly crap comment. Provide _details_ and/or _links to details_. Also, does your "crap" assessment also apply to kdbus?

</comment></comment></comment><comment><USER28> > My dream laptop has evolved (BSD instead of Windows) (15th slide)

But, wait, isn't it Mac?

<comment><USER29> It's a stock photo: [https://www.google.com/search?tbs=sbi:AMhZZivX9JS- QLEbVyc-hN...](https://www.google.com/search?tbs=sbi:AMhZZivX9JS-QLEbVyc- hNm9pulGOhgNa0zpQ-eCE- mTFSlgREXdOD6kgOwxp7H8Xy3Ogb8hahkhki6Y7I-cCc0-9zqi03zdOS8RRAmH0bNLWCYCd89-bLWAFvbXOyujsSHUlk_1OqEuPzFQ6dAgPoCfCyrTj2EjsRuVBEGq2wMVUyW_1vWwB2I7IuebBxeU-43I4NHwfgW6Ait_1h6w6Nri0OiFlsvCYy0sb-Q0gRuGGKUElekx1PIDynjEjpwQfnFOu04CvRxfrOqYKxrRkNWVvAylrSDFGWsW_1b4xN7VkON4-E5EY7u4g1pxHuWzZTRZqVG_1MA9Fwn- VbaTma0YMQXSDKdmp7JZw1xxYLsNAwUsN_1HjreyzRI0SaEJQ5LDyqlbuGxi66iGmb7dhsqGpmO- mkH7Hj2nhpdKKqOErV2lHcjZB9HXIEkbaI6MADGqyrl8MXQdWR96BCtVuFUjCc6l29m8_1ELVNh9FbqtbHH5QDKprfT06K68MXYEMW7PLxvVRT7Z9De0H9ARmX9NkNSqYMeyF_18u-8116hZ3zY475gQdhZFBJL_1Fjvz_1cJf0kqjm- CR58zsvdKuxGjHkt3eLG3bQRig_1PPHFgrOW9CWf2WVHHuQmedCuI2AFhbhMJk4w3g77dvrxaLzuYIBnssNZz0mE0SMqAHYeJsY6eXoLIDAuuHhWi9zMLtRG9PeJTS5vkJQoVLXzWPT908X9_1LBSNB_1gWp1Fdb4eeJPAgFx2Qd_15r-XzGIG9MIi6qPtYDUTp8bKY5cnXsaLBSaNtM- tvksY_1wAD2Iy4142MK0p_1OZvGg-v78m-lT0UanutaLRtiqO4zl2ZkWZp1sXou-K39jBQVXlJvou1FjSwiY94F7VJ7_1Qyuh6EMrMdClK0Z7ApDhOsWZwgA6XoWqNGnbviuNdRzTKhAAllJKRpgF3bXFrIEYH08F1hist8LpGCkIyOc8NB3e-_10rdBl2QJ4pnbQGdPFYxwDJBG_1fz_1Dlf76VNXe8mFj61YS1LoVq2HBCkC3EjmWgENm4X-7xPnISWDTVtJjvXF0FfxeGJb2JlwSA6G8eh5olWRTmTOVXEkpRba7dAmu_16HrCVDJckoFKhGIOD9Dxtm0y_1llBYO7pbazh61dzTdLyfo_1GqK5QjUbeKQZOqgJLY6SbFSE4vD2Xa9M2XEnpbEzyc1984mnFvOlovmylyTfb3NfYRbKUef0Wx4EwoqJiTxXfSK9o2oLJu3b2eO0ccDboC7yGwiXOPY68fRowdpAMKRGPMpy_1IT0AfDYh-_1A5d3lNUK1qGTQE7Wy3hjZm3KoxtTd_1e0DxMFjazHK5YYinb1n_17hoUze- os1LUmdiF1vQ5Ge8Kqp8CCf0MtCj9GL7XDkZlNgYvhH747bAvnTq59P78bP_1eMn1ZoCrchajrP55A_1QohUYi0KqhkKcenjr9ESqa5Q&gws_rd=ssl)

<comment><USER30> It still ships with OSX, albeit it is less apparent than how buying a Windows computer to run Linux (hic, Lenovo fanboys) how antithetical to your cause buying the machine is.

</comment></comment></comment><comment><USER31> Regarding the centralized configuration data, I don't know how to feel about it. Sure, it would be good but most recent attempts at it usually involve going the Registry way.

<comment><USER32> I didn't see anything about centralized configuration.

Only standardising on a single format e.g. JSON.

</comment></comment><comment><USER33> "Even the linux die-hards have essentially grasped the necessity of systemd (Even though they're going to hate on it for awhile longer)"

<comment><USER34> the only reason I'm re-interested in bsd is that it does not have systemd, if BSD wants systemd-alike init I will stop right here...

additionally, for the vast majority linux systems that are actually embedded, BSD needs a solution for that.

<comment><USER35> The one great thing about OpenBSD, is that it provides a consistent, reliable, cleanly documented, constantly maintained, operating system.

There is such an emphasis on consistency, that a solid OpenBSD administrator, who last worked on OpenBSD in 2004, and then, 20 versions later, (OpenBSD releases a new major version, along with a full set of architecture releases and binary packages every six months, like clockwork) - would have _zero_ problem understanding all of the system concepts. A few things have changed/updated/evolved, but a couple hours with the man pages would bring them right up to date.

OpenBSD is about very gradual evolution, not revolution.

My sense is that OpenBSD is not designed for Watches, Tablets, or SmartPhones. It is a world class Server, Firewall, Router, networking device, networking appliance operating system, and it's unlikely to ever lose that focus.

I'm pretty confident that we won't see anything like systemd confusing everyone on OpenBSD as long as Theo continues his steady management at the helm. Systemd actually serves some pretty important functions on systems that have a lot of dynamic services going up and down with dependencies, particularly on low-power devices, and on systems that require rapid parallel process initiation - so I'm not hating on systemd here, just appreciating the consistency that we find in OpenBSD.

<comment><USER36> > OpenBSD is about very gradual evolution, not revolution.

To make a concrete example, look at ifconfig and ip (from iproute2 I guess?) on Linux. ifconfig was used to be the one tool to rule them all, everybody knew it, everybody used it. At some point somebody decided they need a new tool, so now there are two, and the other is said to be deprecated. The fun thing is that ifconfig still mostly works, and you find lots of documentation/tutorials/wikis telling you to use it. But at some point you might bump into some really weird issue which turns out to be because the tool you're using is.. well, deprecated. I did have such a problem myself (related to IPv6, years ago) and it wasn't much fun, because the tool looked like it's got support for the thing I was trying to do, but it would just silently and weirdly fail...

In the OpenBSD land, a network interface is a network interface. You use ifconfig. IPv6 or not. Wireless or not. The same tool everybody knew has been evolved to support the new stuff. The developers are _careful_ about needlessly changing the user facing part of a tool in a way that would require him to re-learn it or another tool. Of course, sometimes changes are inevitable, and these changes are usually documented in the upgrade guide (and the page which documents changes to the -current branch). So there are few surprises.

Sometimes the underlying tool might change entirely to another implementation, yet the user facing parts are made for most part finger-compatible with the old tool. For example, mandoc(1) has replaced historical tools like man(1), apropos(1), etc. And sendmail has been replaced by smtpd, but smtpd still provides newaliases and makemap.

So they don't push shiny new poorly tested tools and tell everyone to relearn everything all the time because _shiny new features (and the old tool was cranky and nobody wanted to fix it)._

<comment><USER37> ifconfig didn't support infiniband and hadn't been maintained for many years.

It was irritating at first but ip is a better, more capable tool.

[http://serverfault.com/questions/458628/should-i-quit- using-...](http://serverfault.com/questions/458628/should-i-quit-using- ifconfig)

<comment><USER35> I've never used "ip" in a sysadmin setting - the only command I've ever used on a _nix (bsd, OS X, Solars, Linux) is ifconfig - which may just indicate I 'm using the wrong command, but also demonstrates the issues involved in switching to a new command.

Re- ifconfig/infiniband - this is ironic - because when I google "configure infiniband linux" \- every page I come up with only mentions ifconfig, and never ip.

(though, ifconfig is just used to display the interfaces, and it's usually other commands like ib_ that seem to be used to configure the infiniband interfaces)

</comment></comment></comment></comment></comment></comment><comment><USER38> I find it alarming that releases are EOL after 1 year, whereas RedHat Linux releases are supported for 10 years.

<comment><AUTHOR> That's a point release. Red Hat point releases are also not supported for 10 years (you follow along the point releases on the major version for that length of support).

It seems to be pretty much the same on FreeBSD. However, the support for major versions is also shorter. E.g. 8.0 was released in 2009, and 8.x is not supported anymore.

<comment><USER39> FreeBSD 8.4 is supported until 2015-06-30. FreeBSD 8.0 was released on 2009-11-25. Odd numbered minor releases and the last minor releases in a major release are supported for 2 years.

Migration two newer minor releases of the same major release preserves binary compatibility. There are ports to preserve binary compatibility with previous major releases.

Why would want to run 10 year old binaries if a compatible and improved version exists? Run FreeBSD 8.4 and 10.1 on the same hardware and perform a bunch of benchmarks. Even if none of the new features are relevant to you it offers improved performance.

<comment><USER40> Yes, that is what it says on paper, but I would submit that both 5.x and 7x were essentially EOL the day they came out.

Since 4.x there has been a huge focus on the upcoming releases. By the time the x.0 release comes out, all of the cool kids are working hard on x+1 and x+2 - you saw this especially during 8.0 and 8.1 when a lot of mailing list chatter from core developers revolved around nitty gritty details of 10.x.

By the time 7.1 came out (for instance) all new driver bug fixes, etc., stopped being applied to the 7 tree and the answer to every question was "it will be in (8/9)".

I _do_ appreciate the fact that an 8.4 was created - it's a step in the right direction and a sign of some real understanding of the problems the end users are having with an inability to invest in FreeBSD and make long-term plans with their own platforms.

However, I still would like to see a release ... any release ... get to x.10 or x.11 - like 4 did. I even committed $50k to that end a few years ago (although I suppose that's small fries these days :)

If people would like to know my specific critiques, there was a long mailing list discussion in 2012:

[http://lists.freebsd.org/pipermail/freebsd- hackers/2012-Janu...](http://lists.freebsd.org/pipermail/freebsd- hackers/2012-January/037294.html)

<comment><USER41> I expect this would be a big deal for the appliance manufacturers (think Juniper, NetApp, Isilon) that need to support long life cycles . I'd also expect those type of companies to pony up for long term support (and they do, at least internally, with staff developers and trees)

But in an ops context, why not simply install compat<version> packages? Or worst case, run the obsolete apps in a <version> jail? With containers, I think we're rapidly approaching a point where the software that touches the hardware can evolve faster than the libraries/support around applications, and this quite frankly is awesome!

</comment></comment></comment></comment></comment><comment><USER42> In 10 years time will they still be using CVS?

<comment><USER43> FreeBSD migrated to Subversion in 2008.</comment></comment>


Show HN: Estimate how much to charge for your SaaS side project - <AUTHOR> https://pricegun.twos.dev/ <comment><USER2> Love the UI, not the logic.

Supply based pricing is a poor communicator of value.

Substitute the cost to the founder with the cost of a substitute for the customer.

Example: I have a side project that takes me an hour or so each month but saves my clients $400/month.

Should I charge the $2/mo the calculator recommends or the $99/mo that I'm currently charging?

Every click costs Google essentially the same, so why charge 10x as much for the search "apartments for rent near me" than the search "knitting pattern for dog sweater"?

Again, love the UI!

<comment><USER3> I took this as a bare minimum price per user for the project to be worth your time (i.e. better pay than your day job) — maybe that could be communicated more clearly?

<comment><AUTHOR> Speak of the devil, as you posted this I updated the messaging to say exactly this! Thanks for the feedback.

</comment></comment></comment><comment><USER4> What does it mean by "what margins do you want?" Margins of what I earn?

Also founder salary should not be in pricing. More like how much customer saves a month</comment>


Founder visa bill proposed - <AUTHOR> http://www.readwriteweb.com/readwritestart/2009/12/it-may-soon-be-easier.php

<comment><USER2> Personally, I think the more wealth and brains we have in the country the better, but $100K seems cheap enough to invite lots of shady cases.

I could start the "Visa Arbitrage Angel Fund" that only makes $100K investments into startups with $20K+ in the bank, then require the startup buy me out one week after closing for $120K (or make monthly payments of $10K for a year, or some other wacky clause that makes my investment an awful loan instead of a real investment). Now we've invented a way for foreigners with $20K to buy a visa.

      The proposed program would make more visas available to
      entrepreneurs who have at least $250,000 in funding from a
      U.S.-based venture capital firm, or $100,000 in angel funding.

<comment><USER3> Wealthy foreigners already do buy their way into the States through the EB-5 visa.

<http://en.wikipedia.org/wiki/EB-5_visa>

The startup visa seeks to change the EB-5 visa to include people who aren't wealthy, but would also create jobs in the US by starting viable companies.

<comment><USER4> This is an interesting link. I always wondered how much money I would need to buy my way into permanent residency in any country in the world. (I am assuming that the USA is among the most difficult -- those with expertise, please correct me if I'm wrong.) It's one of those useful benchmarks for how rich "rich" is.

The price is high, but not astoundingly high, if I'm reading this right. You need $500k in capital that you're willing to invest in "certain qualified investments or regional centers with high unemployment rates". You don't even necessarily have to _lose_ the $500k, or even lose anything. You just need the capital.

<comment><USER5> Then it might interest you that Panama requires only proof that you made $500/month to get a retirement visa

<comment><USER6> Interesting, but as I understand it this $500 is supposed to be your real pension, not some other form of income, thus requiring most of visitors of HN to wait some half a century until retirement in Panama :)

<comment><USER5> The alternative is to buy a house for $200,000

</comment></comment></comment></comment></comment></comment><comment><USER7> In my province there was a similar program, Provincial Nominee Program or PNP, an immigrant would invest $200,000 in a local business plus give a $25,000 deposit to the provincial government and the immigrant investor's citizenship request would be fast-tracked.

After living here for a year they were supposed to get the deposit back, but they didn't.

Even worse is the majority of the people who benefited were the same politicians who set up the program.

Now it's a huge scandal and the police are involved, large amounts of money plus politicians and there's a scandal, imagine that!

</comment><comment><USER8> The only comment I would add to this is pg's quote at the end of the article "I think this would have such a visible effect on the economy that it would make the legislator who introduced the bill famous," says Graham. "The only way to know for sure would be to try it, and that would cost practically nothing."

Unfortunately...that's not true. It might cost no money, but it could cost the congressmen and senators their job at the next mid-term elections. Immigration reform is a hot-button topic, so as much as it would be a great thing to do, it might be politically untenable right now.

Note: I am a foreigner, that would definitely want to take advantage of this program if the bill is passed and it is implemented. Just commenting on the quote :)

</comment><comment><USER5> Timeline seems highly appropriate for me since I graduate from college in 2 years (since I am on a student visa). Maybe I will be able to stay in the US and work on my startup as I want to (during the best years of my life) than sell my soul for a corporate job.

</comment><comment><USER9> Small discussion on this bill last night at <http://news.ycombinator.com/item?id=1024137>.

</comment><comment><USER10> The funny thing is that not that many people that would be able to afford this would actually do it.

The USA is a nice country but there are many parameters that go in to the decision of choosing a place to live and it scores low on plenty of those.

The US is the destination country of choice for people without money. Those with money are just as likely to go elsewhere.

<comment><USER11> I have to disagree, at least anecdotally. I know several people, whom I'm pretty sure don't have to work if they don't want to. Yet they moved to the US specifically in order to start companies. And even they, rich, educated folk from "good" countries have had ridiculous amounts of trouble getting visas and work permission.

<comment><USER10> Anecdotally, I know at least several Americans that have moved to Europe, at least one pretty affluent.

But anecdotes are nice, numbers are better. For every wealthy person that would like to get 'in' to the US there must be 50,000 poor ones.

The difference is that for them nobody is going out of their way to create special visa to allow them entrance.

</comment></comment></comment><comment><USER5> What if the company fails in 6 months? Do note that the visa is one for "Permanent" residence.

<comment><USER12> It's possible that it will end up being a 'conditional permanent residence' that you have to renew after 2 years (the condition being that you still have the company). This is what happens for green cards that are granted on the basis of a new marriage.

<comment><USER5> That would probably work. I just hope we don't end up with another SARBOX where the requirements outweigh the benefits</comment></comment></comment>


On the importance of CSRF protection on Logout - <AUTHOR> http://superlogout.com/

<comment><USER2> Total loser move to post this with no context.

Warning for anyone who hasn't clicked the link yet: This will log you out of a bunch of services ranging from AOL to YouTube.

</comment><comment><USER3> Flagged for exceedingly bad form. A page explaining the issue with a link that the informed user could click would have been far more constructive.

It's an interesting thing to discuss, but this link is the wrong way to do it.

</comment><comment><USER4> I have third party cookies off so it didn't work.

</comment><comment><USER5> I'm going to regret clicking this link tomorrow.</comment>


Ask HN: How to aggregate product info from other websites - <AUTHOR>

Any input on the best way to aggregate product information from various websites would be much appreciated.  Most of the websites I would like to aggregate lack any APIs that I could use to track prices and things of that nature.<p>I have zero experience web scraping of any kind so any direction would be helpful.  Before I start digging I figured HNers may have some invaluable advice. <comment><USER2> Python & Beautiful Soup (<http://www.crummy.com/software/BeautifulSoup/>) are your friends here.

<comment><AUTHOR> Anyone know of a similar library in rails that works well?

<comment><USER3> I'm pretty sure this (HPricot) is the one most people use in Ruby:

<http://code.whytheluckystiff.net/hpricot/>

<comment><USER4> Here's a great hpricot tutorial

[http://www.igvita.com/2007/02/04/ruby-screen-scraper- in-60-s...](http://www.igvita.com/2007/02/04/ruby-screen-scraper- in-60-seconds/)

</comment></comment></comment></comment><comment><USER5> You might also want to 1\. Worry about the Copyright laws. 2\. Make sure you do not hit the site so often that you show up in their logs as bandwdth hog and are blocked.

</comment><comment><USER6> I use python to write scripts of this nature (one script so far:)).

Python has SGML SAX parser and since HTML is SGML it can be used. Better than regexps any day.

Python's http client library also supports cookies so that you can pretend to have a "session" with your target website.

EDIT: the libraries are urllib2, sgmllib, cookielib

<comment><USER7> Very few pages have well formed mark-up. The few large scraping projects I've seen have started out with a mark-up based approach and then switched to regular expressions.

What experiences has everyone else had?

<comment><USER6> Uhm. I though any valid HTML is also valid SGML? Are you sure you're not confusing it with XML markup?

<comment><USER8> I think he's saying that the HTML-parsing approach only works when the HTML is well-formed and for most sites, it isn't.

</comment></comment></comment></comment><comment><USER9> See if the sites in question are part of an affiliate network, like Commission Junction or Link Share. They often provide plain-text feeds to affiliates through these programs, and many of their terms of service enable you to set up these kinds of services (although some have restrictions on mixing their data with data from their competitors). However, I've found that even this data isn't all that great, cleanliness wise (sometimes you can't trust the name of the product, the price, the link, or the SKU to even match the website) and isn't updated very often (like product availability). But it's a hell of a lot easier than writing a custom parser for each site's HTML (although when I was working on project like this, I had to write a custom parser for each feed in order to put them in a more consistent format).

</comment><comment><USER10> For Ruby, consider Scrubyt: <http://scrubyt.org/>

If you're wondering why, well, consider this script that "learns" how to scrape Google results (from one supplied example of output data):

      google_data = Scrubyt::Extractor.define do
        fetch 'http://www.google.com/ncr'
        fill_textfield 'q', 'ruby'
        submit

        link "Ruby Programming Language" do
          url "href", :type => :attribute
        end

        next_page "Next", :limit => 2
      end

      puts google_data.to_xml

Reads almost like English in the scraping part!

</comment><comment><USER11> Perl's WWW::Mechanize module is a good choice for scraping & automating website interactions.

<comment><USER12> Mechanize also has a ruby port since you are working with rails.

</comment></comment><comment><USER13> What are you trying to do exactly? It depends a lot on the type of data you're trying to gather.

<comment><AUTHOR> I am basically trying to track prices of certain products easily so I do not have to worry about doing it by hand and checking myself every once in a while.

<comment><USER14> Have you considered looking at the price comparison sites? Some of them have an API. Unless you plan to compete with them directly, you will save a lot of time.

Example: <http://developer.yahoo.com/shopping/></comment></comment></comment>


Passion, Protectiveness, Anger and Anguish - <AUTHOR> http://shadow.cat/blog/matt-s-trout/passion-anguish/ <comment><AUTHOR> First came across this blog post via an interesting tweet from Audrey Tang:

 _In which @shadowcat_mst reflects on affective & interpersonal neurobiology with candor and wisdom_

<https://twitter.com/audreyt/status/291197318198349824></comment>


Looking For Work - <AUTHOR> http://www.chrisbrogan.com/looking-for-work/

<comment><AUTHOR> This is a frustrating thing to witness. There are people close to me who would rather stay in a bad situation where they don't have to think for themselves instead of putting in some real effort to learn a valuable skill or identify a real opportunity. So much of the work environment in the United States to day is much more babysitting than gainful employment. It kills me to see the talented all around me that is wasted because of a lack of initiative and a preference for simply following someone else's directions.</comment>


How to rewrite it in Rust - <AUTHOR> http://adventures.michaelfbryan.com/posts/how-to-riir/index.html <comment><USER2> We did a similar thing with a Scala -> Rust rewrite for the [http://prisma.io](http://prisma.io) query engine.

By rewriting small components and integrating them into the existing project using Javas native interface, our small team of 5 developers were able to pull off this massive rewrite in just under a year. The resulting code base is rearchitected in a few very important ways, but mostly follows the same structure.

And because we kept and evolved our old Scala based test suite, we have a very high confidence in the rewrite.

When Async/.await finally landed, we could switch over very quickly, and it has been a joy to focus on benchmarks and performance over the last month. Spoiler: Rust is faster than Scala :-D

<comment><USER3> I promise that this is asked genuinely and isn't some sort of veiled "gotcha!" (it's tough to tell on the internet sometimes); what was the reason for a change from Scala to Rust?

I ask because Scala already has a good type system and the JVM typically has good performance nowadays, particularly with something like GraalVM, so I am actually really curious to why you felt a Rust rewrite was a good idea.

<comment><USER4> Just some reason I might make a switch from Java/C# to Rust:

* you can keep memory use quite a bit lower * you can still sometimes get large constant factors of performance improvements over the JVM in some kinds of problem domains. If this means you can run on 1 server instead of say, 5, you have a much simpler infrastructure. * startup time, especially if you are doing 'serverless' or similar * tail latency - even a good GC language will have occasional long pauses. * data race protection at compile time * easier deployment - no need to install a jvm and keep it updated

<comment><USER3> I agree with all of your points except the "startup time" and "easier deployment"; GraalVM is pretty sweet and produces nice, self-contained executables.

<comment><USER5> Prisma engineer here who's been part of the rewrite since the beginning. We tried GraalVM, but the binary size was huge and we anyways needed to write parts, such as the JDBC drivers in Rust, C or C++ due to GraalVM not being able to compile certain JVM code to a native binary.

We distribute the binary with our NodeJS package and hundreds of megabytes of binary size will not work that well for our users.

<comment><USER3> Oh! That's a valid reason; I'm actually surprised that GraalVM has issues not supporting JVM features, since I've been using it for Clojure code locally (though admittedly just for fun, nothing serious). Definitely makes sense if you're stuck rewriting things anyway, might as well just do it in a more modern language.

Thanks for the insight!

<comment><USER5> Yep. I remember how at least JDBC and JWT libs were needed to rewrite using a native language (which we did until some point!). And the GraalVM has a weird API that is not JNA/JNI when you want to use the native-image. It is not very robust system for our needs, but it was a good learning experience.

What we did in the end is we rewrote parts of the system with Rust, plugged that to the JVM package and we had all our tests ready to use. First the database connectors and at the same time the other part of the team was writing the graphql parsing in Rust. We could all utilize our Scala integration tests which was crucial for our success.

And btw. we still have our tests in JVM, although the rest of the stack is Rust now.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> This ability to incrementally add Rust to a C codebase is very useful for adopting Rust in established projects.

You don't actually have to rewrite everything on day one. You can stop writing new C code right now, and then gradually replace old code only when you need to fix it or refactor it.

<comment><USER7> Twice I've been part of a move from Javascript to Typescript that worked much the same. Both projects were large applications with several developers working on them. Both had been ongoing for a few years before the port started. In both projects we decided to write all new code in Typescript and convert JS to TS when we made any largish change to an existing JS file. In both cases it took around a year for us to hit > 90% all code being converted this way, and at that time we decided to actually make issues in our issue tracker for porting the rest, and then had the rest converted in a couple of months after that.

The big difference is however that JS and TS can live side by side on a file by file basis out of the box with the Typescript compiler, which makes it super easy to convert. You don't have this luxury with C and Rust of of the box, but serious kudos to the author for finding a way to do something very similar.

When converting C to Rust you usually have to do things on a module by module or compile artifact by compile artifact basis, which makes it much more challenging. You can however employ some sort of strangler pattern: [https://docs.microsoft.com/en- us/azure/architecture/patterns...](https://docs.microsoft.com/en- us/azure/architecture/patterns/strangler)

<comment><USER8> > When converting C to Rust you have to do things on a module by module or > compile artifact by compile artifact basis, which makes it much more > challenging.

OP is essentially about proving the opposite. It does take a bit of setup to get there, but you _can_ ultimately translate C to Rust on a function-by- function basis, and Rustify interfaces, data structures, etc. only gradually after nothing on the C side is relying on the older defs.

C++ would be more of a challenge - you need to forgo quite a few C++-exclusive features to end up with interfaces that Rust can work with. That's where an "artifact by artifact" approach might work better. Other languages would be roughly similar, with their heavyweight C FFI's.

<comment><USER9> > you need to forgo quite a few C++-exclusive features to end up with > interfaces that Rust can work with

Luckily, many C++ projects do this already so they can be called from C.

</comment></comment></comment></comment><comment><USER9> > However, Rust has a killer feature when it comes to this sort of thing. It > can call into C code with no overhead (i.e. the runtime doesn't need to > inject automatic marshalling like C#'s P/Invoke) and it can expose functions > which can be consumed by C just like any other C function.

As we see below, you may still need to write some code to convert from C types to something that is more ergonomic to use in Rust. But the marshaling ABI- wise is minimal.

> Turns out the original tinyvm will crash for some reason when you have > multiple layers of includes

It's actually crashing because there are no lines of code in the file, so certain data structures never get initialized.

<comment><USER10> > As we see below, you may still need to write some code to convert from C > types to something that is more ergonomic to use in Rust. But the marshaling > ABI-wise is minimal.

Exactly, as much as I love writing Rust code, there is nothing that is more frustrating that maintaining bindings from C to Rust. Then you'd have to create another idiomatic binding on top of it. Sure bindgen is great, but Zig's cImport and Swift's ClangImporter take this further.

They both use clang modules to tackle the first part. A autogenerated idiomatic solution would be great for Rust, but sadly it doesn't exist.

<comment><USER11> At some point, I figure you will always need human intervention to get actually idiomatic interop, whether it's C marshalling, JSON serialization, database persistence, etc.

</comment></comment></comment><comment><USER12> > This is where build scripts come in. Our strategy will be for the Rust crate > to use a build.rs build script and the cc crate to invoke the equivalent > commands to our make invocation

Yikes - port the entire build system to cargo before you write a line of Rust. Now draw the reset of the owl!

Surely's there's an incremental path for the build as well? Perhaps if you're using CMake?

<comment><USER6> You can build Rust code as a static library and make the C build system consume that instead. This is the approach that librsvg took.

Moving C build to build.rs is not necessary. It's usually done only because people used to Cargo don't like bringing CMake along. If you were to publish this as a Rust crate, it'd be slightly easier for downstream Rust users to have one less external tool to install.

</comment></comment><comment><USER13> Great guide, this looked surprisingly straightforward.

<comment><USER14> I came here to say the same thing. This is a great article on "Rust is safe for our org."

</comment></comment><comment><USER15> This seems exactly what remacs is doing with emacs.</comment>


Joys of Supermarket Shopping in the Soviet Union (2017) - <AUTHOR> http://www.strangehistory.net/2017/08/11/joys-supermarket-shopping-soviet-union/ <comment><AUTHOR> I just realised last weekend was the fourth weekend without toilet paper on the shelves in my local supermarket. I'm sure they're getting it in, it's just never there when I go to (quickly, furtively) shop on weekends.</comment>


Math formula gives new glimpse into the magical mind of Ramanujan - <AUTHOR> http://phys.org/news/2012-12-math-formula-glimpse-magical-mind.html <comment><USER2> I can't check from here, but this looks to be an exact duplicate of something posted and discussed a few weeks ago:

<http://news.ycombinator.com/item?id=4933656>

As a bonus, that submission doesn't have ads distributed throughout the text, looking almost exactly like the article.</comment>


Lessig vs. NYT: Very. Good. News - <AUTHOR> https://medium.com/@lessig/lessig-v-nyt-very-good-news-d8b3c57150c4 <comment><USER2> What the hell is going on at the New York freaking Times?

It took "200 days and the filing of a federal case" before Lawrence Lessig got a correction:

"An earlier version of this article referred imprecisely in the lead paragraph to the views of Professor Lawrence Lessig."

Sharyl Attkisson didn't have to wait that long, but it still took the NYT quite a long time -- far longer than Twitter mobs' reactions -- before acknowledging it "referred imprecisly" to her reporting:

"An earlier version of this article referred imprecisely to statements made by Sharyl Attkisson. Ms. Attkisson accurately reported the number and location of U.S. coronavirus deaths, as of the date of her March 13 podcast."

[https://www.aim.org/aim-column/ny-times-apologizes-for- inacc...](https://www.aim.org/aim-column/ny-times-apologizes-for-inaccurate- article-about-coronavirus-doubters/)

[https://sharylattkisson.com/2020/04/new-york-times-nyt- corre...](https://sharylattkisson.com/2020/04/new-york-times-nyt-corrects- false-jeremy-peters-article-that-defamed-sharyl-attkisson/)

</comment><comment><USER3> I used to think the NYT was a bastion of real journalism, and supported them as such for a while. Eventually I picked up on their blatant sensationalism, hardly better than Fox News.

I've since switched to NPR and it's a world of difference. The most blessedly dispassionate headlines you could ask for.

<comment><USER4> I normally hate "BSAB" arguments, but in this case they are hard to defend against. The modern New York Times is basically the result of staring too long into the Fox News abyss.

<comment><USER5> I had to Google bsab to come up with "both sides are bad".

Can't agree the NYT even approaches Fox though.

This seems like a simple case of libel. The headline invokes a mob who will likely not even read the article which has more nuance. Just a mercenary approach to get more eyeballs aka micropennies.

</comment></comment></comment><comment><USER6> I agree that the lede was false, and it's good that it was changed. Not that the "corrected" version of "defend[ing] a university official who anonymously accepted donations from convicted sex offender Jeffrey Epstein" makes Lessig look _much_ better.

As for the headline: "If You Take Epstein's Money, Do It in Secret" \-- Lessig literally says ([https://web.archive.org/web/20190914091011/https://www.nytim...](https://web.archive.org/web/20190914091011/https://www.nytimes.com/2019/09/14/business/lessig- epstein-ito-mit.html)) the following: " _if_ the institution says it's going to take this money, then at the very least it should not be offering the gift of reputation laundering for those who give it" (emphasis in the original). I don't think it's a very big stretch to summarize that as "If You Take Epstein's Money, Do It in Secret".

There is some context: The quote above is preceded by "No. My preference is that none of this money should be in institutions, but". But still... he said it. He could have left it at "Do you think it's O.K. if this is kept secret?" \-- "No.", and he didn't. He could have argued that the money should be passed along to a charity or whatever, and he didn't. He chose to say what he said.

I hate clickbait and I respect Lessig in general, but in this instance he did indeed say what the NYT alleges that he said. And it was a dumb thing to say.</comment>


Zanzibar: Google's Consistent, Global Authorization System - <AUTHOR> https://www.usenix.org/conference/atc19/presentation/pang <comment><USER2> This was previously discussed here: [https://news.ycombinator.com/item?id=20132520](https://news.ycombinator.com/item?id=20132520) but looks like this link has a USENIX conference talk (nice!).</comment>


An Awesomer Tweet Button: Tracks your site's most influential users - <AUTHOR> http://www.wil.lt

<comment><USER2> Great idea - I just don't understand why this needs a different/proprietary button in its implementation.

Surely this is just a case of analyzing twitter users who mentions your url (or any url with your domain, even), and then ranking them by Klout (or just follower score)?

(This would then pick up tweets that don't use a button, too.)

Point is, that is a backend process, why should I change my site's buttons?

<comment><USER3> a) The Twitter Search API is really flakey searching for urls. Twitter is shortening tweets with their own shortener, t.co, which is screwing it all up. We thought capturing 100% of tweets was important.

b) You can use any button you want. We provide simple iframe implementations for our button and a Twitter tweet button. We also give you code to attach to any js event.

</comment></comment><comment><USER3> We've got 1 YC company using it already. Ask us anything!

</comment><comment><USER4> Neat idea, just put it on my site. We don't get a ton of tweets (kind of the wrong audience) but it would be interesting to see. The only thing I'd suggest is a way to add them to follow us on twitter as well...

<comment><USER3> Great! We'll look into that

</comment></comment><comment><USER5> I'm looking forward to testing this out. Smart and simple. With thousands of followers I'm always curious who is most influence in their network... and Klout alone doesn't cut it.

<comment><USER3> I've seen people with really high Klout scores because they are part of a small group of people that always respond to each others tweets.

We thought measuring click-throughs would be more useful for startups to see who can actually get the most people to take a look at what you are doing. If you can get those influential people as your ambassadors / talking you up, your golden!

</comment></comment><comment><USER6> I'm assuming you create a unique short url for each Twitter user. So retweets will be credited to the original tweeter. Is that correct ?

<comment><USER3> Yes!

</comment></comment><comment><USER7> Isn't this the same as <http://totally.awe.sm/>?

<comment><USER3> Not that we can tell. At a minimum, this is free and super simple to use. We asked around for a solution, and no one we knew had a good answer. This does one thing really well

</comment></comment><comment><USER8> "[My site's] love nearly doubled unique visits from 55 to 105 in less than 10 hours. www.wil.lt yourself."

How exactly would this increase traffic to your website? I thought this was an analytic tool.

<comment><USER3> He didn't have a tweet button before www.wil.lt? We just copied his tweet. We have no idea who he is.

<comment><USER8> Oh, didn't think about that. Just assumed people who would use this already use a tweet button and are interested in more statistical information regarding the people that tweet about their page.

<comment><USER9> I was thinking the same thing as you, makes sense now.

</comment></comment></comment></comment><comment><USER3> We are thinking about support custom urls. Ex: you assign the subdomain a.your_domain.com to us, we use that in the tweets. Would you pay $2 / month for this?

<comment><USER10> Yes. I would like to be able to use our own short URL, but twitter doesn't allow this by default ( I'm sure it can be built).

<comment><USER3> Yeah, its impossible to stop Twitter's t.co. The strangest part is that it only gets applied some of the time.

</comment></comment></comment><comment><USER11> AddThis does something similar, but not nearly as useful.

</comment><comment><USER9> As someone who doesn't know too much about this kind of stuff, this seems rather awesome.

</comment><comment><USER12> It's very unclear whether that's a .LT or a .IT - Might be worth looking for a new URL.

<comment><USER3> We've also had other problems with our lithuanian domain registrar. We do not recommend .LT

<comment><USER13> What problems did you encounter? I own .lt domain purchased via french registrar without trouble.

<comment><USER3> 1) (note this could be all wrong, but this is what we were told) You can't transfer registrar to outside of Lithuania 2) No Lithuanian registrar offers naked http redirects (ie: wil.lt/x -> www.wil.lt/x). Hence the www. on all of our links...

We are setting up forwarding the naked domain to a static IP that will do the http forwarding

(forgive me if I butchered the dns speak. not my domain haha)

</comment></comment></comment></comment><comment><USER14> seems similar to <http://gopromo.it/>

</comment><comment><USER15> Sweet! Worth a try.... Love the click thru tracking too.

</comment><comment><USER16> Looking forward to testing this in a new app =]

</comment><comment><USER17> Does anything else like this exist?

<comment><USER18> You _might_ be able to do it with HubSpot or PostRank, but we couldn't find anything simple. SO we built it!

<comment><USER19> ViralHeat and SocMetrics both provide similar features, but they cost money and are more complicated.

<comment><USER18> We wanted to keep things ultra simple. Oh, and FREE!

</comment></comment></comment></comment><comment><USER20> is there a site where we can see this in action?

<comment><USER3> <http://www.vidyard.com> has it integrated into their landing page -> just click "Get Notified"

The results on our landing page are real, updated every 15 minutes with our top 6 influencers

Interested in using us ;-)

</comment></comment><comment><USER21> Awesome indeed - way to go!

</comment><comment><USER22> looking forward to giving it a try. cool.

</comment><comment><USER23> This is neat, will give it spin.

</comment><comment><USER24> Interesting. This looks useful.

<comment><USER3> If you'd like to tie influencers directly to their accounts with you: you can pass in a unique ID, which will appear in the JSON influencer list.

</comment></comment><comment><USER25> This makes a lot of sense

<comment><USER18> Thanks! We're using it on our site now to see who is tweeting about the launch! Real-time results ftw!

</comment></comment><comment><USER26> The quote on your homepage comparing your service to Jesus is offensive.

<comment><USER27> The second testimonial makes me think this is a parody.

<comment><USER3> He actually said it, but in jest. We thought HN would appreciate a little humor</comment></comment></comment>


K3D – WebGL 3D Plots in Jupyter Notebook - <AUTHOR> https://github.com/K3D-tools/K3D-jupyter <comment><USER2> this looks very awesome, I really want to adopt it, but my site is mainly js (although I do support in browser python now). I don't know if the js/webgl part can be used as a separate library.

</comment><comment><USER3> No relation to the very well known K3D software?

<comment><USER4> Nope, the name is K3D-jupyter.</comment></comment>


Unsung Hero of the Nuclear Age - <AUTHOR> http://www.slate.com/articles/life/the_spectator/2011/02/an_unsung_hero_of_the_nuclear_age.single.html <comment><USER2> I'm a bit confused by one thing in this story: it never mentions the two man rule:

[http://en.wikipedia.org/wiki/Two-man_rule](http://en.wikipedia.org/wiki/Two- man_rule)

The President cannot order the use of nuclear weapons on his own; he can only issue the order jointly with the Secretary of Defense. The article mentions that Nixon's SecDef asked people to "check with him" before carrying out orders from Nixon, which may be a sort of garbled reference to the two man rule, but if so it's _very_ garbled.

Whether this rule actually answers Maj. Hering's question is a separate issue. But I find it disappointing (though unfortunately not surprising--journalists often get things like this wrong) that the article repeatedly talks as though a single person can issue the order, when that's not the case.

<comment><USER3> I'm not sure where that fits in either, but the point I took away from the story is; Don't think too hard about Nixon. It was clear or at least not as unclear, that he was not in his best mental condition. One of the problems is, what about the current head of US state? How would you know if he/she isn't in his best condition?

Regarding the two-man rule, my idea of the "Two Person Concept" is to prevent that a single operator would launch an attack by himself or in "error" (whatever that constitutes, I do not know). I interpret Major Hering's question as a separate issue from the "Two Person Concept".

<comment><USER2> _what about the current head of US state? How would you know if he /she isn't in his best condition?_

But that is, in fact, one of the reasons for the two man rule: so that just one person being insane isn't enough. Two people would have to be insane: the President and the Secretary of Defense. That at least provides _some_ reduction of risk.

 _I interpret Major Hering 's question as a separate issue from the "Two Person Concept"._

At levels below the National Command Authority (NCA, i.e., the President and the SecDef), I agree; the two man rule is just to ensure that, at each level through which the launch order passes, two people have to agree that it's a "valid" launch order, where "valid" means it really does come from NCA and it really was issued intentionally by NCA. The two man rule at all those subordinate levels doesn't tell the two people to ask whether NCA was sane when the order was issued; that's a separate issue.

But at the NCA level, as I noted above, the two man rule does add at least some measure of safeguarding against the President himself being insane, because the SecDef has to agree to _issue_ the order in the first place. That is, he's not just agreeing that yes, the President really does want to launch nuclear weapons; he's agreeing that _he_ , himself, as a separate decision maker, wants to launch nuclear weapons. So if the SecDef is sane, and there isn't a sane reason to launch nuclear weapons, he won't agree to the launch order, even if an insane President wants him to.

It's also worth noting that at the next level down (the Chairman of the Joint Chiefs of Staff, who has to receive the launch order from the President and SecDef), they _are_ , as I understand it, supposed to exercise _some_ judgment about whether the order is valid based on circumstances. For example, suppose an insane President fires his (sane) SecDef when the latter refuses to assent to a launch order. There is an ordered list of people who are "next in line" if someone up the chain is killed or is unavailable; so the President calls the next person on the list and asks _them_ to assent to the launch order. However, even if that person agrees (let's suppose they're insane too), when the two of them transmit the order to the Chairman of the JCS, his first question should be, where's the SecDef? I fired him, says the President. Assuming the Chairman is sane, that in itself would be enough to invalidate the launch order; the President can't just fire the SecDef--he's confirmed by the Senate, and there's a formal process that has to be gone through. (The same goes for all the people on the list, btw--they all have to be confirmed by the Senate, and they can't be summarily fired by the President without due process.)

Of course these sorts of scenarios are the stuff of which thrillers are made (for example, Tom Clancy's _The Sum of All Fears_ ); but the point is that officers _are_ supposed to exercise judgment. Which does mean that Major Hering was entirely justified in asking the question he asked.

<comment><USER4> _the President can 't just fire the SecDef--he's confirmed by the Senate, and there's a formal process that has to be gone through. (The same goes for all the people on the list, btw--they all have to be confirmed by the Senate, and they can't be summarily fired by the President without due process.)_

The rest of your comment is fine, but actually the president _can_ fire any cabinet officer or (almost) any non-judicial appointment at any time. The Supreme Court has agreed that the president has this authority.

Granted, the appointment must be confirmed by the Senate in the first place, but the Senate does not hold a veto on the president removing any of these appointees _after_ confirmation. The impeachment and trial of President Andrew Johnson was based on Congress' attempt to keep him from firing appointees, and that law was later ruled unconstitutional.

<comment><USER2> _actually the president can fire any cabinet officer or (almost) any non- judicial appointment at any time. The Supreme Court has agreed that the president has this authority._

Hm, yes, I see on reading about the Myers v. United States decision that, as usual, Supreme Court jurisprudence makes less sense than it ought to. :-)

I still think, though, that a JCS Chairman in the position I described would question (and would be right to question) a President who conveniently fired a SecDef who did not concur with a nuclear launch order.

</comment></comment></comment></comment></comment><comment><USER5> Why did the military require human beings to turn the keys if they expected people (and weeded out people unwilling) to turn the key blindly? A wire would have been much more efficient...

<comment><USER6> Humans are probably more difficult to hack (I hope) and more resistant to noise (I hope).

A weak ago, there was a discussion about the "Letters of last resort" [https://news.ycombinator.com/item?id=7165048](https://news.ycombinator.com/item?id=7165048) (56 points, 6 days ago, 50 comments). They are secret instructions for nuclear submarine commanders in case of something killed the whole UK government.

From Wikipedia:

> _According to Peter Hennessy 's book The Secret State: Whitehall and the > Cold War, 1945 to 1970, the process by which a Trident submarine commander > would determine if the British government continues to function includes, > amongst other checks, establishing whether BBC Radio 4 continues > broadcasting._

This kind of safeguards is easier to implement in humans than in automatic systems. How do you distinguish from the submarine the lack of communication caused by a nuclear attack from a problem caused by a massive electricity outage and a big fire in the BBC building? Maybe you can listen to some Canada and Australia signals to hear if there is a problem.

<comment><USER7> It is not hard to hack a human, it happens every day - we know it by the term _radicalization_ these days. There are people who abandoned comfortable Western lives to fight jihads and become suicide bombers. Another term for it is _brainwashing_. In the Cold War people became _defectors_. You can hack a human by speaking to them or by showing them some text to read, techniques thousands of years old.

</comment></comment></comment><comment><USER8> Does anyone know what TempleOSV2 is talking about? I can't reply to his comment in this thread because it's marked as dead, but it sounds very interesting.

<comment><USER9> This account is used by the author of "The Temple Operanting System"[0], who's schizophrenic.

The first and the last two sections of his post are similar to his usual writings (the fourth one comes out of a Markov chain). The second and third ones are unusual, but it's probably gibberish too.

[0] [http://www.templeos.org/](http://www.templeos.org/) IMO both a work of art and a technical achievement. See my sibling comment for a review.

<comment><USER6> The second part is a quote from: [http://www.nist.gov/itl/csd/ct/nist_beacon.cfm](http://www.nist.gov/itl/csd/ct/nist_beacon.cfm)

The third part is very similar to the random example in: [https://beacon.nist.gov/home](https://beacon.nist.gov/home)

It's apparently unrelated to the current article.

<comment><USER9> Not gibberish then. Thanks for pointing this out.

</comment></comment></comment></comment><comment><USER10> Nuclear weapons are extremely dangerous, not just for the people being targeted but for all mankind. If I had my way they'd never be used. And I want to respect this author's opinion -- after all, they wrote a book about it, and they've been kind enough to write an article.

Having said that, this article reminds me of somebody trying hard to work a problem, giving up, then saying the problem is stupid. That is, trying to work out moral agency in a world where one person can kill hundreds of millions of others, the author (and those like him), give up and pronounce the question wrong -- that is, we should not live in such a world.

Well, that's fine and dandy, but that's the world we live in. So I think we can take "no person should be able to order a nuclear counterstrike" off the table right away. The author doesn't have much to say except running out of gas from waving their arms around so much. This is unfortunate, because we live in a world where more and more individuals have the capability to kill huge numbers of people. Trying to limit the discussion to nuclear weapons does the entire topic a severe injustice. (Though it might sell some more books. Hard to say.) And then effectively giving up and saying that the world we live in shouldn't be like it is does the entire topic disservice.

</comment><comment><USER11> It's a challenging issue, all right. The important part that I don't see many people discuss is the nature of international relations, most of which is based on how other national leaders and decision-makers will perceive your actions.

Consider: North Korea is run by madmen who have at least some primitive nuclear capability. They regularly make wild accusations and threats against the US. Say they do manage to mount a nuclear device on a long-range rocket. What's to hold them back against launching it at a major US city? Whenever people discuss North Korean (or Iranian or...) nuclear capability, the usual line is that we don't need to worry about it that much, since it would obviously be crazy for them to use them against the US, or any other nuclear power. What is it that makes it crazy, when they've already done so many terrible things to their own people?

It's crazy because, according to MAD, any such attack, or even a specific threat to make such an attack, would result in a full-scale launch against their country. Millions of casualties, the total destruction of their culture and way of life. Everyone in the world, most especially leaders in North Korea, and China, fully believes that the US will carry out this threat if attacked with nuclear weapons.

Now, let's say Iran manages to detonate a primitive nuclear device in a coastal US city. The textbook MAD reply is a total destruction of every Iranian city. You can make the case that this is crazy on it's face - there is no imminent threat to stop, and those millions of people who would die didn't do anything to deserve it. Say that what Hering and the article author seem to want happens - that no weapons are launched, and a more measured, conventional reply is used. What do you think the North Korean leaders will think then? Or China and Russia? That's the more important question to ask.

After that, might North Korea think that they can use a nuclear attack to try and extract some sort of diplomatic concession from us? They're a harder nut to crack with conventional weapons, and they have more firm backing from China. If they get the idea that our MAD policy is toothless, they might try something that could lead to a much greater war, even possibly a much bigger nuclear war.

We've been living in a world for a long time now where the Kim Jong-uns of the world have very good reason to be terrified of using nuclear weapons against the US. Are you willing to see what happens if that is no longer true?

There are terrible people in this world who are prepared to do terrible things to everything we hold dear. To keep the world safe and stable, those people must believe that we will do even more terrible things to them if the situation calls for it. Keeping that belief in place may sometimes require us to actually do some terrible things ourselves,

<comment><USER12> You keep using that term MAD. I do not think it means what you think it means.

You seem to imply that it's simply a policy of retaliating against any first strike with massive and lethal force. In fact, MAD, as a theory of nuclear deterrence, requires creating a situation in which a first strike from either side results in the total destruction of both sides, that is, mutually assured destruction. To be workable, this requires two things not present in the situations you describe (North Korea and Iran, or any other rogue state):

1\. a rational enemy, i.e. an enemy for whom death is a bad thing. As much as American propaganda tried to paint the Soviets as godless monsters, they respected them as rational. Fundamentalists and North Koreans, not so much.

2\. strategic parity - a nuke or two held together by duct tape, while certainly capable of causing much destruction, hardly gives anyone the capability of assuring the destruction of the US.

<comment><USER13> Why would you say Iran fails the first condition, i.e. that they aren't "a rational enemy"? They seem pretty rational to me. I can't be sure about North Korea, but for all the crazy news about them, they probably would behave like a rational enemy as well.

<comment><USER12> If Kim Jong-Un was faced with personal defeat (threat of losing power), I have no doubt that he would sacrifice his citizens to go out in a blaze of glory worthy of the Great Successor. In a sense, he's sacrificing his citizens now to support his lavish lifestyle, only he's doing it one starving farmer at a time rather than the whole country in one flash.

I'll defer arguing the rationality of the ruling power of Iran to someone with more knowledge. Bear in mind, my comment wasn't a slur against the people of Iran, but the government and military, i.e. those in the chain of command of potential nuclear weapons.

<comment><USER13> "Starving one farmer at a time" is evil but rational (and, it can be argued, is also done in some West-friendly countries). However, I very seriously doubt Kim Jong-Un would be able to "go out in a blaze of glory" in an apocalyptic scenario. Most likely, North Korea as a whole would act rationally and he would be taken out by a military junta before he destroys everything. No matter how evil he seems, he must have a rational entourage. Even Hitler had one. Stuff simply _has_ to get done in NK; even if the only plan is "blackmail other countries to give us money", do you not see that's a perfectly _rational_ plan?

As for Iran, I understood you were talking about their government. Nothing I've heard of them so far strikes me as irrational -- just hostile to some Western powers.

We must stop confusing "hostile" with "irrational", that's all I'm saying.

</comment></comment></comment></comment></comment><comment><USER14> "When the President does it, that means it is not crazy."

<comment><USER15> Even when he is drinking and bragging about his ability to kill 70 million in 25 minutes. It's alarming alright.

<comment><USER16> World obliterated by a drunken president. I'm not sure if it's alarming or hilarious.

</comment></comment></comment><comment><USER17> Another unsung... Stanislav Petrov: The man who may have saved the world [http://www.bbc.co.uk/news/world- europe-24280831](http://www.bbc.co.uk/news/world-europe-24280831)

<comment><USER18> We've been "singing" about this guy several times around here and there on the Internet and he even made it on BBC. Not to say we shouldn't keep doing it, but just that the term "unsung" may not apply so well any more. :)

</comment></comment><comment><USER19> in my opinion, no order to deploy nuclear weapons can ever possible come from a sane commander. any such order should be refused.

<comment><USER20> Well nuclear missiles _can_ be used on military targets, or targeted on infrastructure or to strategically poison areas with radiation. I think what you object to is MAD.

As terrible as it is, it does likely prevent wars from happening in the first place. Even if the world is stable now, it may not always be so and it wasn't in the past.</comment></comment>