America's gun problem, explained - <AUTHOR> http://www.vox.com/2015/10/3/9444417/gun-violence-united-states-america <comment><USER2> Gun related deaths per 100k in US: 10.5 [https://en.wikipedia.org/wiki/List_of_countries_by_firearm-r...](https://en.wikipedia.org/wiki/List_of_countries_by_firearm- related_death_rate)

Suicides using gun per 100k population: 6.7 [http://www.cdc.gov/nchs/fastats/suicide.htm](http://www.cdc.gov/nchs/fastats/suicide.htm)

So already more than half of the original number is not what you would expect.

As a person that moved from Europe, I don't see any gun problem in USA. I see severe economical problems, social problems, racial tensions, ideological tensions. Mass shootings do happen, but they are like airplane crashes - exciting for media and common folks, but rather rare.

For comparison in US cancer death rate per 100k is : 166.4 [http://statecancerprofiles.cancer.gov/deathrates/deathrates....](http://statecancerprofiles.cancer.gov/deathrates/deathrates.html)

When was the last time when "cancer problem in US" reached Hacker News?

<comment><USER3> "Mass shootings do happen, but they are like airplane crashes - exciting for media and common folks, but rather rare."

In 2015 alone, there have been 355 mass shootings as of the time of this posting. Since 2013 there has been on average one mass shooting a day.

How is that rare?

<comment><USER2> As counted by anti-gun subreddit, that includes anything even remotely reassembling "mass-shooting" (like robberies, gangs etc.). Not to mention it's not even a credible source by definition...

By other sources and definitions it's much, much lower.

[http://fivethirtyeight.com/features/mass-shootings-have- beco...](http://fivethirtyeight.com/features/mass-shootings-have-become-more- common-in-the-u-s/)

</comment></comment></comment><comment><USER4> And here's the solution: Turn in your guns.

Disclaimer: I'm a gun owner, and an avid hunter. At one point in my life I shot for competition. I still think that we need to turn in all guns. I personally know too many people with guns who _don't_ need them, instead they have them because they think it's cool, or because it's a "constitutional right."

Sorry, but I think the constitution was written when we didn't have a problem. Most of these peoples are also religious in one way or another (you can infer which way they lean, and you'll probably be correct) — but don't you dare tell them that it's also a constitutional right to choose to follow no religion. Because that's sacrilegious.

I was also raised catholic.

<comment><USER5> The US government is based on the idea that power is always corruptable, so the way to counter that is to divide and istribute the power.

The 2nd Amendment isn't there so you can protect yourself against criminals. You already got the government (the police force) for that. It is also not there so you can go hunting (though you can use it for that).

The 2nd Amendment is there to divide and distribute half the power to the people and half to the government.

Did you know that the Ten Amendments, are the second part of the Constitution? The first part of the Constitution gives power to the government, while the second part of the Constitution gives power to the people.

Your ancestors fought and died so that 50% of the power will be given to the people. So that the document will be divided into two parts: the Constitution itself (for the government), and the Bills of Rights aka the 10 Amendments (for the people).

So why do you want to abolish your part of the constitution and give all the power back to the government?

It's would be as illogical as Congress deciding to abolish all its power and give them all to the Executive Branch.

The point of the Constitution is to divide and distribute power between the branches, between the federal and the states, and between the government and the people.

<comment><AUTHOR> > The 2nd Amendment is there to divide and distribute half the power to the > people and half to the government.

1) According to whom? I've heard people say that but I know no basis for it.

2) Has this ever happened in the history of the United States, where private citizens asserted power over government through violence (and who were not criminals)? Even the Civil War was an insurrection by a government.

3) Most importantly, it seems like a terrible idea to have issues decided not by votes and laws, but by violence, killing, and who has bigger guns. It sounds like the opposite of civilization - anarchy and barbarism - and the problem democracy and rule of law are meant to solve.

4) The founders, and I believe almost all Americans intend that power should come from votes, and issues should be decided by law, in court.

<comment><USER6> As for 1, I'd suggest reading this book: [http://www.amazon.com/That-Every- Man-Armed-Constitutional/dp...](http://www.amazon.com/That-Every-Man-Armed- Constitutional/dp/0945999380)

As for 2: [https://en.wikipedia.org/wiki/Battle_of_Athens_(1946)](https://en.wikipedia.org/wiki/Battle_of_Athens_\(1946\))

As for 3, no one is suggesting it become a routine method. Heck, the early 20th Century Imperial Japanese political culture of assassination and what it led to is a stark object lesson (particularly stark as I finish reading this right now: [http://www.amazon.com/Hell-Pay-Operation- Downfall-1945-1947/...](http://www.amazon.com/Hell-Pay-Operation- Downfall-1945-1947/dp/1591143160/))

As for 4, your history lessons must have skipped this event: [https://en.wikipedia.org/wiki/American_Revolutionary_War](https://en.wikipedia.org/wiki/American_Revolutionary_War)

Overall, it's rather interesting you can't conceive of the deterrent effects of a well armed populace. Surely our 21st Century experiences in the sandbox suggest something....</comment></comment></comment></comment>


My personal site is a terminal - <AUTHOR> http://karlsteltenpohl.com <comment><USER2> So, because it was a terminal, to exit it I automatically hit Ctrl+D, which bookmarked the page.

Well played Karlsteltenpohl, well played.

<comment><USER3> Less well played: Ctrl+w

Granted this does happen a lot on all other sites when typing but being in a terminal much instantly triggered it.

<comment><USER4> The Jupyter terminal actually does manage to hijack ctrl+w and ctrl+t, at least in IE Edge. Not sure how they manage it but it's kind of a nice touch.

</comment></comment></comment><comment><USER5> Nice idea. I really wanted to like this but I'm not so sure you've pulled off the execution. Just after a couple of minutes of usage I found so many compatibility differences between that a real shell that navigating around your site became rather frustrating:

        * Tab completion was glitchy
        * Deleting characters mid line was glitchy
        * Commands don't follow common idioms:
            - `ls *` would fail
            - `ls -l` would fail
            - `ls ` (space char after `ls` command) would fail
        * I couldn't select the output from `ls` to paste into the prompt
        * Symlinks don't behave link symlinks:
            - I cannot `cat` them, have to click with a mouse
            - Yet they are still displayed as a file in `ls`
        * Common readline shortcuts like ^U don't work
        * It barely works on mobile / tablets:
            - Scrolling is all over the place
            - Screen doesn't resize to use the full screen
            - Pain to type commands on mobile keyboard because they auto-capitalise first characters

Also there seems to be some latency between keypress and the character appearing which makes the experience a little jarring too.

Given this is your main way to navigate the site rather than a secondary navigation system, I think it's something you either need to go full out or not bother at all as the novelty of a partially compatible - inspired by Bash - approach wears off very quickly resulting an in frustrating overall experience.

<comment><USER6> I enjoyed the hell out of it. It was like seeing something familiar from my world, in cake form at a restaurant. I flicked it with my spoon, had a chuckle, and moved on. It's a toy, not a tool.

<comment><USER5> > _It 's a toy, not a tool_

I think it's fair to say it's both because it's the primary navigation tool on a site with a fair amount of linked content (otherwise what's the point in putting content on it if it's not meant to be discovered?)

As a toy, I do completely agree with you. As I said in my previous post, I do really like the idea. But as a navigation tool I think there are areas for refinement while retaining the same fun factor.

<comment><USER7> I think you're being pretty harsh towards a neat personal portfolio site. It would be different if it were for a product or service, but it isn't, it's just a fun personal site.

<comment><USER5> I think you're being pretty harsh about my intentions. I said it's a nice idea and worded all of my feedback constructively thus if the author wishes to further develop this they know areas one user struggled with.

I approached my feedback in terms of what I would like to read if I were the author and I mean that honestly because if this were my project I'd have valued that kind of post more than vague comments like " _this is awesome_ " (which are obviously nice too but doesn't offer any guidance for enhancement).

As an open source contributor myself, I know how negative some people can be when you release a project. But at the same time we (myself included when I release products) cannot expect every comment to be glowing with praise. The real question is whether feedback is constructive or just critical. I felt I was the former and I sincerely hope that's the way the author read it as well because I did genuinely like the concept even if I raised specific issues about its execution.

<comment><USER7> I guess tone is hard to read online sometimes :)

<comment><USER5> Very true.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> Your `cat` command doesn't take multiple arguments, which is ironic since it's supposed to concatenate multiple files.

<comment><USER9> The cat command doesn't do anything for me right now.

</comment></comment><comment><USER10> The effects during typing are a little distracting.

Do you plan to allow the usual string navigation shortcuts that my hands are apparently unable to type without? (^-a ^-e ^-k, etc.) ?

<comment><USER11> Yeah, the one thing that made me click away from the site was the particle effects when typing. It really broke that 'suspension of disbelief' moment for me. I know it is not a real terminal, but if you are going to go to the effort of making people feel they are interacting with a terminal, then don't break that illusion with fancy chrome.

<comment><USER12> Agree. It's a fun effect to show off as a FE dev I guess, but it feels out of character. Maybe make a "party mode" or something? You could click a disco ball to turn it on! :D Other than that, cool idea and well executed.

<comment><USER13> That's actually from an atom plugin called Activate Power Mode: [https://atom.io/packages/activate-power- mode](https://atom.io/packages/activate-power-mode)

Some of my colleagues use it and I tell them they're absolutely nuts, but they swear by it. It reminds them their code has meaning, I guess? Haha

<comment><USER14> I once helped conduct a hiring interview where the candidate had that enabled, it had an especially bad effect on the video compression in google hangouts screensharing.

</comment></comment></comment></comment></comment><comment><USER15> Hey I just wanted to point out that this really cool site you built doesn't have some of the features of a full terminal on Linux.

<comment><USER16> I am especially annoyed that little exploding color circles don't appear when I type on a full terminal on Linux.

<comment><USER17> I expect to see a GitHub project adding exploding color circles to a popular terminal app within a week.

Edit: Never mind, someone time-travelled and did it a year ago. [https://atom.io/packages/activate-power- mode](https://atom.io/packages/activate-power-mode)

</comment></comment></comment><comment><USER18> If the point of the site is to find clients/recruiters/etc.. then you should scrap this idea.

While technically this is somewhat impressive nobody who this site is aimed at will type commands to see your work/cv/etc.. They will just close the tab and move on.

<comment><USER19> Sad but true. I spent some time building a personal site mostly for fun, but also to get back into industry. Many companies view a blog as a liability... better off studying for a few months to get some extra certifications.

<comment><USER20> What do you mean by they view a blog as a liability?

<comment><USER21> I think it depends. If you're blogging about technology findings it's fine. If you're blogging about how much you hate <insert politician here>, then yeah companies may see it as a liability.

</comment></comment></comment></comment><comment><USER22> I had mine for a while now [http://chandrabhavanasi.com/](http://chandrabhavanasi.com/) which was based off of jquery and a bunch of hardcoding. I haven't updated it in a while though. The new ones I see once in a while on hn like these are pretty nice though.

<comment><USER23> Mine too. Completely useless but fun to create. (dperini.com)

</comment></comment><comment><USER24> I guess it works as an art project, but as a website, it's a complete failure.

</comment><comment><USER25> Your personal site doesn't work on Safari Mobile.

<comment> Const-me And has major layout & script problems on MS Edge.

<comment><USER26> And on Firefox the vertical scrollbar keeps randomly going up and down.

</comment></comment></comment><comment><USER27> [https://vishaltelangre.com/](https://vishaltelangre.com/)

Checkout this one. It's built using Elm and is responsive.

<comment><USER28> Would you mind if I use your source code to set up my own similar personal website? Of course, I will give the credit to you. By the way, I am impressed with this novel idea. I will tinker around the code to add my own features.

[https://github.com/vishaltelangre/vishaltelangre.com](https://github.com/vishaltelangre/vishaltelangre.com)

<comment><USER27> I'm not the creator of this website. You can contact him on Twitter

</comment></comment></comment><comment><USER29> problem with the site is that since it only implements a subset of what one would expect from a shell you're constantly inputing things that do not work.

<comment><USER30> Try jslinux

[https://bellard.org/jslinux/](https://bellard.org/jslinux/)

</comment></comment><comment><USER31> I love it, but my minor nitpick is that if you press tab for auto-complete it jumps up and back down again (in Firefox, anyway)

</comment><comment><USER32> Obligatory for HN: here's a VC whose site is a terminal: [http://neuvc.com/](http://neuvc.com/)

<comment><USER33> I realized it got me when I typed "exit", trying to leave the website

<comment><USER34> Ha, I ended up bookmarking the page (Ctrl-D).

</comment></comment></comment><comment><USER35> Similar, but with no input lag: [http://www.clarkduvall.com/](http://www.clarkduvall.com/)

<comment><USER36> Interestingly, this one doesn't register as text input with vimium so it's completely incompatible. OP's does register.

<comment><USER37> haha I know clark and this is ironic since he's obsessed with vim!

</comment></comment></comment><comment><USER38> Well, better than mine I suppose. [http://trufavarela.com/](http://trufavarela.com/)

<comment><USER39> I guess my sloth is slightly more entertaining. [http://yeukhon.me/](http://yeukhon.me/)

<comment><USER40> <marquee> still works!?!?!?

<comment><USER39> Yes! Like Dreamweaver is still alive!?!?!?

<comment><USER41> I still use Dreamweaver 8 and 9. (They are the same thing actually, 9 is just rebranded as 'Adobe')

No, I don't use design mode; I always live in code mode.

I've added the HTML5 intellisense/syntax-highlighting add-on extension, which brings it up to modern standards, and I've created new HTML5 templates.

It supports all the languages I need, and means I can have CSS, HTML, and JS all in the same editor with the same IDE features.

It does me.

<comment><USER39> It was fun though. I learned to use Dreamweaver MX because at the time I was in elementary school and my teacher just started a campus newsletter club. We were also lucky to have computer class and got some HTML lessons. Mind you, this was 1999-2003 in HK. I was very disappointed at US' computer class in my junior high.

</comment></comment></comment></comment></comment></comment><comment><USER42> I liked the whole thing, I would like to see alias like `ll` preconfigured in any good terminal.

there are some issues with errors some of the places it doesn't show that.

When changing directory (going back to home) it doesn't work and doesn't even show the error.

<comment><USER42> command `cd ~/` doesn't work.

</comment></comment><comment><USER43> Try [https://duckduckgo.com/tty/](https://duckduckgo.com/tty/)

<comment><USER28> How do I make onscreen keyboard pop up in android os. I am using firefox.

<comment><USER43> Not sure. May be try to tap and hold? It might be not a normal text field, so Firefox might not understand it. There can be some global gesture for it may be.

</comment></comment></comment><comment><USER44> It'd be interesting to collect stats on all the commands people try to run, and to implement all the ones Linux users are likely to have wired into muscle memory.

<comment><USER45> I bet there would be A LOT of 'rm -rf /'-ing going on. I'll admit it was about the second thing I tried.

<comment><USER46> In the same vein, I always try 'cat /etc/passwd'

</comment></comment></comment><comment><USER45> Cool site that doesn't run like a dog, I'm impressed! I actually spent a few minutes fiddling around trying to see what I could do on the terminal, can't say that for many other sites.

If I could offer one little bit of feedback; some labels on the menu at the top would be kind of handy, a few icons are easy to recognize but some aren't (at least for me).

</comment><comment><USER47> Looks pretty broken for tab completion... Also you can't cat the .ai file? or open it? Whats the point.

<comment><USER48> It took me a sec to realise duchess.ai was a folder, not a file, and then another second to realise tab completion was trying to send me to duchess.air for some reason. Cool concept, just a couple of little things to iron out.

</comment></comment><comment><USER49> So... I can just view source and see all the available data. That is a lot faster then typing in commands.

<comment><USER50> You could also just run tree on your computer instead of navigating directories

</comment></comment><comment><USER51> My personal site works on a phone.

</comment><comment><USER52> I also can't interact with it on my iPad. No keyboard comes up or a button like backup.

</comment><comment><USER53> really "jumpy" when using Firefox Quantum.

I found it frustrating, I didn't actually end up seeing anything other than the terminal I tried changing into folders, but it didn't seem to work. Seems broken.

</comment><comment><USER54> That's awesome!

I did a similar design for my tilde.town site: [http://tilde.town/~myles/](http://tilde.town/~myles/).

<comment><USER55> doesnt work on FF either

</comment></comment><comment><USER56> If you really want to attract attention, use jslinux[1].

[1]: [https://bellard.org/jslinux/](https://bellard.org/jslinux/)

<comment><USER57> Cross-compiling bash to JavaScript and implementing VT would probably be enough :)

</comment></comment><comment><USER58> Interesting, but Tab completion seems broken:

        cd Foosball/
        cat r<tab>

Selecting text (on Firefox) doesn't seem to work either.

<comment><USER59> > Selecting text (on Firefox) doesn't seem to work either.

It seems to be intentional. It works if you deactivate JavaScript.

</comment></comment><comment><USER60> I don't mind this but I wonder what it would take to make it so you could SSH to the same domain and make it somewhat interactive. Letting anyone connect with any username (and based on their username allow them to open files personalized to that) I often wonder the effort it would take to make custom shells for people to connect to without giving too much access to a server for personal reasons.

</comment><comment><USER61> Reminds me of the XKCD April Fools terminal, whose code is actually available here: [https://github.com/chromakode/xkcdfools](https://github.com/chromakode/xkcdfools)

</comment><comment><USER39> So is this just JS or an actual terminal is behind? Looks like just JS... I would love to see someone actually expose a shell.

<comment><USER62> Is it ok if the shell comes with a full Linux kernel? :)

[https://bellard.org/jslinux/vm.html?url=https://bellard.org/...](https://bellard.org/jslinux/vm.html?url=https://bellard.org/jslinux/buildroot-x86.cfg)

(by the amazing Fabrice Bellard)

</comment></comment><comment><USER63> I love it!

Just one thing though, when hitting tab it seems to be getting the root file and it doesn't work then.

E.g cd Photo-Video cd Sunrise<tab>

</comment><comment><USER64> Pretty neat, but those particle effects are strange for me. Similarly, I've never used yet but Unixstickers has a terminal like interface on their website: [https://www.unixstickers.com/terminal](https://www.unixstickers.com/terminal) You can use it for shopping.

</comment><comment><USER65> Nice! I made a site where information was primarily exposed via keyboard input (my personal site as well[0]) but I had to make sure mobile worked okay so I made a static version for mobile users.

[0]: [http://me.thatcoolidea.com](http://me.thatcoolidea.com)

</comment><comment><USER66> I cannot type in Firefox as I have the 'Search for text when you start typing' setting enabled.

</comment><comment><USER67> I understand what others are saying: there's a lot going on at the same time. Getting rid of the effects while typing would be a major plus.

I've also done something similar, but way simpler: [https://rafael.pt](https://rafael.pt)

</comment><comment><USER68> In the same vein, try out [https://desfontain.es/](https://desfontain.es/) it's the personal website of a friend and you can navigate it like if you were playing nethack.

</comment><comment><USER69> What a cool idea! I was hoping there was going to be a directory of blog posts I could `cat`. I feel like there's some fun potential here if you keep fleshing it out, but of course who has the time?

</comment><comment><USER70> I enjoyed how many people are quick to criticize that this doesn't work as well as an actual terminal. Because that was definitely, absolutely the point.

</comment><comment><USER71> Nicely done. You have mentioned ` Daytrader w/ Machine Learning ` How is that going on for you ? Can you guide me on how to get started.

</comment><comment><USER72> Reminds me of [https://github.com/zeit/hyper](https://github.com/zeit/hyper)

</comment><comment><USER73> Anyone know how to get this to work on an iPhone?

No idea how to bring up the keyboard (and it doesn't happen automatically in case someone asks).

</comment><comment><USER74> This is pretty awesome. Youre gonna get a lot of attention, what with your resume being on the front page of hackernews...

</comment><comment><USER75> Reminds me of [http://alinelerner.com/](http://alinelerner.com/)

</comment><comment><USER76> The completion doesn't work properly. It's a super fun little project, but, very frustrating to use.

</comment><comment><USER28> How do I make onscreen keyboard pop up in android os? I am using Firefox in android.

</comment><comment><USER77> I'm unable to start Vim.

</comment><comment><USER78> "Just one thing" \- I'm sure Karl knows this is not fully-fledged, bug-free terminal.

Great concept Karl, I think you're a no-brainer hire for anyone who wants to add out-of-the box problem-solving to their team, since you just hacked your personal brand publicity very creatively :)

<comment><USER79> This kind of site has been around for a long time. Amusingly enough there were even image boards with this approach.

</comment></comment><comment><USER80> $ cd Labs/

$ cd ../Projects <\-- this does not work, the cwd remains Labs/

</comment><comment><USER81> I built one of these ~7 years ago (I feel old :( ) based on this over here [1], inspired by the XKCD CLI [2].

This is certainly prettier!

[1]: [https://github.com/tekacs/RCLI](https://github.com/tekacs/RCLI)

[2]: [https://uni.xkcd.com/](https://uni.xkcd.com/)

</comment><comment><USER82> I like the idea!

Finally an interesting website - don't listen to the moaners.

</comment><comment><USER83> That concept is f __*ing cool... love the idea

</comment><comment><USER84> first command I tried: `rm / -rf`

</comment><comment><USER85> Cool.

Also, figlet sighting, "large" font. :-)

</comment><comment><USER86> I love this.

</comment><comment><USER87> Those visual effects are annoying beyond comprehension. You should find a way for users to disable them easily.

</comment><comment><USER88> Why?

</comment><comment><USER89> This is quite neat!

</comment><comment><USER90> how do you open the resume?

</comment><comment><USER91> rm: command not found

:(

</comment><comment><AUTHOR> Thanks!

</comment><comment><USER92> if you call yourself a hacker, you aren't one.

</comment><comment><USER93> The concept is cool, but I'd like to point out a couple of issues.

The explosion/flashing thing is somewhat annoying. Honestly comes off as childish.

Tab-completion _deletes_ word under cursor if no match is found? Why?

Why is the terminal built on angular? Seems like an overkill. Partly because I think Angular is a terrible abomination, but in general there's not much going on there to even warrant a framework.

</comment><comment><USER94> Nice work. But honestly, you're making it incredibly hard to quickly see your accomplishments.

</comment><comment><USER95> for added beauty put it in a DEC vt05 [https://en.wikipedia.org/wiki/VT05](https://en.wikipedia.org/wiki/VT05)

</comment><comment><USER96> This is so cool!!</comment>


EveryDNS is down for the count - <AUTHOR> http://search.twitter.com/search?q=everydns

<comment><AUTHOR> It's pretty hard to find info about this online, especially since everydns.com isn't resolving either.

Engine Yard made mention of it: [http://engineyard.wordpress.com/2009/03/23/everydns- unavaila...](http://engineyard.wordpress.com/2009/03/23/everydns-unavailable/)

</comment><comment><USER2> Was on the road today and just noticed the stats for several of our sites were really low today. This explains the problem. Does anyone know how long it was down for? I know David is a member here so any details from him would be greatly appreciated.

<comment><USER2> Oops, just noticed the answer to my question on their website. Looks like it was only down an hour. Guess it was a slow day for our sites. Oh well. Still support EveryDNS 100% though!

</comment></comment><comment><USER3> DollarDNS is another free DNS service worth mentioning. I use it in conjunction with EveryDNS in case one of them goes down.

<http://www.dollardns.net/>

</comment><comment><AUTHOR> Looks like they're back up.</comment>


Almost 97% of the Good Jobs Created Since 2010 Have Gone to College Grads - <AUTHOR> http://www.bloomberg.com/news/articles/2015-08-17/almost-97-of-the-good-jobs-created-since-2010-have-gone-to-college-grads <comment><USER2> I'm calling BS - $42,700 is NOT the standard of a "good job".</comment>


Criminals are using deepfakes to impersonate CEOs - <AUTHOR> https://www.fastcompany.com/90379001/criminals-are-using-deepfakes-to-impersonate-ceos <comment><USER2> Twenty years ago people would fall for a convincing email, or a social media profile with a name and photo. Eventually people started to adjust their natural assumptions about what's trustworthy.

I think the same will happen here. People will learn not to trust audio and video for anything important. Cryptographic trust will become the only strong trust.

I think corporations and governments won't have trouble making this transition. There will be stragglers that learn the lesson the hard way, but everyone will move forward eventually.

What's more concerning is the implication for news and crime, where there inherently can't be a carefully built system of authentication. Videos recorded from phones will cease to mean anything. Maybe all media will stop being admissible in court.

We had a world like that around 150 years ago; trust was purely based on people. There was no general way to capture proof of events. We'll regress to that, but maybe the world won't stop.

<comment><USER3> People _still_ fall for "convincing" emails and social media profiles with a name and a photo. I work tech support at my university, and we regularly have to deal with faculty clicking on things they shouldn't, or not clicking on things they should. I also do some work for a local non-profit and a month ago two employees came uncomfortably close to costing us thousands.

Cryptographic trust won't help much either unless it is packaged and presented in the right way to the end user - it's basically advanced black magic to most people. I would love to have cryptographic verification setup for the non- profit's communication so that they can have some guarantee of legitimacy, but first I have to figure out how to make it fit into their workflow and not require them to actually take any action.

It's important to keep in mind that we have some distorted sampling. I would guess that most if not all of the people on HN are technical to some degree, so we may tend to have a bit of a bubble. We are a pathetically, uncomfortably small minority.

Never, ever, ever rely on humans doing the right thing if you can help it, whether in the form of an individual, a corporation, or a government.

<comment><USER2> I did say " _started_ to adjust their natural assumptions". Clearly some people haven't yet; perhaps for some people who didn't grow up with the internet, it's not really possible. But we as a society are adapting, is the point.

</comment></comment></comment><comment><USER4> This feels like Icarus' wings being melted. Tech gave us so much, but maybe this shows that it can go too far. Perhaps the Great Filter theory that at a certain point a civilization's technology becomes it's own demise, might have validity.

Banning certain AI work is going to be a great joke. Kind of like prohibition was in the 20s. It's not like a nuke that requires a lot of infrastructure and manpower. These AI attacks only need a computer from Best Buy to accomplish. Hell, building the box yourself is far cheaper and more efficient. Unless we all agree that all computers should be tracked like guns, plus monitored, I don't think there's a good solution out there.

This deepfake problem hasn't even scratched the surface of what's to come.

<comment><USER5> The extreme response is for companies to stop putting out programmable silicon. Everything on the cloud, only executing signed binaries

</comment></comment><comment><USER6> I wonder when this gets so bad that the only thing you can trust (apart from face to face interaction) is a digital signature. BTW, last I have heard, Microsoft is building a digital identity based off bitcoin blockchain. They may become invaluable for businesses again. I start having respect for their strategic planing. Hopefully it won't get to a criminal abuse of their dominant market position again.

<comment><USER7> First I cringed when reading about blockchain in this context but could it have a true value here? Some kind of global trust store?

</comment></comment><comment><USER8> Fastcompany article is plagiarized and stripped down from Axios:

[https://www.axios.com/the-coming-deepfakes-threat-to- busines...](https://www.axios.com/the-coming-deepfakes-threat-to- businesses-308432e8-f1d8-465e-b628-07498a7c1e2a.html)

</comment><comment><USER9> I really enjoyed Stephenson's latest take on this in Fall. A tech billionaire got sick of people believing in fake news and so created and then open sourced a bunch of tools to allow the generation of an artificial moral panic about any person, place, or topic. The objective was to make it so only blockchainy identities (established by another interesting introduced topic, holographic identies (holograph in the ancient use of the word)) would be trusted.

What it led to instead was the creation of a no man zone called "Ameristan" stretching across the middle of red state America, where people were plugged in to a feed of what one character described as "seriously weird shit," incomprehensible memes that self replicated and led to the creation of a wild ass version of Christianity.

Anyway, it makes me wonder how one could go about implementing this sort of proof of identity based on all sorts of different factors that, combined, are nearly impossible to spoof.

</comment><comment><USER10> Good ol' MSM trying to get ahead of incriminating videos of powerful, well- known people doing extremely evil things...

</comment><comment><USER11> Praxis</comment>


Trump to scrap NASA climate research in crackdown on 'politicized science' - <AUTHOR> https://www.theguardian.com/environment/2016/nov/22/nasa-earth-donald-trump-eliminate-climate-change-research <comment><USER2> Environment and Climate Change Canada's recruitment page: [https://www.ec.gc.ca/emplois-jobs/](https://www.ec.gc.ca/emplois-jobs/)

<comment><USER3> Have they recovered from the Harper years?

</comment></comment><comment><USER4> Not as if climate science isn't a political issue, as it affects everyone living on the planet. Literally.

</comment><comment><USER5> In case anyone is curious, Trump advisor Bob Walker's masters degree is in Political Science.

</comment><comment><USER6> What's so politicized about the NASA climate research?

<comment><USER7> James Hansen

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

<comment><USER8> That's not an indication of politicisation at all.

<comment><USER9> For those of us playing the home version, would you expand you thoughts as to why you disagree?

<comment><USER8> The implication appears to be that political interests drive the scientific consensus on climate change. James Hansen's activism started long after he began publishing, and lots of his peers in climate science are not politically active. It's just a poor argument.

<comment><USER9> Gotcha. I appreciate you coming back after 4 days to explain what you meant. I've been frustrated by the increasing tendency to consider tainted any research or facts put forth by people who also want to take a stand on issues. Granted, that can be problematic, which is why transparency is so important.

</comment></comment></comment></comment></comment></comment><comment><USER10> He's moving it to NOAA. Seems like a better fit, NASA can focus on the solar system and beyond while other agencies handle the earth.

</comment><comment><USER11> I assume that the people who voted for Trump just don't care about and even actively hate their children, so they will be happy with this quite expected news.</comment>


Rejecting Billions, Snapchat Expects a Better Offer - <AUTHOR> http://www.nytimes.com/2013/11/14/technology/rejecting-billions-snapchat-expects-a-better-offer.html?hpw&rref=technology <comment><USER3> Snapchat is already a very rich company. The founders are probably indifferent to the wealth at this point.

I also think a lot of people (myself included) find it hard to comprehend how much money can be made selling stickers in messaging apps. It's mind-boggling, and Snapchat, processing 350+ million messages a day, is in a very strong position to leverage that eventually.

All that said, I'd accept a $3B cash offer in a heartbeat if I were in their shoes. I wouldn't be confident in Snapchat's long-term survival. It might double its user base in the next year and then swiftly die when the next fad comes along. I feel that timing will be critical here. If they wait too long, they could lose it all.

<comment><USER4> Would you care to elaborate on how they're a "very rich company"?

(Edit: I actually read the article after my post and saw the section about Benchmark Capital's $13 million investment. The rest of my comments still stand...)

Now if you meant they have built such a large following that a buyout is inevitable, and/or they stand to make a lot of money by introducing a business model into the equation, then I'd agree. However, that does not change the fact that the owners are incredibly greedy not to accept a $3 billion cash offer, especially considering the fact that there's no guarantee they can come up with a viable business model at all. Now that they've turned down an arguably hugely inflated offer, they may have made a huge mistake in the long run.

Let's not forget that Snapchat isn't exactly a difficult product to clone, and the only thing going for them right now is user numbers. If they introduce a poor money-making mechanism into it, users will not hesitate to flock to the "next big thing" instead of forking over cash or dealing with intrusive ads.

<comment><USER5> >the owners are incredibly greedy not to accept a $3 billion cash offer

You can look at this another way -- Maybe greedy would be taking the life- changing amount of money here, and they're not because they actually like their jobs.

</comment></comment></comment><comment><USER6> From this article — "one roadblock in the talks with Facebook was that Mr. Spiegel questioned whether he wanted to work for Mark Zuckerberg, Facebook's young billionaire chief executive"

Excerpt From: Nick Bilton. "Hatching Twitter." — "Biz and Ev had driven down to Facebook's campus a few days earlier to meet with Mark. Like most meetings involving the chief of Facebook, it had been almost unbearably uncomfortable"

Looks like founders don't want to work for Zuckerberg. Any company looking to sell to Facebook would need a 50% Zuckerberg premium.

<comment><USER7> Could Zuckerberg be forced out of the leadership now that FB is public? sounds like a good reason to push him slightly aside, especially given how aqui- hire-y everyone is recently

<comment><USER8> No. FB is hardly a public company, even though its shares can be traded on public exchanges. Zuckerberg owns about 28% of the company, but has ~57% of the votes. Shareholders other than Zuckerberg have no say on the Board.

Even FB itself listed Zuckerberg's voting power as a potential risk on its own S-1 filing. "So long as the outstanding shares of our class B common stock represent a majority of the combined voting power of our common stock, Mr. Zuckerberg will be able to effectively control all matters submitted to our stockholders for a vote, as well as the overall management and direction of our company."

<comment><USER9> I've always wondered how investors allowed that to happen. They collude in every other matter, why not this one? FB needed investment to survive, so one of the terms could've been "give up your power."

<comment><USER8> FB was too popular at IPO, they could do whatever they wanted. Activists only get involved when shares underperform. Otherwise, they have no leverage. Shareholders only care about the stock price and nothing else.

<comment><USER10> I don't understand that at all. Suppose the shareholders' dreams happen and Facebook starts earning enough to make dividend payments that repay the value of the stock in, say, 10 years.

What's to stop Zuckerberg from just directly diluting every other shareholder ?

(and of course, that's exactly what probably happens right now, because Zuckerberg gets more stock options yearly than anyone else, so his voting power does not dilute over time)

Please don't see this as an attack on Facebook. It's hardly alone in doing this. And I do agree that Zuckerberg is probably a lot more qualified to run Facebook than any (set of) investors. Still, why take the risk that he might "cheat" ? Why are these shares selling ?

</comment></comment></comment></comment></comment></comment><comment><USER11> Groupon-effect.

In 2010, Google offered to buy them for $6B. One year ago today, GRPN hit its lower point in history: its marketcap was less than a third of what Google offered originally. Andrew Mason was fired after soon after, after missing estimates, again.

The stock recovered considerably since then ($6.9B market cap today), but it's a reminder for young entrepreneurs that the market is ruthless with one-trick ponies.

Unless you have something on the table from Facebook, I fail to see what's their long term strategy.

</comment><comment><USER12> Some time ago there was a "Startup FAQ" (can't remember the exact title) circulating. But it has this:

"Q: A company wants to buy us, what to do? A: Sell"

I don't think truer words were ever spoken.

Are they really taking themselves that seriously?

Dropbox could get away with it, they have a good source of revenue. Not something like Zynga.

Then you can use the 3B to either go on vacations or build something even cooler.

Edit: nmb found it: [http://www.jamesaltucher.com/2013/08/the-ultimate-cheat- shee...](http://www.jamesaltucher.com/2013/08/the-ultimate-cheat-sheet-to- starting-and-running-your-own-business/)

<comment><USER13> Why sell? After a valuation of $100M it's all just fun and games and a very unique experience that fewer than a 10 people/year or so can have in their lives.

You can't buy that with money.

<comment><USER12> The question is, can they get 3B (or more) in another way?

If Instagram's 1B was already excessive what's 3B for Snapchat?

You're mentioning valuation, but the 100M _do not exist_. Yes, things have the value they are bought/sold for but selling 10% of something ends up skewing those values.

Yes, it's a definitely cool experience. The you can pocket the 3B and go have another fun experience with another company (or even at the same, unless the company is absorbed/shutdown)

<comment><USER13> They do exist. The definition of valuation is the price someone is willing to pay it.

Facebook is willing to pay it, investors are willing to pay it. That's the definition of valuation.

<comment><USER12> Yes, but here's the thing, for example a 1st round putting the valuation at 100M usually involved a purchase of a % of the company by a % of 100M.

Oh yes, if Facebook is willing to pay for it, the price tag today is 3B (and I would definitely go for it because I think it's worth less than that)

</comment></comment></comment></comment></comment><comment><USER14> February 2013 - 60 Million Photos Per Day

November 2013 - 350 Million Photos Per Day

That's some serious growth. Seeing that much growth over a nine month period probably has a huge influence on why they think a better offer will come around.

</comment><comment><USER15> I think Groupon was said to have done something like this. Not sure that was a face-saving move or not (rumor was Googs didn't like what they saw in their books much). If it wasn't then they overplayed their hand and never got their six billn. Wonder if this will end up being similar.

</comment><comment><USER16> What's cooler than a billion dollars? A trillion.

I'm in my mid 20s, and I _already_ don't get Snapchat. When my friends use it, I almost feel like they're trying to stay attached to being young - <USER2> they're sending each other snaps simply because it's "what kids these days do". Isn't that the textbook definition of a fad?

I am not really sure who would offer Snapchat more than $3bn. Maybe Google will buy them out of fury, over all the data they're deleting (can't organize the world's information if it's getting deleted).

Also, there's _no way_ they're actually deleting all of those snaps, right? That's _sure_ to be a scandal at some point, when someone figures out how much of the data they're keeping. Maybe not the images themselves, but I'd love to build a network out of the "who sent snaps to who" data.

</comment><comment><USER17> The concluding line says it all:

"I'm facing a crisis in this industry, said Mr. Ma. "Young people, the things they like on the Internet, increasingly I don't understand it. This is my biggest worry."

<comment><USER18> I'm on the verge of turning 30, so I'm not too old to remember being a teen, but I can also sense a mild but tangible generational gap between me and the teenagers of today. So while a 1 billion offer for a chat app seems outrageous to me now, I know that Teen-Me would be all over something like snapchat.

I don't know what that says about what kind of software I should be building, if it says anything at all.

</comment></comment><comment><USER19> Anyone else not able to read the article? NYTimes prompts me to register beforehand.

<comment><USER20> Incognito mode, perhaps?</comment></comment>


It is ridiculously easy to refactor Go - <AUTHOR> http://www.onebigfluke.com/2013/01/it-is-ridiculously-easy-to-refactor-go.html <comment><USER2> Welcome to bounded polymorphism, circa 1989. A young Wadler would be pleased.

An aside, it is not "duck typing" if it involves a static type system.

<comment><USER3> Thanks right, technically Go supports a structural type system* which is a similar to, but different than duck typing. But the Go community often refers to Go as being duck-typed due as that term is more familiar to people coming from languages like Python.

* <http://en.wikipedia.org/wiki/Structural_type_system>

<comment><USER4> "often" is stretching things a bit. The reason this terminology popped up is that it was in the official documentation, but it was (or is scheduled to be) taken out.

anyway, you're right, it's not duck typing. Duck typing happens at runtime. With Go, every variable has exactly one type at compile time. Sometimes that type is an interface type. With duck typing, the checking happens at runtime. There's no runtime type checking with Go's interface system.

<comment><USER5> Nothing says duck typing has to be at runtime.

The only requirement to duck typing is "an object's methods and properties determine the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface".

This is exactly how Go's interfaces work. You define the methods you require an argument to have, and then anything that has those methods can be used as that argument, without the original type having any knowledge of the interface that was designed. The only difference between Go and Python in this regard is that Python doesn't actually define what a duck is for a specific method, it is implicitly defined by the methods that are called on it. Go explicitly defines what a duck is, which makes it a hell of a lot easier to know if the object you're passing in qualifies as a duck without reading every line in the damn function.

Yes, go checks that an object is a duck at compile time, that doesn't have anything to do with duck typing.

<comment><USER6> It is true that duck and structural typing have only a subtle difference. But it is also true that duck typing has to be at run time essentially by definition.

Structural typing looks for structural isomorphsims - it is total. Duck typing looks at run time compatibility, so long as the runtime accessed portion is the correct signature it passes.

So structural typing is about isomorphisms and duck typing is about checking the correct boxes before entry. Both have the attribute of looking at structure but you cannot expect them to cluster types in the same manner.

In ML* terms I like to think of structural typing making hard clusters and Duck typing allowing for soft clusters.

* No, not that ML.

<comment><USER5> Structural typing is duck typing at compile time. I'm fine with that definition.

<comment><USER6> Sure if you define the difference away anything can be the same.

But you cannot expect them to always behave the same way. That is, { f_d(t) | t ∈ T} <> {f_s(t) : t ∈ T} where f : T -> T set takes a type and returns the set of types in T equal to it and f_s , f_d check for equivalence via structural and ducks respectively. You can expect f_s to also define a partition over T but not necessarily the same for f_d. f_d is vaguely defined there but if you pretend it acts like it simulates how a runtime check would occur, |f_d| will tend to be >= than |f_s|

An example of how structural typing is not just compile time duck typing is because such a thing exists (in F#) and is not the same as structural typing.

<comment><USER7> I'm beating a dead horse here, but is there a difference between "compile-time duck-typing" and "structural typing" besides just type inference? It seems to me that so long as the duck-typing language really does unify types, they are the same thing, except that with structural typing you have to write down the type somewhere and it can be a more restrictive type than the actual runtime calls necessitate.

<comment><USER4> yes, with structural typing, you have to be able to do everything a duck can do, not just the duckish things you're interested in locally. In duck typing, if all you're interested in is walk_like_a_duck, anything with walk_like_a_duck is acceptable, even something that doesn't talk_like_a_duck, because in reality, you never defined the "duck" type to begin with; the actual "duck" type doesn't even exist. In structural typing, "duck" would be a concrete type. "duck typing" is a pretty shitty name for it, to be honest, because of that saying "if it walks like a duck and talks like a duck, it's a duck", but the reality is it's more like "if I need something that walks_like_a_duck and this walks_like_a_duck then it's good enough for me".

let's put it in another perspective: if you have a function that takes disparate types, then the thing that's passed in that function may be of arbitrary type. It's unknown at compile time how much memory will be allocated for the instantiation of that function in order to accept the parameter, because the type that's being passed it is unknown. In structural typing, like in Go, you know at compile time the type of the thing being passed in, and therefore, the amount of resources that will be required upon calling.

Or in another sense, an array of an interface value in Go has a well-defined memory layout, whereas an array of disparate types in a dynamic language does not have a well-defined memory layout at compile time.

internally, an interface value in Go is a two-tuple; it's an actual _additional_ structure; it _boxes_ the structure we're interested in. With duck typing, there is no box.

so yes, it's actually very different. The difference is more meaningful than people generally let on.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER8> I think you could actually do this in C++, but not with runtime polymorphism. I think you should be able to define extractBody and extractTextBody as template functions. If the signatures (return type, name and parameters) of the functions of the interface are identical - and it looks like they are - then this would work as a C++ template function. Behind the scenes, the compiler would generate two different kinds of functions for you, one for each of the types you called it with.

(Please note I'm not saying this would be _better_ , just pointing out that it's possible.)

<comment><USER9> And he doesn't even have to define an interface.

<comment><USER8> Concepts were an attempt to allow people to explicitly state what that interface is: <http://en.wikipedia.org/wiki/Concepts_(C%2B%2B)>

</comment></comment></comment><comment><USER10> Great article. As a side note, you might want to consider reformatting the blog post using syntax highlighting to make the code more readable and obvious. Thanks for posting though.

<comment><USER11> <http://kyleisom.net/blog/2012/10/17/syntax-off/>

Syntax highlighting is less common in the Go community since Rob Pike called syntax highlighting juvenile :D [https://groups.google.com/d/msg/golang- nuts/hJHCAaiL0so/kG3B...](https://groups.google.com/d/msg/golang- nuts/hJHCAaiL0so/kG3BHV6QFfIJ)

He also argued against keyword emphasizing: <http://www.lysator.liu.se/c/pikestyle.html>

<comment><USER12> ...

This is surely a minority view.

Everyone uses syntax highlighting, for everything. _for everything_

I can't honestly believe the whole go community just decided to by like, oh gee, well Rob doesn't like it, I gues _we'll just ignore what everyone else is doing and do our own thing_.

For what it's worth, _I_ use syntax highlighting in my go code, and so does <http://tour.golang.org/>

<comment><USER10> And everyone uses it for a reason: color is one of the primary discriminators of human vision, it carries information efficiently and does it instantly, as clearly laid out in the Wikipedia article about visual search (pop-out effect) : <http://en.wikipedia.org/wiki/Visual_search>

It seems strange that Rob Pike would call it "infantile". I don't think it's very modern (nor mature) to say that either, since it completely ignores years of research done on the subject by scientists. But then again, to each his/her own.

<comment><USER13> He isn't arguing that highlighting doesn't carry more information. I think he's saying that it carries useless or wrong information.

</comment></comment></comment></comment></comment><comment><USER14> Go has really grown on me in the last few months, it's becoming my favourite language, coming from C++.

<comment><USER15> I've been working in C/C++ for over 20 years now. I started playing with Go about two months ago, burnt through the tutorial in 2 afternoons, and was hooked. It's very easy coming from a C background, it has constructs I'm familiar with, but also picks out the best parts of Python-ish SmallTalk-ish languages, while still being compiled.

I'm looking forward to when I can write Android apps in it, instead of mucking around with Java.

<comment><USER16> Exactly... the day Go compiles for mobile devices is the day I'll dig into mobile development.

But the thing with mobile OSes is, you need a sane binding to the native GUI lib.

However, it would be awesome to circumvent this and just be able to do what I can already do with GLFW and OpenGL across 3 different desktop OSes: open a blank window that's just a canvas for GPU (GL) commands. Seeing how OpenGL ES is on all smart phones, having an equivalent "mobile GLFW" library and GLES binding would be awesome and good enough to roll one's own snappy GUIs.

Oh, all that only once Go compiles for said mobile OS / HW in the first place, which is probably still a few years off...

</comment></comment></comment><comment><USER17> I went into the article thinking it was going to be about some way of renaming functions or something. Probably just my limited internal definition of the word refactor. After reading I would say Go has a cool built in way of using the adapter pattern. More interesting than renaming functions.

<comment><USER18> Actually, Go makes this somewhat easy too. Check this: <http://blog.golang.org/2013/01/go-fmt-your-code.html> It's possible to do context aware source code substitutions. Works great. (Not that it's something new or groundbreaking though, just relevant to your expectation)

<comment><USER19> Comparing gofmt with what refactoring tools allow is too far fetched.

<comment><USER20> Are you aware of gofmt's rewrite rules?

<http://golang.org/cmd/gofmt/#hdr-Examples>

Pretty powerful stuff.

<comment><USER19> I am. Refactoring is much more than that:

\- create functions and methods from code snippets

\- merge duplicate code

\- Semantic renaming of method names/variables/functions without affecting the same name being used in a different context

\- convert field direct access to wrapper functions/methods

\- remove dead code

\- add missing code to interface/module/class where it is being applied

\- validation of code references in comments

\- ...

</comment></comment></comment></comment></comment><comment><USER21> Folks, recursive data-strcutures are CS101. Processing them is also a trivial, template-filling exercise. First you specify the (recursive) datatype, consisting of the simple "leaf" elements, along with the complex forms. Then you write your program consisting of a series of mutually recursive functions.

What matters is that once you specify the data type, the code that processes it follows immediately from the grammar.

<comment> adam-a I think you're slightly missing the point. It's not the use of recursive functions or data structures that is interesting. It's that, in Go, you can add a new type which covers externally defined types, and those types are now instances of the new type automatically. In other languages, to unify two types like this with a common interface, you would probably have to define a wrapper class which proxies the calls to the real objects. Even though the methods for the two classes have matching type signatures and do the same thing already.

</comment></comment><comment><USER22> Haxe has a similar (but not quite identical) bag of tricks which act as a "gradient" of stronger/weaker couplings.

You have to specify that an implementation can use a specific interface, but you may overload an implementation with multiple interfaces. <http://haxe.org/manual/2_types#interfaces>

You can use structure types instead of classes and rely on structural subtyping to match them. <http://haxe.org/manual/2_types#structural-subtyping>

And you can ask for dynamic type behavior wherever the code needs it. <http://haxe.org/ref/dynamic>

</comment><comment><USER23> Typescript allows you to do this also. It's extremely convenient.

</comment><comment><USER24> I don't completely seee the point - in more established OO languages you'd make two one-line wrapper classes that both implement Get() and be done with it. Not stuck at all.. Extra indirection, yes, but is your performance going to block on parsing mime mails?

<comment><USER25> I assumed you would do the same thing as was done in the article.

Create an interface and have a function that takes implementations of that interface as a parameter. The difference would be that in Java or C# you would need to explicitly mark Header and MIMEHeader as implementing emailHeader

I don't think much will come of discussing what is/isn't possible in a language given that they are all Turing complete. Usually posts like this are used for discussing what's easier or cleaner in a language.

For what it's worth I think having dynamic interfaces is cool, but I can only really think of one place I have actually relied on that capability.

Mostly the "dynamic"ness is nice for decoupling code. You can have a package(A) containing a function that takes an interface a parameter, a package(B) containing an implementation of the interface in A and a package (C) which passes the implementation in B to the function in A.

Given this situation C needs to import A and B but neither A nor B need to know about each-other.

</comment></comment><comment><USER26> To be fair, you can do this in java by adding to _Header_ and _MIMEHeader_ " _implements emailHeader_ ".

Structuring typing seems simpler. Are there any downsides? (apart from two types having an identical method signature by coincidence)

<comment><USER27> > To be fair, you can do this in java by adding to Header and MIMEHeader > "implements emailHeader".

Not if you aren't the author of the package. (You could modify your local copy, but requiring a fork is always a pain.) Without the ability to modify the sources, you would have to create custom subclasses of Header and MimeHeader which implement that interface, and find some way to make the library generate your custom subclasses instead of the defaults.

<comment><AUTHOR> Exactly

</comment></comment></comment><comment><USER28> Off-topic: I had to use Readability[0] to make your blog readable.

[0] <http://www.readability.com/shorten>

</comment><comment><USER29> I wished for years for Java to determine "implements interface" by method checking not the way it does it currently.

And while Scala has "structural typing" I'd also wish it would implement it the way Go does not with explicit methods.

</comment><comment><USER30> I hope go 1.1 will be ready soon. A lot of goog stuff in it.

<comment><USER31> care to elaborate ?

<comment><USER32> He/she probably wanted to say "good": [https://groups.google.com/d/msg/golang- nuts/FxELIOik2f4/X5x7...](https://groups.google.com/d/msg/golang- nuts/FxELIOik2f4/X5x7rDsh8moJ)

</comment></comment></comment><comment><USER33> Go has been out for a while, it's really cool to see it finally starting to gain traction.

</comment><comment><USER34> Refactoring is probably the one area where good IDEs shine the most.

I was expecting to see some advanced Emacs / vim or whatever texteditors _or_ IDE support for refactoring Go code.

Not just manual extraction of common behavior into a tinier interface.

But I'm more and more impressed by Go and may give it a try one of these days.

<comment><USER35> I doubt it.

How could anyone refactor something like this in Python

getattr(myobj, 'myprop', None)

Where mypropis dynamically generated?

<comment><USER36> What do you mean by refactoring a single line?</comment></comment></comment>


Inside El Paquete, Cuba's Social Network - <AUTHOR> https://withintent.uncorkedstudios.com/inside-el-paquete-cubas-social-network-2fa6c99660ee <comment><AUTHOR> In a country where the government keeps tight control over the media, citizens are able to access an extraordinary amount of information from around the world in the form of a terabyte-sized weekly file dump, Bring Your Own Hard Drive. For what an American would pay for a single song on iTunes, Cubans can experience thousands of hours of movies and TV, music, and sports.</comment>


India's Stepwells (2013) - <AUTHOR> https://www.archdaily.com/395363/india-s-forgotten-stepwells <comment><USER2> One of those stepwells was used to great effect in Tarsem's movie The Fall (which is a glorious visual feast where clever cinematography did things that you would expect to be CGI)

[http://www.imdb.com/title/tt0460791/](http://www.imdb.com/title/tt0460791/)

<comment><USER3> I'm traveling to India in a few weeks and The Fall is basically my itinerary. After seeing the movie, this was one of the first place I googled because I didn't immediately get what this was for. It should have been obvious, but my preconceptions of deserts/arid places is based on the middle east, where (AFAIK) there are no step wells.

<comment><USER4> If you care about the aesthetic alone, then I would suggest skipping the usual spots and add these to your itinerary:

1\. Udaipur, Rajasthan (everything about this city is beautiful)

2\. Orchha, particularly the "chattris" next to the river.

3\. Khajuraho (the temples are stunning in the right weather)

<comment><USER5> I'm from Udaipur, Rajasthan. @mhd, shoot up if you have any questions about it. :)

</comment></comment></comment></comment><comment><USER6> There is one remarkable picture of a step well from India, taken by the master photographer Edward Burtynsky. A low res version can be found on this page: [http://lenscratch.com/2016/04/edward- burtynsky-2/](http://lenscratch.com/2016/04/edward-burtynsky-2/)

(No affiliation, I just love his work)

<comment><USER7> Wow, that is one magnificent picture. The dark rigid structures in the bottom left combined with the sheer force of the white water on the right. And then you look further and see all the interesting details. Well done.

<comment><USER8> That's not the stepwell - it's a dam in China. Here's the stepwell photo:

[http://lenscratch.com/wp- content/uploads/2016/02/Burtynsky_W...](http://lenscratch.com/wp- content/uploads/2016/02/Burtynsky_Water_03_Step-Well_India.jpg)

<comment><USER6> This photo is listed on that page and is the was talking about.

</comment></comment></comment></comment><comment><USER9> These are beautiful been to many of them myself and in the old days could jump in them as the water was clean, 40 years ago. I don't think they are important for current government, who are too busy worrying about mythical characters to muzzle freedom of expression and speech (want to behead an actresss). They want a temple at the cost of history and culture, even if that means destroying Taj Mahal. This step wells are too below the radar to be saved unless there is a temple or some idol of ram, hanuman or other Hindu deity in them.

<comment><USER10> I've been to a few too, and the decay has been setting in for a long time. Today, the water is very dirty, and access has been barred to the bottom.

It is a shame, really, that you chose to use HN to try to score some cheap shots which anyone would see are wrong.

</comment></comment><comment><USER11> HN discussion from 2015: [https://news.ycombinator.com/item?id=10179467](https://news.ycombinator.com/item?id=10179467)

</comment><comment><USER12> A more recent (Sep 2017) article on stepwells by the same author:

[https://www.archdaily.com/878527/the-astonishing- vanishing-s...](https://www.archdaily.com/878527/the-astonishing-vanishing- stepwells-of-india)

I've been to the Adalaj Vav (stepwell) near Ahmedabad. Its distinctive architecture is a fusion of Hindu, Jain and Islamic styles. There is an interesting legend behind this. See [http://jatinchhabra.com/adalaj-vav- stepwell-gujarat/](http://jatinchhabra.com/adalaj-vav-stepwell-gujarat/)

</comment><comment><USER13> Stepwells in India are a rare and forgotten beauty. Just sit there and listen to the silence, you'll love it.

Most Stepwells are found in Rajasthan and some in Madhya Pradesh and Gujarat too.

</comment><comment><USER14> I'm not sure how I got to my mid 30's and had never heard of stepwells until I played Civ 6, but these things are amazing. I'd love to see one in person some day.

</comment><comment><USER15> Related talk: [https://www.ted.com/talks/anupam_mishra_the_ancient_ingenuit...](https://www.ted.com/talks/anupam_mishra_the_ancient_ingenuity_of_water_harvesting).

</comment><comment><USER16> An unexpected treat. Thanks for posting.</comment>


WikiSort – Fast, stable, O(1) space merge sort algorithm - <AUTHOR> https://github.com/BonzaiThePenguin/WikiSort <comment><USER2> To be pedantic, in-place sorting algorithms (typically?) take O(log n) space, not O(1). They don't copy the data to be sorted, but they do need some temporary space that isn't fixed, but scales (slowly) with the size of the array being sorted. The usual sources of the log-n space growth come from either a stack recursing on things (explicitly or implicitly) and/or the array indices.

This particular implementation (looking at the C version) uses fixed-size 'long ints' for its temporary data storage, which means it only works on arrays up to LONG_MAX elements. If you had larger arrays, your need for temporary data would grow, e.g. you could upgrade all those long ints to long long ints and accommodate arrays up to LLONG_MAX. Of course, logarithmic growth is very slow.

<comment><USER3> So, is there such a thing as a useful O(1)-space algorithm? I can't think of a single one.

<comment><USER4> (Particular, individual) regular expressions can be implemented with O(1) space. Regular expressions can do lots of useful things.

<comment><USER3> This is incorrect, under deliriums pedantic interpretation of space complexity. Some regular expressions require one to accept a certain number of examples of a character. This means that storage space for the count is required, which scales logarithmically in the count.

<comment><USER4> This is why my comment began with the words "particular, individual". A regex like (1{5}0{3})\\* can be implemented in constant space, but a language like

        matches(n, m, string):
            return matches((1{n}0{m})\*, string)

cannot.

Just think about it -- the former is just a DFA, and so _of course_ you can do it in constant space (provided your input stream is abstracted away, or you use a TM.

</comment></comment></comment></comment></comment><comment><AUTHOR> Also, interesting discussion on reddit: [http://www.reddit.com/r/programming/comments/20fxv8/making_a...](http://www.reddit.com/r/programming/comments/20fxv8/making_a_fast_and_stable_sorting_algorithm_with/)

</comment><comment><USER5> I made a video of how the algorithm works: [http://youtu.be/NjcSyD7p660](http://youtu.be/NjcSyD7p660)

To make it I needed a C++ version with iterators, which I though would be faster. But it is still about 20% slower than stable_sort for the default random input test. It probably also stays the same for other inputs.

</comment><comment><AUTHOR> Previous innovation that I remember in sorting was Python's TimSort - it's just MergeSort with a few tweaks, but it's better than any other sort I've met when applied to real world data.

<comment><USER6> > it's just MergeSort with a few tweaks

"a few tweaks" is a bit of an understatement, at a high-level it's a hybrid of insertion and merge sort (it's an insertion sort below 64 elements, and it uses insertion sorts to create sorted sub-sections of 32~64 elements before applying the main merge sort)

<comment><AUTHOR> Yes, it is a bit of understatement. Other than the insertion at smaller sizes, it adds:

\- scans array to find merge-able runs (rather than use a "standard" size like more merge sorts); This makes it closer to O(n) for mostly-sorted arrays, a feature that is mostly associated with Bubble Sorts - but without giving up any of the good things about MergeSort

\- identifies "reverse runs", and just reverses them - making mostly-reverse- sorted arrays closer to O(n), which no other general sort achieves.

It's still O(n log n) in the worst case - but it just works exceptionally well on real life datasets, which often have sorted or reversed sections.

<comment><USER7> Our benchmarks consistently show Tim sort as the fastest -stable- sort, But intro sort consistently beats it.

<comment><AUTHOR> Which benchmarks would that be?

TimSort as implemented in Python goes through the Python machinery of object comparison and object management in general. Make sure you do an apples<->apples comparison when benchmarking.

<comment><USER8> Timsort is in JDK7, btw.

[http://grepcode.com/file/repository.grepcode.com/java/root/j...](http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/7-b147/java/util/TimSort.java)

</comment></comment></comment></comment></comment></comment><comment><USER9> I'm sure people will loathe me for saying this, but I'd really like to see the implemented into JavaScript.

We've got Crossfilter ([https://github.com/square/crossfilter/wiki/API- Reference);](https://github.com/square/crossfilter/wiki/API-Reference\);) however, as more data moves client-side with storage APIs like IndexedDB, I see a need for "as efficient as possible"

<comment><USER10> 1\. Skimming the paper, it only matters if you need an efficient _stable_ sort. If you just need O(1) memory you can stay with heapsort, which at least will have more reference implementations.

This lead me to look up browser sort implementations; [http://stackoverflow.com/questions/234683/javascript- array-s...](http://stackoverflow.com/questions/234683/javascript-array-sort- implementation) \- it seems Moz uses mergesort and Webkit may or may not do something silly for non contiguous arrays.

So, there _could_ be a use for it. For most applications you're about fine as it is.

2\. I'm interested in hearing about applications where you're loading millions of array elements in people's _browsers_.

I was going to be cranky and make rude comments but I can _envision_ people wanting to play with their data without loading it in specialized toolsets/learn R/build a DSL in $lang_of_choice.

<comment><USER11> I do some ML in browser for ease of visualization/portability. Don't often need to sort all the connection weights, but hey you asked :)

<comment><USER9> Here's my work-in-progress visualization with a dataset of 1 million+ IMDB entries to be stored in IDB [http://dashdb.com/#/](http://dashdb.com/#/)

It purposefully pushes IDB way further than it should be taken in most cases.

</comment></comment></comment></comment><comment><USER12> This has a really nice documentation, should make it easy to implement.

<comment><USER13> Despite the good documentation this algorithm is complex and I bet most implementations will be incorrect.

UPDATE: I could not find the article I had initially in mind but I found this one [1] showing that even prominent implementations of simple algorithms like binary search or quicksort contain bugs more often than one expects and they may even remain unnoticed for decades.

So take this as a warning - if you implement this algorithm you will almost surely fail no matter how smart you are or how many people look at your implementation.

[1] [http://googleresearch.blogspot.de/2006/06/extra-extra- read-a...](http://googleresearch.blogspot.de/2006/06/extra-extra-read-all- about-it-nearly.html)

<comment><USER14> There is also a complete lack of tests. It'd be nice if there was a library of tests for all sorting algorithms. I'm sure there is, but something more widely accepted and well known.

</comment></comment></comment><comment><USER15> Is there a way that better minds than me can see to parallelize this algorithm?

<comment><USER16> The merge step[0] can be parallelized -

\- take the two sorted arrays A & B (assume both are of size n) and make partitions of size log n in one of them, let's say A

\- Now considering there are n/logn processors, assign each partition to a processor. On each partition take the last element (l) and do a binary search to find a cut point in the other array B such that all elements in B are <= l. Cut points of two such partitions in A correspond to a partition in B which can then be sequentially merged by the processor.

Span is _O(log n)_ ; Work is _O(n)_ ; so parallelism is _O(n /logn)_ Detailed information here [1]

[0] [https://github.com/BonzaiThePenguin/WikiSort/blob/master/Cha...](https://github.com/BonzaiThePenguin/WikiSort/blob/master/Chapter%203:%20In- Place.md)

[1] [http://electures.informatik.uni- freiburg.de/portal/download/...](http://electures.informatik.uni- freiburg.de/portal/download/3/6950/)

</comment></comment><comment><USER17> I've been meaning to compare various in-place mergesorts, so this'll definitely make it into my bookmarks.

</comment><comment><USER18> why is a sort function so important ?

I mean what sorts of big data sets are you sorting that much often ?

<comment><USER19> Believe it or not, sorting is one of the most common operations software performs. As a simple example think of how many times somebody queries something like `SELECT (...) FROM huge_table WHERE (...) ORDER BY (...)` Obviously the order by means the data needs to be (at least partially) sorted before it can be returned. To be fair that is a different case algorithmically since DB's are almost never able sort entirely in memory. But there are plenty of other examples where in memory sorting is necessary or provides advantages for later computation steps (eg. ability to cut of elements larger than a certain threshold).

<comment><USER18> yeah but it's already implemented into db software, why would devs reinvent the wheel ?

<comment><USER20> Because "do it once, never improve again" is a bizarre philosophy?

<comment><USER18> I think most db software are already quite well optimized.

I mean unless you're a db software dev, and unless you're profiling it for each use case I wonder if you can really find something to optimize.

I just meant that's it's a niche. I honestly got no idea how db software are programmed but I doubt any dev can pretend to do better.

I guess that algorithm would interest people who recompile their db software, or who don't use those db software.

So here comes the question : what are the pro cons of using a db software ? Why would some devs still use plain files to store data ?

</comment></comment></comment></comment></comment><comment><USER21> nice to see even in sort() we have innovation!

<comment><USER22> If you're interested in alternative sort algorithms, you might enjoy the self- improving sort [1]. A simplified tl;dr: given inputs drawn from a particular distribution + a training phase, the result is a sort that is optimal for that particular distribution. The complexity is in terms of the entropy of the distribution, and can beat the typical worst case O(n log n) for comparison sorts.

[1]: [http://www.cs.princeton.edu/~chazelle/pubs/selfimprove.pdf](http://www.cs.princeton.edu/~chazelle/pubs/selfimprove.pdf)

</comment></comment><comment><USER23> I got widely different results there: C - 105.868545% C++ - 80.0518% Java - 61.664313124608775% Probably the optimizations there; can't easily be done in Java one; interesting nonetheless, thanks for post.

<comment><USER24> Those benchmark ratios are not comparable across languages.

The C code compares running time with a very standard mergesort.

The C++ code compares with std::stable_sort.

The Java code compares with a standard mergesort -- very similar to the code in the C version -- but has hard-to-predict JIT warmup effects.

</comment></comment><comment><USER25> How does it compare to an O(1) space version of quicksort?

<comment><AUTHOR> Quicksort is worst case O(n^2) time, unless you incorporate something like Quickselect for your pivot (which no one ever does, because it makes it relatively complicated. Have you ever seen an O(n log n) guaranteed quicksort implemented? I haven't - best I've seen is median-of-3 or median-of-5 pivots - or randomized). Furthermore, I've never seen an O(1) space version of quicksort and I'm not sure one can exist -- see, e.g. [http://stackoverflow.com/questions/11455242/is-it- possible-t...](http://stackoverflow.com/questions/11455242/is-it-possible-to- implement-quicksort-with-o1-space-complexity)

The meaningful comparison would actually be to Heapsort, which is in-place, O(1) space, and NOT stable - though much, much, simpler.

ADDED:

Anyone who uses quicksort should read this gem from Doug McIlroy, which elicits an O(n^2) behaviour from most quicksort implementations: [http://www.cs.dartmouth.edu/~doug/mdmspe.pdf](http://www.cs.dartmouth.edu/~doug/mdmspe.pdf) -

<comment><USER26> Many/most widely used "quicksort" implementations are actually introsort (in particular, `std::sort` is), and thus O(nlogn) worst case.

</comment></comment></comment><comment><USER27> It's the quarterly post from the guy who just reinvented radix sort.</comment>


Show HN: Working Set – a companion to Vim for better search interaction - <AUTHOR> https://github.com/coderifous/working_set <comment><AUTHOR> I created this tool wayyyyy back in 2015 and have used it daily since then, improving it over time. I use it copiously every day, and I've wanted to share it for a while - but I was not quite happy with the quality of the code, and it's overall polish. Well, thanks to the raging pandemic that's eviscerating our very way of life, I found the time to really dive in and make it something I felt good about sharing.

If you're inclined to check it out, you can grab the vim plugin here: [https://github.com/coderifous/working- set.vim](https://github.com/coderifous/working-set.vim)

And instructions for installing Working Set here: [https://github.com/coderifous/working_set](https://github.com/coderifous/working_set)

I hope other folks find it a useful addition to their programming workbench.</comment>


Australian government to crack down on climate protestors - <AUTHOR> https://www.theguardian.com/world/2019/oct/06/incredibly-worrying-legal-fight-looms-around-australia-over-clampdown-on-protest <comment><USER2> Between this and the raids on the ABC I'm starting to get a little worried, I have to say

</comment><comment><USER3> it will get worse. Governments choose to fight the people instead of changing their agenda of driving us towards extinction. Expect Extinction Rebellion to grow fiercely and protests to expand all over the planet.</comment>


I will do some free job to bulk up my portfolio - <AUTHOR>

Hello fellows, I am willing to build my personal brand as a web developer/designer. I don't have works that I could proudly show now but I am sure I am a talented one and the day came to begin working on next level. I would like to work on something challenging that I will put in the portfolio, not something average. So, please feel free to let me know if you have anything to discuss with me. <comment><USER2> You can have a look at <http://www.liberwriter.com> and suggest ideas for it. I'm clearly _not_ a designer, so any help is welcome. I'd be happy to credit you for it, and link to you.

<comment><AUTHOR> Hello David, I am afraid there is something wrong with the link. It won't load here. Is that fine there?

<comment><USER2> What do you mean "won't load"? How so? Works fine for me.

<comment><AUTHOR> Hm, it loads through some web anonymizer, but doesn't open directly. May be there is something with my network? I have reviewed your site. Could you please send me a email to firstname.lastname@example.com to discuss the project? Thanks.

</comment></comment></comment></comment><comment><USER3> What about contributing to opensource project? We just started putting together Cassandra GUI, coz there isn't any..

<comment><AUTHOR> I would like to learn more about that. Please ping me over email to discuss how I can be of use. Thanks.</comment></comment>