Israeli Police Recommend Indicting Netanyahu in Telecom Case - <AUTHOR> https://www.nytimes.com/aponline/2018/12/02/world/middleeast/ap-ml-israel-netanyahu.html <comment><USER3> Israel has some of the best/worst politicians money can buy - but it is not shy about putting them in jail. A previous PM (Olmert) spent time in jail, as did a previous president (Katzav, this is a ceremonial job, with queen-of- england style responsibilities) and quite a few ministers.

<comment><USER4> Unfortunately that hints to me that risk of jail doesn't solve the problem.

<comment><USER5> Yup. The current minister of interior has already been in jail once, for offenses committed as the minister of interior (10 years or so ago).

</comment></comment></comment><comment><USER6> >"The police recommendations regarding me and my wife don't surprise anyone," Netanyahu said in a statement. "These recommendations were decided upon and leaked even before the investigation began."

Isn't this entirely normal for criminal investigations? First you decide that someone is probably doing something bad, then you investigate and indict?

<comment><USER7> No, the investigation is performed in order to decide if there is sufficient evidence to recommend an indictment.

The investigation is the part in which they collect the evidence, witness statements and perform a review of the case.

Then they pass their recommendation for a judicial review which would review the case and take into consideration the recommendation of the investigators and decide if there is sufficient evidence to proceed with an indictment or not, then it goes to the state attorney which has the final say.

If indicted the PM can appeal to the parliament within 30 days to request immunity, however an immunity as far as I know never been granted and over the past few decades Israel has indicted and prosecuted several high ranking politicians including former PMs so their judicial system seems to work pretty well.

The statement was referring to the claim that the recommendation text was leaked prior to the investigation being completed apparently the text was very simmilar to some leaked documents form 2 years ago.

Essentially over the past few years every month or so there was a leak that said an indictment will be recommended sometimes accompanied by the text of the recommendation, but this time it was an official recommendation.

Likely they had the legal text recommending an indictment worked on before the investigation was completed as it likely would demand quite a bit of work and approval to meet the legal nuances required for such a document.

</comment></comment><comment><USER8> >> _The case revolves around suspicions that confidants of Netanyahu promoted regulations worth hundreds of millions of dollars to the Bezeq telecom company in exchange for positive coverage of the prime minister on Bezeq 's subsidiary news website, Walla._

If true, lifetime ban from politics and 20 years in jail. This is messing with the core of democracy--and by using state /people's money. Those hundreds of millions in "gifts" are a cost to Israeli people.

<comment><USER9> Wait, isn't that what every populist politician doing every day - <USER2> something beneficial to an interest group X in exchange for being praised by this interest group and thus raising his chances of being elected again? If a politician recommends a subsidy to the solar industry, knowing he would be positively covered in New York Times and MSNBC, or, alternatively, proposes an increased military budget, knowing Fox News and Rush Limbaugh would praise him for that - is that something that one has to be jailed for? I am afraid if we'd do that then it'd make most sense to just convert the Capitol Hill to a jail, and the same with every state legislature, because everybody there would be jailed anyway.

</comment></comment><comment><USER10> Question for any Israelis-

My view of that region has been that in general, Israel is trying to do the right thing, although inidividual actors might attack Palestinian civilians and then get court martial. Palestinian leadership is broken with competing Hamas and Palestinian Authority with open or at least covert support of terrorism.

How are Israel's politics internally? I fear an Israeli leader who is corrupt and doesn't care for Israeli people or loss of Palestinian civilians could very easily take the Trump path.

It would be easy to blame Palestinians for every problem, just as Trump blames Hispanics, Muslims, immigrants (legal or illegal) or some other ethnic group inside Israel to unite the people with electoral power while the leadership gets away with corruption or outright war crimes in the name of defense.

This is not meant to be a Israel v. Palestine conversation, but just about Israel's internal politics. Just want to learn.

<comment><USER11> Internally it's the same right vs left conflict that you see in many other westernized countries, only magnified by the conflict. But in a very strange and un-hawkish move, after 500 rockets have been fired on Israel in 24 hours, Bibi didn't order any serious retaliation and deescalated instead. Coalition broke down, so now we're up for election on our hands, and Liberman, who resigned in protest against this decision, have seemingly got a lot of points.

However, I'm very curious about Bibi, because his main focus for the last few years have been international relations. His frequent visits, and building a lot of ties with muslim and muslim-friendly countries didn't win him a lot support domestically, but it may just be the key to solving the conflict. Especially in this recent situation, there are strong rumours that the main reason he decided not to allow escalation was his desire to demonstrate his reliableness to other middle eastern powers that got tired of Hamas and Muslim Brotherhood in general.

There's a lot of talk about how corrupt Bibi and his family is; but you have to take it in context, compared to western countries. All Israeli PMs (except for Gold Meir) have always been highly decorated combat military veterans, who have gone into harm's way again and again to serve their country and protect their countrymen. So while it's conceivable that they would give favourable government contracts to their friends and get a couple of millions reached from shady dealings, I don't think that a person with such history wouldn't care for his people.

</comment></comment><comment><USER12> A slowly developing putsch by the Israeli bureacracy against the elected politicians. Welcomed by those who want those politicians gone, not welcomed by the rest.

I would instead think ahead and decide how much I like the idea of rule by bureacracy vs. elections.

<comment><USER13> The rest do want him gone as well. He is as corrupt as Trump.

<comment><USER12> Given that he is at the peak of his popularity and his coalition is expected to win reelection in a landslide - I doubt that the people you've been talking to are a representative sample.</comment></comment></comment>


Square launches IFTTT channel, lets your transactions trigger almost anything - <AUTHOR> http://venturebeat.com/2014/07/24/square-launches-ifttt-channel-lets-your-transactions-trigger-almost-anything/

<comment><USER2> This is a fantastic idea and I could definitely see small businesses finding this useful. Now that I think about it, it would be so cool if there was an IFTTT tie in for VISA cards. Make a purchase, update a google spreadsheet and send me a text message if it's over $50. Basically your own highly customizable version of Mint.

<comment><USER3> You won't get this directly from Visa, but depending on who your bank is you could do this. I do this by scraping Simple's interface ([https://simple.com](https://simple.com)).

When a deposit over X hits my account, I initiate a transfer to Betterment.

<comment><USER2> Totally. It would be cool if IFTTT started getting banks & credit cards on board, that way it "just works" and you don't have to write custom software to export your transactions.

</comment></comment></comment><comment><AUTHOR> For any of you wondering.

We have slowly but surely begun rolling out an API which allow us to connect with various partner and allow merchants to build their own apps on top.

We have only just begun.

[https://connect.squareup.com/](https://connect.squareup.com/)</comment>


Show HN: My x86 emulator written in JavaScript - <AUTHOR> http://copy.sh/v24/ <comment><USER2> This may as well be magic as far as I'm concerned. When I first saw [http://bellard.org/jslinux/](http://bellard.org/jslinux/) I just about shat myself. This is definitely another level of awesome. Well done.

<comment><USER3> This really is extremely well done [and I'd like to see the unminified source]. The next feature I'd want to see is networking support. I love the idea to be able to run my entire dev setup in an emulated browser session [e.g. ruby, rails, redis]. That would be a game changer on how I'd develop.

<comment><USER4> At 2000 kIPS you may have a few generations of javascript engines to go before we get there.

That's not meant to take away from this project - it truly is amazing what can be interpreted in the browser now.

<comment><USER5> Just for reference's sake this does vary a fair bit by computer and browser - mine never drops below ~8kIPS and runs mostly at ~15kIPS (and up to ~23kIPS).

Whilst this is nothing like the several orders of magnitude required for more capable interactive behaviour, it _does_ make my load times noticeably faster than those claimed on the page. :)

(I'm Chrome on Linux, i7 4th Gen, incidentally)

<comment><USER6> I'm getting here > speed 1640kIPS on the old Nexus 7, don't you mean 8kkIPS?

(This value was the average while booting Linux)

<comment><USER5> Absolutely so, yes. Thanks. :)

8 - 23 MIPS ain't so bad, right?

<comment><USER7> For reference, that's about as fast as a Motorola 68030 @50MHz [1] which was used in the AppleIIx, and while that was no slouch when it was released, you wouldn't want to run a modern development environment on such a machine either ;)

[1] [http://en.wikipedia.org/wiki/Motorola_68030](http://en.wikipedia.org/wiki/Motorola_68030)

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> [https://news.ycombinator.com/item?id=6221724](https://news.ycombinator.com/item?id=6221724)

       g3 62 days ago | link | parent | on: Show HN: Virtual Machines in the Browser
       Just give me one more month, I'm almost there ...

The last month always takes at least 60 days. Strong work!

</comment><comment><USER9> Very impressive.

Interesting bug: I can't seem to type '-', '=', '+', or '_' into the Linux image. Missing '-' in particular makes it hard to run commands with options.

Elaborate workaround:

        /root% eval eq$(dmesg | grep 'e820 update' | sed 's/.*) \(.\).*/\1\1/')
        /root% echo $eq
        =
        /root% eval dash$eq$(uname bad 2>&1 | grep Usage: | sed 's/.*\[\(.\).*/\1/')
        /root% echo $dash
        -
        /root% uname ${dash}a
        Linux (none) 126.96.36.199 #44 Tue Oct 15 20:50:15 CEST 2013 i586 GNU/Linux

The first command grabs an '=' from dmesg and sets "eq" to it (without typing '='), and then the second command grabs a '-' from the usage message of uname and sets "dash" to that (without typing '-'). The last shows how to use ${dash} in a command.

<comment><USER10> This is the most soul-crushing category of bug, the kind which keeps me up all night, drinking.

Build a skyscraper, and lock the keys inside for the ribbon cutting. Sorry pal you lost your funding

Land on Mars, see an alien, but your camera is out of batteries and everybody back on Earth thinks you're a quack.

Successfully perform open-heart surgery on a desert island, but muck up the stitches and cause a scar. Your patient will hold it against you the rest of his life (which you saved).

<comment><USER11> Luckily, he was able to come up with a workaround.

Here's a soul-crushing situation that doesn't have a workaround, as far as I can tell.

You can play the original Deus Ex on OnLive. By default, it sets the fov to a very low number. It's only possible to change it in the console (there is no UI for it). But the console is disabled. However, you can get around that by pressing T, which creates a mini console with "say " prepoulated. Press delete to erase say, and type "fov 90". So close...

But they disabled the Enter key from working.

So you can get full access to the console, type the command that would fix the FOV, but you're unable to execute it because Enter key does not get sent to the game. You're completely helpless.

<comment><USER12> OnLive runs on OSX. gdb (i think) also runs on OSX. It should be possible to isolate the callback used to handle keyboard input and call it with c=10. This would take anywhere from hours to weeks of debugging though.

<comment><USER11> No, that won't work. Nothing you do client-side will help.

OnLive Client <-all input is transmitted-> OnLive Servers <-filter out Enter-> Deus Ex instance in a VM.

The enter key is filtered out on their servers. Unless you hack into their servers and change that, there is nothing you can do on the client-side. That's what makes you completely helpless.

<comment><USER12> Ah, my apologies, I thought the game was running locally. (This sort of assholeness on the part of servers is basically why 'cloud computing' is such a bad idea.)

<comment><USER11> I disagree that cloud computing is a bad idea because of this. It has advantages and disadvantages. Not being able to hack around to make changes you wish is a disadvantage, but having access to something you would not have otherwise is a much bigger advantage.

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> Pretty awesome, I for one don't think the constant stream of "x, rewritten completely in javascript" is tiring (this is not meant to be sarcastic).

[EDIT] - This post doesn't seem to say enough when I look back at it. Wanted to add this:

Seeing posts like this really excites me (and inspires me) about the future of web programming, and programming in general. Anyone that's excited about programming has to get excited about abstraction, and it doesn't get much more abstract that cross-coded/implemented virtualized systems like this. Even if you hate javascript.

Every step people take in blurring lines between systems like this should be exciting, given the large amount of abstraction that had to go into creating something like this.

</comment><comment><USER14> If like this you might also be interested in my port of the PCE Emulator to the browser: [http://jamesfriend.com.au/pce- js/](http://jamesfriend.com.au/pce-js/)

At the moment I've only uploaded a demo of the Mac Plus emulator (classic 68k mac) but I'll upload IBM PC and Atari ST demos soon also.

<comment><USER15> That's very nice too, though aren't you going to be running into some legal issues by distributing their ROMs?

<comment><USER14> Potentially, but I feel that the historical significance of these systems and the value of making them available to a newer generation of creators outweighs the technical infringement of copyright. It's basically abandonware, after all.

I feel very strongly about the importance of learning from the past, and not making the same mistakes over and over due to lack of historical perspective. I was particularly inspired by Bret Victor's talk at the DBX conference[1]. That's what motivated me to make this available in the most accessible way possible.

[1] [http://worrydream.com/dbx/](http://worrydream.com/dbx/)

<comment><USER16> I don't know about the other games, but Wolfenstein 3D is definitely not abandonware. You can still buy it on Steam, XBLA, PSN and other places.

<comment><USER17> That image has the free shareware version of Wolf3D. It has only episode 1 and is free to distribute to anyone.

</comment></comment></comment></comment></comment><comment><USER18> cute.

      /% cat /proc/cpuinfo
      processor       : 0
      vendor_id       : GenuineIntel
      cpu family      : 5
      model           : 1
      model name      : Pentium 60/66
      stepping        : 3
      cpu MHz         : 1.301
      cache size      : 256 KB
      fdiv_bug        : no
      hlt_bug         : no
      f00f_bug        : no
      coma_bug        : no
      fpu             : yes
      fpu_exception   : yes
      cpuid level     : 2
      wp              : yes
      flags           : fpu pse tsc cx8 pge cmov
      bogomips        : 2.60
      clflush size    : 32
      cache_alignment : 32
      address sizes   : 32 bits physical, 32 bits virtual
      power management:

Heh, 1.3 MHz on a Pentium 60.

</comment><comment><USER19>
      125 kB compressed JS
      262 kB uncompressed JS
      9765 lines of uncompressed JS

Wow.

</comment><comment><USER20> Plan 9 iso [0] CD image fails

        Unimplemented: #GP handler
        Execution stopped

[0] [http://plan9.bell-labs.com/wiki/plan9/download/](http://plan9.bell- labs.com/wiki/plan9/download/)

</comment><comment><USER21> Just when you thought "I've written an x in JavaScript" can't get any more insane . . .

Still, this wins the Nobel Prize for awesome.

<comment><USER22> I'm still waiting for "Show HN: I built a self-modifying general AI in JavaScript".

(@Eliezer, how's the work going? ;))

</comment></comment><comment><USER23> Now and then I see a project which is soul crushing to me when I compare myself with other programmers. This is one of them.

</comment><comment><USER24> It actually boots on Chrome.

On Android.

Then it usually dies for low memory - and I can't enter anything at all without keyboard (which doesn't pop up) - but still. The fact that I can boot up a x86 emulator in javascript in browser on ARM mobile phone is crazy.

<comment><USER25> Works for me on Firefox for Android, no crashes yet.

</comment></comment><comment><USER26> My second computer was an IBM XT 8086. That was the first time I played and fell in love with Rogue. Every time I grab a copy of Rogue nowadays for nostalgia's sake I'm left disappointed because I can never find the version of Rogue that I played as a kid.

My friend, your emulator has that version of Rogue. The kid inside me thanks you greatly.

</comment><comment><USER17> Would have been fun if it included some interface to execute assembler code on it directly in some way (without booting an OS).

In any case, super awesome! Great work :)

EDIT: Whoa, the dos one has games on it! Can you make Wolf3D work? :)

<comment><USER27> I doubt it, but nethack might be worth a shot.

</comment></comment><comment><USER28> This is awesome.

You might want to consider re-ordering the font list in the console though. Consolas isn't perfectly fixed-width apparently, and it made Rogue rather puzzling to play.

<comment><USER29> Consoles isn't perfectly fixed width? That sucks. Till now it was my go-to fixed width font.

I assumed something named _consol_ as would be a font suitable for consoles.

Which font do you like to use?

<comment><USER28> I use Consolas every day.

I'm on Linux, so that might also impact something.

Perhaps the line drawing characters are extra-small or something? Fire up Rogue and try it out...

</comment></comment></comment><comment><USER30> Two things:

1\. How can we help? How can I support you? 2\. Please open source this.

</comment><comment><USER31> This guy is awesome. Check out a Game of Life Turing Machine: [http://copy.sh/life/?pattern=turingmachine](http://copy.sh/life/?pattern=turingmachine)

<comment><USER32> how do you use it to perform a calculation? or what should i be asking?

</comment></comment><comment><USER33> I know this sounds like crazy pants, but I would actually use this in the real world if it were a NodeJS module.

Not for anything compute-intensive or serious, but for creating _very_ secure _very_ isolated VMs to run web apps or other services in an insecure environment. It could also be a great way to take a LAMP stack app and rapidly deploy it in certain cases.

Again not for high performance, but for... I can think of a few things personally and I'm sure others can too.

(Though honestly performance wouldn't be _that_ bad...)

Then add the ability to go back and forth between client and server, and virtual networking, and you might have a commercial "virtual DOS LAN with nodes in a browser as a service" startup. What for? Supporting legacy DOS crap: point of sale systems, etc. "Run your legacy DOS stuff in your browser with persistence in the cloud." You'd be surprised how much legacy DOS crap is out there.

<comment><AUTHOR> The project is made with both browser and nodejs support in mind. There are still some issues to resolve, but I will definitely release a node version this year.

<comment><USER34> its HTML5 and SSE?

<comment><USER34> Yes its HTML5. Saw header <!doctype html> ...

</comment></comment></comment></comment><comment><USER35> I want to write an emulator as a learning experience. Any tips how should I start?

<comment><USER36> I recently posted about emulating the NES with JavaScript.

[http://blog.alexanderdickson.com/javascript-nes-emulator- par...](http://blog.alexanderdickson.com/javascript-nes-emulator-part-1)

Part 2 will be posted when it's done. :)

If you want to get something done much quicker, have a go at emulating the Chip-8 VM.

I also have a post, but it's less hand-holding than the first.

[http://blog.alexanderdickson.com/javascript- chip-8-emulator](http://blog.alexanderdickson.com/javascript-chip-8-emulator)

Good luck!

<comment><USER37> I really like your tutorial. I been trying to learn assembly and your tutorial is really helping me put the big picture together. I hope you continue to work on making it better.

<comment><USER36> I have a heap on my plate right now but will hope to do part 2 before the end of the year. Glad you enjoyed it.

</comment></comment></comment></comment><comment> s-macke g3: Probably you have seen my emulator. [http://s-macke.github.io/jor1k/](http://s-macke.github.io/jor1k/) It does more or less the same, but emulates a different CPU.

Your emulator is impressive and especially fast. I think it took a long time for you to optimize it. I tried to start TinyCore, but it stops after decompressing the kernel. So still some work to do ;)

<comment> s-macke I saw the source and I have some tips for you: Avoid the UInt32 Arrays and the >>> operator. They could be transformed by the JIT compiler into doubles and slow everything down. This does not happen with the Int32 Arrays and the >> operator. There is a plug-in called JIT-Inspector which give you this information. Unfortunately it does no longer work in Firefox 24. Firefox 22 was the last working version. Additionally worker threads gave me an incredible speed boost in Firefox. The whole GUI stuff is then separated. Especially the costly canvas update.

<comment><AUTHOR> Hi s-macke. I've read the source code of your emulator before, good job.

I'm aware of the problem with big integers. I'll look into this more closely, thanks for your help.

Regarding workers: I need some restructuring to get this working. I'll also need to figure out the fastest way to exchange the canvas buffer between the worker and the browser.

<comment> s-macke I did the copying by a for loop copying In32 Arrays which is an acceptable solution. It slows down the worker thread by 1-2% by using 10fps and a screen size of 640x400x32. I think the reason why I didn't used more advanced ArrayBuffer functions to do this was the IE. Probably this has changed. The color transformations and so on can be done in the master GUI-thread.

</comment></comment></comment></comment><comment><USER38> Anyone know what format the floppies are expecting? It won't accept a DOS 6.22 install disk from MSDN, maybe it doesn't like DMF?

Also, swapping disks during the install might be an issue, I don't see a button...

<comment><AUTHOR> It expects one of the standard formats (720k, 1440k or 2880k). I'll add switching disks some time in the future.

<comment><USER39> It rejected my 360Kb images :-(

</comment></comment></comment><comment><USER40> I'm trying to run a custom basic x86 kernel (it was an assignment for my Computer Architecture course). But I can't get it to work =/. (This image works with bochs and in a virtual machine without problems). It seems that it can get to protected mode, enable interruptions, enable paging, but it fails loading the tasks =/

This is the error that I'm getting:

Unimplemented: load system segment descriptor, type = 9 Execution stopped

Here's a screenshot: [http://i.imgur.com/DdCt8jX.png](http://i.imgur.com/DdCt8jX.png)

</comment><comment><USER41> I tried the freedos image, says something about 400kips and then down to 0. Nothing ever shows. FF 17.0.9 ESR on 1386 freebsd 8.3

<comment><AUTHOR> I'm testing in Firefox 24. If you could tell me what the error console outputs, I'll try to fix it.

<comment><USER41> Thanks, it's under the error tab:

ReferenceError: requestAnimationFrame is not defined [http://copy.sh/v24/v86_all.js](http://copy.sh/v24/v86_all.js) Line: 239

<comment><USER42> Update to a newer Firefox. Your FF is dead old and doesnt support the new HTML5 methods... and @author, maybe add a polyfill?

<comment><USER43> FF 24 is the latest stable. FF's docs say they added this function in FF 4.0, which was several years ago. So it's a bit more complicated than you make it out to be.

EDIT: I thought FF24 wasn't working, turns out I was confused between my Linux desktop's and Mac laptop's FF versions. Sorry!

<comment><USER44> It's actually not all that complicated.

Firefox 4 added mozRequestAnimationFrame.

Firefox 23 added the unprefixed version.

It's documented in the browser compatibility table at [https://developer.mozilla.org/en- US/docs/Web/API/window.requ...](https://developer.mozilla.org/en- US/docs/Web/API/window.requestAnimationFrame) (note that "moz" next to the 4.0).

<comment><USER41> That must have done the trick, it starts now, thank you for your help.

</comment></comment></comment></comment></comment></comment></comment><comment><USER45> Man, shit like this makes me feel dumb. How does this work?

</comment><comment><USER46> Is there a non minified version of the javascript emulator file that is publicly available?

<comment><AUTHOR> I'll put it online soon. I haven't figured licensing out yet and need to write some technical notes

<comment><USER47> I would like you to consider GPLv3+. Thanks and congrats on amazing work!

<comment><USER48> In a case like this, the more important licensing question is that of the x86 instruction set; I do not know what the strict licensing situation would be with that—it's quite possible (probable, actually) that this is technically illegal.

For the _software_ part, why would you advocate GPLv3+ over permissive licenses like MIT/BSD/Apache?

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

I have one problem with it though, it doesn't seem to support my keyboard. For example when I try "*", it writes "-".

I'm using a Turkish Q keyboard and Chromium on OS X Mavericks GM.

<comment><AUTHOR> It should be the US keyboard layout, because that's what the operating systems in the emulator use.

<comment><USER17> I know keyboard codes in web browsers are a nightmare, but, afaik it is possible to get the intended ascii/unicode character code value of the key, so the emulator could translate that to the US keyboard equivalent to fix this issue.

</comment></comment></comment><comment><USER50> I got a kernel panic trying to boot tinycore linux:

Decompressing Linux... Parsing ELF... done. Booting the kernel. init[1]: segfault at b8e8e089 ip 08071929 sp bfb81b08 error 4 in busybox[8048000 +7c000] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

atkbd serio0: Spurious ACK on isa0060/serio0. Some program might be trying to ac cess hardware directly.

<comment><AUTHOR> Both bugs are fixed now.

</comment></comment><comment><USER51> This is beyond awesome! I'd love to read about your thought process while writing it, I guess a lot of people (including myself) would learn a lot from it. How long did it take to write?

<comment><AUTHOR> I got Freedos working about 2 years ago, but then stopped working on it. I picked it up again earlier this year. Approximately 3 months of full time work.

I'm considering writing some articles, just need to find some free time.

</comment></comment><comment> iso-8859-1 Here's a list of virtual machines in JavaScript: [https://gist.github.com/ysangkok/5606032](https://gist.github.com/ysangkok/5606032)

</comment><comment><USER52> When I first saw DOOM running on a bog-standard 386, I declared it to be utter nonsense. I'm no fool! I know what's possible and what's impossible, and that was clearly the latter. Sure, I knew it wasn't impossible, and in fact was true and real and a testament to the brilliance of Carmack et al, but it was still nonsense. Brilliant, astonishing nonsense.

I declare your x86 emulator similar nonsense, for all the same reasons. I take my hat off to you. Well done indeed!

<comment><USER52> My gods. It runs on my phone. In a web browser. Now, if only I knew how to make the onscreen keyboard pop up...

<comment><USER52> Hmmm... could you add a simple edit field, <input type="text">, that sent anything typed in it directly to the emulated console? That would make it work on a phone browser.

</comment></comment></comment><comment><USER53> This is quite amazing. Could someone post a blog post on the details behind how this works. I am not a JavaScrip programer, and this looks like black magic to me at the moment.

</comment><comment><USER54> This is incredible! At this point, it's definitely JS magic, because I'm struggling to fathom how this even exists.

</comment><comment><USER34> Very interesting. Great job!

No xhr queries detected in firebug and firefox console. Its is done without AJAX? How its working? Thanks.

<comment><USER34> wireshark says like "encrypted allert"

saw https packets

</comment></comment><comment><USER55> I've been waiting ages for this ever since I saw jslinux. This is freaking brilliant.

Looking at the source its been minified. How big is it before that? Are you planning on going open source? Was kind of blown away to see the single js file do all this. Would love to see the method's names to understand how it works

</comment><comment><USER56> Cool, I tried the linux gui OS and games worked.

sudoku and snake worked really well, but pong seemed to graphically expensive

</comment><comment><USER57> That's awesome, I quit! :)

</comment><comment><USER58> waiting for docker.js

</comment><comment><USER11> Has anyone had success running this on an iOS device? There are hints of it working on my iPad mini under Chrome, but with Safari it gives a "Unimplemented: #GP handler".

</comment><comment><USER59> Could you give some tips or links on how to go about emulating an architecture? I would like to know how to go about emulating an architecture much less complicated like PIC.

</comment><comment><USER60> Very cool!

Btw, this is what I'm working on [http://cloud306.com](http://cloud306.com) It's kind of similar, but not really.

</comment><comment><USER61> Seems very like [http://bellard.org/jslinux/](http://bellard.org/jslinux/) from a while back.

</comment><comment><USER62> I know it is oversimplification, but in essence, isn't writing an emulator just mundane following and reading specs? a lot of specs...

<comment><USER63> Yes, following the specs will give you a correct emulator.

The trick is in writing a fast and accurate one.

</comment></comment><comment><USER64> ...wow. Just, wow. You, my friend, are awesome.

</comment><comment><USER65> If you add networking support to this amazing project, I think some crazy development environment tools are waiting for us.

</comment><comment><USER66> This is a superb work! Beyond my imagination.

</comment><comment><USER67> I can't sleep over the awesomeness of your emulator. I love you and happy birthday <3

</comment><comment><USER68> I can just imagine the posts in a few years: "Look at my JavaScript GPU emulator!"

</comment><comment><USER69> The FreeDOS feels only half the speed of a TRS-80

This is jaw dropping. Imagine next generation javascript.

</comment><comment><USER70> Love it and would like to learn more. Are there any docs you could make available ?

</comment><comment><USER71> What else is there to say? Swung for downtown and knocked it into the ocean.

</comment><comment><USER72> Wow, very impressive! What are your plans for this? Any plans to open source?

<comment><AUTHOR> It will be open-source. I don't know how to deal with licensing yet.

<comment><USER73> 1\. Pick a license. You'll probably want something compatible with Qemu (GPL2+).

2\. Ship a COPYING file, add a header to your files: [https://github.com/osterman/copyright- header](https://github.com/osterman/copyright-header)

</comment></comment></comment><comment><USER74> Dude, this is Grade-A stuff.

</comment><comment><USER75> Cool project. Can you elaborate on the difference between this and JSLinux?

</comment><comment><USER76> Very, very awesome. Kudos!

</comment><comment><USER77> I can't believe this

</comment><comment><USER78> Doesn't quite exactly work on a non QWERTY keyboard : (

Still awesome, though!

</comment><comment><USER79> The amazing thing is it works (slowly) on my Nexus 4. Great work!

</comment><comment><USER80> A program listing as screensaver (KolibriOS). Now, that is cool.

</comment><comment><USER81> how does it work?

<comment><USER82> Yeah! Especially X - that's a pretty amazing X implementation!

<comment><USER83> It's not an X implementation, it's VESA emulation (disclaimer: this is a guess).

<comment><AUTHOR> Good guess, that's correct

</comment></comment></comment></comment><comment><USER84> You should un-minify and open-source this.

</comment><comment><USER85> I really want to make this run Node...

</comment><comment><USER86> no network interfaces :( boo. rm -rf or halt -f are fun.

this is great work. would love to see source un-minified.

<comment><AUTHOR> Networking is on the todo list. I couldn't host the traffic, though.

<comment><USER87> i suppose you could try adding something to do the networking part via webrtc as the channel?

<comment><USER73> Nothing in the web platform lets you use raw (or TCP/UDP/etc) sockets. At most you could do VPN-style networking and use a bridge to talk to the rest of the internet; that bridge needs someone to host it.

<comment><USER87> damn. at least i found [http://www.w3.org/TR/webrtc/#peer-to-peer-data- api](http://www.w3.org/TR/webrtc/#peer-to-peer-data-api) which looks like its a standard to allow for peer to peer data transfer.

</comment></comment></comment></comment></comment><comment><USER88> I'm totally impressed.

</comment><comment><USER89> Very cool! Great job!

</comment><comment><USER34> now waiting release for support lxc containers :)

</comment><comment><USER90> wow

</comment><comment><USER32> github link?

</comment><comment> _-_-_- @g3 this is super-mega awesome. 3 questions:

1\. I know it is already available via the page, but would you please open- source it so others could contribute?

2\. Thought I appreciate the apps being shown in the canvas in the resolution they are supposed to use, a full-screen option would be incredible. That way I could play space invaders the way it was meant to be played, in FreeDOS, in a JS emulator, in Firefox, on a mac. (That's just so wrong, it's right.)

3\. Is that your real hair? (Sorry, just had to throw in a Real Genius quote.)

<comment><AUTHOR> Fullscreen is there and yes, it will be open source.

</comment></comment><comment><USER91> this is beyond cool... logs off to think in some startup with this :)</comment>


Today is a Fibonacci day: 5th day of 8th month of 13th year of 21st century - <AUTHOR>

Today is a Fibonacci day: 5th day of 8th month of 13th year of 21st century!
If you are 34 years old with four kids (twin 1 yo, 2yo, 3yo and another baby comming) then congrats!!! You're the Fibonacci master!
I don't claim credit for this. A friend at work noticed it, just thought about sharing this wonderful curiosity. <comment><USER2> The crucial moment was :

the 0th microsecond of the first millisecond of the first second of the second minute of the third hour of the ...

</comment><comment><USER3> Today is my first day as 34 years old...!

</comment><comment><USER4> Can somebody overlay this on a stock chart and tell me what to buy.

</comment><comment><USER5> this was news at 1:23 AM

<comment><USER6> make that 11:23

</comment></comment><comment><USER7> Time to drink 36 beers?</comment>


Gary Starkweather, inventor of the laser printer, dies at 81 - <AUTHOR> https://www.nytimes.com/2020/01/15/technology/gary-starkweather-dead.html <comment><AUTHOR> [https://www.nytimes.com/2020/01/15/technology/gary- starkweat...](https://www.nytimes.com/2020/01/15/technology/gary-starkweather- dead.html)

</comment><comment><USER2> Big discussion a few days ago: [https://news.ycombinator.com/item?id=21997642](https://news.ycombinator.com/item?id=21997642)</comment>


Amazon to Launch Delivery Service That Would Vie with FedEx, UPS - <AUTHOR> https://www.wsj.com/articles/amazon-to-launch-delivery-service-that-would-vie-with-fedex-ups-1518175920?mod=breakingnews <comment><AUTHOR> specifically -> "The company is preparing to begin the offering in Los Angeles with its 'third-party merchants' and then roll it out more broadly"</comment>


If You Are So Smart, Why Aren't You an Entrepreneur? (Study) - <AUTHOR> http://ideas.repec.org/p/iza/izadps/dp3648.html

<comment><USER2> One sentence: I love programming. If as an entrepreneur (i.e., a company founder; being an employee at a startup -- which, by the way, is great -- is not the same) I spend the same percentage of my time programming as I do when working as a software engineer, I'm almost guaranteed to fail. Software needs to not only be built and tested: it needs to solve a problem actual users have, be marketed, sold and be supported. A polished commercial product can't always be built by a one man team, so I'll likely need to spend my time recruiting others and raising money to pay them.

That said, I'm not against entrepreneurship: it's a means to an end. If the best way to bring a particular product to the market is through going on my own (and I've felt that way at multiple points in my career), I'll do what it takes. However, I have no interest in entrepreneurship for money's, status' or its own sake.

</comment><comment><USER3> Maybe I'm not an entrepreneur -because- I am so smart.

See, I know what I want. And I really, really like my free time. Money doesn't matter nearly so much to me as it seems to for most people.

So the answer to that question is:

Because you don't know me.

<comment><AUTHOR> See, this study does not claim to know you. It claims statistical properties, correlations. By definition, this paints an incomplete, simplified picture.

The title is admittedly rather attention-grabby, but I did not make it up, I copied it from the study (and truncated it to fit in 80 characters).

</comment></comment><comment><USER4> I think eventually most people will be entrepreneurs. More and more things will be automated, decreasing the need for labor and making it easier to build value by combining the results.

For example, once robotic transportation becomes a reality, virtual assembly lines will be possible, giving entrepreneurs new tools and lower costs. Something people previously moving things from point A to B could take advantage of to create products and services at suddenly lower costs.

In the same way the Internet made it possible to distribute digital products world wide, low cost robotic transportation will make it cheap to combine physical things in interesting new ways.

All of this will make being an employee less rewarding and entrepreneurship even more appealing.

Instead of being a cog, more people will be buying cogs and building machines that satisfy even more human needs.

<comment><USER5> It seems great until you understand what economies of scale mean. A big group is likely to ultimately win over several groups collectively of same size.

However, people with knowledge that computers can't yet automate; will be pretty valuable (Try online self-diagnosis..).

<comment><USER6> Large organizations can suffer from diseconomy of scale. Office politics, slow response time, and duplication of effort are some of the problems that decrease the efficency of large corporations.

Which is to say, big doesn't alway win either.

<comment><USER7> Not always, but the rise of information technology allows big groups to cut the large company overhead in a way they never could in the past. Recent technologies favor large (sometimes stupendously large) groups over small ones, so if large corporations were viable at all in the '70s, they're much more viable now.

<comment><USER4> I think my point is that the cost of integrating the work of many into a small business are going to drop.

I believe (and am probably alone in this belief :-)) that there is still an inherent tax advantage to having everything in one entity that probably outweighs the disadvantages of coordinating a large group.

A group of 100 members trades internally without paying taxes on these transactions, but everything between independents has some tax effects for at least one side.

If this advantage were removed by some kind of tax reform, I suspect corporations would be smaller on average.

Getting back to the entrepreneur, even if there are many standard-izable things in a process, there are costs to outsourcing those things. Automation of physical logistics may greatly reduce these costs, making it possible to focus on just the unique value one can add and be rewarded.

<comment><USER7> Where I live you only pay sales taxes at the retail level - companies earlier on in the supply chain don't pay anything. I think that's pretty standard, actually, and for the reasons you discussed.

Or were you talking about some other kind of tax?

<comment><USER4> bingo. Companies that only trade with companies still pay income taxes on their profits, at least here in the US.

Not sure how big an effect this is or it has been studied at all.

I guess the costs of doing business with another entity should also be considered and maybe they are more significant. Just having to evaluate vendors, do POs, trying to collect, etc, are also costs avoided inhouse.

</comment></comment></comment></comment></comment></comment></comment><comment><USER8> The Lazear Jack Of All Trades paper cited is available at [http://faculty- gsb.stanford.edu/lazear/Personal/PDFs/Balance...](http://faculty- gsb.stanford.edu/lazear/Personal/PDFs/Balanced%20Skills%20and%20Entrepreneurship%20\(12-15-03\).pdf) for those following up references

</comment><comment><USER5> I've told other wannabe entrepreneurs that there's an awful lot of confirmation bias even in entrepreneur networks. I point out "Facebook makes billions of dollars! You could do it too"- articles but show "Small businesses are very likely to fail" for an counter example.

One should do critical thinking and always get relevant feedback because hey, what you're doing is for others. Not for yourself.

</comment><comment><USER9> The abstract didn't mention risk tolerance but I imagine that probably ranks high for entrepreneurial traits.

<comment><USER5> Critical thinking?

Can you build me the next facebook? I can't say what it is unless you sign this heavily-one-sided NDA.

</comment></comment><comment><USER10> Really, the highest earning "occupations" (or most prestigious) change as time goes: \- in the 1800s many smart people became authors or poets. \- in the 1950 many became physicists \- around 2000, many became entrepreneurs (or even venture capitalists)

Purely macro-economic reasons can dictate, that sometimes it is best to be an entrepreneur (say, in times of "under-investment"), sometimes a consultant and yet again, sometimes an employee (in times of "over-investment" in a sector)

<comment><USER11> Around 2000, highest earning occupations are by far in finance. Some entrepreneurs will make more, but when comparing 10 smart people in finance and 10 entrepreneurs, the average earnings aren't even close.

Prestigious depends very heavily on who you ask. I don't think you can come up with one answer even 50% of a population would agree on today.

<comment><USER12> Controlling for ability? Entrepreneurship has no barrier to entry the way finance does; there's no job application to say "You didn't go to an Ivy League college, so no job for you". So if you take ten _random_ entrepreneurs and compare them to 10 _smart people_ in finance, of course the average earnings won't be close.

I suspect that if you limited your applicant pool - say, "10 people who could get into YC" or "10 people who scored perfects on the SATs", the returns for entrepreneurship vs. finance would be much more even. I'm not sure entrepreneurs would come out ahead, but you're far more likely to catch the Herokus and Reddits and less likely to catch the folks who start a restaurant or a RoR CRUDscreen with no plan for monetization.

<comment><USER11> Sorry - that should have read "10 smart people in finance and 10 smart entrepreneurs". I was being careful to stay gender-impartial and left a crucial word out as a result...

I must admit being a bit out of my depth regarding U.S. finance hiring. In Canada, Ivy or equivalent is not required, though of course it's not going to hurt. As far as I can see, it's one of the better fields when it comes to recognizing and rewarding hard work and ability and motivation (provided a baseline social/IQ ability). The luck component is still pretty important, but nevertheless much less so than in entrepreneurship.

Unfortunately neither of us have data here. I can't go digging for mine right now, which is a bit of a shame as I would like to continue this discussion. Some other time?

</comment></comment></comment></comment><comment><USER13> Jumping straight to the conclusion...

"The same individual has a 30% higher return to general ability when active as an entrepreneur than when working as an employee. Nevertheless, the resulting earnings are higher as an entrepreneur than as an employee only for the upper echelon of the general ability distribution. This suggests that, if the choice for entrepreneurship hinges on expected earnings, only the smartest people become entrepreneurs. However, as indicated by the results in Table A2 of the Appendix, general ability is not a factor that affects people's occupational choice. In fact, there is some negative effect of general ability but it is not significant."

"These results suggest that, again if occupational choices are based on expected earnings differentials, people with high levels of math, technical and social abilities become entrepreneurs, whereas people with relatively high levels of clerical and language abilities become wage employees."

</comment><comment><USER14> what law states entrepreneurs are smart? Not to be a downer, but you've probably only heard of the successful ones. I'm sure there are plenty more who aren't successful. Smart is a consequential call, isn't it?

<comment><USER15> I've met dumb academically, but successful entrepreneur types to.

</comment></comment><comment><USER16> So there's only one kind of smart now?

One of the reasons I'm not an entrepeneur is that it involves dealing with people and money. I prefer dealing with code.

</comment><comment><USER17> If You Are So Smart, Why Aren't You an Engineer?

</comment><comment><USER18> Dear Einstein,</comment>


Selfie 2 Waifu - <AUTHOR> https://twitter.com/tkasasagi/status/1250427941567094786 <comment><AUTHOR> Twitter thread with examples:

[https://twitter.com/tkasasagi/status/1250427941567094786](https://twitter.com/tkasasagi/status/1250427941567094786)

<comment><USER2> As usual for this sort of thing, the results vary all the way from "impressive" to "absolutely horrific." I will say it seems to work quite well for many of the women in the thread.

<comment><USER3> It can work for men OK too.

Bumped into this about a week ago and after quite a few tries it looked pretty good.

Figured to toss a few dollars to the person who created this via the paypal link at their site. But then paypal told me: "Currently PayPal accounts in China are only able to send payments. This recipient is not eligible to receive funds."

Meh..

Emailed the author to inform them and they mused about using bitcoin, but that the threshold is too high for casual users.

Perhaps time to reconsider.

<comment><USER4> Sigh, one more reason why we really need a strong paypal competitor.

<comment><USER5> The problem there is not PayPal. It is the company formerly named GoPay, a Chinese company, that necessarily adheres to Chinese law.

</comment></comment></comment></comment></comment><comment><USER6> The submitted URL was [https://waifu.lofiu.com/index.html](https://waifu.lofiu.com/index.html). Since the thread is filling up with complaints about redirects, spam, and malware, we've changed the URL for now to the one mentioned here: [https://news.ycombinator.com/item?id=23032129](https://news.ycombinator.com/item?id=23032129). If the original site settles down, we can change it back.

</comment><comment><USER7> I get redirected to a spam website from this page.

[https://postimg.cc/svwnR4rK](https://postimg.cc/svwnR4rK)

<comment><USER8> So do I. Do you have any idea what it was meant to be?

<comment><USER9> You upload a picture of yourself, and it returns an anime-style version of that picture.

</comment></comment></comment><comment><USER10> _> The selfie dataset contains 46,836 selfie images annotated with 36 different attributes. We only use photos of females as training data and test data. The size of the training dataset is 3400,and that of the test dataset is 100, with the image size of 256 x 256. The size of the training dataset is 3400,and that of the test dataset is 100, with the image size of 256 x 256. For the anime dataset, we havefirstly retrieved 69,926 animation character images from Anime-Planet1. Among those images,27,023 face images are extracted by using an anime-face detector2._

These seem tiny, don't NNs need more samples to achieve decent quality?

<comment><USER11> The CycleGAN datasets [1] all have less than 10k images. The two largest have 10,345 images and 5,129 images, the rest (like the famous horses2zebras) have less than 3k.

[1] [https://github.com/junyanz/CycleGAN#datasets](https://github.com/junyanz/CycleGAN#datasets)

</comment></comment><comment><USER12> One day people will have computers embedded into their optic and auditory nerves.

They will quite literally see a fantasy world, with filters and augmented reality changing everything they perceive.

Deep fakes and 3D transforms will mean any horny people can see anyone they want to naked. Other people will be able to live in a complete Lord of the Rings fantasy world with dragons, magic, elves and orcs.

<comment><USER13> This concept is very entertaining. The PS3 game Haze and Black Mirror episode Men Against Fire have similar premises. Are there any other works of media exploring this?

<comment><USER14> One of the more famous ones was the classic game (now, series) Syndicate. The core premise was exactly as described above - a chip that would get wired into the brain to alter all sensory perception. The idea was that the world in the setting had become awful enough that this level of personal surrender was no longer outrageous - people were primarily just altering the perception to be "nicer".

The core plot of the game then assumed that once a critical percentage of people had these, it was a viable tool for criminal organizations to engage in massive campaigns of thought control and overthrow the governments of countries all over the world, essentially replacing states entirely.

<comment><USER15> Illustrated in the Syndicate Wars intro: [https://youtu.be/CrruSboN1bQ](https://youtu.be/CrruSboN1bQ)

</comment></comment></comment></comment><comment><USER16> Already clean some inappropiate ads, sorry for that. Should be clean to visit now.

<comment><USER17> I am still getting tons of spanmy popups when I click "take a selfie".

</comment></comment><comment><USER18> Attention! This is a dangerous site. Don't click it as it linked to numerous malware applications— at least 6 viruses there. For public interest.

</comment><comment><USER19> The Github page has a lot more information: [https://github.com/taki0112/UGATIT](https://github.com/taki0112/UGATIT)

Might be worth changing the link to this.

<comment><USER20> So, as someone with literally no experience with using this type of software, how do I go about self-hosting this? What are the hardware requirements?

<comment><USER21> The following instructions are for Linux or macOS. It may work on Windows too, but I'm not very experienced with Windows. No special hardware is required (you can run it on a CPU; no GPU needed).

Install pyenv[0] and pyenv-virtualenv[1]. Clone the repo and set up an environment:

      git clone https://github.com/taki0112/UGATIT
      cd UGATIT
      pyenv install 3.6.10  # [2]
      pyenv virtualenv 3.6.10 UGATIT
      pyenv local UGATIT
      pyenv activate
      pip install opencv-python==126.96.36.199 tensorflow==1.14.0

Download the pretrained weights from [https://github.com/taki0112/UGATIT/issues/50#issuecomment-53...](https://github.com/taki0112/UGATIT/issues/50#issuecomment-531489641). Extract them:

      tar xf ugatit100.tar.xz
      mkdir checkpoint
      mv UGATIT_selfie2anime* checkpoint
      mkdir -p dataset/selfie2anime/{train,test}{A,B}

Crop your images in a 1:1 aspect ratio so that they contain only the head. Place them in the dataset/selfie2anime/testA/ directory. Run the program:

      python main.py --dataset selfie2anime --phase test

Open results/*/index.html in your browser to see the results.

[0] [https://github.com/pyenv/pyenv#installation](https://github.com/pyenv/pyenv#installation)

[1] [https://github.com/pyenv/pyenv- virtualenv#installation](https://github.com/pyenv/pyenv- virtualenv#installation)

[2] Other versions may work, but this is the version mentioned in [https://github.com/taki0112/UGATIT#requirements](https://github.com/taki0112/UGATIT#requirements)

<comment><USER20> Thank you so much! I'll give this a crack on windows and see how it turns out.

<comment><USER20> I got it working via WSL on windows. Thanks!

</comment></comment></comment></comment></comment><comment><USER22> I would be very careful with sending data here as the website has no Privacy Policy. We don't know how this data is being used.

This website however, present a Privacy Policy: [https://selfie2anime.com/](https://selfie2anime.com/)

I am not promoting one site or another. I did not read the PP of the selfie2anime.com either.

You can check the other implementations here (currently only two):

[https://github.com/taki0112/UGATIT#web- page](https://github.com/taki0112/UGATIT#web-page)

<comment><USER23> > We don't know how this data is being used

what can possibly go wrong ? or just paranoid ?

<comment><USER24> Hmm, I just tried this with a few pictures, including one of mine. I forgot about all the "your selfies are being data-mined by the bad guys!" stories.

Ever heard of browser fingerprinting? If this site is doing it, now it has my IP, my browser fingerprint, and my face (as well as some friends' faces...). Search for my face on Facebook and they have my name too. Sell to marketer.

<comment><USER25> > Search for my face on Facebook and they have my name too. Sell to marketer.

Spoiler: Clearview already did this. And possibly others we haven't yet heard of because they've been smart.

</comment></comment></comment></comment><comment><USER26> Every photo I upload keeps getting rotated the wrong way. Oh well.

<comment><USER27> If you're on your phone, take a screenshot of the photo to "bake" the rotation in

<comment><USER28> This is quite a useful tip. A lot of things can't handle the rotation metadata.

</comment></comment></comment><comment><USER29> The results: I wasn't impressed with the results, it seemed like I could have done better using some OpenCV and first principle algorithms. The examples they give are excellent, but when trying them they are awful.

The viruses: I didn't see all these viruses people were talking about, the software worked "as intended" for me without the redirects. There was no advertising on the page either... I run with uBlock Origin in Chromium.

The dataset: Where do these images come from? These seem like the sorts of pictures that might be uploaded to some older social media website, like Bebo or something.

2 cents: Personally I would like to try and do some work with a dataset that has a 1:1 mapping of person to character, but that would require artists and quite a bit of money. I was thinking that you could build out such a database for free by randomly matching anime characters and real pictures together and have a human rate closeness - then train a network based on these ratings.

<comment><USER25> > it seemed like I could have done better using some OpenCV and first > principle algorithms

I am happy to volunteer a whole bunch of images (of me, sadly) as a test when you get this up and running.

</comment></comment><comment><USER9> Mine looks really good.

One wonders if sites like this exist to link faces to IP addresses, though. Get someone to upload a selfie from their computer, then you can add it to your database. Share on Facebook and Twitter, and they know your socials. Next time you walk into a store (post-mask era anyway), they find you in the database, and can see if you've visited their website or not, who your friends are, what sort of things you're interested in, etc.

I'm almost surprised that this isn't more common, now that I think about it.

Edit to add: I had to flag this link. The site is now redirecting to malware. I guess people did in fact want that database!

<comment><USER30> They link to their GitHub project. I hope to try it out locally this weekend.

<comment><USER31> I see the taki0112/UGATIT github project that it's based on but I don't see the project itself linked anywhere. I could easily be missing it though.

</comment></comment></comment><comment><USER32> I couldn't try because it has some of the most aggressive ads i've ever seen. After I upload a pic it says my phone needs cleaning and sends me to a cleaning app on the play store. No time to check the results.

</comment><comment><USER33> Somewhat related someone made this anime character generator I think it's pretty impressive make.girls.moe

Can be a time sink as you keep pressing generate over and over.

<comment><USER34> thiswaifudoesntexist is better me thinks

<comment><USER33> oh that's interesting and it produces a little story.

I don't know in the back of my mind if I ever really get into that personal assistant thing and want a wrapper/face around it, this would be interesting. Sadly many of the voices are bad... but there are those services you can sample a voice and get a voice to use for TTS, that could be something. Then licensing issues but yeah and latency from API trips

</comment></comment></comment><comment><USER35> My waifu has a beard.

<comment><USER36> My waifu merged my moustache with the shadow under my nose. That part is horrible; the rest is OK?

I'm tempted to edit my photo some, then resubmit it to see if it turns out better. It looks like it could be quite amusing.

</comment></comment><comment><USER37> Would love to get a chance to actually see the result, each time I scroll down to it on mobile I'm sent to a disgusting chain of ad redirects.

</comment><comment><USER38> On iOS (FF or Safari) this site is a spammy nightmare.

</comment><comment><USER39> Put some donation links (PayPal/bitcoin/patreon), try using teir 1 ad companies like Google AdSense and if they don't accept you, try something like native ads (outbrain)

I can understand how such GPU intensive website can be difficult to support for a creator.

</comment><comment><USER18> Attention! This is a malware page— don't click it. It directs to host of viruses, to me at least 6.

</comment><comment><USER40> I gave both of them a whirl[0]. The second one is OK?

[0]: [https://blog.ryjones.org/2020/04/30/ML](https://blog.ryjones.org/2020/04/30/ML)

</comment><comment><USER41> There seems to be a lot of flattening and smoothing going on, not unlike the art style of anime characters with no discernible nose.

</comment><comment><USER42> A few casual observations:

* Looks like the expression is almost always the same.

* The backgrounds seem remarkably well replicated in many of these.

<comment><USER43> did you see the one with gandhi in the background? impressive.

<comment><USER42> I'm actually inclined to say that's less impressive because the model should be good at faces. On the other hand, the model doesn't seem to work when multiple people are in the picture. I'm wondering if somehow the gandhi face was recognized as not being a person in the picture, and was animeitized using a similar but different logic.

<comment><USER43> a good point.

</comment></comment></comment></comment><comment><USER44> It gave me scary results when I uploaded a few selfies that were black & white (grayscale)

</comment><comment><USER45> I tried a few dozen selfies of myself with no luck. Maybe it's the beard? :(

</comment><comment><USER46> results can be impressive if you look somewhat Asian

</comment><comment><USER47> what's with the waifu thing, why not just call this Selfie2Anime/Manga or whatever.

<comment><USER48> It's an inside joke of the (western) anime community - cute anime girls == "waifus", as in you'd like to marry her.

[https://www.urbandictionary.com/define.php?term=Waifu](https://www.urbandictionary.com/define.php?term=Waifu)

I'm guessing the author wanted this to be aimed at people who get the joke and/or say that the project shouldn't be taken too seriously by using a meme in the title.

</comment></comment><comment><USER49> 522 in Southern California

</comment><comment><USER50> 429 too many weebs

</comment><comment><USER51> Proves "2d" is better than "3d".

</comment><comment><USER52> My waifu was made by a dirty hippie on LSD.</comment>


RethinkDB: why we failed - <AUTHOR> http://www.defstartup.org/2017/01/18/why-rethinkdb-failed.html <comment><USER2> Previous discussion: [https://news.ycombinator.com/item?id=13421608](https://news.ycombinator.com/item?id=13421608)

</comment><comment><USER3> I really wonder how much of it was timing. Startups with very little to lose aren't going to pay for support contracts on open source software. That takes established companies with SLAs, or quantified dollars lost per minute of downtime, or companies that just can't hire fast enough and too much work to do to bother with investigating DB issues.

But these companies that would pay aren't going to roll out new products on a database only a few folks have heard of.

Let's suppose in an alternate universe Slava had made Rethink his hobby project and it had taken ten years to get to where it is today. Even then, companies that had taken a gamble on it may _still_ be a few years out from where the survivors can (and it would make economic sense to) buy a support contract, but their runway would have potentially carried them into the sweet spot of having early adopters become paying customers.

</comment><comment><USER4> _> Many people have very strong feelings about the developer tools market. Engineers love building developer tools, so they badly want developer tools companies to thrive._

 _> I am hesitant to dismiss the market entirely – partly because I don't want to generalize from a single experience, partly because I don't like saying "it cannot be done", and partly because there are quite a few exceptions. GitHub, MongoDB, and Docker have built formidable companies. GitLab and Unity seem to be doing well._

I think the mentioned examples are less developer _tools_ companies than developer _services_ companies.

</comment><comment><USER5> I get that they are saying the cloud offering is hard, but if they didn't have that, what was their business model? Were they relying on support and consulting fees? Consulting is hard to scale.

Cloud offering with build-in redundancy (herokudb, RDS, Redis Cloud) is what most app stakeholders are looking for. We want to try RethinkDb but we don't want to deal with servers.

If rethinkdb is good, i hope someone can resurrect this as a cloud service.

<comment><USER6> AWS would be kind of ironic. ;)

</comment></comment><comment><USER7> Back in 1996, having just joined a developer tools company, I recall my new CEO at our first meeting saying "The developer tools market is such a shitty, shitty market"</comment>


Two Screens - <AUTHOR> https://avc.com/2020/06/two-screens/ <comment><USER2> Disagree. Just got rid of my second screen after neck aches and headaches.

I'll take one decent sized (27" for me) 4K screen over two. Completely solved all problems.

Productivity? I can only focus on one thing at a time. Managing windows and which screens they are on is an overhead I don't need to deal with.

<comment><USER3> For me, the second screen isn't there for me to focus on. It's there to keep the focus on the main screen. I keep my less-used programs (spotify, discord, etc) on the secondary display so I don't have to constantly alt-tab on my main display.

<comment><USER4> What an electronic and energy waste only to avoid doing some keystrokes!

<comment><USER5> I have a work notebook, so the second screen in my setup is the notebook screen. This screen is there anyway, so there is no electronic waste. As for the energy, the notebook overall consumes about 10 W during normal use. My estimate for the screen's power usage is about half of that, so maybe 4-6 W. To put that into perspective, my body's baseline energy usage is 90 W.

<comment><USER4> I do also have two screens: one laptop for work and one PC for personal usage (my company does not allow me to use the laptop for personal usage). Individually we can all find "mitigating factors" but collectively we failed finding the right balance between comfort and sustainability.

The multi-screen trend is now pursuing its mainstreamification to every offices and home desktops. But at the same time Earth is sending us warnings: we need to slow down. Given the state of our knowledge on that matter, I am surprised that the general consensus on YN is not to have less screens and reserve the resources to better usage.

</comment></comment></comment></comment></comment><comment><USER6> Two screens seems like a no-brainer for what I consider the typical HN reader as I think they are likely a software developer.

Especially if the one screen is a laptop screen.

I find myself much more productive having a standard keyboard, mouse, and large monitors. Then when I have to attempt to do my work using just a laptop with no accessories.

I am impressed with the people who are highly productive with a tiny laptop screen. I have seen them in action. Unfortunately that isn't me :(

<comment><USER7> I haven't used two screens in years! A 4k single display is great for me. I can get two windows side-by-side and that is the most I ever need. If I need more than 2 windows I feel my workflow needs help.

<comment><USER8> I recently went back to the world of two screens, laptop and external display, after being a 4 screen freak. It's my way of forcing myself to stop lying about being a multitasker and allow myself to focus on one thing, get it done or at least to a state where I can safely walk away from it, and move to the next without excess cognitive load.

Found that the more screens I accumulated the more work I tried doing concurrently, and, well:

Fuck _that_ noise.

MUCH more productive, and feel much less jittery about workload by allowing myself to focus on the _cadence_ of work instead of the _volume_ of work. Boss is happy with it too ;)

<comment><USER9> I don't know if it's Anne Robinson's legacy, but what on earth does the winky face add to an otherwise serious and reasonable comment?

Are you implying the workload is some form of sexually satisfying your boss, that you're keeping them happy nudge nudge wink wink say no more?

Are you implying sarcasm, that your boss is actually NOT happy with your improved mood and improved productivity?

Are you implying that the boss is "happy", nudge nudge wink wink, so now _you 're_ the one getting extra favours, if you know what I mean?

Are you implying you're not more productive, you're doing less, and you're putting on a sham act which your boss is falling for?

I'm trying to imagine someone actually saying in-person "I rethought my workflow and now I'm calmer and more productive. And my boss is happy with it too". and then winking at me. And me not feeling skeeved out by it.

<comment><USER10> Who hurt you?

<comment><USER9> Nobody ;)

and if that's not the most frustrating reply I could put to that, because of the winky face, I don't know what is. btw, after reading all of the entire comment ... wink wink, not serious, just kidding, gotcha!

</comment></comment></comment></comment></comment></comment><comment><USER11> Just to be clear, he decided he needed a second screen after he decided he needed a second home, and a home office with a separate room for a video- conference app.

He may be right that the second screen helps. But maybe it's worth saying it in a way that isn't tied in with a level of wealth that signals that his problems are often unlike most people's problems.

<comment><USER12> You can get a decent monitor for $100 nowadays.

</comment></comment><comment><USER13> I was thinking that the author was going to be arguing that anything more than 2 screens is a bad idea. (Because seriously, where the heck did my mouse go? I can't find it and it's somewhere on one of these 3 monitors in front of me).

I can't fathom being a professional in the tech world and _not_ having two monitors.

<comment><USER9> > where the heck did my mouse go?

Windows' mouse properties control panel has " _Display pointer trails_ " and " _Show location of pointer when I press the Ctrl key_ " options to make the pomouse pointer more findable.

<comment><USER14> there's also the mac shake the mouse pointer to enlarge it momentarily feature.

<comment><USER15> It's quite smart, considering shaking the mouse is the first thing I do when I cannot find my mouse. And it becomes hilariously huge.

</comment></comment></comment></comment><comment><USER16> Primary 4k monitor center of desk; macbook on a stand to the side. Put the speaker video fullscreen on the macbook and now you are making eye contact when you are looking at them, and not when you're not.

</comment><comment><USER17> I've been sharing this tip (joining an online meeting using two devices / screens) ever since the beginning of WFH. I will join a meeting using my phone as the camera and have the UI set to display a grid of faces. I will join that same meeting using my PC and have the UI set to display whatever the presenter is projecting. This lets me minimize the parallax when I'm talking to someone and it lets me use my 43" monitor to see whatever it is that the presenter is projecting (often in some tiny font because ... we're all learning).

This works for both Zoom and Teams - I haven't tried other meeting solutions.

<comment><USER18> I'm doing something similar. I have a laptop for communications (mainly Zoom, but a bit of Cisco SeeMe as well) and an iMac for remoting into my work machine. Many times I put Zoom on full screen on the laptop, it's great. The screen dedicated to work is not very large (24in), can't wait for a new iMac to be released so I can upgrade. But for the time being, I can function.

<comment><USER17> The nice thing about a laptop is that it has a much bigger screen than my phone, but the tradeoff in the phone case is that I can't see the other people as clearly when I'm looking at a 4-box of people. The tradeoff in the laptop case is that (usually) laptops have a pretty crappy integrated webcam.

Another solution that I'm going to experiment with sometime soon is to use my iPad Pro as the video conferencing device so that I can (hopefully - haven't tried yet) see a 9 box of people on the device. It's probably a step down in video quality for other folks looking at me, but that's OK :)

</comment></comment></comment><comment><USER19> I've gone the opposite way and invested in a lovely Ultrawide Dell for home work and it's a huge benefit.

Coupled with FancyZones from PowerToys ([https://github.com/microsoft/PowerToys](https://github.com/microsoft/PowerToys) ) it's even better.

You might think, well if you're just using FancyZones to split the screen up again doesn't that take you back to close to a two monitor setup, but the key is the flexible sizing. I have a main pane centrally for core focus and then I have really small side windows for scripts, upcoming reminders, and a bigger side section for calendar and chat, which are both handy to glance at (eg to confirm things during calls)

I honestly think it'll be a struggle to compete with "home me" when I go back to the office, as it's just so much better. A certain amount may be a placebo effect but I sense the effect all the same!

</comment><comment><USER20> Why just two? I have two 1080p 23's stacked on top of each other with a mount specifically for that.

The first screen is 27" away from my eyes with the top of the screen bezel being level with my eyes. This works great.

The second screen is the 23" above the first and is generally used in terminal sessions or when I'm presenting something in a meeting.

The screen on the right is portrait mode. It's only 20" or so, but that doesn't matter. Slack works SO WELL in portrait mode.

The 4th screen on the left is 22" and is 1680x1050. It works fine for email, stuff I need but not immediately.

My total investment in monitors? About $50. I do need two video cards though, but since it's for work, not gaming, that was cheap too.

The monitor on the right is no longer there, it was for my ham radio shack computer, which I now just teamviewer into.

[https://imgur.com/lJFITgX](https://imgur.com/lJFITgX)

</comment><comment><USER21> Time for a reminder...?

Maker's Schedule, Manager's Schedule [http://www.paulgraham.com/makersschedule.html](http://www.paulgraham.com/makersschedule.html)

As a maker (and permanent remote worker, even before COVID-19), I am constantly struggling to convince people to have fewer meetings, and having a second screen for the meetings I do have, isn't the answer: the answer is _fewer_ meetings!

I know this whole "remote-work" thing is somehow new to people, but, in a word: evolve!

I am so not into a second screen that I have embarked on using a cellular- capable tablet as my sole device, so that I can do work anywhere, anytime. The "home office" with multiple monitors is not the answer to remote-work, doing your job with simple tools, is. But, of course, this is just my opinion.

<comment><USER22> One does not disqualify the other. Over time, I managed to get my weekly calls from 10+ to 4. That's great.

At the same time, if I'd lose my second screen, I'd lose more productivity than I gained from all the won time. I think most dev related jobs benefit greatly from a 2nd monitor. I couldn't imagine working on a website, having an IDE open, browser dev tools etc. and constantly alt-tabbing between all of those.

<comment><USER21> I have done the command-tab, command-tilde, control-arrow (for workspaces) dance for years (and it is so ingrained in me, that sometimes a second monitor makes things worse). But my point was more in reference to Fred's notion that this "new normal" of remote meetings via video somehow requires a second screen. To that I say, if you are a manager, yes, sure thing! Otherwise, no.

</comment></comment></comment><comment><USER23> Im a big fan of using a single ~36" 4k display. The pixel pitch ends up being about the same as for a typical 1080p monitor, but it comfortably fills the whole field of view without bezels. Any larger and its uncomfortable to read the edges without moving.

</comment><comment><USER24> In other screen-related news, I recently ditched my LG 24" 4K display and replaced it with Sidecar and one of my iPads. What a change in perspective! While with the large external display, my MacBook's internal display felt like an irritating afterthought.

An iPad screen is much closer in size to the MacBook display, and I find I make better use of this more balanced setup than I did my very lopsided previous big monitor and small laptop display configuration. Less can be more.

NB: Sidecar sometimes flakes out on wakeup, so it's not a total win.

</comment><comment><USER25> I stopped using multiple monitors when I started using a keyboard-driven tiling window manager. At the time I had a 3-monitor setup in my office. I found that it was more efficient to switch applications by keyboard than to turn my head. I have used a single monitor ever since. At times I put 2 windows side-by-side, but mostly I display a single window at a time.

</comment><comment><USER26> I use a laptop and an iPad that way. Instead of being fixed I can go to a convenient corner, esp if my gf has a meeting at the same time.

Another trick that works well is to use my phone as the Zoom camera. There are a bunch of apps you can use (why? Quicktime can just connect to the phone) but I simply connect in multiple times.

</comment><comment><USER27> FYI Google Meet supports two screens as well.

<comment><USER28> Tell me more :-)

</comment></comment><comment><USER29> Well, the point is to _not_ spend too much time in video-meetings, so you can be fine with a laptop for work

<comment><USER30> A laptop is terrible ergonomically.

<comment><USER29> I work in any kind of position, but never on a chair/desk, I put my laptop on boxes and I move a few meters away during the day, depending on the sun. For me a laptop is perfect: movable, light, silent. I use only the touchpad, no more mouse

<comment><USER30> About thirty minutes on a laptop and my hands/arms/elbows start to hurt :/

</comment></comment></comment></comment><comment><USER31> Sorry, i don't understand. So you are attending meeting which require your focus and valuable time and input while still intend to do something else ?

When I'm on meeting, I'm on meeting.

Actually, like the couch setup from article a lot.

Is this new Slack hell ?

<comment><USER32> They're not exactly clear about it, but I think the use case they're getting at is that you can have one screen for videoconferencing and a second one for materials that are being presented. We had a setup like this at my office that I miss. If you're in a lot of meetings, it's nice to have a powerpoint slide or a screenshare in full screen, while still having the video streams up for questions and discussion.

<comment><USER31> I see. So you basically expanding the meeting area. Should be more immersing. Make sense. Will try for sure. Thanks

</comment></comment></comment><comment><USER33> Other than two screens (which I do agree is a great idea) pay attention to how you position those two screens and the ergonomics behind them.

</comment><comment><USER34> One Wave, One Fin. Two Eyes, Two Screens. Peace!

</comment><comment><USER35> Second screens are a productivity boost. But this article is a poorly- concealed submarine [1] for Zoom.

[1] [http://paulgraham.com/submarine.html](http://paulgraham.com/submarine.html)

<comment><USER36> Yeah, the one thing I took away from this timely endorsement of using two screens(?) is that Zoom has a special two-screen mode.</comment></comment>


Google's C++ Class - <AUTHOR> https://developers.google.com/edu/c++/ <comment><USER2> Does anyone have any recommendations for learning to write modern, idiomatic C++? I used C++ in college for data structures and algorithms, so I have some familiarity with the basics. But we were mostly restricted to using C++98, and I'm not sure what the best practices look like these days with the changes introduced in 11, 14, and 17.

<comment><USER3> Effective Modern C++ by Scott Meyers is a good book that I've been supplementing with google searches. It goes over the main new features in '11 and '14 you would want to know.

<comment><USER4> +1 for this book. Also, if your company can afford it, having Meyers or Sutter coming on site to give a day or two lecture to a group about Modern C++ is worth it. They both have great handout material, give great lectures/presentations and are very approachable with (even idiotic) questions.

(disclaimer: I am an unattributed - due to company policy - interviewee for Meyers Effective Modern C++)

edit: grammar

<comment><USER5> Scott retired in 2015; I don't know if Scott is still active in terms of lectures/presentations:

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

<comment><USER6> Jon Kalb has told on CppCast that Scott is doing a presentation at CppNow, but totally unrelated to C++ (presentation skills workshop).

[http://cppcast.com/2018/03/jon-kalb/](http://cppcast.com/2018/03/jon-kalb/)

</comment></comment></comment></comment></comment><comment><USER7> I really like the idea of google open sourcing stuff but it seems like they always do it in the worst way possible.. Maybe I'm looking at the wrong projects. For example WebRTC is buried in Chromium (so is QUIC iirc) and to build either of those things it's a lot of freaking work because you have to figure out Google's build system with the documentation doing its best to prevent you from figuring it out.

<comment><USER8> I don't think that's true in general. Google released some widely used open- source projects like Kubernetes, Tensorflow, Android, Go, Chromonium and Angular.

<comment><USER6> Android is one of the poster childs how bad Google documentation is scattered all over Stackoverflow, Google blogs, Medium articles, outdated entries in official documentation.

Then the multiple revisions of build tools and plugins, support library releases with multiple issues on release day, breakages on Android Studio in spite of several months in beta.

<comment><USER9> AOSP in particular has very little documentation. When I was learning it the only thing I could find was a draft of an O'Reilly book. That, or reading the source code for the build system.

</comment></comment></comment></comment><comment><USER10> Is there a list of all classes available under developers.google.com ? I could not find one from the front page. Edit: found it, [https://developers.google.com/products/#a](https://developers.google.com/products/#a)

</comment><comment><USER11> I was hoping this was a class in the object-oriented language sense, and that somehow you'd use this class to instantiate a C++ in your program. Oh well—one can always dream.

<comment><USER12> I was hoping it referred to a singular, monolithic C++ class in use by Google, to which any new C++ code must be added.

<comment><USER13> We've adopted the monoclass architecture at our startup after reading about how well it works at Google.

<comment><USER9> It's pretty convenient in the embedded world too because it let's us minimize the size of the global initializer table our compiler outputs.

</comment></comment></comment></comment><comment><USER14> Really cool that Google is open sourcing this (as well as some of their other classes, like the machine learning one).

Back in the day when I was learning to code, one had to trudge through a tome of esotericism after spending hours setting up your compiler. The snow was waist deep and uphill both ways. Seriously tho, this is great. My kids are now learning to code and the availability of great resources makes a huge difference.

</comment><comment><USER15> I'm surprised that they don't go too much into good practice and style; these are heavily enforced in Google's code-bases. I would expect to see things like references and smart pointers, raw pointers are typically avoided as much as possible to avoid all the fun problems that come along with them.

<comment><USER7> Sure but naked pointers and manually managing allocation and deallocation force you to learn about how memory works in C++! Abstracting that stuff away is great for safety, but maybe less great for learning fundamentals.

</comment></comment><comment><USER16> Looking at the Getting Started section... Is this really the best way to write text out to the console in C++, or is it just traditional?

        cout << "Hello World!" << endl;

It seems like something a bit simpler, readable and predictable would be better for beginners and/or experienced devs alike. I look at that and wonder where did cout come from? Is << a heredoc or some sort of pipe indirection, or am I bit-shifting? And is endl a keyword? Does it always follow cout? Is this like a Pascal endif? Oh, it's basically just a newline. What's wrong with just "\n"? I think C++ devs purposefully make their language as obtuse as possible.

Maybe NOT starting with streamio and operator overloading might be a more modern way to start teaching the language?

<comment><USER17> > Oh, it's basically just a newline. What's wrong with just "\n"?

Not all platforms use "\n" for a new line.

<comment><USER18> The std::stream will translate '\n' to what's required for the underlying platform, so it is a perfectly portable way to terminate a line.

What std::endl really does is flush the internal stream buffer if any.

</comment></comment></comment><comment><USER19> I'm surprised that in their unit tests category, they are using CPPUnit instead of Google Unit (gunit). Any ideas why?

</comment><comment><USER20> I guess Google is in favour of spaces over tabs by the look of that

<comment><USER21> Ugh that's it, I never cared before, but now I'm switching to DuckDuckGo.

<comment><USER22> Bing for me: they open brace on the same line as a control statement/function declaration.

Allman style forever! [1]

1\. [https://en.m.wikipedia.org/wiki/Indentation_style#Allman](https://en.m.wikipedia.org/wiki/Indentation_style#Allman)

</comment></comment></comment><comment><USER23> Please for god's sake, let this language die. There has been nothing this bad in the entire history of programming languages and now Google wants to impose more undefined behaviors on our professional lives. Anyone starting out with learning should go through [https://www.rust-lang.org](https://www.rust- lang.org) path and anyone who's wise enough to understand pros and cons of such language will automatically choose rustlang over them in 2018.

Even in comparison with C, it falls short. C was a beautifully designed language.

The features of the C language were added with purpose. They were intended to solve a real problem and solve that problem they did. Simple arithmetic with promotion. Automatic register allocation with a portable (between compilers) ABI. A simple-but-handy preprocessor. And so on. C is also a lean language: a single person can feasibly write a C compiler in a relatively short time (tinycc is a C99-compliant C compiler written in just 65kLOC of C!). C set out to achieve a clear goal and it achieved its goal. Thanks to the cleanness of C lots of quality compilers came on the market quickly and even decent OSS solutions were available early on.

In contrast, C++ never had a clear goal. The features of C++ were added almost at random. Stroustrup's original idea was essentially "C is cool and OOP is cool so let's bolt OOP onto C". Retrospectively, OOP was massively overhyped and is the wrong tool for the job for most of the people most of the time. Half of the GoF design patterns just emulate idioms from functional programming. Real OOP languages like Smalltalk and IO express many useful things that C++ cannot. The feature that C needed most was perhaps parametric polymorphism (aka generics in Java and C#, first seen in ML in the late 1970s) but instead of that C++ got templates that weren't designed to solve any particular problem but rather to kind of solve several completely unrelated problems (e.g. generics and metaprogramming). Someone actually discovered by accident that C++ templates are Turing complete and they wrote and published a program that computed prime numbers at compile time. Wow. A remarkable observation that led to decades of template abuse where people used templates to solve problems much better solved by other pre-existing solutions such Lisp macros and ML polymorphism. Worse, this abuse led to even more language features being piled on top, like template partial specialization.

The massive incidental complexity in C++ made it almost impossible to write a working compiler. For example, it remains extremely difficult to write a parser for the C++ language. The syntax also has horrible aspects like List<Set<int>> being interpreted as logical shift right. None of the original C++ compilers were reliable. During my PhD in 2000-2004 I was still stumbling upon dozens of bugs in C++ compilers from GNU, Intel and SGI. Only after two decades did we start to see solid C++ compilers (by which time C++ was in decline in industry due to Java and C#).

C++ is said to be fast but the reality is that C++ is essentially only fast when you write C-like code and even then it is only fast for certain kinds of programs. Due to the "you don't pay for what you don't use" attitude, C++ is generally inefficient. RAII injects lots of unnecessary function calls at the end of scope, sometimes even expensive virtual calls. These calls often require data that would otherwise be dead so the data are kept alive, increasing register pressure and spilling and decreasing performance. The C++ exception mechanism is very inefficient (~6x slower than OCaml) because it unwinds the stack frame by frame calling destructors rather than long jumping. Allocation with new and delete is slow compared to a modern garbage collector so people are encouraged to use STL collections but these pre-allocate huge blocks of memory in comparison so you've lost the memory-efficiency of C and then you are advised to write your own STL allocator which is no better than using C in the first place. One of the main long-standing advantages of C over modern languages is the unpredictable latency incurred by garbage collectors. C++ offers the worst of both worlds by not having a garbage collector (making it impossible to leverage useful concepts like purely functional data structures properly) but it encourages all destructors to avalanche so you get unbounded pause times (worse than any production GC). Although templates are abused for metaprogramming they are very poor at it and C++ has no real support for metaprogramming. For example, you cannot write an efficient portable regular expression library in C++ because there is no way to do run- time code generation and compilation as you can in Java, C# and languages dating back to Lisp (1960). So while Java and C# have had regular expressions in their standard libraries for well over 10 years, C++ only just got them and they are slow.

C++ is so complicated that even world experts make rookie mistakes with it. Herb Sutter works for Microsoft and sits on the C++ standards committee where he influences the future of C++. In a lecture he gave his favorite 10-line C++ program, a thread-safe object cache. Someone pointed out that it leaks memory.

My personal feeling is that the new Rust programming language is what C++ should have been. It has useful known features like generics, discriminated unions and pattern matching and useful new features like memory safety without garbage collection.

<comment><USER6> There is nothing beautiful about C other that having had the luck UNIX was available for free and thus adopted by startups like Sun and SGI.

"Oh, it was quite a while ago. I kind of stopped when C came out. That was a big blow. We were making so much good progress on optimizations and transformations. We were getting rid of just one nice problem after another. When C came out, at one of the SIGPLAN compiler conferences, there was a debate between Steve Johnson from Bell Labs, who was supporting C, and one of our people, Bill Harrison, who was working on a project that I had at that time supporting automatic optimization...The nubbin of the debate was Steve's defense of not having to build optimizers anymore because the programmer would take care of it. That it was really a programmer's issue....

Seibel: Do you think C is a reasonable language if they had restricted its use to operating-system kernels?

Allen: Oh, yeah. That would have been fine. And, in fact, you need to have something like that, something where experts can really fine-tune without big bottlenecks because those are key problems to solve. By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. This is one of the reasons compilers are ... basically not taught much anymore in the colleges and universities."

Fran Allen interview, Excerpted from: Peter Seibel. Coders at Work: Reflections on the Craft of Programming

C++ has a clear goal, as Bjarne puts so eloquently, never having to write C again.

<comment><USER24> Donald Knuth likes it: _" I think C has a lot of features that are very important. The way C handles pointers, for example, was a brilliant innovation; it solved a lot of problems that we had before in data structuring and made the programs look good afterwards. C isn't the perfect language, no language is, but I think it has a lot of virtues, and you can avoid the parts you don't like."_ [http://tex.loria.fr/litte/knuth- interview](http://tex.loria.fr/litte/knuth-interview) [1993]

Counterpoints:

Of course, you can only avoid the parts you don't like if you're a lone academic working on a new program by yourself from scratch with no third party integration or legacy code.

Knuth's own languages generally make the eyes bleed.

There is no accounting for taste.

</comment></comment></comment><comment><USER25> Chapter 1: Use Golang

<comment><USER26> Chapter 32: Please (GC pauses the world) rewrite (GC pauses the world) it (GC pauses the world) with (GC pauses the world) C++.

</comment></comment><comment><USER27> I used to touch some cc files at Google. I must say they are really horrible. Basically everything relies on bizarre internal frameworks glued together with opaque macros. Some of the least legible c++ code bases I've worked on.

<comment><USER14> Do you have any insights as to how those internal frameworks developed?

One would think that with the ease and ubiquity of options these days, the homegrown framework (that is often proprietary to the company D-:) over open standards would be disappearing, but I still encounter it often, even in newer products.

<comment><USER28> The commenter is welcome to his opinion but I think it's pretty wrong. Google has a few internal frameworks for things but mostly they evolved before the standard library had reasonable standardized equivalents and in cases where the standard has grown to encompass these things there's been orderly migration towards using the standard equivalent where it makes sense. It's a quite well maintained codebase with good sensible standards and review process as well as teams of people whose sole job it is to go through to analyze and migrate whole swathes of the code base for improvement.

Plus alot of Google's internal stuff is being open sourced: [https://opensource.googleblog.com/2017/09/introducing- abseil...](https://opensource.googleblog.com/2017/09/introducing-abseil-new- common-libraries.html?m=1)

You can waltz through that code as well as other open sourced things and judge for yourself on the quality.</comment></comment></comment>